From: Bart Van Assche <bvanassche@acm.org>
To: Sergey Gorenko <sergeygo@nvidia.com>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
Max Gurtovoy <mgurtovoy@nvidia.com>
Subject: Re: [PATCH] srp_daemon: Avoid extra permissions for the lock file
Date: Tue, 15 Sep 2020 13:32:27 -0700 [thread overview]
Message-ID: <e6c1888e-8488-4255-edda-7fa1648ca957@acm.org> (raw)
In-Reply-To: <BN8PR12MB32208D60B5E5E1AFBDBAF0CCBF200@BN8PR12MB3220.namprd12.prod.outlook.com>
On 2020-09-15 01:10, Sergey Gorenko wrote:
> I tested the patch for the following scenarios:
> * Start the srp_daemon service when srp_daemon is not running and the lock file does not exist.
> * Start the srp_daemon service when srp_daemon is not running and the lock file exists.
> * Start the srp_daemon service when srp_daemon is running and the lock file exists.
> * Start the srp_daemon service when srp_daemon is running and the lock file exists and the file owner is not root. (Such scenario can happen if someone tries to run srp_daemon manually as not root. The srp_daemon fails in this case, but the lock file is created). This case is handled successfully even without the fchmod() call because the srp_daemon service starts srp_daemon as root.
>
> I do not know any case when fchmod() is needed. And it does not look like a good idea to create a word-writable file owned by root. That's why I want to remove the fchmod() call.
>
> Do you have an idea when the fchmod() call can be needed?
>
> If you have no other objections, I will add the fixes line and send V1.
Thanks Sergey for having shared all this information. I think this testing
is sufficient. Hence:
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
prev parent reply other threads:[~2020-09-15 20:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-19 14:17 [PATCH] srp_daemon: Avoid extra permissions for the lock file Sergey Gorenko
2020-09-14 9:24 ` Sergey Gorenko
2020-09-14 16:50 ` Bart Van Assche
2020-09-14 16:56 ` Bart Van Assche
2020-09-15 8:10 ` Sergey Gorenko
2020-09-15 20:32 ` Bart Van Assche [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e6c1888e-8488-4255-edda-7fa1648ca957@acm.org \
--to=bvanassche@acm.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mgurtovoy@nvidia.com \
--cc=sergeygo@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox