From: Jes Sorensen <jes.sorensen@gmail.com>
To: NeilBrown <neilb@suse.com>, John Stoffel <john@stoffel.org>
Cc: Linux Raid <linux-raid@vger.kernel.org>
Subject: Re: [mdadm PATCH] mdopen: call "modprobe md_mod" if it might be needed.
Date: Tue, 26 Sep 2017 11:11:36 -0400 [thread overview]
Message-ID: <250d2eff-ce7e-df72-1e6c-b4a8a2c43537@gmail.com> (raw)
In-Reply-To: <87poae72z5.fsf@notabene.neil.brown.name>
On 09/25/2017 07:50 PM, NeilBrown wrote:
> On Mon, Sep 25 2017, John Stoffel wrote:
>
>> I haven't looked, but shouldn't the path for modprobe be hardcoded
>> here to /sbin/modprobe? Or the PATH sanitized so that random people
>> can't put something into the system PATH and cause problems?
>
> That issue briefly crossed my mind as I wrote the code (is it OK to use
> system()? should I use /sbin/modprobe or just modprobe?) but as mdadm is
> not set-uid and cannot be run in an environment created by a
> non-privileged user, there is no security risk.
> Certainly a careless sysadmin might set path wrongs, but the most likely
> wrong outcome is that modprobe won't be found, and there is very little
> cost to that.
>
> So thanks for asking, but I don't think there is any need for any extra
> care, in which case "simplest is best".
I completely agree, I also think we shouldn't hardcode imposed layouts
unless there are very strong reasons for it. Someone may want to put
this into an initramfs or somewhere else and want to put it in a
different location.
Cheers,
Jes
next prev parent reply other threads:[~2017-09-26 15:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-25 5:52 [mdadm PATCH] mdopen: call "modprobe md_mod" if it might be needed NeilBrown
2017-09-25 15:26 ` John Stoffel
2017-09-25 23:50 ` NeilBrown
2017-09-26 15:11 ` Jes Sorensen [this message]
2017-09-26 19:12 ` Wols Lists
2017-09-26 20:55 ` John Stoffel
2017-09-27 21:30 ` Jes Sorensen
[not found] ` <cba5f77f-d6de-7a6b-35b0-70b7c56eb3f7@suse.com>
2017-10-10 20:16 ` NeilBrown
2017-10-11 7:39 ` Zhilong Liu
2017-10-12 0:06 ` NeilBrown
2017-10-12 3:55 ` Zhilong Liu
2017-10-12 8:48 ` NeilBrown
2017-10-13 9:16 ` Zhilong Liu
2017-10-15 22:41 ` NeilBrown
2017-10-12 9:55 ` Wols Lists
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=250d2eff-ce7e-df72-1e6c-b4a8a2c43537@gmail.com \
--to=jes.sorensen@gmail.com \
--cc=john@stoffel.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.