summaryrefslogtreecommitdiff
path: root/source3/smbd/session.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-11-03 23:20:10 -0700
committerJeremy Allison <jra@samba.org>2007-11-03 23:20:10 -0700
commit5b0b4f23ef5fec3d1ad518237f973d4e014b5766 (patch)
treef75cdfaef81e5fcc0cf7061e0141b97831508ee1 /source3/smbd/session.c
parent51a0354d751f48a2542984c81e218da33669bbeb (diff)
downloadsamba-5b0b4f23ef5fec3d1ad518237f973d4e014b5766.tar.gz
samba-5b0b4f23ef5fec3d1ad518237f973d4e014b5766.tar.bz2
samba-5b0b4f23ef5fec3d1ad518237f973d4e014b5766.zip
Remove most of the remaining globals out of lib/util_sock.c.
I have a plan for dealing with the remaining..... Watch this space. Jeremy. (This used to be commit 963fc7685212689f02b3adcc05b4273ee5c382d4)
Diffstat (limited to 'source3/smbd/session.c')
-rw-r--r--source3/smbd/session.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/smbd/session.c b/source3/smbd/session.c
index 69f4a37c85..000b2f5d9c 100644
--- a/source3/smbd/session.c
+++ b/source3/smbd/session.c
@@ -159,9 +159,9 @@ bool session_claim(user_struct *vuser)
client_name() handles this case internally.
*/
- hostname = client_name();
+ hostname = client_name(get_client_fd());
if (strcmp(hostname, "UNKNOWN") == 0) {
- hostname = client_addr(addr,sizeof(addr));
+ hostname = client_addr(get_client_fd(),addr,sizeof(addr));
}
fstrcpy(sessionid.username, vuser->user.unix_name);
@@ -171,7 +171,8 @@ bool session_claim(user_struct *vuser)
sessionid.uid = vuser->uid;
sessionid.gid = vuser->gid;
fstrcpy(sessionid.remote_machine, get_remote_machine_name());
- fstrcpy(sessionid.ip_addr_str, client_addr(addr,sizeof(addr)));
+ fstrcpy(sessionid.ip_addr_str,
+ client_addr(get_client_fd(),addr,sizeof(addr)));
sessionid.connect_start = time(NULL);
if (!smb_pam_claim_session(sessionid.username, sessionid.id_str,