summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2000-11-22 19:51:41 +0000
committerGerald Carter <jerry@samba.org>2000-11-22 19:51:41 +0000
commitaf85ca538cc1f04f089c85dd5814f4c66036bc79 (patch)
tree6fd067abc9c08cca4b3e7842ea9ef7954d5b410f /source3/passdb
parentb935b968ec0bf595940824cff2e0462badadf7a4 (diff)
downloadsamba-af85ca538cc1f04f089c85dd5814f4c66036bc79.tar.gz
samba-af85ca538cc1f04f089c85dd5814f4c66036bc79.tar.bz2
samba-af85ca538cc1f04f089c85dd5814f4c66036bc79.zip
o fixed logon script problems (wrong len in reply to net_sam_logon for
a few strings). I was the one who broke it obviously. o changed a few more defaults in the smbpasswd backend with respect to times. Now the logon time becomes '0' and the pass_can_change_time is set ot the same as pass_last_set_time o change Get_Pwnam() call in local_lookup_name to sys_getpwnam() as it did not seem necessary to try case permutations in the username. Tim, I think this was your code, so you might want to double check me. -- jerry (This used to be commit 37a665002c5cd7908c13d306f61af272a899dbc8)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/passdb.c6
-rw-r--r--source3/passdb/pdb_smbpasswd.c1
2 files changed, 4 insertions, 3 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 217916bc98..27934cb118 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -107,7 +107,7 @@ void pdb_init_sam(SAM_ACCOUNT *user)
ZERO_STRUCTP(user);
- user->logon_time = (time_t)-1;
+ user->logon_time = (time_t)0;
user->logoff_time = (time_t)-1;
user->kickoff_time = (time_t)-1;
user->pass_last_set_time = (time_t)-1;
@@ -508,7 +508,7 @@ BOOL local_lookup_name(char *domain, char *user, DOM_SID *psid, enum SID_NAME_US
(void)map_username(user);
- if(!(pass = Get_Pwnam(user, False))) {
+ if(!(pass = sys_getpwnam(user))) {
/*
* Maybe it was a group ?
*/
@@ -1024,7 +1024,7 @@ time_t pdb_get_logon_time (SAM_ACCOUNT *sampass)
if (sampass)
return (sampass->logon_time);
else
- return (-1);
+ return (0);
}
time_t pdb_get_logoff_time (SAM_ACCOUNT *sampass)
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index 951c97ab3c..38059d5ef3 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -1252,6 +1252,7 @@ static BOOL build_sam_account (SAM_ACCOUNT *sam_pass,
pdb_set_lanman_passwd (sam_pass, pw_buf->smb_passwd);
pdb_set_acct_ctrl (sam_pass, pw_buf->acct_ctrl);
pdb_set_pass_last_set_time (sam_pass, pw_buf->pass_last_set_time);
+ pdb_set_pass_can_change_time (sam_pass, pw_buf->pass_last_set_time);
pdb_set_domain (sam_pass, lp_workgroup());
/* FIXME!! What should this be set to? New smb.conf parameter maybe?