s3:pdb_samba_dsdb: fix calucating of dsdb_flags
authorStefan Metzmacher <metze@samba.org>
Thu, 11 Feb 2016 07:59:09 +0000 (08:59 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 27 Jun 2016 03:00:16 +0000 (05:00 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9654

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/passdb/pdb_samba_dsdb.c

index 56f3f107cef6c86660aa0aab5ff1c03c8149da1f..19c6705dfcbaec748fd31530dc54e6a81ad420f6 100644 (file)
@@ -366,7 +366,7 @@ static int pdb_samba_dsdb_replace_by_sam(struct pdb_samba_dsdb_state *state,
        /* If we set a plaintext password, the system will
         * force the pwdLastSet to now() */
        if (need_update(sam, PDB_PASSLASTSET)) {
-               dsdb_flags = DSDB_PASSWORD_BYPASS_LAST_SET;
+               dsdb_flags |= DSDB_PASSWORD_BYPASS_LAST_SET;
 
                ret |= pdb_samba_dsdb_add_time(msg, "pwdLastSet",
                                           pdb_get_pass_last_set_time(sam));
@@ -473,7 +473,7 @@ static int pdb_samba_dsdb_replace_by_sam(struct pdb_samba_dsdb_state *state,
                }
                if (changed_lm_pw || changed_nt_pw || changed_history) {
                        /* These attributes can only be modified directly by using a special control */
-                       dsdb_flags = DSDB_BYPASS_PASSWORD_HASH;
+                       dsdb_flags |= DSDB_BYPASS_PASSWORD_HASH;
                }
        }