[SCM] Samba Shared Repository - branch v4-0-test updated

2012-11-28 Thread Karolin Seeger
The branch, v4-0-test has been updated
   via  9872a73 docs: Add some binaries to the SEE ALSO section
   via  7001c0a docs: Fix version in man smb.conf.
   via  aa1e012 s3-rpc_client: try to use socket_addr if available in 
rpc_pipe_open_tcp() (bug #9426)
  from  92c3c86 WHATSNEW: Update changes since rc5.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -
commit 9872a7370ff7d59b6a86f52a92edaf947c8afdf4
Author: Karolin Seeger ksee...@samba.org
Date:   Tue Nov 27 11:46:38 2012 +0100

docs: Add some binaries to the SEE ALSO section

of man smb.conf.

Karolin

Reviewed by: Jeremy Allison j...@samba.org
(cherry picked from commit 5f0f50c542450b7ede855f8e538ec90450cd10ab)

Autobuild-User(v4-0-test): Karolin Seeger ksee...@samba.org
Autobuild-Date(v4-0-test): Wed Nov 28 10:47:39 CET 2012 on sn-devel-104

commit 7001c0a7dfc4778096ad50dd756075078facd9e3
Author: Karolin Seeger ksee...@samba.org
Date:   Tue Nov 27 11:29:26 2012 +0100

docs: Fix version in man smb.conf.

Karolin

Reviewed by: Jeremy Allison j...@samba.org
(cherry picked from commit 4a1b16fe57c31ae8125475137088215426997749)

commit aa1e0127657a8a4668fd005ee6a9ba1d96c3d2ec
Author: Günther Deschner g...@samba.org
Date:   Fri Nov 23 18:15:30 2012 +0100

s3-rpc_client: try to use socket_addr if available in rpc_pipe_open_tcp() 
(bug #9426)

Guenther

Signed-off-by: Günther Deschner g...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

Autobuild-User(master): Stefan Metzmacher me...@samba.org
Autobuild-Date(master): Mon Nov 26 17:36:20 CET 2012 on sn-devel-104

---

Summary of changes:
 docs-xml/manpages/smb.conf.5.xml |5 -
 source3/rpc_client/cli_pipe.c|   23 ---
 source3/rpc_client/cli_pipe.h|1 +
 source3/torture/rpc_open_tcp.c   |3 ++-
 4 files changed, 23 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/smb.conf.5.xml b/docs-xml/manpages/smb.conf.5.xml
index a73382f..71b097b 100644
--- a/docs-xml/manpages/smb.conf.5.xml
+++ b/docs-xml/manpages/smb.conf.5.xml
@@ -792,7 +792,7 @@ chmod 1770 /usr/local/samba/lib/usershares
 refsect1
titleVERSION/title
 
-   paraThis man page is correct for version 3 of the Samba suite./para
+   paraThis man page is correct for version 4 of the Samba suite./para
 /refsect1
 
 refsect1
@@ -803,6 +803,9 @@ chmod 1770 /usr/local/samba/lib/usershares
manvolnum8/manvolnum/citerefentry, 
citerefentryrefentrytitleswat/refentrytitle
manvolnum8/manvolnum/citerefentry, 
citerefentryrefentrytitlesmbd/refentrytitle
manvolnum8/manvolnum/citerefentry, 
citerefentryrefentrytitlenmbd/refentrytitle
+   manvolnum8/manvolnum/citerefentry, 
citerefentryrefentrytitlewinbindd/refentrytitle
+   manvolnum8/manvolnum/citerefentry, 
citerefentryrefentrytitlesamba/refentrytitle
+   manvolnum8/manvolnum/citerefentry, 
citerefentryrefentrytitlesamba-tool/refentrytitle
manvolnum8/manvolnum/citerefentry, 
citerefentryrefentrytitlesmbclient/refentrytitle
manvolnum1/manvolnum/citerefentry, 
citerefentryrefentrytitlenmblookup/refentrytitle
manvolnum1/manvolnum/citerefentry, 
citerefentryrefentrytitletestparm/refentrytitle
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index f8c7b24..61e6cce 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -2420,6 +2420,7 @@ NTSTATUS rpccli_schannel_bind_data(TALLOC_CTX *mem_ctx, 
const char *domain,
  * Create an rpc pipe client struct, connecting to a tcp port.
  */
 static NTSTATUS rpc_pipe_open_tcp_port(TALLOC_CTX *mem_ctx, const char *host,
+  const struct sockaddr_storage *ss_addr,
   uint16_t port,
   const struct ndr_syntax_id 
*abstract_syntax,
   struct rpc_pipe_client **presult)
@@ -2448,9 +2449,13 @@ static NTSTATUS rpc_pipe_open_tcp_port(TALLOC_CTX 
*mem_ctx, const char *host,
result-max_xmit_frag = RPC_MAX_PDU_FRAG_LEN;
result-max_recv_frag = RPC_MAX_PDU_FRAG_LEN;
 
-   if (!resolve_name(host, addr, NBT_NAME_SERVER, false)) {
-   status = NT_STATUS_NOT_FOUND;
-   goto fail;
+   if (ss_addr == NULL) {
+   if (!resolve_name(host, addr, NBT_NAME_SERVER, false)) {
+   status = NT_STATUS_NOT_FOUND;
+   goto fail;
+   }
+   } else {
+   addr = *ss_addr;
}
 
status = open_socket_out(addr, port, 60*1000, fd);
@@ -2487,6 +2492,7 @@ static NTSTATUS rpc_pipe_open_tcp_port(TALLOC_CTX 
*mem_ctx, const char *host,
  * target host.
  */
 

[SCM] Samba Shared Repository - branch master updated

2012-11-28 Thread Michael Adam
The branch, master has been updated
   via  bc6bcee s3:vfs_gpfs: add no memory check in gpfs2smb_acl()
   via  0f630ab s3:vfs_gpfs: make sure we return the correct errno in 
gpfs2smb_acl()
   via  b3eb78c s4:smbd/open: add missing TALLOC_FREE(frame) to 
inherit_new_acl()
   via  d598704 s3:vfs_aixacl2: make use of vfs_aixacl_util.h
  from  00e2d83 s3: Open gencache_notrans with TDB_NOSYNC

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit bc6bceec655f241f23d713edc0d7a2633b5d6592
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Nov 28 11:44:58 2012 +0100

s3:vfs_gpfs: add no memory check in gpfs2smb_acl()

Signed-off-by: Stefan Metzmacher me...@samba.org
Reviewed-by: Michael Adam ob...@samba.org

Autobuild-User(master): Michael Adam ob...@samba.org
Autobuild-Date(master): Wed Nov 28 14:06:27 CET 2012 on sn-devel-104

commit 0f630abb3f197a8b672c6aa96362d83fdad1f92f
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Nov 28 11:44:15 2012 +0100

s3:vfs_gpfs: make sure we return the correct errno in gpfs2smb_acl()

TALLOC_FREE() could overwrite errno.

Signed-off-by: Stefan Metzmacher me...@samba.org
Reviewed-by: Michael Adam ob...@samba.org

commit b3eb78c4f7123ccad6af50379c29d0939590d1ff
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Nov 28 11:38:13 2012 +0100

s4:smbd/open: add missing TALLOC_FREE(frame) to inherit_new_acl()

Signed-off-by: Stefan Metzmacher me...@samba.org
Reviewed-by: Michael Adam ob...@samba.org

commit d5987048347beefa720f902d97b621e6cb719fdf
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Nov 28 11:21:51 2012 +0100

s3:vfs_aixacl2: make use of vfs_aixacl_util.h

This should fix the build.

Signed-off-by: Stefan Metzmacher me...@samba.org
Reviewed-by: Michael Adam ob...@samba.org

---

Summary of changes:
 source3/modules/vfs_aixacl2.c |4 +---
 source3/modules/vfs_gpfs.c|7 ++-
 source3/smbd/open.c   |2 ++
 3 files changed, 9 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_aixacl2.c b/source3/modules/vfs_aixacl2.c
index 327b06d..65625d1 100644
--- a/source3/modules/vfs_aixacl2.c
+++ b/source3/modules/vfs_aixacl2.c
@@ -21,15 +21,13 @@
 #include system/filesys.h
 #include smbd/smbd.h
 #include nfs4_acls.h
+#include vfs_aixacl_util.h
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_VFS
 
 #define AIXACL2_MODULE_NAME aixacl2
 
-extern SMB_ACL_T aixacl_to_smbacl( struct acl *file_acl);
-extern struct acl *aixacl_smb_to_aixacl(SMB_ACL_TYPE_T acltype, SMB_ACL_T 
theacl);
-
 typedef union aixjfs2_acl_t {
nfs4_acl_int_t jfs2_acl[1];
aixc_acl_t aixc_acl[1];
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 8f5a19c..e2058e1 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -575,6 +575,11 @@ static SMB_ACL_T gpfs2smb_acl(const struct gpfs_acl *pacl, 
TALLOC_CTX *mem_ctx)
result-count = pacl-acl_nace;
result-acl = talloc_realloc(result, result-acl, struct smb_acl_entry,
 result-count);
+   if (result-acl == NULL) {
+   TALLOC_FREE(result);
+   errno = ENOMEM;
+   return NULL;
+   }
 
for (i=0; ipacl-acl_nace; i++) {
struct smb_acl_entry *ace = result-acl[i];
@@ -608,8 +613,8 @@ static SMB_ACL_T gpfs2smb_acl(const struct gpfs_acl *pacl, 
TALLOC_CTX *mem_ctx)
default:
DEBUG(10, (Got invalid ace_type: %d\n,
   g_ace-ace_type));
-   errno = EINVAL;
TALLOC_FREE(result);
+   errno = EINVAL;
return NULL;
}
 
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 201f698..d736f4f 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -3460,6 +3460,7 @@ static NTSTATUS inherit_new_acl(files_struct *fsp)
size_t size = 0;
 
if (!parent_dirname(frame, fsp-fsp_name-base_name, parent_name, 
NULL)) {
+   TALLOC_FREE(frame);
return NT_STATUS_NO_MEMORY;
}
 
@@ -3469,6 +3470,7 @@ static NTSTATUS inherit_new_acl(files_struct *fsp)
frame,
parent_desc);
if (!NT_STATUS_IS_OK(status)) {
+   TALLOC_FREE(frame);
return status;
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-11-28 Thread Jim McDonough
The branch, master has been updated
   via  cb0064d BUG 9436: Fix leaking sockets of SMB connections to a DC.
  from  bc6bcee s3:vfs_gpfs: add no memory check in gpfs2smb_acl()

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit cb0064d35cdc60c7c625ad4561ad77739f8553c5
Author: Andreas Schneider a...@samba.org
Date:   Wed Nov 28 12:53:39 2012 +0100

BUG 9436: Fix leaking sockets of SMB connections to a DC.

As this is a burst of 3 unbound sockets with each try to reach a DC
we're running out of file descriptors pretty fast. So winbind is then
mostly spinning in an accept loop failing with EMFILE.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Jim McDonough j...@samba.org

Autobuild-User(master): Jim McDonough j...@samba.org
Autobuild-Date(master): Wed Nov 28 17:17:21 CET 2012 on sn-devel-104

---

Summary of changes:
 source3/winbindd/winbindd_cm.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 79b5839..57027eb 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -1598,6 +1598,10 @@ static NTSTATUS cm_open_connection(struct 
winbindd_domain *domain,
 
result = cm_prepare_connection(domain, fd, domain-dcname,
new_conn-cli, retry);
+   if (!NT_STATUS_IS_OK(result)) {
+   /* Don't leak the smb connection socket */
+   close(fd);
+   }
 
if (!retry)
break;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-11-28 Thread Andreas Schneider
The branch, master has been updated
   via  941bb9b docs: Rename man ntlm_auth.
   via  29f90ec s3: Use dbwrap_parse_record in fetch_share_mode_unlocked
  from  cb0064d BUG 9436: Fix leaking sockets of SMB connections to a DC.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 941bb9bb6dfd1c2dfd01696b2169e0782158ad6d
Author: Karolin Seeger ksee...@samba.org
Date:   Wed Nov 28 12:46:31 2012 +0100

docs: Rename man ntlm_auth.

Rename man ntlm_auth to ntlm_auth4.

Karolin

Reviewed-by: Andreas Schneider a...@samba.org

Autobuild-User(master): Andreas Schneider a...@cryptomilk.org
Autobuild-Date(master): Wed Nov 28 20:41:48 CET 2012 on sn-devel-104

commit 29f90ecf53c8cebe955d5bb6762c6fe6de008ff0
Author: Volker Lendecke v...@samba.org
Date:   Tue Nov 27 15:40:06 2012 +0100

s3: Use dbwrap_parse_record in fetch_share_mode_unlocked

Reviewed-by: Andreas Schneider a...@samba.org

---

Summary of changes:
 source3/locking/share_mode_lock.c  |   27 
 .../man/{ntlm_auth.1.xml = ntlm_auth4.1.xml}  |   74 ++--
 source4/utils/wscript_build|2 +-
 3 files changed, 52 insertions(+), 51 deletions(-)
 rename source4/utils/man/{ntlm_auth.1.xml = ntlm_auth4.1.xml} (80%)


Changeset truncated at 500 lines:

diff --git a/source3/locking/share_mode_lock.c 
b/source3/locking/share_mode_lock.c
index a82c44e..4f26099 100644
--- a/source3/locking/share_mode_lock.c
+++ b/source3/locking/share_mode_lock.c
@@ -389,6 +389,15 @@ fail:
return NULL;
 }
 
+static void fetch_share_mode_unlocked_parser(
+   TDB_DATA key, TDB_DATA data, void *private_data)
+{
+   struct share_mode_lock *lck = talloc_get_type_abort(
+   private_data, struct share_mode_lock);
+
+   lck-data = parse_share_modes(lck, data);
+}
+
 /***
  Get a share_mode_lock without locking the database or reference
  counting. Used by smbstatus to display existing share modes.
@@ -400,25 +409,17 @@ struct share_mode_lock 
*fetch_share_mode_unlocked(TALLOC_CTX *mem_ctx,
struct share_mode_lock *lck;
struct file_id tmp;
TDB_DATA key = locking_key(id, tmp);
-   TDB_DATA data;
NTSTATUS status;
 
-   status = dbwrap_fetch(lock_db, talloc_tos(), key, data);
-   if (!NT_STATUS_IS_OK(status)) {
-   DEBUG(3, (Could not fetch share entry\n));
-   return NULL;
-   }
-   if (data.dptr == NULL) {
-   return NULL;
-   }
lck = talloc(mem_ctx, struct share_mode_lock);
if (lck == NULL) {
-   TALLOC_FREE(data.dptr);
+   DEBUG(0, (talloc failed\n));
return NULL;
}
-   lck-data = parse_share_modes(lck, data);
-   TALLOC_FREE(data.dptr);
-   if (lck-data == NULL) {
+   status = dbwrap_parse_record(
+   lock_db, key, fetch_share_mode_unlocked_parser, lck);
+   if (!NT_STATUS_IS_OK(status) ||
+   (lck-data == NULL)) {
TALLOC_FREE(lck);
return NULL;
}
diff --git a/source4/utils/man/ntlm_auth.1.xml 
b/source4/utils/man/ntlm_auth4.1.xml
similarity index 80%
rename from source4/utils/man/ntlm_auth.1.xml
rename to source4/utils/man/ntlm_auth4.1.xml
index 09a8961..da187d7 100644
--- a/source4/utils/man/ntlm_auth.1.xml
+++ b/source4/utils/man/ntlm_auth4.1.xml
@@ -3,19 +3,19 @@
 refentry id=ntlm-auth.1
 
 refmeta
-   refentrytitlentlm_auth/refentrytitle
+   refentrytitlentlm_auth4/refentrytitle
manvolnum1/manvolnum
 /refmeta
 
 
 refnamediv
-   refnamentlm_auth/refname
+   refnamentlm_auth4/refname
refpurposetool to allow external access to Winbind's NTLM 
authentication function/refpurpose
 /refnamediv
 
 refsynopsisdiv
cmdsynopsis
-   commandntlm_auth/command
+   commandntlm_auth4/command
arg choice=opt-d debuglevel/arg
arg choice=opt-l logdir/arg
arg choice=opt-s lt;smb config filegt;/arg
@@ -28,10 +28,10 @@
paraThis tool is part of the 
citerefentryrefentrytitlesamba/refentrytitle
manvolnum7/manvolnum/citerefentry suite./para
 
-   paracommandntlm_auth/command is a helper utility that 
authenticates 
+   paracommandntlm_auth4/command is a helper utility that 
authenticates
users using NT/LM authentication. It returns 0 if the users is 
authenticated
-   successfully and 1 if access was denied. ntlm_auth uses winbind to 
access 
-   the user and authentication data for a domain.  This utility 
+   successfully and 1 if access was denied. ntlm_auth4 uses winbind to 
access
+   the user and authentication data for a domain.  This utility
   

[SCM] Samba Shared Repository - branch v3-6-test updated

2012-11-28 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  ecc9f5b Fix Bug 9422 - large read requests cause server to issue 
malformed reply
  from  0a52a89 s3-rpc_client: lookup nametype 0x20 in 
rpc_pipe_open_tcp_port(). (bug #9426)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit ecc9f5bdb8c56853a37ff6e980fed815fc5ee0a9
Author: Volker Lendecke v...@samba.org
Date:   Thu Nov 22 21:46:53 2012 +0100

Fix Bug 9422 - large read requests cause server to issue malformed reply

---

Summary of changes:
 source3/lib/util.c |2 +-
 source3/smbd/process.c |5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/util.c b/source3/lib/util.c
index d751c5b..23bb11c 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -383,7 +383,7 @@ void smb_set_enclen(char *buf,int len,uint16 enc_ctx_num)
 
 void smb_setlen(char *buf,int len)
 {
-   _smb_setlen(buf,len);
+   _smb_setlen_large(buf,len);
 
SCVAL(buf,4,0xFF);
SCVAL(buf,5,'S');
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 5aa19cb..358d051 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -151,7 +151,7 @@ bool srv_send_smb(struct smbd_server_connection *sconn, 
char *buffer,
}
}
 
-   len = smb_len(buf_out) + 4;
+   len = smb_len_large(buf_out) + 4;
 
ret = write_data(sconn-sock, buf_out+nwritten, len - nwritten);
if (ret = 0) {
@@ -2030,7 +2030,8 @@ void chain_reply(struct smb_request *req)
 * example).
 */
req-chain_outbuf = TALLOC_REALLOC_ARRAY(
-   req, req-outbuf, uint8_t, smb_len(req-outbuf) + 4);
+   req, req-outbuf, uint8_t,
+   smb_len_large(req-outbuf) + 4);
if (req-chain_outbuf == NULL) {
smb_panic(talloc failed);
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2012-11-28 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  40c6cfe Fix MD5 detection in the autoconf build
  from  ecc9f5b Fix Bug 9422 - large read requests cause server to issue 
malformed reply

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 40c6cfeb6ff39e73d824f17cb2ddc26eedb2b022
Author: Matthieu Patou m...@matws.net
Date:   Thu Nov 22 16:14:42 2012 -0800

Fix MD5 detection in the autoconf build

This is synthesis of patches made for bugs
* 9037
* 9086
* 9094
* 9418

It checks if there is a library for md5 related functions (libmd or
libmd5) and if so it checks for the presence of md5.h headers.

Signed-off-by: Matthieu Patou m...@matws.net

---

Summary of changes:
 source3/configure.in |   28 
 1 files changed, 12 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index 2018a6e..a298183 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -752,35 +752,31 @@ AC_CHECK_HEADERS(netgroup.h)
 AC_CHECK_HEADERS(linux/falloc.h)
 
 dnl check for OS implementation of md5 conformant to rfc1321
-AC_CHECK_HEADERS(md5.h)
-
 samba_cv_md5lib=none
 
-if test x$ac_cv_header_md5_h = xyes; then
-   AC_DEFINE(HAVE_MD5_H, 1,
-   [Whether md5.h is available.])
-   AC_CHECK_LIB(md5, MD5Update, [samba_cv_md5lib=md5])
-fi
+AC_CHECK_LIB(c, MD5Update, [samba_cv_md5lib=])
 
-if test x$ac_cv_header_md5_h = xyes -a \
-x$samba_cv_md5lib = xnone ; then
+if test x$samba_cv_md5lib = xnone ; then
AC_CHECK_LIB(md, MD5Update, [samba_cv_md5lib=md])
 fi
 
-if test x$ac_cv_header_md5_h = xyes -a \
-x$samba_cv_md5lib = xnone ; then
-   AC_CHECK_LIB(c, MD5Update, [samba_cv_md5lib=])
+if test x$samba_cv_md5lib = xnone ; then
+   AC_CHECK_LIB(md5, MD5Update, [samba_cv_md5lib=md5])
 fi
 
 if test x$samba_cv_md5lib != xnone ; then
+   AC_CHECK_HEADERS(md5.h)
+fi
+
+CRYPTO_MD5_OBJ=../lib/crypto/md5.o
+if test x$ac_cv_header_md5_h = xyes -a \
+x$samba_cv_md5lib != xnone ; then
if test x$samba_cv_md5lib != x ; then
LIBS=${LIBS} -l${samba_cv_md5lib}
+   AC_DEFINE(HAVE_LIBMD5, 1,
+ [Whether libmd5 conformant to rfc1321 is 
available.])
fi
CRYPTO_MD5_OBJ=
-   AC_DEFINE(HAVE_LIBMD5, 1,
-   [Whether libmd5 conformant to rfc1321 is available.])
-else
-   CRYPTO_MD5_OBJ=../lib/crypto/md5.o
 fi
 
 AC_SUBST(CRYPTO_MD5_OBJ)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2012-11-28 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  1106ca5 BUG 9436: Fix leaking sockets of SMB connections to a DC.
  from  40c6cfe Fix MD5 detection in the autoconf build

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 1106ca59eea9fe5d95a1098c84f77c9e6108659f
Author: Andreas Schneider a...@samba.org
Date:   Wed Nov 28 12:53:39 2012 +0100

BUG 9436: Fix leaking sockets of SMB connections to a DC.

As this is a burst of 3 unbound sockets with each try to reach a DC
we're running out of file descriptors pretty fast. So winbind is then
mostly spinning in an accept loop failing with EMFILE.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Jim McDonough j...@samba.org

Autobuild-User(master): Jim McDonough j...@samba.org
Autobuild-Date(master): Wed Nov 28 17:17:21 CET 2012 on sn-devel-104

---

Summary of changes:
 source3/winbindd/winbindd_cm.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index d129e1f..9a02789 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -1602,6 +1602,10 @@ static NTSTATUS cm_open_connection(struct 
winbindd_domain *domain,
 
result = cm_prepare_connection(domain, fd, domain-dcname,
new_conn-cli, retry);
+   if (!NT_STATUS_IS_OK(result)) {
+   /* Don't leak the smb connection socket */
+   close(fd);
+   }
 
if (!retry)
break;


-- 
Samba Shared Repository