diff options
author | Jeremy Allison <jra@samba.org> | 2009-09-24 15:44:28 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-09-24 15:44:28 -0700 |
commit | 536c4dd2d69f9a35547c0ce77b47c4f0b03aa5ac (patch) | |
tree | 97c6fdb2c4ecb7bee1b77accd6411fc679c1b046 /source3/smbd/password.c | |
parent | 4f10aa59730b44fc4328daca3e2e43693fc1b69f (diff) | |
download | samba-536c4dd2d69f9a35547c0ce77b47c4f0b03aa5ac.tar.gz samba-536c4dd2d69f9a35547c0ce77b47c4f0b03aa5ac.tar.bz2 samba-536c4dd2d69f9a35547c0ce77b47c4f0b03aa5ac.zip |
Revert b39c390280d1f268e2550c731057aec550a3f086 - casts should not
be here.
Jeremy.
Diffstat (limited to 'source3/smbd/password.c')
-rw-r--r-- | source3/smbd/password.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c index d6a84470e1..4c1cef45cc 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -551,13 +551,14 @@ 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)) { - char **invalid = (char **) str_list_copy(talloc_tos(), - lp_invalid_users(snum)); + invalid = str_list_copy(talloc_tos(), lp_invalid_users(snum)); if (invalid && str_list_substitute(invalid, "%S", lp_servicename(snum))) { @@ -566,37 +567,36 @@ static bool user_ok(struct smbd_server_connection *sconn, if ( invalid && str_list_sub_basic(invalid, "", "") ) { ret = !user_in_list(sconn, user, - (const char **)invalid); + (const char **)invalid); } } - TALLOC_FREE(invalid); } + TALLOC_FREE(invalid); if (ret && lp_valid_users(snum)) { - char **valid = (char **) str_list_copy(talloc_tos(), - lp_valid_users(snum)); - if (valid && - str_list_substitute(valid, "%S", lp_servicename(snum))) { + valid = str_list_copy(talloc_tos(), lp_valid_users(snum)); + if ( valid && + str_list_substitute(valid, "%S", lp_servicename(snum)) ) { /* This is used in sec=share only, so no current user * around to pass to str_list_sub_basic() */ if ( valid && str_list_sub_basic(valid, "", "") ) { ret = user_in_list(sconn, user, - (const char **)valid); + (const char **)valid); } } - TALLOC_FREE(valid); } + TALLOC_FREE(valid); if (ret && lp_onlyuser(snum)) { - char **user_list = (char **) str_list_make_v3( + char **user_list = str_list_make_v3( talloc_tos(), lp_username(snum), NULL); if (user_list && str_list_substitute(user_list, "%S", lp_servicename(snum))) { ret = user_in_list(sconn, user, - (const char **)user_list); + (const char **)user_list); } TALLOC_FREE(user_list); } |