summaryrefslogtreecommitdiffstats
path: root/source/smbd/session.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-04-21 07:43:54 +0000
committerJeremy Allison <jra@samba.org>2001-04-21 07:43:54 +0000
commit1e098744677e022547707ebff500fb4515402871 (patch)
treef7c2f3488db74aef510b2aaaa1aca71829ae61cd /source/smbd/session.c
parentf87f3707f3d5f205d0287381d71380264a711666 (diff)
downloadsamba-1e098744677e022547707ebff500fb4515402871.tar.gz
samba-1e098744677e022547707ebff500fb4515402871.tar.xz
samba-1e098744677e022547707ebff500fb4515402871.zip
Fixed compile bug when using --with-pam but not --with-utmp.
Jeremy.
Diffstat (limited to 'source/smbd/session.c')
-rw-r--r--source/smbd/session.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/smbd/session.c b/source/smbd/session.c
index 653a3d9c027..4ede1d9a687 100644
--- a/source/smbd/session.c
+++ b/source/smbd/session.c
@@ -89,7 +89,14 @@ BOOL session_claim(uint16 vuid)
}
fstrcpy(sessionid.username, vuser->user.unix_name);
+#if WITH_UTMP
fstrcpy(sessionid.hostname, lp_utmp_hostname());
+#else
+ {
+ extern fstring remote_machine;
+ fstrcpy(sessionid.hostname, remote_machine);
+ }
+#endif
slprintf(sessionid.id_str, sizeof(sessionid.id_str)-1, SESSION_TEMPLATE, i);
sessionid.id_num = i;
sessionid.pid = pid;