=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sudo/Attic/sudo.c,v retrieving revision 1.11 retrieving revision 1.12 diff -c -r1.11 -r1.12 *** src/usr.bin/sudo/Attic/sudo.c 2002/01/03 03:49:16 1.11 --- src/usr.bin/sudo/Attic/sudo.c 2002/01/08 15:44:25 1.12 *************** *** 1,5 **** /* ! * Copyright (c) 1993-1996,1998-2001 Todd C. Miller * All rights reserved. * * Redistribution and use in source and binary forms, with or without --- 1,5 ---- /* ! * Copyright (c) 1993-1996,1998-2002 Todd C. Miller * All rights reserved. * * Redistribution and use in source and binary forms, with or without *************** *** 98,104 **** #include "version.h" #ifndef lint ! static const char rcsid[] = "$Sudo: sudo.c,v 1.311 2001/12/15 00:45:13 millert Exp $"; #endif /* lint */ /* --- 98,104 ---- #include "version.h" #ifndef lint ! static const char rcsid[] = "$Sudo: sudo.c,v 1.313 2002/01/08 15:00:18 millert Exp $"; #endif /* lint */ /* *************** *** 155,160 **** --- 155,161 ---- int cmnd_status; int sudo_mode; int pwflag; + char **new_environ; sigaction_t sa; extern int printmatches; extern char **environ; *************** *** 271,278 **** log_error(NO_MAIL|MSG_ONLY, "no passwd entry for %s!", *user_runas); } ! /* Customize environment and get rid of any nasty bits. */ ! environ = rebuild_env(sudo_mode, envp); /* This goes after the sudoers parse since we honor sudoers options. */ if (sudo_mode == MODE_KILL || sudo_mode == MODE_INVALIDATE) { --- 272,279 ---- log_error(NO_MAIL|MSG_ONLY, "no passwd entry for %s!", *user_runas); } ! /* Build up custom environment that avoids any nasty bits. */ ! new_environ = rebuild_env(sudo_mode, envp); /* This goes after the sudoers parse since we honor sudoers options. */ if (sudo_mode == MODE_KILL || sudo_mode == MODE_INVALIDATE) { *************** *** 368,373 **** --- 369,377 ---- /* Become specified user or root. */ set_perms(PERM_RUNAS, sudo_mode); + + /* Install the new environment. */ + environ = new_environ; #ifndef PROFILING if ((sudo_mode & MODE_BACKGROUND) && fork() > 0)