r18754: Get rid of some more invalid time sets
authorJim McDonough <jmcd@samba.org>
Wed, 20 Sep 2006 23:43:56 +0000 (23:43 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:00:54 +0000 (12:00 -0500)
(This used to be commit 3840d3785f1d61885aa7c83675a3e19673eb4b2a)

source3/rpc_server/srv_samr_util.c

index 94121e27175102d7416662eedaa6ee31612d48ae..242d44c6e83422cecaecd532a68f7c8bc32329a7 100644 (file)
@@ -99,14 +99,6 @@ void copy_id21_to_sam_passwd(struct samu *to, SAM_USER_INFO_21 *from)
                        pdb_set_kickoff_time(to, unix_time , PDB_CHANGED);
        }       
 
-       if (from->fields_present & ACCT_ALLOW_PWD_CHANGE) {
-               unix_time=nt_time_to_unix(from->pass_can_change_time);
-               stored_time = pdb_get_pass_can_change_time(to);
-               DEBUG(10,("INFO_21 PASS_CAN_CH: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time));
-               if (stored_time != unix_time) 
-                       pdb_set_pass_can_change_time(to, unix_time, PDB_CHANGED);
-       }
-
        if (from->fields_present & ACCT_LAST_PWD_CHANGE) {
                unix_time=nt_time_to_unix(from->pass_last_set_time);
                stored_time = pdb_get_pass_last_set_time(to);
@@ -115,14 +107,6 @@ void copy_id21_to_sam_passwd(struct samu *to, SAM_USER_INFO_21 *from)
                        pdb_set_pass_last_set_time(to, unix_time, PDB_CHANGED);
        }
 
-       if (from->fields_present & ACCT_FORCE_PWD_CHANGE) {
-               unix_time=nt_time_to_unix(from->pass_must_change_time);
-               stored_time=pdb_get_pass_must_change_time(to);
-               DEBUG(10,("INFO_21 PASS_MUST_CH: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time));
-               if (stored_time != unix_time) 
-                       pdb_set_pass_must_change_time(to, unix_time, PDB_CHANGED);
-       }
-
        if ((from->fields_present & ACCT_USERNAME) &&
            (from->hdr_user_name.buffer)) {
                old_string = pdb_get_username(to);
@@ -337,14 +321,6 @@ void copy_id23_to_sam_passwd(struct samu *to, SAM_USER_INFO_23 *from)
                        pdb_set_kickoff_time(to, unix_time , PDB_CHANGED);
        }       
 
-       if (from->fields_present & ACCT_ALLOW_PWD_CHANGE) {
-               unix_time=nt_time_to_unix(from->pass_can_change_time);
-               stored_time = pdb_get_pass_can_change_time(to);
-               DEBUG(10,("INFO_23 PASS_CAN_CH: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time));
-               if (stored_time != unix_time) 
-                       pdb_set_pass_can_change_time(to, unix_time, PDB_CHANGED);
-       }
-
        if (from->fields_present & ACCT_LAST_PWD_CHANGE) {
                unix_time=nt_time_to_unix(from->pass_last_set_time);
                stored_time = pdb_get_pass_last_set_time(to);
@@ -353,14 +329,6 @@ void copy_id23_to_sam_passwd(struct samu *to, SAM_USER_INFO_23 *from)
                        pdb_set_pass_last_set_time(to, unix_time, PDB_CHANGED);
        }
 
-       if (from->fields_present & ACCT_FORCE_PWD_CHANGE) {
-               unix_time=nt_time_to_unix(from->pass_must_change_time);
-               stored_time=pdb_get_pass_must_change_time(to);
-               DEBUG(10,("INFO_23 PASS_MUST_CH: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time));
-               if (stored_time != unix_time) 
-                       pdb_set_pass_must_change_time(to, unix_time, PDB_CHANGED);
-       }
-
        /* Backend should check this for sanity */
        if ((from->fields_present & ACCT_USERNAME) &&
            (from->hdr_user_name.buffer)) {
@@ -565,14 +533,6 @@ void copy_id25_to_sam_passwd(struct samu *to, SAM_USER_INFO_25 *from)
                        pdb_set_kickoff_time(to, unix_time , PDB_CHANGED);
        }       
 
-       if (from->fields_present & ACCT_ALLOW_PWD_CHANGE) {
-               unix_time=nt_time_to_unix(from->pass_can_change_time);
-               stored_time = pdb_get_pass_can_change_time(to);
-               DEBUG(10,("INFO_25 PASS_CAN_CH: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time));
-               if (stored_time != unix_time) 
-                       pdb_set_pass_can_change_time(to, unix_time, PDB_CHANGED);
-       }
-
        if (from->fields_present & ACCT_LAST_PWD_CHANGE) {
                unix_time=nt_time_to_unix(from->pass_last_set_time);
                stored_time = pdb_get_pass_last_set_time(to);
@@ -581,14 +541,6 @@ void copy_id25_to_sam_passwd(struct samu *to, SAM_USER_INFO_25 *from)
                        pdb_set_pass_last_set_time(to, unix_time, PDB_CHANGED);
        }
 
-       if (from->fields_present & ACCT_FORCE_PWD_CHANGE) {
-               unix_time=nt_time_to_unix(from->pass_must_change_time);
-               stored_time=pdb_get_pass_must_change_time(to);
-               DEBUG(10,("INFO_25 PASS_MUST_CH: %lu -> %lu\n",(long unsigned int)stored_time, (long unsigned int)unix_time));
-               if (stored_time != unix_time) 
-                       pdb_set_pass_must_change_time(to, unix_time, PDB_CHANGED);
-       }
-
        if ((from->fields_present & ACCT_USERNAME) &&
            (from->hdr_user_name.buffer)) {
                old_string = pdb_get_username(to);