summaryrefslogtreecommitdiff
path: root/source4/lib/samba3/policy.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-08-25 19:02:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:35 -0500
commit69fb6840637e07318914d632571c8481f3573461 (patch)
tree0a1dd4cc4b91ab314ce02ea20c219a67c05aa154 /source4/lib/samba3/policy.c
parent9bf5e494f7ccbb2a9587dce961a99fa07392bf97 (diff)
downloadsamba-69fb6840637e07318914d632571c8481f3573461.tar.gz
samba-69fb6840637e07318914d632571c8481f3573461.tar.bz2
samba-69fb6840637e07318914d632571c8481f3573461.zip
r9621: Bunch of bug fixes. Add 'format' option to samba3dump (text,summary,ldif)
(This used to be commit dc6aab8d4a6d0fe47756c90d3d311b6009d571ff)
Diffstat (limited to 'source4/lib/samba3/policy.c')
-rw-r--r--source4/lib/samba3/policy.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/source4/lib/samba3/policy.c b/source4/lib/samba3/policy.c
index bec3eb7d93..cfe6284fc4 100644
--- a/source4/lib/samba3/policy.c
+++ b/source4/lib/samba3/policy.c
@@ -1,8 +1,7 @@
/*
* Unix SMB/CIFS implementation.
* account policy storage
- * Copyright (C) Jean François Micouleau 1998-2001.
- * Copyright (C) Andrew Bartlett 2002
+ * 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
@@ -24,30 +23,14 @@
#include "lib/samba3/samba3.h"
#include "system/filesys.h"
-#define DATABASE_VERSION 2
-
-/****************************************************************************
- Open the account policy tdb.
-****************************************************************************/
-
NTSTATUS samba3_read_account_policy(const char *fn, TALLOC_CTX *ctx, struct samba3_policy *ret)
{
- const char *vstring = "INFO/version";
- uint32_t version;
-
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;
}
- /* handle a Samba upgrade */
- if (!tdb_fetch_uint32(tdb, vstring, &version) || version != DATABASE_VERSION) {
- tdb_store_uint32(tdb, vstring, DATABASE_VERSION);
- }
-
- ret = talloc_zero(ctx, struct samba3_policy);
-
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);