2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Make login_style private to bsdauth.c

Add a setter for policy.c to handle auth_type from the front-end.
This commit is contained in:
Todd C. Miller
2023-05-04 13:06:09 -06:00
parent cda03ed13f
commit d5de5890f5
5 changed files with 41 additions and 26 deletions

View File

@@ -37,6 +37,7 @@
#include "sudoers.h"
#include "sudoers_version.h"
#include "interfaces.h"
#include "auth/sudo_auth.h"
static char **command_info;
@@ -62,10 +63,6 @@ int sudoedit_nfiles;
extern sudo_dso_public struct policy_plugin sudoers_policy;
#ifdef HAVE_BSD_AUTH_H
char *login_style;
#endif /* HAVE_BSD_AUTH_H */
static int
parse_bool(const char *line, int varlen, int *flags, int fval)
{
@@ -349,7 +346,8 @@ sudoers_policy_deserialize_info(void *v, struct defaults_list *defaults)
#ifdef HAVE_BSD_AUTH_H
if (MATCHES(*cur, "bsdauth_type=")) {
CHECK(*cur, "bsdauth_type=");
login_style = *cur + sizeof("bsdauth_type=") - 1;
p = *cur + sizeof("bsdauth_type=") - 1;
bsdauth_set_style(p);
continue;
}
#endif /* HAVE_BSD_AUTH_H */