qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Moravec (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (QPID-3500) qpidd --help should ignore other parameters (incl. config file)
Date Thu, 22 Sep 2011 12:19:25 GMT

     [ https://issues.apache.org/jira/browse/QPID-3500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pavel Moravec updated QPID-3500:
--------------------------------

    Attachment: help_show.patch

Patch proposal that fixes all
except one scenarios.

The patch does _not_ fix this particular scenario:
qpidd --help --log-file non-readable_file   (where /etc/qpidd.conf does not
contain log-file option)

It is questionable if the above makes sense to fix. But if so, then configuring
Logger in the code snip below must be conditional based on help/version option
presence:

(qpidd.cpp):
        try {
            bootOptions.parse (argc, argv, bootOptions.common.config, true);
        qpid::log::Logger::instance().configure(bootOptions.log);
        } catch (const std::exception& e) {
            // Couldn't configure logging so write the message direct to
stderr.
            cerr << "Unexpected error: " << e.what() << endl;
            return 1;
        }

> qpidd --help should ignore other parameters (incl. config file)
> ---------------------------------------------------------------
>
>                 Key: QPID-3500
>                 URL: https://issues.apache.org/jira/browse/QPID-3500
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: 0.12
>            Reporter: Pavel Moravec
>            Priority: Trivial
>              Labels: patch
>         Attachments: help_show.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> Steps to Reproduce:
> 1. Add "log-to-file=/tmp/qpidd.log" to /etc/qpidd.conf
> 2. Login as root user, touch /tmp/qpidd.log && chmod 600 /tmp/qpidd.log
> 3. su to a non-root user, run "/usr/sbin/qpidd --help"
> Further similar reproductions:
> qpidd --help --config not_readable_file
> qpidd --help --log-file not_readable_file   (where /etc/qpidd.conf does not
> contain log-file option)
> qpidd --help  (when config file is not readable)
> qpidd --help  (when config file contains log-file to non-readable file)
> Plus all the above for --version option (instead of --help).
> Patch for all the above (except one questionable case) will be uploaded.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message