mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
Instead of setprogname(), add initprogname() which gets the program
name for getprogname() using /proc or pstat() if possible.
This commit is contained in:
@@ -138,11 +138,9 @@ policy_open(unsigned int version, sudo_conv_t conversation,
|
||||
if (strncmp(*ui, "runas_group=", sizeof("runas_group=") - 1) == 0) {
|
||||
runas_group = *ui + sizeof("runas_group=") - 1;
|
||||
}
|
||||
#if !defined(HAVE_GETPROGNAME) && !defined(HAVE___PROGNAME)
|
||||
if (strncmp(*ui, "progname=", sizeof("progname=") - 1) == 0) {
|
||||
setprogname(*ui + sizeof("progname=") - 1);
|
||||
initprogname(*ui + sizeof("progname=") - 1);
|
||||
}
|
||||
#endif
|
||||
/* Check to see if sudo was called as sudoedit or with -e flag. */
|
||||
if (strncmp(*ui, "sudoedit=", sizeof("sudoedit=") - 1) == 0) {
|
||||
if (strcasecmp(*ui + sizeof("sudoedit=") - 1, "true") == 0)
|
||||
|
Reference in New Issue
Block a user