1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3-auth: use typedefs in auth.h

Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Andrew Bartlett 2011-10-17 15:56:44 +11:00
parent e7d5f0a357
commit 9068a3080b

View File

@ -66,6 +66,14 @@ struct auth_serversupplied_info {
char *unix_name;
};
typedef NTSTATUS (*prepare_gensec_fn)(TALLOC_CTX *mem_ctx,
struct gensec_security **gensec_context);
typedef NTSTATUS (*gensec_start_mech_by_oid_fn)(struct gensec_security *gensec_context,
const char *oid_string);
typedef NTSTATUS (*gensec_start_mech_by_authtype_fn)(struct gensec_security *gensec_context,
uint8_t auth_type,
uint8_t auth_level);
struct auth_context {
DATA_BLOB challenge;
@ -85,10 +93,9 @@ struct auth_context {
struct auth_serversupplied_info **server_info);
NTSTATUS (*nt_status_squash)(NTSTATUS nt_status);
NTSTATUS (*prepare_gensec)(TALLOC_CTX *mem_ctx,
struct gensec_security **gensec_context);
NTSTATUS (*gensec_start_mech_by_oid)(struct gensec_security *gensec_context, const char *oid_string);
NTSTATUS (*gensec_start_mech_by_authtype)(struct gensec_security *gensec_context, uint8_t auth_type, uint8_t auth_level);
prepare_gensec_fn prepare_gensec;
gensec_start_mech_by_oid_fn gensec_start_mech_by_oid;
gensec_start_mech_by_authtype_fn gensec_start_mech_by_authtype;
};
typedef struct auth_methods
@ -111,10 +118,9 @@ typedef struct auth_methods
TALLOC_CTX *mem_ctx);
/* Optional methods allowing this module to provide a way to get a gensec context */
NTSTATUS (*prepare_gensec)(TALLOC_CTX *mem_ctx,
struct gensec_security **gensec_context);
NTSTATUS (*gensec_start_mech_by_oid)(struct gensec_security *gensec_context, const char *oid_string);
NTSTATUS (*gensec_start_mech_by_authtype)(struct gensec_security *gensec_context, uint8_t auth_type, uint8_t auth_level);
prepare_gensec_fn prepare_gensec;
gensec_start_mech_by_oid_fn gensec_start_mech_by_oid;
gensec_start_mech_by_authtype_fn gensec_start_mech_by_authtype;
/* Used to keep tabs on things like the cli for SMB server authentication */
void *private_data;