summaryrefslogtreecommitdiff
path: root/source3/passdb/passdb.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-03-02 10:16:28 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-03-02 10:16:28 +0000
commit2ef9be9a99cbd4b3c5076433153d675aa0cd4ca2 (patch)
tree2cd36969e8d97fbf8f18bd8f0593bc2298bc163e /source3/passdb/passdb.c
parentf4f43fc9401a5c681ec7cd18564dbad3a1d8cd08 (diff)
downloadsamba-2ef9be9a99cbd4b3c5076433153d675aa0cd4ca2.tar.gz
samba-2ef9be9a99cbd4b3c5076433153d675aa0cd4ca2.tar.bz2
samba-2ef9be9a99cbd4b3c5076433153d675aa0cd4ca2.zip
This patch merges my private LDAP tree into HEAD.
The main change here is to move ldap into the new pluggable passdb subsystem and to take the LDAP location as a 'location' paramter on the 'passdb backend' line in the smb.conf. This is an LDAP URL, parsed by OpenLDAP where supported, and by hand where it isn't. It also adds the ldap user suffix and ldap machine suffix smb.conf options, so that machines added to the LDAP dir don't get mixed in with people. Non-unix account support is also added. This means that machines don't need to be in /etc/passwd or in nss_ldap's scope. This code has stood up well under my production environment, so it relitivly well tested. I'm commiting this now becouse others have shown interest in using it, and there is no point 'hording' the code :-). Andrew Bartlett (This used to be commit cd5234d7dd7309d88944b83d807c1f1c2ca0460a)
Diffstat (limited to 'source3/passdb/passdb.c')
-rw-r--r--source3/passdb/passdb.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 5ae1b710f5..191844a454 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -904,12 +904,13 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from)
if (from == NULL || to == NULL)
return;
- pdb_set_logon_time(to,nt_time_to_unix(&from->logon_time));
- pdb_set_logoff_time(to,nt_time_to_unix(&from->logoff_time));
- pdb_set_kickoff_time(to, nt_time_to_unix(&from->kickoff_time));
+ pdb_set_logon_time(to,nt_time_to_unix(&from->logon_time), True);
+ pdb_set_logoff_time(to,nt_time_to_unix(&from->logoff_time), True);
+ pdb_set_kickoff_time(to, nt_time_to_unix(&from->kickoff_time), True);
+ pdb_set_pass_can_change_time(to, nt_time_to_unix(&from->pass_can_change_time), True);
+ pdb_set_pass_must_change_time(to, nt_time_to_unix(&from->pass_must_change_time), True);
+
pdb_set_pass_last_set_time(to, nt_time_to_unix(&from->pass_last_set_time));
- pdb_set_pass_can_change_time(to, nt_time_to_unix(&from->pass_can_change_time));
- pdb_set_pass_must_change_time(to, nt_time_to_unix(&from->pass_must_change_time));
if (from->uni_user_name.buffer)
pdb_set_username(to , pdb_convert(&from->uni_user_name ));
@@ -958,12 +959,13 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from)
if (from == NULL || to == NULL)
return;
- pdb_set_logon_time(to,nt_time_to_unix(&from->logon_time));
- pdb_set_logoff_time(to,nt_time_to_unix(&from->logoff_time));
- pdb_set_kickoff_time(to, nt_time_to_unix(&from->kickoff_time));
+ pdb_set_logon_time(to,nt_time_to_unix(&from->logon_time), True);
+ pdb_set_logoff_time(to,nt_time_to_unix(&from->logoff_time), True);
+ pdb_set_kickoff_time(to, nt_time_to_unix(&from->kickoff_time), True);
+ pdb_set_pass_can_change_time(to, nt_time_to_unix(&from->pass_can_change_time), True);
+ pdb_set_pass_must_change_time(to, nt_time_to_unix(&from->pass_must_change_time), True);
+
pdb_set_pass_last_set_time(to, nt_time_to_unix(&from->pass_last_set_time));
- pdb_set_pass_can_change_time(to, nt_time_to_unix(&from->pass_can_change_time));
- pdb_set_pass_must_change_time(to, nt_time_to_unix(&from->pass_must_change_time));
if (from->uni_user_name.buffer)
pdb_set_username(to , pdb_convert(&from->uni_user_name ));