[SCM] Samba Shared Repository - branch master updated

2012-06-30 Thread Rusty Russell
The branch, master has been updated
   via  8150f69 ccan: make it a grouping library.
  from  5679ba1 Don't allow asynchronous creates to be canceled in SMB2.

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


- Log -
commit 8150f69dc4cf73adb6f7aebd6f06074502dfcd05
Author: Rusty Russell 
Date:   Sat Jun 30 17:05:38 2012 +0930

ccan: make it a grouping library.

Andrew Bartlett pointed out that making CCAN a non-library will break
the build in a different way in future: when two separate private
libraries start using the same CCAN module, the symbol duplicate
detection will fire (since private libaries don't use any symbol
hiding).  That doesn't happen yet, but it will surely happen
eventually.

So, for now at least, we build as a private library again.  This
unfortunately means the top-level build creates a libccan.so, which
contains all the ccan modules whether you need them or not.  Given the
size of the library, I don't think this is a win.  But it's simple.

Signed-off-by: Rusty Russell 

Autobuild-User(master): Rusty Russell 
Autobuild-Date(master): Sat Jun 30 11:19:04 CEST 2012 on sn-devel-104

---

Summary of changes:
 lib/ccan/wscript |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/ccan/wscript b/lib/ccan/wscript
index c9bb49b..be5eab2 100644
--- a/lib/ccan/wscript
+++ b/lib/ccan/wscript
@@ -125,8 +125,11 @@ def ccan_module(bld, name, deps=''):
 bld.SAMBA_SUBSYSTEM('ccan-%s' % name,
 source=bld.path.ant_glob('%s/*.c' % name),
 deps=deps)
+bld.env.CCAN_MODS += 'ccan-%s ' % name
 
 def build(bld):
+bld.env.CCAN_MODS = ""
+
 # These have actual C files.
 ccan_module(bld, 'hash', 'ccan-build_assert')
 ccan_module(bld, 'ilog', 'ccan-compiler');
@@ -159,3 +162,10 @@ def build(bld):
 ccan-err ccan-hash ccan-htable ccan-list
 ccan-read_write_all ccan-str ccan-time execinfo
 ''')
+
+# This is the complete CCAN collection as one group.
+bld.SAMBA_LIBRARY('ccan',
+  source='',
+  deps=bld.env.CCAN_MODS,
+  private_library=True,
+  grouping_library=True)


-- 
Samba Shared Repository


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

2012-06-30 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  d5c01dc Same fix as bug 8989 - Samba 3.5.x (and probably all other 
versions of Samba) does not send correct responses to NT Transact Secondary 
when no data and no params
   via  115f5af Fix Bug 8989 - Samba 3.5.x (and probably all other versions 
of Samba) does not send correct responses to NT Transact Secondary when no data 
and no params
  from  0d6ff03 WHATSNEW: Start release notes for Samba 3.6.7.

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


- Log -
commit d5c01dc502e02cde12abc939afd48519d38c09a9
Author: Jeremy Allison 
Date:   Mon Jun 18 16:24:12 2012 -0700

Same fix as bug 8989 - Samba 3.5.x (and probably all other versions of 
Samba) does not send correct responses to NT Transact Secondary when no data 
and no params

for the Trans2 calls. See MS-CIFS 2.2.4.47.2 for details.

commit 115f5af9a89a20929f02578c08a34ae2736951dd
Author: Jeremy Allison 
Date:   Mon Jun 18 16:23:13 2012 -0700

Fix Bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does 
not send correct responses to NT Transact Secondary when no data and no params

Found by Richard Sharpe . The correct
command code in a reply to NT Transact Secondary (0xa1) is
NT Transact (0xa0).

---

Summary of changes:
 source3/smbd/nttrans.c |   11 ++-
 source3/smbd/trans2.c  |   15 +--
 2 files changed, 15 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 429250e..e87d132 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -144,11 +144,6 @@ void send_nt_replies(connection_struct *conn,
 + data_alignment_offset);
 
/*
-* We might have had SMBnttranss in req->inbuf, fix that.
-*/
-   SCVAL(req->outbuf, smb_com, SMBnttrans);
-
-   /*
 * Set total params and data to be sent.
 */
 
@@ -3255,6 +3250,12 @@ void reply_nttranss(struct smb_request *req)
 
show_msg((char *)req->inbuf);
 
+   /* Windows clients expect all replies to
+  an NT transact secondary (SMBnttranss 0xA1)
+  to have a command code of NT transact
+  (SMBnttrans 0xA0). See bug #8989 for details. */
+   req->cmd = SMBnttrans;
+
if (req->wct < 18) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
END_PROFILE(SMBnttranss);
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index c7cf1a2..9514c72 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -863,12 +863,6 @@ void send_trans2_replies(connection_struct *conn,
reply_outbuf(req, 10, total_sent_thistime + alignment_offset
 + data_alignment_offset);
 
-   /*
-* We might have SMBtrans2s in req which was transferred to
-* the outbuf, fix that.
-*/
-   SCVAL(req->outbuf, smb_com, SMBtrans2);
-
/* Set total params and data to be sent */
SSVAL(req->outbuf,smb_tprcnt,paramsize);
SSVAL(req->outbuf,smb_tdrcnt,datasize);
@@ -8839,6 +8833,15 @@ void reply_transs2(struct smb_request *req)
 
show_msg((char *)req->inbuf);
 
+   /* Windows clients expect all replies to
+  a transact secondary (SMBtranss2 0x33)
+  to have a command code of transact
+  (SMBtrans2 0x32). See bug #8989
+  and also [MS-CIFS] section 2.2.4.47.2
+  for details.
+   */
+   req->cmd = SMBtrans2;
+
if (req->wct < 8) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
END_PROFILE(SMBtranss2);


-- 
Samba Shared Repository


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

2012-06-30 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  8243fb8 Same fix as bug 8989 - Samba 3.5.x (and probably all other 
versions of Samba) does not send correct responses to NT Transact Secondary 
when no data and no params
   via  e46f242 Fix Bug 8989 - Samba 3.5.x (and probably all other versions 
of Samba) does not send correct responses to NT Transact Secondary when no data 
and no params
  from  41c2411 s3: Fix a winbind race leading to 100% CPU

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


- Log -
commit 8243fb8dbeed34e1a9a61d44c48d82321eebe7ab
Author: Jeremy Allison 
Date:   Mon Jun 18 16:24:12 2012 -0700

Same fix as bug 8989 - Samba 3.5.x (and probably all other versions of 
Samba) does not send correct responses to NT Transact Secondary when no data 
and no params

for the Trans2 calls. See MS-CIFS 2.2.4.47.2 for details.
(cherry picked from commit d5c01dc502e02cde12abc939afd48519d38c09a9)

commit e46f24296158ca48ac450b013cce39dd6ea91b42
Author: Jeremy Allison 
Date:   Mon Jun 18 16:23:13 2012 -0700

Fix Bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does 
not send correct responses to NT Transact Secondary when no data and no params

Found by Richard Sharpe . The correct
command code in a reply to NT Transact Secondary (0xa1) is
NT Transact (0xa0).
(cherry picked from commit 115f5af9a89a20929f02578c08a34ae2736951dd)

---

Summary of changes:
 source3/smbd/nttrans.c |   11 ++-
 source3/smbd/trans2.c  |   15 +--
 2 files changed, 15 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 6fbbed9..2ca14f4 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -134,11 +134,6 @@ void send_nt_replies(connection_struct *conn,
 + data_alignment_offset);
 
/*
-* We might have had SMBnttranss in req->inbuf, fix that.
-*/
-   SCVAL(req->outbuf, smb_com, SMBnttrans);
-
-   /*
 * Set total params and data to be sent.
 */
 
@@ -3068,6 +3063,12 @@ void reply_nttranss(struct smb_request *req)
 
show_msg((char *)req->inbuf);
 
+   /* Windows clients expect all replies to
+  an NT transact secondary (SMBnttranss 0xA1)
+  to have a command code of NT transact
+  (SMBnttrans 0xA0). See bug #8989 for details. */
+   req->cmd = SMBnttrans;
+
if (req->wct < 18) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
END_PROFILE(SMBnttranss);
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 794c138..602280d 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -849,12 +849,6 @@ void send_trans2_replies(connection_struct *conn,
reply_outbuf(req, 10, total_sent_thistime + alignment_offset
 + data_alignment_offset);
 
-   /*
-* We might have SMBtrans2s in req which was transferred to
-* the outbuf, fix that.
-*/
-   SCVAL(req->outbuf, smb_com, SMBtrans2);
-
/* Set total params and data to be sent */
SSVAL(req->outbuf,smb_tprcnt,paramsize);
SSVAL(req->outbuf,smb_tdrcnt,datasize);
@@ -8562,6 +8556,15 @@ void reply_transs2(struct smb_request *req)
 
show_msg((char *)req->inbuf);
 
+   /* Windows clients expect all replies to
+  a transact secondary (SMBtranss2 0x33)
+  to have a command code of transact
+  (SMBtrans2 0x32). See bug #8989
+  and also [MS-CIFS] section 2.2.4.47.2
+  for details.
+   */
+   req->cmd = SMBtrans2;
+
if (req->wct < 8) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
END_PROFILE(SMBtranss2);


-- 
Samba Shared Repository


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

2012-06-30 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  1f19c2d s3: Correct documentation of case sensitive
  from  d5c01dc Same fix as bug 8989 - Samba 3.5.x (and probably all other 
versions of Samba) does not send correct responses to NT Transact Secondary 
when no data and no params

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


- Log -
commit 1f19c2de580b04fe9e3038c879c80d8a54ce828f
Author: Olaf Flebbe 
Date:   Fri Oct 28 09:59:07 2011 +0200

s3: Correct documentation of case sensitive

this fixes bug #8552

Autobuild-User(master): Björn Jacke 
Autobuild-Date(master): Fri Jun 22 21:59:59 CEST 2012 on sn-devel-104
(cherry picked from commit 8558e321c5fc7eab94f47b243024e0439dfe1378)

---

Summary of changes:
 docs-xml/smbdotconf/filename/casesensitive.xml |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/filename/casesensitive.xml 
b/docs-xml/smbdotconf/filename/casesensitive.xml
index ed77050..e90f468 100644
--- a/docs-xml/smbdotconf/filename/casesensitive.xml
+++ b/docs-xml/smbdotconf/filename/casesensitive.xml
@@ -8,5 +8,5 @@
See the discussion in the section .
 
 
-no
+auto
 


-- 
Samba Shared Repository


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

2012-06-30 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  fad706e s3: Correct documentation of case sensitive
  from  8243fb8 Same fix as bug 8989 - Samba 3.5.x (and probably all other 
versions of Samba) does not send correct responses to NT Transact Secondary 
when no data and no params

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


- Log -
commit fad706e7a7c47d4f0a0933daf5769abfda1f5c49
Author: Olaf Flebbe 
Date:   Fri Oct 28 09:59:07 2011 +0200

s3: Correct documentation of case sensitive

this fixes bug #8552

Autobuild-User(master): Björn Jacke 
Autobuild-Date(master): Fri Jun 22 21:59:59 CEST 2012 on sn-devel-104
(cherry picked from commit 8558e321c5fc7eab94f47b243024e0439dfe1378)
(cherry picked from commit 1f19c2de580b04fe9e3038c879c80d8a54ce828f)

---

Summary of changes:
 docs-xml/smbdotconf/filename/casesensitive.xml |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/filename/casesensitive.xml 
b/docs-xml/smbdotconf/filename/casesensitive.xml
index ed77050..e90f468 100644
--- a/docs-xml/smbdotconf/filename/casesensitive.xml
+++ b/docs-xml/smbdotconf/filename/casesensitive.xml
@@ -8,5 +8,5 @@
See the discussion in the section .
 
 
-no
+auto
 


-- 
Samba Shared Repository


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

2012-06-30 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  0e2fb6c Fix bug #8974 - Kernel oplocks are broken when uid(file) != 
uid(process).
  from  1f19c2d s3: Correct documentation of case sensitive

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


- Log -
commit 0e2fb6c69e971c7502fabe17fa71d1453dda18a6
Author: Jeremy Allison 
Date:   Wed Jun 20 15:50:00 2012 -0700

Fix bug #8974 - Kernel oplocks are broken when uid(file) != uid(process).

Based on a fix from "Etienne Dechamps " 

---

Summary of changes:
 source3/modules/vfs_default.c |5 -
 source3/smbd/oplock_linux.c   |   13 +
 2 files changed, 13 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 27e9b9b..2472ec1 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -1044,11 +1044,6 @@ static int vfswrap_linux_setlease(vfs_handle_struct 
*handle, files_struct *fsp,
START_PROFILE(syscall_linux_setlease);
 
 #ifdef HAVE_KERNEL_OPLOCKS_LINUX
-   /* first set the signal handler */
-   if(linux_set_lease_sighandler(fsp->fh->fd) == -1) {
-   return -1;
-   }
-
result = linux_setlease(fsp->fh->fd, leasetype);
 #else
errno = ENOSYS;
diff --git a/source3/smbd/oplock_linux.c b/source3/smbd/oplock_linux.c
index 4f243e2..02bd32a 100644
--- a/source3/smbd/oplock_linux.c
+++ b/source3/smbd/oplock_linux.c
@@ -76,9 +76,22 @@ int linux_setlease(int fd, int leasetype)
 {
int ret;
 
+   /* First set the signal handler. */
+   if (linux_set_lease_sighandler(fd) == -1) {
+   return -1;
+   }
ret = fcntl(fd, F_SETLEASE, leasetype);
if (ret == -1 && errno == EACCES) {
set_effective_capability(LEASE_CAPABILITY);
+   /*
+* Bug 8974 - work around Linux kernel bug
+* https://bugzilla.kernel.org/show_bug.cgi?id=43336.
+* "fcntl(F_SETLEASE) resets signal number when
+*  called multiple times"
+*/
+   if (linux_set_lease_sighandler(fd) == -1) {
+   return -1;
+   }
ret = fcntl(fd, F_SETLEASE, leasetype);
}
 


-- 
Samba Shared Repository


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

2012-06-30 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  92b1d6b Fix bug #8974 - Kernel oplocks are broken when uid(file) != 
uid(process).
  from  fad706e s3: Correct documentation of case sensitive

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


- Log -
commit 92b1d6b93571facbb07b7d32f169ba32ef6f8e1f
Author: Jeremy Allison 
Date:   Wed Jun 20 15:50:00 2012 -0700

Fix bug #8974 - Kernel oplocks are broken when uid(file) != uid(process).

Based on a fix from "Etienne Dechamps " 
(cherry picked from commit 0e2fb6c69e971c7502fabe17fa71d1453dda18a6)

---

Summary of changes:
 source3/modules/vfs_default.c |5 -
 source3/smbd/oplock_linux.c   |   13 +
 2 files changed, 13 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 60b85d9..0a34198 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -1133,11 +1133,6 @@ static int vfswrap_linux_setlease(vfs_handle_struct 
*handle, files_struct *fsp,
START_PROFILE(syscall_linux_setlease);
 
 #ifdef HAVE_KERNEL_OPLOCKS_LINUX
-   /* first set the signal handler */
-   if(linux_set_lease_sighandler(fsp->fh->fd) == -1) {
-   return -1;
-   }
-
result = linux_setlease(fsp->fh->fd, leasetype);
 #else
errno = ENOSYS;
diff --git a/source3/smbd/oplock_linux.c b/source3/smbd/oplock_linux.c
index c60c745..ff5d596 100644
--- a/source3/smbd/oplock_linux.c
+++ b/source3/smbd/oplock_linux.c
@@ -74,9 +74,22 @@ int linux_setlease(int fd, int leasetype)
 {
int ret;
 
+   /* First set the signal handler. */
+   if (linux_set_lease_sighandler(fd) == -1) {
+   return -1;
+   }
ret = fcntl(fd, F_SETLEASE, leasetype);
if (ret == -1 && errno == EACCES) {
set_effective_capability(LEASE_CAPABILITY);
+   /*
+* Bug 8974 - work around Linux kernel bug
+* https://bugzilla.kernel.org/show_bug.cgi?id=43336.
+* "fcntl(F_SETLEASE) resets signal number when
+*  called multiple times"
+*/
+   if (linux_set_lease_sighandler(fd) == -1) {
+   return -1;
+   }
ret = fcntl(fd, F_SETLEASE, leasetype);
}
 


-- 
Samba Shared Repository


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

2012-06-30 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  9aa0c85 s3: fix build without ads support
  from  0e2fb6c Fix bug #8974 - Kernel oplocks are broken when uid(file) != 
uid(process).

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


- Log -
commit 9aa0c85e84b1e66142b65631a244aec8b2111bbc
Author: Björn Jacke 
Date:   Wed Jun 13 19:28:06 2012 +0200

s3: fix build without ads support

when we have no ads support we don't have the ads_get_sid_token symbol used 
in
this unused code :-)

Autobuild-User(master): Björn Jacke 
Autobuild-Date(master): Wed Jun 13 21:20:15 CEST 2012 on sn-devel-104
(cherry picked from commit 43c56dc4255a7a6cbd176e6ae66a7652c6d72d2c)

Fix bug #8996 - build without ads support (e.g. plain solaris 8) broken.

---

Summary of changes:
 libgpo/gpo_util.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libgpo/gpo_util.c b/libgpo/gpo_util.c
index 553402a..91078bb 100644
--- a/libgpo/gpo_util.c
+++ b/libgpo/gpo_util.c
@@ -843,6 +843,7 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
const char *dn,
struct security_token **token)
 {
+#ifdef HAVE_ADS
struct security_token *ad_token = NULL;
ADS_STATUS status;
 #if _SAMBA_BUILD_ == 4
@@ -851,9 +852,6 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
NTSTATUS ntstatus;
 #endif
 
-#ifndef HAVE_ADS
-   return ADS_ERROR_NT(NT_STATUS_NOT_SUPPORTED);
-#endif
status = ads_get_sid_token(ads, mem_ctx, dn, &ad_token);
if (!ADS_ERR_OK(status)) {
return status;
@@ -869,4 +867,7 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
}
 #endif
return ADS_SUCCESS;
+#else
+   return ADS_ERROR_NT(NT_STATUS_NOT_SUPPORTED);
+#endif
 }


-- 
Samba Shared Repository


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

2012-06-30 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  65cc848 s3:winbindd: don't turn negative cache entries into valid 
idmappings (bug #9002)
   via  e19d064 s3:passdb: don't turn negative cache entries into valid 
idmappings (bug #9002)
   via  a1a0bab s3:winbindd: do not expose negative cache idmap entries as 
valid mappings (bug #9002)
   via  19b0db8 s3:winbindd: discard the expired gid cache if we're online 
(bug #9002)
  from  9aa0c85 s3: fix build without ads support

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


- Log -
commit 65cc848fde9e383afa0c9eff78e66d6cd57aea18
Author: Stefan Metzmacher 
Date:   Tue Jun 19 17:57:19 2012 +0200

s3:winbindd: don't turn negative cache entries into valid idmappings (bug 
#9002)

It's typical that some file operations set a NTACL, which tries
sid2uid() before sid2gid(), this will create a negative cache entry.

Negative SID2UID entries cause that a valid SID2GID mapping is ignored
and the group is ignored in the UNIX Token.

metze

commit e19d064b2a23ec083da06fa56af47be694152442
Author: Stefan Metzmacher 
Date:   Tue Jun 19 17:57:19 2012 +0200

s3:passdb: don't turn negative cache entries into valid idmappings (bug 
#9002)

It's typical that some file operations set a NTACL, which tries
sid2uid() before sid2gid(), this will create a negative cache entry.

Negative SID2UID entries cause that a valid SID2GID mapping is ignored
and the group is ignored in the UNIX Token.

metze

commit a1a0babdbd89b229a9d539993c2ad3791b654952
Author: Stefan Metzmacher 
Date:   Thu May 24 09:08:21 2012 +0200

s3:winbindd: do not expose negative cache idmap entries as valid mappings 
(bug #9002)

metze

commit 19b0db85cde6fc4affa1dec19bd39adf862dbf8c
Author: Stefan Metzmacher 
Date:   Fri Mar 2 05:08:17 2012 +0100

s3:winbindd: discard the expired gid cache if we're online (bug #9002)

This matches the uid case...

metze

---

Summary of changes:
 source3/passdb/lookup_sid.c  |4 +-
 source3/winbindd/winbindd_sids_to_xids.c |   94 --
 2 files changed, 77 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index 2afa86e..64a181e 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -1437,13 +1437,13 @@ bool sids_to_unix_ids(const struct dom_sid *sids, 
uint32_t num_sids,
}
if (idmap_cache_find_sid2uid(&sids[i], &ids[i].id.uid,
 &expired)
-   && !expired) {
+   && !expired && ids[i].id.uid != (uid_t)-1) {
ids[i].type = WBC_ID_TYPE_UID;
continue;
}
if (idmap_cache_find_sid2gid(&sids[i], &ids[i].id.gid,
 &expired)
-   && !expired) {
+   && !expired && ids[i].id.gid != (gid_t)-1) {
ids[i].type = WBC_ID_TYPE_GID;
continue;
}
diff --git a/source3/winbindd/winbindd_sids_to_xids.c 
b/source3/winbindd/winbindd_sids_to_xids.c
index 9c38b5a..7487f8f 100644
--- a/source3/winbindd/winbindd_sids_to_xids.c
+++ b/source3/winbindd/winbindd_sids_to_xids.c
@@ -123,41 +123,87 @@ struct tevent_req *winbindd_sids_to_xids_send(TALLOC_CTX 
*mem_ctx,
 static bool winbindd_sids_to_xids_in_cache(struct dom_sid *sid,
   struct id_map *map)
 {
-   uid_t uid;
-   gid_t gid;
-   bool expired;
+   bool is_online = is_domain_online(find_our_domain());
+   gid_t gid = (gid_t)-1;
+   bool gid_expired = false;
+   bool gid_cached = false;
+   bool gid_negative = false;
+   uid_t uid = (uid_t)-1;
+   bool uid_expired = false;
+   bool uid_cached = false;
+   bool uid_negative = false;
 
if (!winbindd_use_idmap_cache()) {
return false;
}
+
/*
 * SIDS_TO_XIDS is primarily used to resolve the user's group
 * sids. So we check groups before users.
 */
-   if (idmap_cache_find_sid2gid(sid, &gid, &expired)) {
-   if (expired && is_domain_offline(find_our_domain())) {
-   return false;
+   gid_cached = idmap_cache_find_sid2gid(sid, &gid, &gid_expired);
+   if (!is_online) {
+   gid_expired = false;
+   }
+   if (gid_cached && !gid_expired) {
+   if (gid != (gid_t)-1) {
+   map->sid = sid;
+   map->xid.id = gid;
+   map->xid.type = ID_TYPE_GID;
+   map->status = ID_MAPPED;
+

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

2012-06-30 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  bea2d3d s3-vfs_gpfs: Fix bug #9003, posix acl on gpfs
  from  65cc848 s3:winbindd: don't turn negative cache entries into valid 
idmappings (bug #9002)

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


- Log -
commit bea2d3d007cef5643e863d2d4a80f0ea72461ec3
Author: Volker Lendecke 
Date:   Fri Jun 22 15:46:13 2012 +0200

s3-vfs_gpfs: Fix bug #9003, posix acl on gpfs

gpfs2smb_acl can leave errno!=0 around even if it returned a correct
result!=NULL. We can only rely on errno being set if another error
condition (in this case result==NULL) indicates an error. If
result!=NULL, errno is undefined and can be anything. This leads to
SAFE_FREE(result) further down even in the success case.

Signed-off-by: Stefan Metzmacher 

Autobuild-User(master): Stefan Metzmacher 
Autobuild-Date(master): Fri Jun 22 19:27:39 CEST 2012 on sn-devel-104
(cherry picked from commit e7b58146d8576ae8bf4eaf2ec1063fe7697e05b8)

---

Summary of changes:
 source3/modules/vfs_gpfs.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 08e5f55..0c86ea8 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -598,8 +598,8 @@ static SMB_ACL_T gpfsacl_get_posix_acl(const char *path, 
gpfs_aclType_t type)
   pacl->acl_nace));
 
result = gpfs2smb_acl(pacl);
-   if (result == NULL) {
-   goto done;
+   if (result != NULL) {
+   errno = 0;
}
 
  done:


-- 
Samba Shared Repository


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

2012-06-30 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  6fa785d s3-vfs_gpfs: Fix bug #9003, posix acl on gpfs
  from  92b1d6b Fix bug #8974 - Kernel oplocks are broken when uid(file) != 
uid(process).

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


- Log -
commit 6fa785d9b2379138bff759266a1545bf0240f092
Author: Volker Lendecke 
Date:   Fri Jun 22 15:46:13 2012 +0200

s3-vfs_gpfs: Fix bug #9003, posix acl on gpfs

gpfs2smb_acl can leave errno!=0 around even if it returned a correct
result!=NULL. We can only rely on errno being set if another error
condition (in this case result==NULL) indicates an error. If
result!=NULL, errno is undefined and can be anything. This leads to
SAFE_FREE(result) further down even in the success case.

Signed-off-by: Stefan Metzmacher 

Autobuild-User(master): Stefan Metzmacher 
Autobuild-Date(master): Fri Jun 22 19:27:39 CEST 2012 on sn-devel-104
(cherry picked from commit e7b58146d8576ae8bf4eaf2ec1063fe7697e05b8)
(cherry picked from commit bea2d3d007cef5643e863d2d4a80f0ea72461ec3)

---

Summary of changes:
 source3/modules/vfs_gpfs.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index ca29f64..ecfa60a 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -586,8 +586,8 @@ static SMB_ACL_T gpfsacl_get_posix_acl(const char *path, 
gpfs_aclType_t type)
   pacl->acl_nace));
 
result = gpfs2smb_acl(pacl);
-   if (result == NULL) {
-   goto done;
+   if (result != NULL) {
+   errno = 0;
}
 
  done:


-- 
Samba Shared Repository


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

2012-06-30 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  9658d8e s3: fix build on HP-UX
  from  6fa785d s3-vfs_gpfs: Fix bug #9003, posix acl on gpfs

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


- Log -
commit 9658d8e13dc045a338a7b1496a6cc3ce5ed0e704
Author: Björn Jacke 
Date:   Thu Jun 10 17:19:16 2010 +0200

s3: fix build on HP-UX

this struct member h_errno is not used in the HP-UX code paths, it was just
there because Solaris has it, too. As h_errno is a function call macro on 
HP-UX
when thread support is enabled we run into trouble here. Just commenting it 
out
should be okay as we don't use it anyway.
(cherry picked from commit ec94efb79d4516b09c7d1d93a4ff8ce0f7046f41)

Fix bug #9011 - Build on HP-UX broken.

---

Summary of changes:
 nsswitch/winbind_nss_hpux.h |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/winbind_nss_hpux.h b/nsswitch/winbind_nss_hpux.h
index 40a352d..393c0a3 100644
--- a/nsswitch/winbind_nss_hpux.h
+++ b/nsswitch/winbind_nss_hpux.h
@@ -130,7 +130,12 @@ typedef struct nss_XbyY_args {
 
void *returnval;
int erange;
-   int h_errno;
+   /*
+   *  h_errno is defined as function call macro for multithreaded 
applications
+   *  in HP-UX. *this* h_errno is not used in the HP-UX codepath of our nss
+   *  modules, so let's simply comment it out here:
+   * int h_errno;
+   */
nss_status_t status;
 } nss_XbyY_args_t;
 


-- 
Samba Shared Repository


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

2012-06-30 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  b1a6698 WHATSNEW: Prepare release notes for Samba 3.5.16.
  from  9658d8e s3: fix build on HP-UX

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


- Log -
commit b1a6698ec7a6fc661e8ff9876dfbdf740f33ae2d
Author: Karolin Seeger 
Date:   Sat Jun 30 21:45:53 2012 +0200

WHATSNEW: Prepare release notes for Samba 3.5.16.

Karolin

---

Summary of changes:
 WHATSNEW.txt |   72 +++--
 1 files changed, 69 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 3e8711d..1e2ff06 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,6 +1,6 @@
==
Release Notes for Samba 3.5.16
-  , 2012
+   July 2, 2012
==
 
 
@@ -8,13 +8,79 @@ This is the latest stable release of Samba 3.5.
 
 Major enhancements in Samba 3.5.16 include:
 
-o 
+o  Fix possible memory leaks in the Samba master process (bug #8970).
+o  Fix uninitialized memory read in talloc_free().
+o  Fix smbd crash with unknown user (bug #8314).
+
 
 Changes since 3.5.15:
 -
 
-
 o   Jeremy Allison 
+* BUG 8314: Fix smbd crash with unknown user.
+* BUG 8831: Fix inconsistent (with manpage) command-line switch for "help"
+  in smbtree.
+* BUG 8882: Fix processing of %U with vfs_full_audit when "force user"
+  is set.
+* BUG 8897: winbind_krb5_locator only returns one IP address.
+* BUG 8910: resolve_ads() code can return zero addresses and miss valid DC
+  IP addresses.
+* BUG 8957: Fix typo in pam_winbindd code.
+* BUG 8972: Directory group write permission bit is set if unix extensions
+  are enabled.
+* BUG 8974: Kernel oplocks are broken when uid(file) != uid(process).
+* BUG 8989: Send correct responses to NT Transact Secondary when no data 
and
+  no params.
+* BUG 8994: Fix "winbind normalize names".
+
+
+o   Andrew Bartlett 
+* BUG 8599: Only use SamLogonEx when we can get unencrypted session keys.
+* BUG 8943: Slow but responsive DC can lock up winbindd for > 10 minutes
+  at a time.
+
+
+o   Björn Baumbach 
+* BUG 7564: Fix default name resolve order in the manpage.
+
+
+o   John Bradshaw 
+* BUG 7938: Fix typo (overrided -> overridden) in Samba3-HOWTO.
+
+
+o   Olaf Flebbe 
+* BUG 8552: Correct documentation of "case sensitive".
+
+
+o   Björn Jacke 
+* BUG 8869: Remove outdated netscape ds 5 schema file.
+* BUG 9011: Fix build on HP-UX.
+
+
+o   Volker Lendecke 
+* Fix uninitialized memory read in talloc_free().
+* BUG 8338: OS/X can not deal with a 10-vwv read on normal files.
+* BUG 8998: Notify code can miss a ChDir.
+* BUG 9000: Fix a Winbind race leading to 100% CPU.
+* BUG 9003: Fix posix acl on gpfs.
+
+
+o   Matthieu Patou 
+* BUG 8975: Make sure that Winbind can coredump.
+
+
+o   Karolin Seeger 
+* BUG 7930: Add hint that setting "profile acls = yes" on normal shares can
+  cause trouble.
+
+
+o   Richard Sharpe 
+* BUG 8822: Fix building out-of-tree vfs modules.
+* BUG 8970: Fix possible memory leaks in the Samba master process.
+
+
+o   Simo Sorce 
+* BUG 8915: Fix pam_winbind build against newer iniparser library.
 
 
 ##


-- 
Samba Shared Repository


autobuild: intermittent test failure detected

2012-06-30 Thread autobuild
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2012-07-01-0004/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2012-07-01-0004/samba3.stderr
   http://git.samba.org/autobuild.flakey/2012-07-01-0004/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2012-07-01-0004/samba.stderr
   http://git.samba.org/autobuild.flakey/2012-07-01-0004/samba.stdout
  
The top commit at the time of the failure was:

commit 8150f69dc4cf73adb6f7aebd6f06074502dfcd05
Author: Rusty Russell 
Date:   Sat Jun 30 17:05:38 2012 +0930

ccan: make it a grouping library.

Andrew Bartlett pointed out that making CCAN a non-library will break
the build in a different way in future: when two separate private
libraries start using the same CCAN module, the symbol duplicate
detection will fire (since private libaries don't use any symbol
hiding).  That doesn't happen yet, but it will surely happen
eventually.

So, for now at least, we build as a private library again.  This
unfortunately means the top-level build creates a libccan.so, which
contains all the ccan modules whether you need them or not.  Given the
size of the library, I don't think this is a win.  But it's simple.

Signed-off-by: Rusty Russell 

Autobuild-User(master): Rusty Russell 
Autobuild-Date(master): Sat Jun 30 11:19:04 CEST 2012 on sn-devel-104