sudo-project/sudo

--enable-static-sudoers is broken

Closed this issue · 1 comments

#./sudo --version
Sudo version 1.9.13p1
Configure options: CC=/usr/bin/arm-buildroot-linux-gnueabi-gcc --host=arm-buildroot-linux-gnueabi --target=arm-buildroot-linux-gnueabi --prefix=/sudo/install --without-pam --disable-pam-session --without-lecture --disable-zlib --disable-openssl --enable-static-sudoers --disable-shared-libutil
sudo: error in /etc/sudo.conf, line 1 while loading plugin "sudoers_policy"
sudo: unable to load /sudo/install/libexec/sudo/sudoers.so: /sudo/install/libexec/sudo/sudoers.so: cannot open shared object file: No such file or directory
sudo: fatal error, unable to load plugins

When the sudoers plugin is statically compiled, the sudoers plugin path should always be sudoers.so, not "/sudo/install/libexec/sudo/sudoers.so" in my case.
This bug seems to have been introduced by 73abff2. In function sudo_qualify_plugin(), if STATIC_SUDOERS_PLUGIN is defined, the function should return earlier like the old version after copying the info->path into fullpath, and should not prepend the plugin_dir to the fullpath.

Fixed by 9181499