diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-06-27 14:34:47 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-06-27 11:29:17 +0200 |
commit | cb01f6c51ebc206c623dbd1a8f05a760f1d1ca88 (patch) | |
tree | f4b3b3dfbe48b6f6ea6d449b387d2545001c6808 /source3/passdb | |
parent | f7c372795c7fa9d45c731cc0c8fba135f8305301 (diff) | |
download | samba-cb01f6c51ebc206c623dbd1a8f05a760f1d1ca88.tar.gz samba-cb01f6c51ebc206c623dbd1a8f05a760f1d1ca88.tar.bz2 samba-cb01f6c51ebc206c623dbd1a8f05a760f1d1ca88.zip |
s3-pdb_samba4: Add support for lastLogon and lastLogoff
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/pdb_samba4.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/passdb/pdb_samba4.c b/source3/passdb/pdb_samba4.c index b0e34e42d1..389668fa5c 100644 --- a/source3/passdb/pdb_samba4.c +++ b/source3/passdb/pdb_samba4.c @@ -516,6 +516,16 @@ static int pdb_samba4_replace_by_sam(struct pdb_samba4_state *state, pdb_get_kickoff_time(sam)); } + if (need_update(sam, PDB_LOGONTIME)) { + ret |= pdb_samba4_add_time(msg, "lastLogon", + pdb_get_logon_time(sam)); + } + + if (need_update(sam, PDB_LOGOFFTIME)) { + ret |= pdb_samba4_add_time(msg, "lastLogoff", + pdb_get_logoff_time(sam)); + } + if (need_update(sam, PDB_USERNAME)) { ret |= ldb_msg_add_string(msg, "samAccountName", pdb_get_username(sam)); @@ -564,8 +574,6 @@ static int pdb_samba4_replace_by_sam(struct pdb_samba4_state *state, } /* Not yet handled here or not meaningful for modifies on a Samba4 backend: - PDB_LOGONTIME, - PDB_LOGOFFTIME, PDB_BAD_PASSWORD_TIME, PDB_CANCHANGETIME, - these are calculated per policy, not stored PDB_DOMAIN, |