[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-0rc1-78-gcd4df7f

Karolin Seeger kseeger at samba.org
Tue Jun 10 08:17:27 GMT 2008


The branch, v3-2-stable has been updated
       via  cd4df7f7e0267f17d608194d76d0f82641e09642 (commit)
       via  26b67d63698a70ec98e1cf4228be0d6a17e258c8 (commit)
      from  9d6d9e205e195afba7f0e9b3e3ee2c37f7bab3b2 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable


- Log -----------------------------------------------------------------
commit cd4df7f7e0267f17d608194d76d0f82641e09642
Author: Karolin Seeger <kseeger at samba.org>
Date:   Tue Jun 10 10:17:14 2008 +0200

    WHATSNEW: Update changes since 3.2.0rc1.
    
    Karolin
    (cherry picked from commit eb99ac3618269103b434afaca13295ab5c2cc478)

commit 26b67d63698a70ec98e1cf4228be0d6a17e258c8
Author: Jim McDonough <jmcd at samba.org>
Date:   Mon Jun 9 11:45:39 2008 -0400

    Don't reset password last set time just because the expired flag
    is set to 0.  If the account wasn't expired but autolocked,
    using "net user /dom <username> /active:y" would clear this,
    incorrectly setting the current time as the new "password last set"
    time.
    (cherry picked from commit 2089c692cfe5a4f9bbed1e658c6f73c310dbff57)

-----------------------------------------------------------------------

Summary of changes:
 WHATSNEW.txt                      |    5 +++++
 source/rpc_server/srv_samr_util.c |   10 +++++++++-
 2 files changed, 14 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index c28913a..6085d71 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -248,6 +248,11 @@ o   Volker Lendecke <vl at samba.org>
     * Shrink ldbtools.
 
 
+o   Jim McDonough <jmcd at samba.org>
+    * Fix reset of password last set time just because the expired flag
+      is set to 0.
+
+
 o   Stefan Metzmacher <metze at samba.org>
     * Remove support for symbol versioning in shared libraries.
       For more information, please have a look at the disussion on
diff --git a/source/rpc_server/srv_samr_util.c b/source/rpc_server/srv_samr_util.c
index 74daf46..ef588ae 100644
--- a/source/rpc_server/srv_samr_util.c
+++ b/source/rpc_server/srv_samr_util.c
@@ -339,7 +339,15 @@ void copy_id21_to_sam_passwd(const char *log_prefix,
 		if (from->password_expired == PASS_MUST_CHANGE_AT_NEXT_LOGON) {
 			pdb_set_pass_last_set_time(to, 0, PDB_CHANGED);
 		} else {
-			pdb_set_pass_last_set_time(to, time(NULL),PDB_CHANGED);
+			/* A subtlety here: some windows commands will
+			   clear the expired flag even though it's not
+			   set, and we don't want to reset the time
+			   in these caess.  "net user /dom <user> /active:y"
+			   for example, to clear an autolocked acct.
+			   We must check to see if it's expired first. jmcd */
+			stored_time = pdb_get_pass_last_set_time(to);
+			if (stored_time == 0)
+				pdb_set_pass_last_set_time(to, time(NULL),PDB_CHANGED);
 		}
 	}
 }


-- 
Samba Shared Repository


More information about the samba-cvs mailing list