summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-10-17 15:56:44 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-10-18 13:13:33 +1100
commit9068a3080b6d8980f46cc141fdf76b832d38ecf7 (patch)
tree3241d310ad8843e5d7eaa47ed62c310281e40543 /source3
parente7d5f0a357c42593a015b80390dedf920117a7e2 (diff)
downloadsamba-9068a3080b6d8980f46cc141fdf76b832d38ecf7.tar.gz
samba-9068a3080b6d8980f46cc141fdf76b832d38ecf7.tar.bz2
samba-9068a3080b6d8980f46cc141fdf76b832d38ecf7.zip
s3-auth: use typedefs in auth.h
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/include/auth.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/source3/include/auth.h b/source3/include/auth.h
index 6721b1f188..5be5701baa 100644
--- a/source3/include/auth.h
+++ b/source3/include/auth.h
@@ -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;