[sudo-workers] Adding a second sysconfdir
Todd C. Miller
Todd.Miller at sudo.ws
Thu May 4 09:53:25 MDT 2023
On Fri, 21 Apr 2023 13:36:53 +0200, Otto Hollmann wrote:
> Sorry, I forgot to check autoconf mailing list.
> You are right, conversation died in February and we can assume that they
> rejected this feature/new option.
> I realized that using:
> --enable-distconf --prefix=/usr --sysconfdir=/etc
> will be sufficient for us and I will move configuration files into /usr/etc
> using mv command in spec file.
The changes to support multiple configuration file paths has been
committed. What was committed is different from the initial patches.
For your use case, it should be sufficient to run configure with:
--prefix=/usr --sysconfdir=/usr/etc --enable-adminconf=/etc
That will install the default condfiguration files in /usr/etc but
allow files in /etc to override those defaults.
The visudo command has been updated to install modified sudoers
files in the adminconf directory if one is enabled. Thus, if only
/usr/etc/sudoers exists and the admin uses visudo to edit it, the
resulting file will be stored as /etc/sudoers, which is used in
preference to /usr/etc/sudoers.
More information about the sudo-workers