summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-02-04 20:57:35 +0100
committerVolker Lendecke <vl@samba.org>2008-02-04 20:57:49 +0100
commit2762b9a97582b9b28fd5985ba8e3d0299126820e (patch)
treebcaa02c53a19e332ac20c41377e4951caed8d4a9 /source3/smbd
parent3955801298bbcf69afe01c212d5e8ac9812a5dcf (diff)
downloadsamba-2762b9a97582b9b28fd5985ba8e3d0299126820e.tar.gz
samba-2762b9a97582b9b28fd5985ba8e3d0299126820e.tar.bz2
samba-2762b9a97582b9b28fd5985ba8e3d0299126820e.zip
Always pass a TALLOC_CTX to str_list_make and str_list_copy
(This used to be commit e2c9fc4cf5f0ff725330fa44f53782db65fca37e)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/map_username.c6
-rw-r--r--source3/smbd/password.c9
2 files changed, 8 insertions, 7 deletions
diff --git a/source3/smbd/map_username.c b/source3/smbd/map_username.c
index 7290f70547..7536758bcb 100644
--- a/source3/smbd/map_username.c
+++ b/source3/smbd/map_username.c
@@ -178,7 +178,7 @@ bool map_username(fstring user)
/* skip lines like 'user = ' */
- dosuserlist = str_list_make(dosname, NULL);
+ dosuserlist = str_list_make(talloc_tos(), dosname, NULL);
if (!dosuserlist) {
DEBUG(0,("Bad username map entry. Unable to build user list. Ignoring.\n"));
continue;
@@ -193,13 +193,13 @@ bool map_username(fstring user)
fstrcpy( user, unixname );
if ( return_if_mapped ) {
- str_list_free (&dosuserlist);
+ TALLOC_FREE(dosuserlist);
x_fclose(f);
return True;
}
}
- str_list_free (&dosuserlist);
+ TALLOC_FREE(dosuserlist);
}
x_fclose(f);
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 85e1ccf0a7..913c3c35da 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -582,7 +582,7 @@ static bool user_ok(const char *user, int snum)
ret = True;
if (lp_invalid_users(snum)) {
- str_list_copy(&invalid, lp_invalid_users(snum));
+ str_list_copy(talloc_tos(), &invalid, lp_invalid_users(snum));
if (invalid &&
str_list_substitute(invalid, "%S", lp_servicename(snum))) {
@@ -599,7 +599,7 @@ static bool user_ok(const char *user, int snum)
str_list_free (&invalid);
if (ret && lp_valid_users(snum)) {
- str_list_copy(&valid, lp_valid_users(snum));
+ str_list_copy(talloc_tos(), &valid, lp_valid_users(snum));
if ( valid &&
str_list_substitute(valid, "%S", lp_servicename(snum)) ) {
@@ -615,13 +615,14 @@ static bool user_ok(const char *user, int snum)
str_list_free (&valid);
if (ret && lp_onlyuser(snum)) {
- char **user_list = str_list_make (lp_username(snum), NULL);
+ char **user_list = str_list_make(
+ talloc_tos(), lp_username(snum), NULL);
if (user_list &&
str_list_substitute(user_list, "%S",
lp_servicename(snum))) {
ret = user_in_list(user, (const char **)user_list);
}
- if (user_list) str_list_free (&user_list);
+ TALLOC_FREE(user_list);
}
return(ret);