=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sudo/Attic/env.c,v retrieving revision 1.3.4.1 retrieving revision 1.4 diff -c -r1.3.4.1 -r1.4 *** src/usr.bin/sudo/Attic/env.c 2002/01/18 17:20:23 1.3.4.1 --- src/usr.bin/sudo/Attic/env.c 2002/04/25 15:49:03 1.4 *************** *** 62,68 **** #include "sudo.h" #ifndef lint ! static const char rcsid[] = "$Sudo: env.c,v 1.15 2002/01/15 23:43:58 millert Exp $"; #endif /* lint */ /* --- 62,68 ---- #include "sudo.h" #ifndef lint ! static const char rcsid[] = "$Sudo: env.c,v 1.16 2002/04/18 15:38:52 millert Exp $"; #endif /* lint */ /* *************** *** 434,452 **** /* Add the SUDO_COMMAND envariable (cmnd + args). */ if (user_args) { ! cp = emalloc(strlen(user_cmnd) + strlen(user_args) + 15); ! sprintf(cp, "SUDO_COMMAND=%s %s", user_cmnd, user_args); insert_env(newenvp, cp); } else insert_env(newenvp, format_env("SUDO_COMMAND", user_cmnd)); /* Add the SUDO_USER, SUDO_UID, SUDO_GID environment variables. */ insert_env(newenvp, format_env("SUDO_USER", user_name)); ! cp = emalloc(MAX_UID_T_LEN + 10); ! sprintf(cp, "SUDO_UID=%ld", (long) user_uid); insert_env(newenvp, cp); ! cp = emalloc(MAX_UID_T_LEN + 10); ! sprintf(cp, "SUDO_GID=%ld", (long) user_gid); insert_env(newenvp, cp); return(newenvp); --- 434,449 ---- /* Add the SUDO_COMMAND envariable (cmnd + args). */ if (user_args) { ! easprintf(&cp, "SUDO_COMMAND=%s %s", user_cmnd, user_args); insert_env(newenvp, cp); } else insert_env(newenvp, format_env("SUDO_COMMAND", user_cmnd)); /* Add the SUDO_USER, SUDO_UID, SUDO_GID environment variables. */ insert_env(newenvp, format_env("SUDO_USER", user_name)); ! easprintf(&cp, "SUDO_UID=%ld", (long) user_uid); insert_env(newenvp, cp); ! easprintf(&cp, "SUDO_GID=%ld", (long) user_gid); insert_env(newenvp, cp); return(newenvp);