summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-06-15 17:06:06 +0000
committerJeremy Allison <jra@samba.org>2001-06-15 17:06:06 +0000
commit9312eab0d134aac673caa5b1b8e8e74c25f94566 (patch)
tree247bb99a7b8580ce10f130488daef71253e6001b
parentc916aa4bc141b2202ab0e9da2ce91a0856d60e40 (diff)
downloadsamba-9312eab0d134aac673caa5b1b8e8e74c25f94566.tar.gz
samba-9312eab0d134aac673caa5b1b8e8e74c25f94566.tar.xz
samba-9312eab0d134aac673caa5b1b8e8e74c25f94566.zip
Null hostname fix from HEAD.
Jeremy.
-rw-r--r--source/smbd/utmp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/smbd/utmp.c b/source/smbd/utmp.c
index 486c7fe06ee..f79cd43c5b1 100644
--- a/source/smbd/utmp.c
+++ b/source/smbd/utmp.c
@@ -391,7 +391,8 @@ static void sys_utmp_update(struct utmp *u, const char *hostname, BOOL claim)
getutmpx(u, &ux);
#if defined(HAVE_UX_UT_SYSLEN)
- ux.ut_syslen = strlen(hostname) + 1; /* include end NULL */
+ if (hostname) ux.ut_syslen = strlen(hostname) + 1; /* include end NULL */
+ else ux.ut_syslen = 0;
#endif
safe_strcpy(ux.ut_host, hostname, sizeof(ux.ut_host)-1);