summaryrefslogtreecommitdiff
path: root/source3/smbd/utmp.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/utmp.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/utmp.c')
-rw-r--r--source3/smbd/utmp.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/source3/smbd/utmp.c b/source3/smbd/utmp.c
index 2c5a1abc82..9833a11f2d 100644
--- a/source3/smbd/utmp.c
+++ b/source3/smbd/utmp.c
@@ -21,8 +21,6 @@
#include "includes.h"
-#ifdef WITH_UTMP
-
/****************************************************************************
Reflect connection status in utmp/wtmp files.
T.D.Lee@durham.ac.uk September 1999
@@ -110,6 +108,23 @@ Notes:
****************************************************************************/
+#ifndef WITH_UTMP
+/*
+ * Not WITH_UTMP? Simply supply dummy routines.
+ */
+
+void sys_utmp_claim(const char *username, const char *hostname,
+ struct in_addr *ipaddr,
+ const char *id_str, int id_num)
+{}
+
+void sys_utmp_yield(const char *username, const char *hostname,
+ struct in_addr *ipaddr,
+ const char *id_str, int id_num)
+{}
+
+#else /* WITH_UTMP */
+
#include <utmp.h>
#ifdef HAVE_UTMPX_H
@@ -571,6 +586,4 @@ void sys_utmp_claim(const char *username, const char *hostname,
sys_utmp_update(&u, hostname, True);
}
-#else /* WITH_UTMP */
- void dummy_utmp(void) {}
-#endif
+#endif /* WITH_UTMP */