pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
'sudo' as SU_CMD on Solaris w/sunfreeware gcc3.4.6
I'm using gcc3.4.6 from sunfreeware.com, so some things are linked
against /usr/local/lib/lib*. They run fine as an ordinary user
(LD_LIBRARY_PATH=/usr/local/lib:/usr/pkg/lib) but failed when becoming
root. This is particularly true of tools like "gmake" required to build
other packages.
I'd installed 'sudo' from pkgsrc-2008Q1 and was using it for my "SU_CMD"
in "mk.conf", the problem only showed up when I attempted to install
something that used these extra tools, particularly 'gmake', during
installation.
Since the recent versions of 'sudo' reset the environment to a minimal
set, "LD_LIBRARY_PATH" was not included. When I ran 'ldd' on the
offending programs as my regular user, all was well. When I ran 'ldd'
as root using 'sudo', libraries previously shown to be in /usr/local/lib/
were listed as "file not found".
The solution was to be sure my sudoers file contained something like:
Defaults env_keep+="FOO BAR BAZ QUX LD_LIBRARY_PATH"
to make sure that LD_LIBRARY_PATH is preserved when using 'sudo' to
become root.
Hope this helps other pkgsrc/Solaris users.
--
John D. Baker, KN5UKS NetBSD Darwin/MacOS X
jdbaker(at)mylinuxisp(dot)com OpenBSD FreeBSD
BSD -- It just sits there and _works_!
GPG fingerprint: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
Home |
Main Index |
Thread Index |
Old Index