2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 22:05:46 +00:00

Attempt to fix building on systems that only have setuid.

This commit is contained in:
Todd C. Miller
2010-05-14 16:35:03 -04:00
parent 9a6cbe03b6
commit e336dac874
2 changed files with 23 additions and 4 deletions

View File

@@ -418,11 +418,15 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
}
settings[j] = NULL;
/* Must have the command in argv[0]. */
if (mode == MODE_EDIT) {
#if defined(HAVE_SETRESUID) || defined(HAVE_SETREUID) || defined(HAVE_SETEUID)
/* Must have the command in argv[0]. */
argc++;
argv--;
argv[0] = "sudoedit";
#else
errorx(1, "sudoedit is not supported on this platform");
#endif
}
*settingsp = settings;