diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-09-25 10:17:17 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-09-25 10:59:13 +0200 |
commit | fb1eb112672c30d7086881922036066b55436a01 (patch) | |
tree | 939f08ec3e4ca4bc4198886076232c15ad319612 /source3/smbd/password.c | |
parent | 0650423edf72a07c55ec1f9516f657d635c3a49a (diff) | |
download | samba-fb1eb112672c30d7086881922036066b55436a01.tar.gz |
s3:smbd/password - move list pointers into blocks
Diffstat (limited to 'source3/smbd/password.c')
-rw-r--r-- | source3/smbd/password.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 4c1cef45cc7..755ff5d6cde 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -551,14 +551,13 @@ bool user_in_list(struct smbd_server_connection *sconn, static bool user_ok(struct smbd_server_connection *sconn, const char *user, int snum) { - char **valid, **invalid; bool ret; - valid = invalid = NULL; ret = True; if (lp_invalid_users(snum)) { - invalid = str_list_copy(talloc_tos(), lp_invalid_users(snum)); + char **invalid = str_list_copy(talloc_tos(), + lp_invalid_users(snum)); if (invalid && str_list_substitute(invalid, "%S", lp_servicename(snum))) { @@ -570,11 +569,12 @@ static bool user_ok(struct smbd_server_connection *sconn, (const char **)invalid); } } + TALLOC_FREE(invalid); } - TALLOC_FREE(invalid); if (ret && lp_valid_users(snum)) { - valid = str_list_copy(talloc_tos(), lp_valid_users(snum)); + char **valid = str_list_copy(talloc_tos(), + lp_valid_users(snum)); if ( valid && str_list_substitute(valid, "%S", lp_servicename(snum)) ) { @@ -586,8 +586,8 @@ static bool user_ok(struct smbd_server_connection *sconn, (const char **)valid); } } + TALLOC_FREE(valid); } - TALLOC_FREE(valid); if (ret && lp_onlyuser(snum)) { char **user_list = str_list_make_v3( |