Make up the right dependencies now that ldb depends on libevents
[metze/samba/wip.git] / source / dsdb / common / util.c
index 8a7a22a641e98dd429f7771ed336a362d6e4ccf4..b98112304c9549b71bf766003a3c45871af07c08 100644 (file)
 */
 
 #include "includes.h"
+#include "events.h"
 #include "ldb.h"
 #include "ldb_errors.h"
 #include "lib/util/util_ldb.h"
 #include "dsdb/samdb/samdb.h"
 #include "libcli/security/security.h"
 #include "librpc/gen_ndr/ndr_security.h"
+#include "librpc/gen_ndr/ndr_misc.h"
 #include "dsdb/common/flags.h"
 #include "dsdb/common/proto.h"
 #include "libcli/ldap/ldap_ndr.h"
@@ -450,7 +452,7 @@ NTTIME samdb_result_account_expires(struct ldb_message *msg)
        NTTIME ret = ldb_msg_find_attr_as_uint64(msg, "accountExpires",
                                                 0);
 
-       if (ret == (NTTIME)0)
+       if (ret == 0)
                ret = 0x7FFFFFFFFFFFFFFFULL;
 
        return ret;
@@ -1530,7 +1532,7 @@ static bool samdb_password_complexity_ok(const char *pass)
 
   The caller should probably have a transaction wrapping this
 */
-_PUBLIC_ NTSTATUS samdb_set_password(struct ldb_context *ctx, TALLOC_CTX *mem_ctx,
+NTSTATUS samdb_set_password(struct ldb_context *ctx, TALLOC_CTX *mem_ctx,
                            struct ldb_dn *user_dn,
                            struct ldb_dn *domain_dn,
                            struct ldb_message *mod,
@@ -1770,7 +1772,7 @@ _PUBLIC_ NTSTATUS samdb_set_password(struct ldb_context *ctx, TALLOC_CTX *mem_ct
   and actually performs the password change
 
 */
-_PUBLIC_ NTSTATUS samdb_set_password_sid(struct ldb_context *ctx, TALLOC_CTX *mem_ctx,
+NTSTATUS samdb_set_password_sid(struct ldb_context *ctx, TALLOC_CTX *mem_ctx,
                                const struct dom_sid *user_sid,
                                const char *new_pass,
                                struct samr_Password *lmNewHash,