2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +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:
Todd C. Miller
2013-12-01 19:12:21 -07:00
parent 902215a8c0
commit 0d81263e26
21 changed files with 147 additions and 108 deletions

View File

@@ -138,9 +138,7 @@ main(int argc, char *argv[])
sudoersdebug = 1;
#endif
#if !defined(HAVE_GETPROGNAME) && !defined(HAVE___PROGNAME)
setprogname(argc > 0 ? argv[0] : "testsudoers");
#endif
initprogname(argc > 0 ? argv[0] : "testsudoers");
sudoers_setlocale(SUDOERS_LOCALE_USER, NULL);
bindtextdomain("sudoers", LOCALEDIR); /* XXX - should have own domain */