summaryrefslogtreecommitdiffstats
path: root/source/smbd/uid.c
diff options
context:
space:
mode:
authorCVS Import User <samba-bugs@samba.org>2004-04-04 11:27:30 +0000
committerCVS Import User <samba-bugs@samba.org>2004-04-04 11:27:30 +0000
commitf8db8e0ae8fa16894a5eb6367ca325e530ff506b (patch)
tree753894e0b091990464ef5ce274cb149e4fd9cf0d /source/smbd/uid.c
parent139b1658ca30692835c1a7203c7cd003e587ac12 (diff)
downloadsamba-f8db8e0ae8fa16894a5eb6367ca325e530ff506b.tar.gz
samba-f8db8e0ae8fa16894a5eb6367ca325e530ff506b.tar.xz
samba-f8db8e0ae8fa16894a5eb6367ca325e530ff506b.zip
r4: merge in the SAMBA_3_0 branch from cvs
to checkout try this: svn co svn+ssh://svn.samba.org/home/svn/samba/branches/SAMBA_3_0 samba-3_0-work metze
Diffstat (limited to 'source/smbd/uid.c')
-rw-r--r--source/smbd/uid.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source/smbd/uid.c b/source/smbd/uid.c
index ff3dd1a56ef..3859298055b 100644
--- a/source/smbd/uid.c
+++ b/source/smbd/uid.c
@@ -44,7 +44,7 @@ BOOL change_to_guest(void)
initgroups(pass->pw_name, pass->pw_gid);
#endif
- set_sec_ctx(pass->pw_uid, pass->pw_gid, 0, NULL, NULL, NULL);
+ set_sec_ctx(pass->pw_uid, pass->pw_gid, 0, NULL, NULL);
current_user.conn = NULL;
current_user.vuid = UID_FIELD_INVALID;
@@ -161,9 +161,8 @@ BOOL change_to_user(connection_struct *conn, uint16 vuid)
gid_t gid;
uid_t uid;
char group_c;
- BOOL must_free_token_priv = False;
+ BOOL must_free_token = False;
NT_USER_TOKEN *token = NULL;
- PRIVILEGE_SET *privs = NULL;
if (!conn) {
DEBUG(2,("change_to_user: Connection not open\n"));
@@ -196,14 +195,12 @@ BOOL change_to_user(connection_struct *conn, uint16 vuid)
current_user.groups = conn->groups;
current_user.ngroups = conn->ngroups;
token = conn->nt_user_token;
- privs = conn->privs;
} else if ((vuser) && check_user_ok(conn, vuser, snum)) {
uid = conn->admin_user ? 0 : vuser->uid;
gid = vuser->gid;
current_user.ngroups = vuser->n_groups;
current_user.groups = vuser->groups;
token = vuser->nt_user_token;
- privs = vuser->privs;
} else {
DEBUG(2,("change_to_user: Invalid vuid used %d or vuid not permitted access to share.\n",vuid));
return False;
@@ -251,20 +248,17 @@ BOOL change_to_user(connection_struct *conn, uint16 vuid)
DEBUG(1, ("change_to_user: create_nt_token failed!\n"));
return False;
}
- pdb_get_privilege_set(token->user_sids, token->num_sids, privs);
- must_free_token_priv = True;
+ must_free_token = True;
}
- set_sec_ctx(uid, gid, current_user.ngroups, current_user.groups, token, privs);
+ set_sec_ctx(uid, gid, current_user.ngroups, current_user.groups, token);
/*
* Free the new token (as set_sec_ctx copies it).
*/
- if (must_free_token_priv) {
+ if (must_free_token)
delete_nt_token(&token);
- destroy_privilege(&privs);
- }
current_user.conn = conn;
current_user.vuid = vuid;
@@ -305,7 +299,7 @@ BOOL become_authenticated_pipe_user(pipes_struct *p)
return False;
set_sec_ctx(p->pipe_user.uid, p->pipe_user.gid,
- p->pipe_user.ngroups, p->pipe_user.groups, p->pipe_user.nt_user_token, p->pipe_user.privs);
+ p->pipe_user.ngroups, p->pipe_user.groups, p->pipe_user.nt_user_token);
return True;
}