Turn the pdb_rid_algorithm into a capabilities call that returns flags
[metze/samba/wip.git] / source3 / passdb / passdb.c
index 51190e0bc2a26e7a1b54733bd243302cbcb8cdbb..502c3728a35906586a46074597cd4778fa774b93 100644 (file)
@@ -207,7 +207,7 @@ static NTSTATUS samu_set_unix_internal(struct samu *user, const struct passwd *p
           initialized and will fill in these fields later (such as from a 
           netr_SamInfo3 structure) */
 
-       if ( create && !pdb_rid_algorithm() ) {
+       if ( create && (pdb_capabilities() & PDB_CAP_STORE_RIDS)) {
                uint32 user_rid;
                DOM_SID user_sid;
 
@@ -655,9 +655,6 @@ NTSTATUS local_password_change(const char *user_name,
        *pp_msg_str = NULL;
 
        tosctx = talloc_tos();
-       if (!tosctx) {
-               return NT_STATUS_NO_MEMORY;
-       }
 
        sam_pass = samu_new(tosctx);
        if (!sam_pass) {