Bug 477 - sudo: symbol 'crypt': can't resolve symbol in lib '/usr/libexec/sudoers.so'
sudo: symbol 'crypt': can't resolve symbol in lib '/usr/libexec/sudoers.so'
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Configure
1.8.0
PC Linux
: low high
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-04 03:55 MST by Natanael Copa
Modified: 2011-04-11 08:05 MDT (History)
0 users

See Also:


Attachments
libcrypt.patch (464 bytes, patch)
2011-03-04 04:57 MST, Natanael Copa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2011-03-04 03:55:46 MST
When upgrading to sudo-1.8.0 on Alpine Linux sudo failed to work (breraking all our build boxes)

sudo: symbol 'crypt': can't resolve symbol in lib '/usr/libexec/sudoers.so'.
sudo: unable to dlopen /usr/libexec/sudoers.so: (null)


I notice something that looks like a bug in configure.in:
...
checking for strsignal... yes
./configure: line 17464: test: =: unary operator expected
checking for library containing crypt... -lcrypt
...

Alpine Linux is a non-GNU x86/86_64 linux distro based on uclibc/busybox.

(uclibc is fairly POSIX compliant nowdays)

My guess is that the sudoers.so needs -lcrypt, but GNU compiles fine without it.
Comment 1 Natanael Copa 2011-03-04 04:57:11 MST
Created attachment 305 [details]
libcrypt.patch

The attched patch fixes the issue for Alpine Linux.

Basicly it just adds -lcrypt hard to sudoers.so.
Comment 2 Todd C. Miller 2011-03-04 08:28:28 MST
Some libraries used for authentication were being added to SUDO_LIBS where they should be added to SUDOERS_LIBS.  In the case of shared libraries, this is not a big deal, but if the libraries are static this could cause the problem you report.

I've fixed that in the source repo, can you try ftp://ftp.sudo.ws/pub/millert/sudo/configure and verify that it works correctly for you?
Comment 3 Natanael Copa 2011-03-07 04:09:55 MST
(In reply to comment #2)
> Some libraries used for authentication were being added to SUDO_LIBS
> where they should be added to SUDOERS_LIBS.  In the case of shared
> libraries, this is not a big deal, but if the libraries are static this
> could cause the problem you report.
> 
> I've fixed that in the source repo, can you try
> ftp://ftp.sudo.ws/pub/millert/sudo/configure and verify that it works
> correctly for you?

Yes, that seems to work. Please make sure it gets included in the 1.8.1 release. Thanks!
Comment 4 Todd C. Miller 2011-03-22 09:47:08 MDT
This is fixed in 1.8.1 which is currently in beta test, see
http://www.sudo.ws/sudo/devel.html
Comment 5 Todd C. Miller 2011-04-11 08:05:09 MDT
Fixed in sudo 1.8.1