Move NewArgv, NewArgc and saved_argv into struct sudoers_context.
This commit is contained in:
@@ -133,7 +133,7 @@ sudo_auth_init(const struct sudoers_context *ctx, struct passwd *pw,
|
||||
if (IS_DISABLED(auth))
|
||||
continue;
|
||||
if (!IS_STANDALONE(auth)) {
|
||||
audit_failure(ctx, NewArgv,
|
||||
audit_failure(ctx, ctx->runas.argv,
|
||||
N_("invalid authentication methods"));
|
||||
log_warningx(ctx, SLOG_SEND_MAIL,
|
||||
N_("Invalid authentication methods compiled into sudo! "
|
||||
@@ -259,7 +259,7 @@ verify_user(const struct sudoers_context *ctx, struct passwd *pw, char *prompt,
|
||||
|
||||
/* Make sure we have at least one auth method. */
|
||||
if (auth_switch[0].name == NULL) {
|
||||
audit_failure(ctx, NewArgv, N_("no authentication methods"));
|
||||
audit_failure(ctx, ctx->runas.argv, N_("no authentication methods"));
|
||||
log_warningx(ctx, SLOG_SEND_MAIL,
|
||||
N_("There are no authentication methods compiled into sudo! "
|
||||
"If you want to turn off authentication, use the "
|
||||
@@ -311,7 +311,8 @@ verify_user(const struct sudoers_context *ctx, struct passwd *pw, char *prompt,
|
||||
}
|
||||
}
|
||||
if (num_methods == 0) {
|
||||
audit_failure(ctx, NewArgv, N_("no authentication methods"));
|
||||
audit_failure(ctx, ctx->runas.argv,
|
||||
N_("no authentication methods"));
|
||||
log_warningx(ctx, SLOG_SEND_MAIL,
|
||||
N_("Unable to initialize authentication methods."));
|
||||
debug_return_int(-1);
|
||||
|
Reference in New Issue
Block a user