From: "Ludovic Courtès" <ludo@gnu.org>
To: pkill9 <pkill9@runbox.com>
Cc: "guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: Re: Verify validity of sudoers file when reconfiguring system.
Date: Mon, 24 Aug 2020 23:29:21 +0200 [thread overview]
Message-ID: <87imd7zqa6.fsf@gnu.org> (raw)
In-Reply-To: <20200802131115.720bdf36@runbox.com> (pkill9@runbox.com's message of "Sun, 2 Aug 2020 13:11:15 +0100")
Hi pkill9,
pkill9 <pkill9@runbox.com> skribis:
> Last time I tested, the sudoers file could be changed to anything in
> the guix system configuration, whether it's valid or not. This could
> result in someone being locked out of their system when root doesn't
> have a password, and they rely on sudo. Ideally, `guix system
> reconfigure` would fail if the specified sudoers file is invalid.
>
> I ran `visudo --help` and there are two flags that could be used for
> this: --check, which simply parses the sudoers file and checks that
> it's valid, and --file, which specifies which file to check.
Thanks a lot for the suggestion! Commit
384377632c41c5c42e32889f4a239223aaae1ca9 implements exactly that.
Apparently ‘visudo --check’ doesn’t check whether the user/groups
mentioned exist though, so this kind of error could still occur.
The better fix would be to define record types or similar for the
sudoers list so we can better sanitize it.
Ludo’.
prev parent reply other threads:[~2020-08-24 21:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-02 12:11 Verify validity of sudoers file when reconfiguring system pkill9
2020-08-24 21:29 ` Ludovic Courtès [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=87imd7zqa6.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=pkill9@runbox.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
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.