summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-12-04 06:20:39 +0000
committerAndrew Tridgell <tridge@samba.org>2001-12-04 06:20:39 +0000
commit1838d83e241ceaa73c61c53b50d5f7104b2f6143 (patch)
tree8fbc15a70fe250245643156af16d6d893e7ab8ab /source3
parent8e8ce079b8c54b257111537d487a5419ce0d1479 (diff)
downloadsamba-1838d83e241ceaa73c61c53b50d5f7104b2f6143.tar.gz
samba-1838d83e241ceaa73c61c53b50d5f7104b2f6143.tar.bz2
samba-1838d83e241ceaa73c61c53b50d5f7104b2f6143.zip
moved init_account_policy() to the right place
(This used to be commit e908f304a26b9f1100e301610151a9334bf117b0)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/account_pol.c6
-rw-r--r--source3/utils/smbpasswd.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/source3/lib/account_pol.c b/source3/lib/account_pol.c
index aad6f8e11d..74c8883ed1 100644
--- a/source3/lib/account_pol.c
+++ b/source3/lib/account_pol.c
@@ -66,7 +66,7 @@ BOOL init_account_policy(void)
/****************************************************************************
****************************************************************************/
-static char *decode_account_policy_name(field)
+static char *decode_account_policy_name(int field)
{
switch (field) {
case AP_MIN_PASSWORD_LEN:
@@ -109,6 +109,8 @@ BOOL account_policy_get(int field, int *value)
{
fstring name;
+ init_account_policy();
+
fstrcpy(name, decode_account_policy_name(field));
*value=tdb_fetch_int(tdb, name);
DEBUG(10,("account_policy_get: %s:%d\n", name, *value));
@@ -122,6 +124,8 @@ BOOL account_policy_set(int field, int value)
{
fstring name;
+ init_account_policy();
+
fstrcpy(name, decode_account_policy_name(field));
if ( tdb_store_int(tdb, name, value)== -1)
return False;
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index b129268f34..92136bea7a 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -221,8 +221,6 @@ static BOOL password_change(const char *remote_machine, char *user_name,
return ret;
}
- init_account_policy();
-
ret = local_password_change(user_name, local_flags, new_passwd,
err_str, sizeof(err_str), msg_str, sizeof(msg_str));