summaryrefslogtreecommitdiff
path: root/source3/include/ads.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-07-17 10:13:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:28:42 -0500
commit7bef162aeb74afd654b8e802bdf81b220ceb44b4 (patch)
tree59f8d0cfc4cb80bba357b6d28167657bbd526f62 /source3/include/ads.h
parentdb4099884a44168a5a986093dc11426efef9803c (diff)
downloadsamba-7bef162aeb74afd654b8e802bdf81b220ceb44b4.tar.gz
samba-7bef162aeb74afd654b8e802bdf81b220ceb44b4.tar.bz2
samba-7bef162aeb74afd654b8e802bdf81b220ceb44b4.zip
r23922: implement input buffer handling for the SASL read wrapper
metze (This used to be commit 7d8518ebd9470062b499b7074a940e14520e99f2)
Diffstat (limited to 'source3/include/ads.h')
-rw-r--r--source3/include/ads.h61
1 files changed, 46 insertions, 15 deletions
diff --git a/source3/include/ads.h b/source3/include/ads.h
index 5c15359c41..8404ad907b 100644
--- a/source3/include/ads.h
+++ b/source3/include/ads.h
@@ -15,7 +15,31 @@ enum wb_posix_mapping {
WB_POSIX_MAP_UNIXINFO = 4
};
-typedef struct {
+/* there are 5 possible types of errors the ads subsystem can produce */
+enum ads_error_type {ENUM_ADS_ERROR_KRB5, ENUM_ADS_ERROR_GSS,
+ ENUM_ADS_ERROR_LDAP, ENUM_ADS_ERROR_SYSTEM, ENUM_ADS_ERROR_NT};
+
+typedef struct {
+ enum ads_error_type error_type;
+ union err_state{
+ int rc;
+ NTSTATUS nt_status;
+ } err;
+ /* For error_type = ENUM_ADS_ERROR_GSS minor_status describe GSS API error */
+ /* Where rc represents major_status of GSS API error */
+ int minor_status;
+} ADS_STATUS;
+
+struct ads_struct;
+
+struct ads_saslwrap_ops {
+ const char *name;
+ ADS_STATUS (*wrap)(struct ads_struct *);
+ ADS_STATUS (*unwrap)(struct ads_struct *);
+ ADS_STATUS (*disconnect)(struct ads_struct *);
+};
+
+typedef struct ads_struct {
int is_mine; /* do I own this structure's memory? */
/* info needed to find the server */
@@ -63,6 +87,27 @@ typedef struct {
#ifdef HAVE_LDAP_SASL_WRAPPING
Sockbuf_IO_Desc *sbiod; /* lowlevel state for LDAP wrapping */
+ TALLOC_CTX *mem_ctx;
+ const struct ads_saslwrap_ops *wrap_ops;
+ void *wrap_private_data;
+ struct {
+ uint32 ofs;
+ uint32 needed;
+ uint32 left;
+ uint32 max;
+ uint32 min;
+ uint32 size;
+ uint8 *buf;
+ } in;
+ struct {
+ uint32 ofs;
+ uint32 needed;
+ uint32 left;
+ uint32 max;
+ uint32 min;
+ uint32 size;
+ uint8 *buf;
+ } out;
#endif /* HAVE_LDAP_SASL_WRAPPING */
} ldap;
#endif /* HAVE_LDAP */
@@ -80,20 +125,6 @@ struct posix_schema {
};
-/* there are 5 possible types of errors the ads subsystem can produce */
-enum ads_error_type {ENUM_ADS_ERROR_KRB5, ENUM_ADS_ERROR_GSS,
- ENUM_ADS_ERROR_LDAP, ENUM_ADS_ERROR_SYSTEM, ENUM_ADS_ERROR_NT};
-
-typedef struct {
- enum ads_error_type error_type;
- union err_state{
- int rc;
- NTSTATUS nt_status;
- } err;
- /* For error_type = ENUM_ADS_ERROR_GSS minor_status describe GSS API error */
- /* Where rc represents major_status of GSS API error */
- int minor_status;
-} ADS_STATUS;
#ifdef HAVE_ADS
typedef LDAPMod **ADS_MODLIST;