summaryrefslogtreecommitdiff
path: root/source3/smbd/session.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-06-06 22:33:43 +0000
committerGerald Carter <jerry@samba.org>2003-06-06 22:33:43 +0000
commit71298881c4a630666c1a14be99048f8f86e48162 (patch)
tree2dfcf72ea73b1abffa32cd3717f929174bea9474 /source3/smbd/session.c
parent40eacb1648307c0523b6b3581e8f15322f75eb42 (diff)
downloadsamba-71298881c4a630666c1a14be99048f8f86e48162.tar.gz
samba-71298881c4a630666c1a14be99048f8f86e48162.tar.bz2
samba-71298881c4a630666c1a14be99048f8f86e48162.zip
* add in David Lee's utmp patch (defaults to on if available)
* one more try at fixing builds when --with-ldap=no (This used to be commit b516ab7bdef6b6b2b7f0df8966dbd4c329f46a92)
Diffstat (limited to 'source3/smbd/session.c')
-rw-r--r--source3/smbd/session.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/source3/smbd/session.c b/source3/smbd/session.c
index b7f3bc43e7..4d8826d332 100644
--- a/source3/smbd/session.c
+++ b/source3/smbd/session.c
@@ -66,7 +66,6 @@ BOOL session_claim(user_struct *vuser)
data.dptr = NULL;
data.dsize = 0;
-#if WITH_UTMP
if (lp_utmp()) {
for (i=1;i<MAX_SESSION_ID;i++) {
slprintf(keystr, sizeof(keystr)-1, "ID/%d", i);
@@ -84,7 +83,6 @@ BOOL session_claim(user_struct *vuser)
slprintf(sessionid.id_str, sizeof(sessionid.id_str)-1, SESSION_UTMP_TEMPLATE, i);
tdb_store_flag = TDB_MODIFY;
} else
-#endif
{
slprintf(keystr, sizeof(keystr)-1, "ID/%lu/%u",
(long unsigned int)sys_getpid(),
@@ -137,13 +135,11 @@ BOOL session_claim(user_struct *vuser)
return False;
}
-#if WITH_UTMP
if (lp_utmp()) {
sys_utmp_claim(sessionid.username, sessionid.hostname,
client_ip,
sessionid.id_str, sessionid.id_num);
}
-#endif
vuser->session_keystr = strdup(keystr);
if (!vuser->session_keystr) {
@@ -181,13 +177,11 @@ void session_yield(user_struct *vuser)
SAFE_FREE(dbuf.dptr);
-#if WITH_UTMP
if (lp_utmp()) {
sys_utmp_yield(sessionid.username, sessionid.hostname,
client_ip,
sessionid.id_str, sessionid.id_num);
}
-#endif
smb_pam_close_session(sessionid.username, sessionid.id_str, sessionid.hostname);