summaryrefslogtreecommitdiff
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
commite129db422b7e2bf9a567ed4b778e7ca326e14a4b (patch)
tree007cba165a3b3e0f31d6851a63807a5e71cfd881
parent911975c88f0b364dfc42905a53ed0f183028c57b (diff)
downloadsamba-e129db422b7e2bf9a567ed4b778e7ca326e14a4b.tar.gz
samba-e129db422b7e2bf9a567ed4b778e7ca326e14a4b.tar.bz2
samba-e129db422b7e2bf9a567ed4b778e7ca326e14a4b.zip
Fixed compile bug when using --with-pam but not --with-utmp.
Jeremy. (This used to be commit 1e098744677e022547707ebff500fb4515402871)
-rw-r--r--source3/smbd/session.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/smbd/session.c b/source3/smbd/session.c
index 653a3d9c02..4ede1d9a68 100644
--- a/source3/smbd/session.c
+++ b/source3/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;