Add a sudoers_context struct that embeds the user and runas structs.
This commit is contained in:
@@ -62,12 +62,12 @@ adt_sudo_common(char *const argv[])
|
||||
}
|
||||
|
||||
/* get the real executable name */
|
||||
if (user_ctx.cmnd != NULL) {
|
||||
if (strlcpy(cmdpath, (const char *)user_ctx.cmnd,
|
||||
if (ctx.user.cmnd != NULL) {
|
||||
if (strlcpy(cmdpath, (const char *)ctx.user.cmnd,
|
||||
sizeof(cmdpath)) >= sizeof(cmdpath)) {
|
||||
log_warningx(SLOG_NO_STDERR,
|
||||
_("truncated audit path user_ctx.cmnd: %s"),
|
||||
user_ctx.cmnd);
|
||||
_("truncated audit path ctx.user.cmnd: %s"),
|
||||
ctx.user.cmnd);
|
||||
}
|
||||
} else {
|
||||
if (strlcpy(cmdpath, argv[0],
|
||||
|
Reference in New Issue
Block a user