summaryrefslogtreecommitdiff
path: root/source4/lib/samba3/policy.c
diff options
context:
space:
mode:
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);