svn commit: samba r22819 - in branches: SAMBA_3_0/source/auth SAMBA_3_0_25/source/auth SAMBA_3_0_26/source/auth

vlendec at samba.org vlendec at samba.org
Sat May 12 19:53:48 GMT 2007


Author: vlendec
Date: 2007-05-12 19:53:47 +0000 (Sat, 12 May 2007)
New Revision: 22819

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22819

Log:
Fix Bug 4613. We just dumped the must change & friends. With the
pass_last_changed == 0 we now return "Change now!" instead of "Change
never"

Modified:
   branches/SAMBA_3_0/source/auth/auth_util.c
   branches/SAMBA_3_0_25/source/auth/auth_util.c
   branches/SAMBA_3_0_26/source/auth/auth_util.c


Changeset:
Modified: branches/SAMBA_3_0/source/auth/auth_util.c
===================================================================
--- branches/SAMBA_3_0/source/auth/auth_util.c	2007-05-12 19:34:39 UTC (rev 22818)
+++ branches/SAMBA_3_0/source/auth/auth_util.c	2007-05-12 19:53:47 UTC (rev 22819)
@@ -1484,6 +1484,30 @@
 		return NT_STATUS_NO_MEMORY;
 	}
 
+	if (!pdb_set_pass_last_set_time(
+		    sam_account,
+		    nt_time_to_unix(info3->pass_last_set_time),
+		    PDB_CHANGED)) {
+		TALLOC_FREE(sam_account);
+		return NT_STATUS_NO_MEMORY;
+	}
+
+	if (!pdb_set_pass_can_change_time(
+		    sam_account,
+		    nt_time_to_unix(info3->pass_can_change_time),
+		    PDB_CHANGED)) {
+		TALLOC_FREE(sam_account);
+		return NT_STATUS_NO_MEMORY;
+	}
+
+	if (!pdb_set_pass_must_change_time(
+		    sam_account,
+		    nt_time_to_unix(info3->pass_must_change_time),
+		    PDB_CHANGED)) {
+		TALLOC_FREE(sam_account);
+		return NT_STATUS_NO_MEMORY;
+	}
+
 	result = make_server_info(NULL);
 	if (result == NULL) {
 		DEBUG(4, ("make_server_info failed!\n"));

Modified: branches/SAMBA_3_0_25/source/auth/auth_util.c
===================================================================
--- branches/SAMBA_3_0_25/source/auth/auth_util.c	2007-05-12 19:34:39 UTC (rev 22818)
+++ branches/SAMBA_3_0_25/source/auth/auth_util.c	2007-05-12 19:53:47 UTC (rev 22819)
@@ -1874,6 +1874,30 @@
 		return NT_STATUS_NO_MEMORY;
 	}
 
+	if (!pdb_set_pass_last_set_time(
+		    sam_account,
+		    nt_time_to_unix(info3->pass_last_set_time),
+		    PDB_CHANGED)) {
+		TALLOC_FREE(sam_account);
+		return NT_STATUS_NO_MEMORY;
+	}
+
+	if (!pdb_set_pass_can_change_time(
+		    sam_account,
+		    nt_time_to_unix(info3->pass_can_change_time),
+		    PDB_CHANGED)) {
+		TALLOC_FREE(sam_account);
+		return NT_STATUS_NO_MEMORY;
+	}
+
+	if (!pdb_set_pass_must_change_time(
+		    sam_account,
+		    nt_time_to_unix(info3->pass_must_change_time),
+		    PDB_CHANGED)) {
+		TALLOC_FREE(sam_account);
+		return NT_STATUS_NO_MEMORY;
+	}
+
 	result = make_server_info(NULL);
 	if (result == NULL) {
 		DEBUG(4, ("make_server_info failed!\n"));

Modified: branches/SAMBA_3_0_26/source/auth/auth_util.c
===================================================================
--- branches/SAMBA_3_0_26/source/auth/auth_util.c	2007-05-12 19:34:39 UTC (rev 22818)
+++ branches/SAMBA_3_0_26/source/auth/auth_util.c	2007-05-12 19:53:47 UTC (rev 22819)
@@ -1874,6 +1874,30 @@
 		return NT_STATUS_NO_MEMORY;
 	}
 
+	if (!pdb_set_pass_last_set_time(
+		    sam_account,
+		    nt_time_to_unix(info3->pass_last_set_time),
+		    PDB_CHANGED)) {
+		TALLOC_FREE(sam_account);
+		return NT_STATUS_NO_MEMORY;
+	}
+
+	if (!pdb_set_pass_can_change_time(
+		    sam_account,
+		    nt_time_to_unix(info3->pass_can_change_time),
+		    PDB_CHANGED)) {
+		TALLOC_FREE(sam_account);
+		return NT_STATUS_NO_MEMORY;
+	}
+
+	if (!pdb_set_pass_must_change_time(
+		    sam_account,
+		    nt_time_to_unix(info3->pass_must_change_time),
+		    PDB_CHANGED)) {
+		TALLOC_FREE(sam_account);
+		return NT_STATUS_NO_MEMORY;
+	}
+
 	result = make_server_info(NULL);
 	if (result == NULL) {
 		DEBUG(4, ("make_server_info failed!\n"));



More information about the samba-cvs mailing list