From 69fb6840637e07318914d632571c8481f3573461 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 25 Aug 2005 19:02:03 +0000 Subject: r9621: Bunch of bug fixes. Add 'format' option to samba3dump (text,summary,ldif) (This used to be commit dc6aab8d4a6d0fe47756c90d3d311b6009d571ff) --- source4/lib/samba3/policy.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'source4/lib/samba3/policy.c') 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); -- cgit