summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_smbpasswd.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-10-01 10:54:11 +0000
committerAndrew Tridgell <tridge@samba.org>2001-10-01 10:54:11 +0000
commitc6d1e756649408412d72e5ad2789804b2908b6f2 (patch)
tree78f1b8853ca09a80cb6e5769361b5fe73ff78d99 /source3/passdb/pdb_smbpasswd.c
parent2e3be37878f065b8012e4bb16bede14790f240f0 (diff)
downloadsamba-c6d1e756649408412d72e5ad2789804b2908b6f2.tar.gz
samba-c6d1e756649408412d72e5ad2789804b2908b6f2.tar.bz2
samba-c6d1e756649408412d72e5ad2789804b2908b6f2.zip
- fix handling of 0 last_change_time and must_change_time
- move the arbitrary 21 day timeout to local.h (This used to be commit 11075f543470c3283accce0246d0b2983420695a)
Diffstat (limited to 'source3/passdb/pdb_smbpasswd.c')
-rw-r--r--source3/passdb/pdb_smbpasswd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index bca7541782..f487dcf347 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -1219,10 +1219,11 @@ static BOOL build_sam_account(SAM_ACCOUNT *sam_pass, struct smb_passwd *pw_buf)
pdb_set_dir_drive (sam_pass, lp_logon_drive());
- /* FIXME!! What should this be set to? New smb.conf parameter maybe?
- max password age? For now, we'll use the current time + 21 days.
- --jerry */
- pdb_set_pass_must_change_time (sam_pass, time(NULL)+1814400);
+ /* the smbpasswd format doesn't have a must change time field, so
+ we can't get this right. The best we can do is to set this to
+ some time in the future. 21 days seems as reasonable as any other value :)
+ */
+ pdb_set_pass_must_change_time (sam_pass, pw_buf->pass_last_set_time + MAX_PASSWORD_AGE);
/* check if this is a user account or a machine account */
if (samlogon_user[strlen(samlogon_user)-1] != '$')