X-Git-Url: http://git.samba.org/?p=samba.git;a=blobdiff_plain;f=source4%2Flib%2Fldb%2Finclude%2Fldb.h;h=f3ec1ed606d47066eac74944648e82f47e754ea4;hp=065aa31682d42f32456872d7f956710dd7f3284b;hb=191d632e237761004fe0fe79a29a7274b7267d45;hpb=e5a9469a88e039b558e13273ae637f874bbb42b3 diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h index 065aa31682d..f3ec1ed606d 100644 --- a/source4/lib/ldb/include/ldb.h +++ b/source4/lib/ldb/include/ldb.h @@ -86,6 +86,14 @@ struct ldb_val { #ifndef PRINTF_ATTRIBUTE #define PRINTF_ATTRIBUTE(a,b) #endif + +#ifndef _DEPRECATED_ +#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) +#define _DEPRECATED_ __attribute__ ((deprecated)) +#else +#define _DEPRECATED_ +#endif +#endif /*! \endcond */ /* opaque ldb_dn structures, see ldb_dn.c for internals */ @@ -671,6 +679,12 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void *opaque); */ #define LDB_CONTROL_RELAX_OID "1.3.6.1.4.1.4203.666.5.12" +/** + control for RODC join + See [MS-ADTS] section 3.1.1.3.4.1.23 +*/ +#define LDB_CONTROL_RODC_DCPROMO_OID "1.2.840.113556.1.4.1341" + /* OID for LDAP Extended Operation PASSWORD_CHANGE. @@ -1633,7 +1647,7 @@ char *ldb_dn_alloc_linearized(TALLOC_CTX *mem_ctx, struct ldb_dn *dn); \param dn The DN to linearize \param mode Style of extended DN to return (0 is HEX representation of binary form, 1 is a string form) */ -char *ldb_dn_get_extended_linearized(void *mem_ctx, struct ldb_dn *dn, int mode); +char *ldb_dn_get_extended_linearized(TALLOC_CTX *mem_ctx, struct ldb_dn *dn, int mode); const struct ldb_val *ldb_dn_get_extended_component(struct ldb_dn *dn, const char *name); int ldb_dn_set_extended_component(struct ldb_dn *dn, const char *name, const struct ldb_val *val); void ldb_dn_extended_filter(struct ldb_dn *dn, const char * const *accept); @@ -1673,7 +1687,7 @@ struct ldb_dn *ldb_dn_new_fmt(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, cons \note The DN will not be parsed at this time. Use ldb_dn_validate to tell if the DN is syntacticly correct */ -struct ldb_dn *ldb_dn_from_ldb_val(void *mem_ctx, struct ldb_context *ldb, const struct ldb_val *strdn); +struct ldb_dn *ldb_dn_from_ldb_val(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, const struct ldb_val *strdn); /** Determine if this DN is syntactically valid @@ -1851,8 +1865,17 @@ struct ldb_message *ldb_msg_copy_shallow(TALLOC_CTX *mem_ctx, struct ldb_message *ldb_msg_copy(TALLOC_CTX *mem_ctx, const struct ldb_message *msg); +/* + * ldb_msg_canonicalize() is now depreciated + * Please use ldb_msg_normalize() instead + * + * NOTE: Returned ldb_message object is allocated + * into *ldb's context. Callers are recommended + * to steal the returned object into a TALLOC_CTX + * with short lifetime. + */ struct ldb_message *ldb_msg_canonicalize(struct ldb_context *ldb, - const struct ldb_message *msg); + const struct ldb_message *msg) _DEPRECATED_; int ldb_msg_normalize(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, @@ -1860,9 +1883,18 @@ int ldb_msg_normalize(struct ldb_context *ldb, struct ldb_message **_msg_out); +/* + * ldb_msg_diff() is now depreciated + * Please use ldb_msg_difference() instead + * + * NOTE: Returned ldb_message object is allocated + * into *ldb's context. Callers are recommended + * to steal the returned object into a TALLOC_CTX + * with short lifetime. + */ struct ldb_message *ldb_msg_diff(struct ldb_context *ldb, struct ldb_message *msg1, - struct ldb_message *msg2); + struct ldb_message *msg2) _DEPRECATED_; /** * return a ldb_message representing the differences between msg1 and msg2. @@ -2083,7 +2115,7 @@ unsigned int ldb_get_flags(struct ldb_context *ldb); void ldb_set_flags(struct ldb_context *ldb, unsigned flags); -struct ldb_dn *ldb_dn_binary_from_ldb_val(void *mem_ctx, +struct ldb_dn *ldb_dn_binary_from_ldb_val(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, const struct ldb_val *strdn);