diff options
author | Volker Lendecke <vl@samba.org> | 2008-05-08 15:53:55 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-05-10 11:17:01 +0200 |
commit | 53a623d8a69b5dd7fbd964013032878e09032375 (patch) | |
tree | aa65bf69c68b6346c14b0f1bc251cb5e254849fc /source3/smbd | |
parent | 776caa081bc36aac0ab7cc826836740f5bf0bf24 (diff) | |
download | samba-53a623d8a69b5dd7fbd964013032878e09032375.tar.gz samba-53a623d8a69b5dd7fbd964013032878e09032375.tar.bz2 samba-53a623d8a69b5dd7fbd964013032878e09032375.zip |
Remove the unix token info from connection_struct
(This used to be commit 2834dacc8d49f77fe55fb5d7e3eb2dda431d1d3d)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/connection.c | 4 | ||||
-rw-r--r-- | source3/smbd/lanman.c | 8 | ||||
-rw-r--r-- | source3/smbd/service.c | 17 | ||||
-rw-r--r-- | source3/smbd/uid.c | 16 |
4 files changed, 24 insertions, 21 deletions
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c index d7063c9989..97f36971c8 100644 --- a/source3/smbd/connection.c +++ b/source3/smbd/connection.c @@ -152,8 +152,8 @@ bool claim_connection(connection_struct *conn, const char *name, crec.pid = procid_self(); crec.cnum = conn?conn->cnum:-1; if (conn) { - crec.uid = conn->uid; - crec.gid = conn->gid; + crec.uid = conn->server_info->uid; + crec.gid = conn->server_info->gid; strlcpy(crec.servicename, lp_servicename(SNUM(conn)), sizeof(crec.servicename)); } diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index a233893482..4309622b26 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -103,7 +103,7 @@ static int CopyExpanded(connection_struct *conn, lp_servicename(SNUM(conn)), conn->user, conn->connectpath, - conn->gid, + conn->server_info->gid, get_current_username(), current_user_info.domain, buf); @@ -154,7 +154,7 @@ static int StrlenExpanded(connection_struct *conn, int snum, char *s) lp_servicename(SNUM(conn)), conn->user, conn->connectpath, - conn->gid, + conn->server_info->gid, get_current_username(), current_user_info.domain, buf); @@ -184,7 +184,7 @@ static char *Expand(connection_struct *conn, int snum, char *s) lp_servicename(SNUM(conn)), conn->user, conn->connectpath, - conn->gid, + conn->server_info->gid, get_current_username(), current_user_info.domain, buf); @@ -3002,7 +3002,7 @@ static bool api_RNetServerGetInfo(connection_struct *conn,uint16 vuid, lp_servicename(SNUM(conn)), conn->user, conn->connectpath, - conn->gid, + conn->server_info->gid, get_current_username(), current_user_info.domain, comment); diff --git a/source3/smbd/service.c b/source3/smbd/service.c index 77ed320e07..fd072135e8 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -833,14 +833,13 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, conn->vuid = (vuser != NULL) ? vuser->vuid : UID_FIELD_INVALID; - conn->uid = conn->server_info->uid; - conn->gid = conn->server_info->gid; string_set(&conn->user, conn->server_info->unix_name); { char *s = talloc_sub_advanced(talloc_tos(), lp_servicename(SNUM(conn)), conn->user, - conn->connectpath, conn->gid, + conn->connectpath, + conn->server_info->gid, get_current_username(), current_user_info.domain, lp_pathname(snum)); @@ -960,7 +959,8 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, if (*lp_rootpreexec(snum)) { char *cmd = talloc_sub_advanced(talloc_tos(), lp_servicename(SNUM(conn)), conn->user, - conn->connectpath, conn->gid, + conn->connectpath, + conn->server_info->gid, get_current_username(), current_user_info.domain, lp_rootpreexec(snum)); @@ -997,7 +997,8 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, if (*lp_preexec(snum)) { char *cmd = talloc_sub_advanced(talloc_tos(), lp_servicename(SNUM(conn)), conn->user, - conn->connectpath, conn->gid, + conn->connectpath, + conn->server_info->gid, get_current_username(), current_user_info.domain, lp_preexec(snum)); @@ -1316,7 +1317,8 @@ void close_cnum(connection_struct *conn, uint16 vuid) change_to_user(conn, vuid)) { char *cmd = talloc_sub_advanced(talloc_tos(), lp_servicename(SNUM(conn)), conn->user, - conn->connectpath, conn->gid, + conn->connectpath, + conn->server_info->gid, get_current_username(), current_user_info.domain, lp_postexec(SNUM(conn))); @@ -1330,7 +1332,8 @@ void close_cnum(connection_struct *conn, uint16 vuid) if (*lp_rootpostexec(SNUM(conn))) { char *cmd = talloc_sub_advanced(talloc_tos(), lp_servicename(SNUM(conn)), conn->user, - conn->connectpath, conn->gid, + conn->connectpath, + conn->server_info->gid, get_current_username(), current_user_info.domain, lp_rootpostexec(SNUM(conn))); diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index 8a4a54f867..004e48a44f 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -157,7 +157,7 @@ bool change_to_user(connection_struct *conn, uint16 vuid) */ if((lp_security() == SEC_SHARE) && (current_user.conn == conn) && - (current_user.ut.uid == conn->uid)) { + (current_user.ut.uid == conn->server_info->uid)) { DEBUG(4,("change_to_user: Skipping user change - already " "user\n")); return(True); @@ -186,10 +186,10 @@ bool change_to_user(connection_struct *conn, uint16 vuid) */ if (conn->force_user) /* security = share sets this too */ { - uid = conn->uid; - gid = conn->gid; - group_list = conn->groups; - num_groups = conn->ngroups; + uid = conn->server_info->uid; + gid = conn->server_info->gid; + group_list = conn->server_info->groups; + num_groups = conn->server_info->n_groups; } else if (vuser) { uid = conn->admin_user ? 0 : vuser->server_info->uid; gid = conn->server_info->gid; @@ -220,15 +220,15 @@ bool change_to_user(connection_struct *conn, uint16 vuid) int i; for (i = 0; i < num_groups; i++) { - if (group_list[i] == conn->gid) { - gid = conn->gid; + if (group_list[i] == conn->server_info->gid) { + gid = conn->server_info->gid; gid_to_sid(&conn->server_info->ptok ->user_sids[1], gid); break; } } } else { - gid = conn->gid; + gid = conn->server_info->gid; gid_to_sid(&conn->server_info->ptok->user_sids[1], gid); } |