summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/configure.in3
-rw-r--r--source4/smbd/process.c6
2 files changed, 5 insertions, 4 deletions
diff --git a/source4/configure.in b/source4/configure.in
index b0a8b950a4..6145871911 100644
--- a/source4/configure.in
+++ b/source4/configure.in
@@ -455,7 +455,7 @@ AC_HEADER_STDC
AC_HEADER_DIRENT
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(arpa/inet.h sys/select.h fcntl.h sys/time.h)
+AC_CHECK_HEADERS(arpa/inet.h sys/select.h fcntl.h sys/fcntl.h sys/time.h)
AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h)
AC_CHECK_HEADERS(compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h)
AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h)
@@ -1819,7 +1819,6 @@ dnl glibc2.1 broken check has succeeded.
dnl
AC_CACHE_CHECK([for 64 bit fcntl locking],samba_cv_HAVE_STRUCT_FLOCK64,[
- AC_CHECK_HEADERS(sys/fcntl.h)
AC_TRY_RUN([
#if defined(HAVE_UNISTD_H)
#include <unistd.h>
diff --git a/source4/smbd/process.c b/source4/smbd/process.c
index 0891e3de76..f3ca69ea32 100644
--- a/source4/smbd/process.c
+++ b/source4/smbd/process.c
@@ -717,6 +717,7 @@ void init_smbsession(struct event_context *ev, struct model_ops *model_ops, int
struct server_context *smb;
TALLOC_CTX *mem_ctx;
struct fd_event fde;
+ char *socket_addr;
set_socket_options(fd,"SO_KEEPALIVE");
set_socket_options(fd, lp_socket_options());
@@ -736,8 +737,9 @@ void init_smbsession(struct event_context *ev, struct model_ops *model_ops, int
/* set an initial client name based on its IP address. This will be replaced with
the netbios name later if it gives us one */
- sub_set_remote_machine(strdup(get_socket_addr(smb->mem_ctx, fd)));
- smb->socket.client_addr = get_socket_addr(smb->mem_ctx, fd);
+ socket_addr = get_socket_addr(smb->mem_ctx, fd);
+ sub_set_remote_machine(socket_addr);
+ smb->socket.client_addr = socket_addr;
/* now initialise a few default values associated with this smb socket */
smb->negotiate.max_send = 0xFFFF;