diff options
Diffstat (limited to 'source3/smbd/session.c')
-rw-r--r-- | source3/smbd/session.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/smbd/session.c b/source3/smbd/session.c index ebbb40eb5a..15154162b9 100644 --- a/source3/smbd/session.c +++ b/source3/smbd/session.c @@ -69,6 +69,7 @@ bool session_claim(user_struct *vuser) struct db_context *ctx; struct db_record *rec; NTSTATUS status; + char addr[INET6_ADDRSTRLEN]; vuser->session_keystr = NULL; @@ -160,7 +161,7 @@ bool session_claim(user_struct *vuser) hostname = client_name(); if (strcmp(hostname, "UNKNOWN") == 0) { - hostname = client_addr(); + hostname = client_addr(addr); } fstrcpy(sessionid.username, vuser->user.unix_name); @@ -170,7 +171,7 @@ 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()); + fstrcpy(sessionid.ip_addr_str, client_addr(addr)); sessionid.connect_start = time(NULL); if (!smb_pam_claim_session(sessionid.username, sessionid.id_str, |