s3-util_sid: use shared dom_sid_compare_auth and dom_sid_equal_X functions.
[samba.git] / source3 / passdb / pdb_smbpasswd.c
index dd89c8e10bafe5506ab49b9dd2a9ad44f7f818ae..93697269883ef29c189c7244ca1456850eb4a808 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "includes.h"
 #include "../librpc/gen_ndr/samr.h"
+#include "../libcli/security/dom_sid.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_PASSDB
@@ -1372,7 +1373,7 @@ static NTSTATUS smbpasswd_getsampwsid(struct pdb_methods *my_methods, struct sam
                return nt_status;
 
        /* build_sam_account might change the SID on us, if the name was for the guest account */
-       if (NT_STATUS_IS_OK(nt_status) && !sid_equal(pdb_get_user_sid(sam_acct), sid)) {
+       if (NT_STATUS_IS_OK(nt_status) && !dom_sid_equal(pdb_get_user_sid(sam_acct), sid)) {
                DEBUG(1, ("looking for user with sid %s instead returned %s "
                          "for account %s!?!\n", sid_string_dbg(sid),
                          sid_string_dbg(pdb_get_user_sid(sam_acct)),