diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-07-18 15:07:23 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-07-18 15:07:23 +0930 |
commit | fe72740e8221575921c22030d6d4fcb19201b03b (patch) | |
tree | 0b1bb254e23d6541eede8f2ff4494af477fd5566 /source3/smbd/uid.c | |
parent | c809eec53fb1d2a36909e4934dff349f91e3359e (diff) | |
download | samba-fe72740e8221575921c22030d6d4fcb19201b03b.tar.gz samba-fe72740e8221575921c22030d6d4fcb19201b03b.tar.bz2 samba-fe72740e8221575921c22030d6d4fcb19201b03b.zip |
loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.
They use talloc_tos() internally: hoist that up to the callers, some
of whom don't want to us talloc_tos().
A simple patch, but hits a lot of files.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'source3/smbd/uid.c')
-rw-r--r-- | source3/smbd/uid.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index 27d7d1a413..eac5d9d97e 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -122,7 +122,8 @@ static bool check_user_ok(connection_struct *conn, if (!readonly_share && !share_access_check(session_info->security_token, - lp_servicename(snum), FILE_WRITE_DATA, + lp_servicename(talloc_tos(), snum), + FILE_WRITE_DATA, NULL)) { /* smb.conf allows r/w, but the security descriptor denies * write. Fall back to looking at readonly. */ @@ -132,7 +133,7 @@ static bool check_user_ok(connection_struct *conn, } if (!share_access_check(session_info->security_token, - lp_servicename(snum), + lp_servicename(talloc_tos(), snum), readonly_share ? FILE_READ_DATA : FILE_WRITE_DATA, NULL)) { @@ -209,7 +210,7 @@ static bool change_to_user_internal(connection_struct *conn, "not permitted access to share %s.\n", session_info->unix_info->sanitized_username, session_info->unix_info->unix_name, - lp_servicename(snum))); + lp_servicename(talloc_tos(), snum))); return false; } @@ -222,7 +223,7 @@ static bool change_to_user_internal(connection_struct *conn, * See if we should force group for this service. If so this overrides * any group set in the force user code. */ - if((group_c = *lp_force_group(snum))) { + if((group_c = *lp_force_group(talloc_tos(), snum))) { SMB_ASSERT(conn->force_group_gid != (gid_t)-1); @@ -299,7 +300,8 @@ bool change_to_user(connection_struct *conn, uint64_t vuid) if (vuser == NULL) { /* Invalid vuid sent */ DEBUG(2,("Invalid vuid %llu used on share %s.\n", - (unsigned long long)vuid, lp_servicename(snum))); + (unsigned long long)vuid, lp_servicename(talloc_tos(), + snum))); return false; } @@ -307,7 +309,8 @@ bool change_to_user(connection_struct *conn, uint64_t vuid) if (!conn->force_user && vuser == NULL) { DEBUG(2,("Invalid vuid used %llu in accessing share %s.\n", - (unsigned long long)vuid, lp_servicename(snum))); + (unsigned long long)vuid, + lp_servicename(talloc_tos(), snum))); return False; } |