diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-02-21 09:55:13 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-02-21 09:55:13 +1100 |
commit | 774fa12ac1695600710ce9fac18024edd38161ee (patch) | |
tree | 5440d8c0f00d28656e0d8f65f3b771eb11a01842 /source4/lib/samba3/policy.c | |
parent | 49b3a4829325967df9d1e616ad32e5379ce6cf5d (diff) | |
parent | 910a1cafdf253255510d3aff7cc2385da43331dd (diff) | |
download | samba-774fa12ac1695600710ce9fac18024edd38161ee.tar.gz samba-774fa12ac1695600710ce9fac18024edd38161ee.tar.bz2 samba-774fa12ac1695600710ce9fac18024edd38161ee.zip |
Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-local
(This used to be commit 5cd3310b78a85243eb436d05db3228c3495f9162)
Diffstat (limited to 'source4/lib/samba3/policy.c')
-rw-r--r-- | source4/lib/samba3/policy.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/source4/lib/samba3/policy.c b/source4/lib/samba3/policy.c deleted file mode 100644 index 44944770c1..0000000000 --- a/source4/lib/samba3/policy.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Unix SMB/CIFS implementation. - * account policy storage - * Copyright (C) Jelmer Vernooij 2005 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see <http://www.gnu.org/licenses/>. - */ - -#include "includes.h" -#include "lib/tdb/include/tdb.h" -#include "lib/util/util_tdb.h" -#include "lib/samba3/samba3.h" -#include "system/filesys.h" - -NTSTATUS samba3_read_account_policy(const char *fn, TALLOC_CTX *ctx, struct samba3_policy *ret) -{ - TDB_CONTEXT *tdb = tdb_open(fn, 0, TDB_DEFAULT, O_RDONLY, 0600); - if (!tdb) { - DEBUG(0,("Failed to open account policy database\n")); - return NT_STATUS_UNSUCCESSFUL; - } - - tdb_fetch_uint32(tdb, "min password length", &ret->min_password_length); - tdb_fetch_uint32(tdb, "password history", &ret->password_history); - tdb_fetch_uint32(tdb, "user must logon to change pasword", &ret->user_must_logon_to_change_password); - tdb_fetch_uint32(tdb, "maximum password age", &ret->maximum_password_age); - tdb_fetch_uint32(tdb, "minimum password age", &ret->minimum_password_age); - tdb_fetch_uint32(tdb, "lockout duration", &ret->lockout_duration); - tdb_fetch_uint32(tdb, "reset count minutes", &ret->reset_count_minutes); - tdb_fetch_uint32(tdb, "bad lockout minutes", &ret->bad_lockout_minutes); - tdb_fetch_uint32(tdb, "disconnect time", &ret->disconnect_time); - tdb_fetch_uint32(tdb, "refuse machine password change", &ret->refuse_machine_password_change); - - /* FIXME: Read privileges as well */ - - tdb_close(tdb); - - return NT_STATUS_OK; -} |