const char *name;
ADS_STATUS (*wrap)(struct ads_struct *, uint8 *buf, uint32 len);
ADS_STATUS (*unwrap)(struct ads_struct *);
- ADS_STATUS (*disconnect)(struct ads_struct *);
+ void (*disconnect)(struct ads_struct *);
+};
+
+enum ads_saslwrap_type {
+ ADS_SASLWRAP_TYPE_PLAIN = 1,
+ ADS_SASLWRAP_TYPE_SIGN = 2,
+ ADS_SASLWRAP_TYPE_SEAL = 4
};
typedef struct ads_struct {
time_t last_attempt; /* last attempt to reconnect */
int port;
+ enum ads_saslwrap_type wrap_type;
+
#ifdef HAVE_LDAP_SASL_WRAPPING
Sockbuf_IO_Desc *sbiod; /* lowlevel state for LDAP wrapping */
+#endif /* HAVE_LDAP_SASL_WRAPPING */
TALLOC_CTX *mem_ctx;
const struct ads_saslwrap_ops *wrap_ops;
void *wrap_private_data;
uint32 ofs;
uint32 needed;
uint32 left;
- uint32 max;
- uint32 min;
+#define ADS_SASL_WRAPPING_IN_MAX_WRAPPED 0x0FFFFFFF
+ uint32 max_wrapped;
+ uint32 min_wrapped;
uint32 size;
uint8 *buf;
} in;
struct {
uint32 ofs;
uint32 left;
- uint32 max;
- uint32 min;
+#define ADS_SASL_WRAPPING_OUT_MAX_WRAPPED 0x00A00000
+ uint32 max_unwrapped;
uint32 sig_size;
uint32 size;
uint8 *buf;
} out;
-#endif /* HAVE_LDAP_SASL_WRAPPING */
} ldap;
#endif /* HAVE_LDAP */
} ADS_STRUCT;
#define ADS_AUTH_ANON_BIND 0x04
#define ADS_AUTH_SIMPLE_BIND 0x08
#define ADS_AUTH_ALLOW_NTLMSSP 0x10
+#define ADS_AUTH_SASL_SIGN 0x20
+#define ADS_AUTH_SASL_SEAL 0x40
+#define ADS_AUTH_SASL_FORCE 0x80
/* Kerberos environment variable names */
#define KRB5_ENV_CCNAME "KRB5CCNAME"
#define ADS_EXTENDED_RIGHT_APPLY_GROUP_POLICY "edacfd8f-ffb3-11d1-b41d-00a0c968f939"
+#define ADS_IGNORE_PRINCIPAL "not_defined_in_RFC4178@please_ignore"
+
#endif /* _INCLUDE_ADS_H_ */