diff options
author | Günther Deschner <gd@samba.org> | 2010-05-18 18:54:56 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-05-18 21:43:05 +0200 |
commit | f6f3bb1813b5f030616e422ed420b938244be84e (patch) | |
tree | ac189ce46b5e73b83c71c2790b7d6823e34a0dd1 /source3/passdb | |
parent | 8478770c357f712f1fc3b8a0a9a5f9e730388abb (diff) | |
download | samba-f6f3bb1813b5f030616e422ed420b938244be84e.tar.gz samba-f6f3bb1813b5f030616e422ed420b938244be84e.tar.bz2 samba-f6f3bb1813b5f030616e422ed420b938244be84e.zip |
s3-passdb: move get_logon_hours_from_pdb() into samr server.
Guenther
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/passdb.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 9514e05254..08488f13c9 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -2397,26 +2397,3 @@ bool get_trust_pw_hash(const char *domain, uint8 ret_pwd[16], "password for domain %s\n", domain)); return False; } - -struct samr_LogonHours get_logon_hours_from_pdb(TALLOC_CTX *mem_ctx, - struct samu *pw) -{ - struct samr_LogonHours hours; - const int units_per_week = 168; - - ZERO_STRUCT(hours); - hours.bits = talloc_array(mem_ctx, uint8_t, units_per_week); - if (!hours.bits) { - return hours; - } - - hours.units_per_week = units_per_week; - memset(hours.bits, 0xFF, units_per_week); - - if (pdb_get_hours(pw)) { - memcpy(hours.bits, pdb_get_hours(pw), - MIN(pdb_get_hours_len(pw), units_per_week)); - } - - return hours; -} |