TuskenTower on 1 May 2006 14:56:58 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] how to get sudo to preserve LD_PRELOAD


Dan,
 Can you do a diff of your environment variables?
   env | sort > my_env.txt
   sudo env | sort > root_env.txt
   diff my_env.txt root_env.txt

 Where are you modifying/setting the LD environment variables?  Last
time I remember playing with those, I edited the linker script to
secure a class project.

 Have you tried removing those lines from the sudoers file?

HTH
Amul

On 4/30/06, Dan Crosta <dcrosta@sccs.swarthmore.edu> wrote:
Stephen Gran wrote:
> Don't these two lines cancel each other, leaving you at the default of
> not keeping it?
>
> I'm not sure, but that's my first naive reading of it.
>

There are at least 3 lists of things that effect how sudo mangles the
environment: env_keep, env_check and env_delete. In theory,

- anything in env_keep should be kept
- anything in env_delete should be deleted
- anything in env_check is checked to make sure it's not a shell function

env_delete has a default setting to remove all LD_ variables (written as
LD_*), so i'm trying to remove that from env_delete, and also trying to
remove LD_PRELOAD explicitly from env_delete in case it is in there.
then i add LD_PRELOAD to env_keep as extra assurance... except it
doesn't work. I've tried many variations and permutations, all without
any luck so far.

dsc
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug