summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/passdb/passdb.c6
-rw-r--r--source3/passdb/pdb_smbpasswd.c1
-rw-r--r--source3/rpc_parse/parse_net.c12
3 files changed, 10 insertions, 9 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?
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index 904f3f3612..1080995aa4 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -1034,12 +1034,12 @@ void init_net_user_info3(NET_USER_INFO_3 *usr, SAM_ACCOUNT *sampw,
int len_logon_srv = strlen(logon_srv);
int len_logon_dom = strlen(logon_dom);
- len_user_name = user_name != NULL ? strlen(user_name )+1 : 0;
- len_full_name = full_name != NULL ? strlen(full_name )+1 : 0;
- len_home_dir = home_dir != NULL ? strlen(home_dir )+1 : 0;
- len_dir_drive = dir_drive != NULL ? strlen(dir_drive )+1 : 0;
- len_logon_script = logon_script != NULL ? strlen(logon_script)+1 : 0;
- len_profile_path = profile_path != NULL ? strlen(profile_path)+1 : 0;
+ len_user_name = strlen(user_name );
+ len_full_name = strlen(full_name );
+ len_home_dir = strlen(home_dir );
+ len_dir_drive = strlen(dir_drive );
+ len_logon_script = strlen(logon_script);
+ len_profile_path = strlen(profile_path);
ZERO_STRUCTP(usr);