From: Volker Lendecke Date: Fri, 3 Jan 2020 12:47:14 +0000 (+0100) Subject: auth: Remove the "typedef auth_methods" X-Git-Tag: ldb-2.1.0~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59cb155a27f21a55bdc588d38c8080cd29562a7e;p=thirdparty%2Fsamba.git auth: Remove the "typedef auth_methods" Signed-off-by: Volker Lendecke Reviewed-by: Gary Lockyer --- diff --git a/examples/auth/auth_skel.c b/examples/auth/auth_skel.c index 6abd5ad4f7a..8734383aeeb 100644 --- a/examples/auth/auth_skel.c +++ b/examples/auth/auth_skel.c @@ -42,7 +42,10 @@ static NTSTATUS check_skel_security(const struct auth_context *auth_context, } /* module initialisation */ -static NTSTATUS auth_init_skel(struct auth_context *auth_context, const char *param, auth_methods **auth_method) +static NTSTATUS auth_init_skel( + struct auth_context *auth_context, + const char *param, + struct auth_methods **auth_method) { struct auth_methods *result; @@ -56,7 +59,7 @@ static NTSTATUS auth_init_skel(struct auth_context *auth_context, const char *pa if (param && *param) { /* we load the 'fallback' module - if skel isn't here, call this module */ - auth_methods *priv; + struct auth_methods *priv; if (!load_auth_module(auth_context, param, &priv)) { return NT_STATUS_UNSUCCESSFUL; } diff --git a/source3/auth/auth.c b/source3/auth/auth.c index b4192d97412..e8bb9d7821a 100644 --- a/source3/auth/auth.c +++ b/source3/auth/auth.c @@ -177,7 +177,7 @@ NTSTATUS auth_check_ntlm_password(TALLOC_CTX *mem_ctx, /* if all the modules say 'not for me' this is reasonable */ NTSTATUS nt_status = NT_STATUS_NOT_IMPLEMENTED; const char *unix_username; - auth_methods *auth_method; + struct auth_methods *auth_method; struct auth_serversupplied_info *server_info = NULL; struct dom_sid sid = {0}; struct imessaging_context *msg_ctx = NULL; @@ -404,7 +404,8 @@ static NTSTATUS make_auth_context(TALLOC_CTX *mem_ctx, } bool load_auth_module(struct auth_context *auth_context, - const char *module, auth_methods **ret) + const char *module, + struct auth_methods **ret) { static bool initialised_static_modules = False; @@ -465,8 +466,8 @@ static NTSTATUS make_auth_context_text_list(TALLOC_CTX *mem_ctx, struct auth_context **auth_context, char **text_list) { - auth_methods *list = NULL; - auth_methods *t, *method = NULL; + struct auth_methods *list = NULL; + struct auth_methods *t, *method = NULL; NTSTATUS nt_status; if (!text_list) { diff --git a/source3/auth/auth_builtin.c b/source3/auth/auth_builtin.c index 8a5c4b74723..f16b3cc2934 100644 --- a/source3/auth/auth_builtin.c +++ b/source3/auth/auth_builtin.c @@ -86,7 +86,10 @@ static NTSTATUS check_anonymous_security(const struct auth_context *auth_context /* Guest modules initialisation */ -static NTSTATUS auth_init_anonymous(struct auth_context *auth_context, const char *options, auth_methods **auth_method) +static NTSTATUS auth_init_anonymous( + struct auth_context *auth_context, + const char *options, + struct auth_methods **auth_method) { struct auth_methods *result; @@ -150,7 +153,10 @@ static NTSTATUS check_name_to_ntstatus_security(const struct auth_context *auth_ /** Module initialisation function */ -static NTSTATUS auth_init_name_to_ntstatus(struct auth_context *auth_context, const char *param, auth_methods **auth_method) +static NTSTATUS auth_init_name_to_ntstatus( + struct auth_context *auth_context, + const char *param, + struct auth_methods **auth_method) { struct auth_methods *result; diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c index 46958c54d3a..9310ef0e1f0 100644 --- a/source3/auth/auth_sam.c +++ b/source3/auth/auth_sam.c @@ -40,7 +40,10 @@ static NTSTATUS auth_sam_ignoredomain_auth(const struct auth_context *auth_conte } /* module initialisation */ -static NTSTATUS auth_init_sam_ignoredomain(struct auth_context *auth_context, const char *param, auth_methods **auth_method) +static NTSTATUS auth_init_sam_ignoredomain( + struct auth_context *auth_context, + const char *param, + struct auth_methods **auth_method) { struct auth_methods *result; @@ -108,7 +111,10 @@ static NTSTATUS auth_samstrict_auth(const struct auth_context *auth_context, } /* module initialisation */ -static NTSTATUS auth_init_sam(struct auth_context *auth_context, const char *param, auth_methods **auth_method) +static NTSTATUS auth_init_sam( + struct auth_context *auth_context, + const char *param, + struct auth_methods **auth_method) { struct auth_methods *result; @@ -168,8 +174,10 @@ static NTSTATUS auth_sam_netlogon3_auth(const struct auth_context *auth_context, } /* module initialisation */ -static NTSTATUS auth_init_sam_netlogon3(struct auth_context *auth_context, - const char *param, auth_methods **auth_method) +static NTSTATUS auth_init_sam_netlogon3( + struct auth_context *auth_context, + const char *param, + struct auth_methods **auth_method) { struct auth_methods *result; diff --git a/source3/auth/auth_samba4.c b/source3/auth/auth_samba4.c index a71c75631d7..6dee9c6f411 100644 --- a/source3/auth/auth_samba4.c +++ b/source3/auth/auth_samba4.c @@ -364,8 +364,8 @@ static NTSTATUS make_auth4_context_s4(const struct auth_context *auth_context, /* module initialisation */ static NTSTATUS auth_init_samba4(struct auth_context *auth_context, - const char *param, - auth_methods **auth_method) + const char *param, + struct auth_methods **auth_method) { struct auth_methods *result; diff --git a/source3/auth/auth_unix.c b/source3/auth/auth_unix.c index 08d4e002e3d..56fd205a9b8 100644 --- a/source3/auth/auth_unix.c +++ b/source3/auth/auth_unix.c @@ -83,7 +83,10 @@ static NTSTATUS check_unix_security(const struct auth_context *auth_context, } /* module initialisation */ -static NTSTATUS auth_init_unix(struct auth_context *auth_context, const char* param, auth_methods **auth_method) +static NTSTATUS auth_init_unix( + struct auth_context *auth_context, + const char* param, + struct auth_methods **auth_method) { struct auth_methods *result; diff --git a/source3/auth/auth_winbind.c b/source3/auth/auth_winbind.c index 93b832265cf..3b8d1a95769 100644 --- a/source3/auth/auth_winbind.c +++ b/source3/auth/auth_winbind.c @@ -178,7 +178,10 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context, } /* module initialisation */ -static NTSTATUS auth_init_winbind(struct auth_context *auth_context, const char *param, auth_methods **auth_method) +static NTSTATUS auth_init_winbind( + struct auth_context *auth_context, + const char *param, + struct auth_methods **auth_method) { struct auth_methods *result; diff --git a/source3/auth/proto.h b/source3/auth/proto.h index 575a3a147cb..cd33c618754 100644 --- a/source3/auth/proto.h +++ b/source3/auth/proto.h @@ -37,7 +37,8 @@ NTSTATUS smb_register_auth(int version, const char *name, auth_init_function init); bool load_auth_module(struct auth_context *auth_context, - const char *module, auth_methods **ret) ; + const char *module, + struct auth_methods **ret) ; NTSTATUS make_auth3_context_for_ntlm(TALLOC_CTX *mem_ctx, struct auth_context **auth_context); NTSTATUS make_auth3_context_for_netlogon(TALLOC_CTX *mem_ctx, diff --git a/source3/include/auth.h b/source3/include/auth.h index 0facb8668cd..69e53bb7083 100644 --- a/source3/include/auth.h +++ b/source3/include/auth.h @@ -98,7 +98,7 @@ struct auth_context { const char *forced_samba4_methods; }; -typedef struct auth_methods +struct auth_methods { struct auth_methods *prev, *next; const char *name; /* What name got this module */ @@ -117,7 +117,7 @@ typedef struct auth_methods uint32_t flags; -} auth_methods; +}; typedef NTSTATUS (*auth_init_function)(struct auth_context *, const char *, struct auth_methods **);