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

2009-12-02 Thread Karolin Seeger
The branch, v3-3-test has been updated
   via  0a16584... s3-kerberos: fix the build on Mac OS X 10.6.2.
   via  9acd239... s3-kerberos: add a missing reference to authdata headers.
   via  9329564... s3-kerberos: do not include authdata headers before 
including krb5 headers.
   via  6026236... s3-kerberos: only use krb5 headers where required.
   via  a6572bb... s3-kerberos: Fix Bug #6929: build with recent heimdal.
   via  d89231e... s3-kerberos: next step to resolve Bug #6929: build with 
recent heimdal.
   via  e559256... s3-kerberos: add check for prerequisite krb5/krb5.h 
header while checking for krb5/locate_plugin.h.
   via  dff3d01... nsswitch: fix compile of winbind_krb5_locator with 
recent Heimdal versions.
   via  1d5af51... cifs.upcall: 2nd part of fix for Bug #6868: support 
building with Heimdal we well as with MIT.
   via  3aaec6a... s3-build: really fix build of winbind_krb5_locator.
   via  087c41e... nsswitch: fix the build of the winbind krb5 locator 
plugin.
   via  cca1f7a... cifs.upcall: Fix Bug #6868: support building with 
Heimdal we well as with MIT.
   via  bddafc6... s3-kerberos: add smb_krb5_principal_get_realm().
   via  6664d01... s3-kerberos: fix some build warnings when building 
against heimdal.
   via  ce1bea7... kerberos: fix some heimdal build warnings.
  from  dc3d1f2... s3: Fix shadow copy display on Windows 7

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


- Log -
commit 0a165844459eb0e04fa14a33f338c80669e3a92c
Author: Günther Deschner g...@samba.org
Date:   Fri Nov 27 20:08:44 2009 +0100

s3-kerberos: fix the build on Mac OS X 10.6.2.

Guenther
(cherry picked from commit 51328a7056918bc75a7c1c442f47cf0271075542)

commit 9acd2394edf2504df23d0ce93f4bafc88c83323b
Author: Günther Deschner g...@samba.org
Date:   Fri Nov 27 18:51:56 2009 +0100

s3-kerberos: add a missing reference to authdata headers.

Guenther
(cherry picked from commit da79cbb0800dd647be864e8bbb5fe1132708174b)

commit 9329564e44a1432251acb7f0afaf1bd04b8cb957
Author: Günther Deschner g...@samba.org
Date:   Fri Nov 27 18:30:18 2009 +0100

s3-kerberos: do not include authdata headers before including krb5 headers.

Guenther

commit 60262369fc2ae19f6d9263e35b5db9b09b603a1b
Author: Günther Deschner g...@samba.org
Date:   Fri Nov 27 15:52:57 2009 +0100

s3-kerberos: only use krb5 headers where required.

This seems to be the only way to deal with mixed heimdal/MIT setups during
merged build.

Guenther

commit a6572bb03fcd323ce03b22ccd713181235f3b0e6
Author: Günther Deschner g...@samba.org
Date:   Fri Nov 27 01:06:36 2009 +0100

s3-kerberos: Fix Bug #6929: build with recent heimdal.

Heimdal changed the KRB5_DEPRECATED define (which now may not take an 
identifier
for activation) in new releases (like 1.3.1).

Guenther
(cherry picked from commit 1a8f8382740e352a83133b8c49aaedd4716210cd)

commit d89231e76c618c5d10244ed4bec68dac8fa9cb3c
Author: Günther Deschner g...@samba.org
Date:   Thu Nov 26 10:15:45 2009 +0100

s3-kerberos: next step to resolve Bug #6929: build with recent heimdal.

Based on patch from Allan al...@archlinux.org.

Also should fix the FreeBSD build on the buildfarm.

Guenther
(cherry picked from commit 5b3a32be97a37c119e837bdee8f049684565458c)

commit e5592560bb8f90446bd8cbe8019663cbf00e22ab
Author: Günther Deschner g...@samba.org
Date:   Wed Nov 25 21:33:48 2009 +0100

s3-kerberos: add check for prerequisite krb5/krb5.h header while checking 
for krb5/locate_plugin.h.

(Needed for new Heimdal versions).

Guenther
(cherry picked from commit c438b2b3923db66672ec82e795eef543de5fcb8a)

commit dff3d01119c91fbdac613508c64f3f8fc0b8a413
Author: Günther Deschner g...@samba.org
Date:   Wed Nov 25 15:21:54 2009 +0100

nsswitch: fix compile of winbind_krb5_locator with recent Heimdal versions.

Guenther
(cherry picked from commit 51864219cc12ceb66c281355f3e1191d5e32842d)

commit 1d5af511dd6f88d211b6c63b1e2d9d7ec97b03ad
Author: Günther Deschner g...@samba.org
Date:   Wed Nov 25 15:06:19 2009 +0100

cifs.upcall: 2nd part of fix for Bug #6868: support building with Heimdal 
we well as with MIT.

Guenther
(cherry picked from commit 660ee2e74523194e5f6b2b6428d76628beb74717)

commit 3aaec6a346a88b732e66796514bc21e47c23e850
Author: Günther Deschner g...@samba.org
Date:   Thu Nov 19 13:44:33 2009 +0100

s3-build: really fix build of winbind_krb5_locator.

Guenther
(cherry picked from commit fc9f199f2619635f73e8ee7f3b5359521d63f325)

commit 087c41e390b8be513016ca29a96d1702b0d03587
Author: Günther Deschner g...@samba.org
Date:   Wed Oct 21 02:44:44 2009 +0200

nsswitch: fix the build of the winbind krb5 locator plugin.

Guenther
(cherry picked from 

[SCM] Samba Shared Repository - branch master updated

2009-12-02 Thread Günther Deschner
The branch, master has been updated
   via  5f60855... samba-spoolss: use spoolss_StringArray2 in 
spoolss_EnumPrinterKey.
   via  292af4f... spoolss: add spoolss_StringArray2.
   via  91bb065... s3-spoolss: move MAXDEVICENAME to spoolss idl.
  from  53744f0... s3: Cope with older external libtdb

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


- Log -
commit 5f60855ba2eb822dcb867378ff09278c42931b89
Author: Günther Deschner g...@samba.org
Date:   Wed Dec 2 14:25:31 2009 +0100

samba-spoolss: use spoolss_StringArray2 in spoolss_EnumPrinterKey.

This should finally resolve the endian issues we were seeing on sparc and is
much cleaner for spoolss clients and servers.

Guenther

commit 292af4fc046ff39ebd3ec853c402dc267a863fa6
Author: Günther Deschner g...@samba.org
Date:   Wed Dec 2 14:22:52 2009 +0100

spoolss: add spoolss_StringArray2.

The difference to spoolss_StringArray is that in spoolss_StringArray2 the 
string
array is put into a subcontext of _ndr_size.

Guenther

commit 91bb0659776d397bc4b8ca7a534f6f2327e2e6fe
Author: Günther Deschner g...@samba.org
Date:   Tue Dec 1 02:38:19 2009 +0100

s3-spoolss: move MAXDEVICENAME to spoolss idl.

Guenther

---

Summary of changes:
 librpc/gen_ndr/cli_spoolss.c|8 +-
 librpc/gen_ndr/cli_spoolss.h|4 +-
 librpc/gen_ndr/ndr_spoolss.c|  104 +++
 librpc/gen_ndr/ndr_spoolss.h|3 +
 librpc/gen_ndr/spoolss.h|8 ++-
 librpc/gen_ndr/srv_spoolss.c|4 +-
 librpc/idl/spoolss.idl  |   13 +++-
 librpc/ndr/ndr_spoolss_buf.c|9 +++
 librpc/ndr/ndr_spoolss_buf.h|1 +
 source3/include/nt_printing.h   |2 -
 source3/rpc_client/cli_spoolss.c|   24 +---
 source3/rpc_server/srv_spoolss_nt.c |2 +-
 source4/torture/rpc/spoolss.c   |   19 +-
 source4/torture/rpc/spoolss_win.c   |   19 +-
 14 files changed, 118 insertions(+), 102 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c
index aba70f2..0a5c2a6 100644
--- a/librpc/gen_ndr/cli_spoolss.c
+++ b/librpc/gen_ndr/cli_spoolss.c
@@ -12207,7 +12207,7 @@ struct tevent_req 
*rpccli_spoolss_EnumPrinterKey_send(TALLOC_CTX *mem_ctx,
  struct rpc_pipe_client 
*cli,
  struct policy_handle 
*_handle /* [in] [ref] */,
  const char *_key_name /* 
[in] [charset(UTF16)] */,
- uint16_t *_key_buffer /* 
[out] [ref,size_is(offered/2)] */,
+ struct 
spoolss_StringArray2 *_key_buffer /* [out] [ref] */,
  uint32_t _offered /* [in] 
 */,
  uint32_t *_needed /* 
[out] [ref] */)
 {
@@ -12278,7 +12278,7 @@ static void rpccli_spoolss_EnumPrinterKey_done(struct 
tevent_req *subreq)
}
 
/* Copy out parameters */
-   memcpy(state-orig.out.key_buffer, state-tmp.out.key_buffer, 
(state-tmp.in.offered / 2) * sizeof(*state-orig.out.key_buffer));
+   *state-orig.out.key_buffer = *state-tmp.out.key_buffer;
*state-orig.out.needed = *state-tmp.out.needed;
 
/* Copy result */
@@ -12317,7 +12317,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterKey(struct 
rpc_pipe_client *cli,
   TALLOC_CTX *mem_ctx,
   struct policy_handle *handle /* [in] 
[ref] */,
   const char *key_name /* [in] 
[charset(UTF16)] */,
-  uint16_t *key_buffer /* [out] 
[ref,size_is(offered/2)] */,
+  struct spoolss_StringArray2 *key_buffer 
/* [out] [ref] */,
   uint32_t offered /* [in]  */,
   uint32_t *needed /* [out] [ref] */,
   WERROR *werror)
@@ -12345,7 +12345,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterKey(struct 
rpc_pipe_client *cli,
}
 
/* Return variables */
-   memcpy(key_buffer, r.out.key_buffer, (r.in.offered / 2) * 
sizeof(*key_buffer));
+   *key_buffer = *r.out.key_buffer;
*needed = *r.out.needed;
 
/* Return result */
diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h
index 943cbce..58a45ee 100644
--- a/librpc/gen_ndr/cli_spoolss.h
+++ b/librpc/gen_ndr/cli_spoolss.h
@@ -1262,7 +1262,7 @@ struct tevent_req 
*rpccli_spoolss_EnumPrinterKey_send(TALLOC_CTX *mem_ctx,

[SCM] Samba Shared Repository - branch master updated

2009-12-02 Thread Jeremy Allison
The branch, master has been updated
   via  b6fdecd... Fix bug #6837 - Too many open files when trying to 
access large number of files from Windows 7. Original patch by me fixed up with 
the correct open files number by jmaggar...@hotmail.com. Jeremy.
  from  5f60855... samba-spoolss: use spoolss_StringArray2 in 
spoolss_EnumPrinterKey.

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


- Log -
commit b6fdecd11210a3d2ff803bdc315aacd9f8b445a1
Author: Jeremy Allison j...@samba.org
Date:   Wed Dec 2 10:01:14 2009 -0800

Fix bug #6837 - Too many open files when trying to access large number of 
files
from Windows 7. Original patch by me fixed up with the correct open files 
number
by jmaggar...@hotmail.com.
Jeremy.

---

Summary of changes:
 source3/include/local.h  |   20 +++-
 source3/param/loadparm.c |   16 
 source3/smbd/files.c |2 --
 3 files changed, 35 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/local.h b/source3/include/local.h
index 45767ad..de54ea5 100644
--- a/source3/include/local.h
+++ b/source3/include/local.h
@@ -66,7 +66,25 @@
 #ifndef MAX_OPEN_FILES
 #define MAX_OPEN_FILES 1
 #endif
- 
+
+/*
+ * Fudgefactor required for open tdb's, etc.
+ */
+
+#ifndef MAX_OPEN_FUDGEFACTOR
+#define MAX_OPEN_FUDGEFACTOR 20
+#endif
+
+/*
+ * Minimum number of open files needed for Windows7 to
+ * work correctly. A little conservative but better that
+ * than run out of fd's.
+ */
+
+#ifndef MIN_OPEN_FILES_WINDOWS
+#define MIN_OPEN_FILES_WINDOWS 1050
+#endif
+
 #define WORDMAX 0x
 
 /* the maximum password length before we declare a likely attack */
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index a1f5328..3d426ec 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -4739,6 +4739,22 @@ static int max_open_files(void)
 #endif
 #endif
 
+   if (sysctl_max  MIN_OPEN_FILES_WINDOWS) {
+   DEBUG(2,(max_open_files: sysctl_max (%d) below 
+   minimum Windows limit (%d)\n,
+   sysctl_max,
+   MIN_OPEN_FILES_WINDOWS));
+   sysctl_max = MIN_OPEN_FILES_WINDOWS;
+   }
+
+   if (rlimit_max  MIN_OPEN_FILES_WINDOWS) {
+   DEBUG(2,(rlimit_max: rlimit_max (%d) below 
+   minimum Windows limit (%d)\n,
+   rlimit_max,
+   MIN_OPEN_FILES_WINDOWS));
+   rlimit_max = MIN_OPEN_FILES_WINDOWS;
+   }
+
return MIN(sysctl_max, rlimit_max);
 }
 
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index 2bc5ba6..455666f 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -171,8 +171,6 @@ void file_close_pid(uint16 smbpid, int vuid)
  Initialise file structures.
 /
 
-#define MAX_OPEN_FUDGEFACTOR 20
-
 void file_init(void)
 {
int request_max_open_files = lp_max_open_files();


-- 
Samba Shared Repository


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

2009-12-02 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  358cca7... Fix bug #6837 - Too many open files when trying to 
access large number of files from Windows 7. Original patch by me fixed up with 
the correct open files number by jmaggar...@hotmail.com. Jeremy. (cherry picked 
from commit b6fdecd11210a3d2ff803bdc315aacd9f8b445a1)
  from  d09fd7e... Ensure we don't see the xattr used to store NT security 
(visible when xattr_tdb is used). Allows make test to pass with acl_xattr.so 
prepended to the vfs modules. Jeremy. (cherry picked from commit 
8dda4cea660639190c1c7e84355186d07a6e064f)

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


- Log -
commit 358cca77b2e09262e7e7bd41a782f46cff63922c
Author: Jeremy Allison j...@samba.org
Date:   Wed Dec 2 10:01:14 2009 -0800

Fix bug #6837 - Too many open files when trying to access large number of 
files
from Windows 7. Original patch by me fixed up with the correct open files 
number
by jmaggar...@hotmail.com.
Jeremy.
(cherry picked from commit b6fdecd11210a3d2ff803bdc315aacd9f8b445a1)

---

Summary of changes:
 source3/include/local.h  |   20 +++-
 source3/param/loadparm.c |   16 
 source3/smbd/files.c |2 --
 3 files changed, 35 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/local.h b/source3/include/local.h
index 45767ad..de54ea5 100644
--- a/source3/include/local.h
+++ b/source3/include/local.h
@@ -66,7 +66,25 @@
 #ifndef MAX_OPEN_FILES
 #define MAX_OPEN_FILES 1
 #endif
- 
+
+/*
+ * Fudgefactor required for open tdb's, etc.
+ */
+
+#ifndef MAX_OPEN_FUDGEFACTOR
+#define MAX_OPEN_FUDGEFACTOR 20
+#endif
+
+/*
+ * Minimum number of open files needed for Windows7 to
+ * work correctly. A little conservative but better that
+ * than run out of fd's.
+ */
+
+#ifndef MIN_OPEN_FILES_WINDOWS
+#define MIN_OPEN_FILES_WINDOWS 1050
+#endif
+
 #define WORDMAX 0x
 
 /* the maximum password length before we declare a likely attack */
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 9da853f..08bb654 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -4739,6 +4739,22 @@ static int max_open_files(void)
 #endif
 #endif
 
+   if (sysctl_max  MIN_OPEN_FILES_WINDOWS) {
+   DEBUG(2,(max_open_files: sysctl_max (%d) below 
+   minimum Windows limit (%d)\n,
+   sysctl_max,
+   MIN_OPEN_FILES_WINDOWS));
+   sysctl_max = MIN_OPEN_FILES_WINDOWS;
+   }
+
+   if (rlimit_max  MIN_OPEN_FILES_WINDOWS) {
+   DEBUG(2,(rlimit_max: rlimit_max (%d) below 
+   minimum Windows limit (%d)\n,
+   rlimit_max,
+   MIN_OPEN_FILES_WINDOWS));
+   rlimit_max = MIN_OPEN_FILES_WINDOWS;
+   }
+
return MIN(sysctl_max, rlimit_max);
 }
 
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index 2bc5ba6..455666f 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -171,8 +171,6 @@ void file_close_pid(uint16 smbpid, int vuid)
  Initialise file structures.
 /
 
-#define MAX_OPEN_FUDGEFACTOR 20
-
 void file_init(void)
 {
int request_max_open_files = lp_max_open_files();


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-12-02 Thread Jeremy Allison
The branch, master has been updated
   via  486c8d5... Ensure get_nt_acl_internal() only looks at the ACL 
blobs, not reads off the underlying filesystem. Ensure that vfs_acl_tdb.c 
returns NT_STATUS_NOT_FOUND, not NT_STATUS_OBJECT_NAME_NOT_FOUND when it can't 
find a blob matching the file. Jeremy.
  from  b6fdecd... Fix bug #6837 - Too many open files when trying to 
access large number of files from Windows 7. Original patch by me fixed up with 
the correct open files number by jmaggar...@hotmail.com. Jeremy.

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


- Log -
commit 486c8d57ec5a9aa63aff275621ff45c22b8cde61
Author: Jeremy Allison j...@samba.org
Date:   Wed Dec 2 12:09:48 2009 -0800

Ensure get_nt_acl_internal() only looks at the ACL blobs, not
reads off the underlying filesystem. Ensure that vfs_acl_tdb.c
returns NT_STATUS_NOT_FOUND, not NT_STATUS_OBJECT_NAME_NOT_FOUND
when it can't find a blob matching the file.
Jeremy.

---

Summary of changes:
 source3/modules/vfs_acl_common.c |   40 -
 source3/modules/vfs_acl_tdb.c|2 +-
 2 files changed, 23 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 116211c..ff97a04 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -161,7 +161,8 @@ static NTSTATUS create_acl_blob(const struct 
security_descriptor *psd,
 }
 
 /***
- Store a DATA_BLOB into an xattr given a pathname.
+ Pull a DATA_BLOB from an xattr given a pathname.
+ DOES NOT FALL BACK TO THE UNDERLYING ACLs ON THE FILESYSTEM.
 ***/
 
 static NTSTATUS get_nt_acl_internal(vfs_handle_struct *handle,
@@ -185,21 +186,8 @@ static NTSTATUS get_nt_acl_internal(vfs_handle_struct 
*handle,
 
status = get_acl_blob(talloc_tos(), handle, fsp, name, blob);
if (!NT_STATUS_IS_OK(status)) {
-   DEBUG(10, (get_acl_blob returned %s\n, nt_errstr(status)));
-   if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
-   /* Pull the ACL from the underlying system. */
-   if (fsp) {
-   status = SMB_VFS_NEXT_FGET_NT_ACL(handle,
-   fsp,
-   security_info,
-   ppdesc);
-   } else {
-   status = SMB_VFS_NEXT_GET_NT_ACL(handle,
-   name,
-   security_info,
-   ppdesc);
-   }
-   }
+   DEBUG(10, (get_nt_acl_internal: get_acl_blob returned %s\n,
+   nt_errstr(status)));
return status;
}
 
@@ -668,8 +656,16 @@ static int mkdir_acl_common(vfs_handle_struct *handle, 
const char *path, mode_t
 static NTSTATUS fget_nt_acl_common(vfs_handle_struct *handle, files_struct 
*fsp,
 uint32_t security_info, struct security_descriptor **ppdesc)
 {
-   return get_nt_acl_internal(handle, fsp,
+   NTSTATUS status = get_nt_acl_internal(handle, fsp,
NULL, security_info, ppdesc);
+   if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
+   /* Pull the ACL from the underlying system. */
+   status = SMB_VFS_NEXT_FGET_NT_ACL(handle,
+   fsp,
+   security_info,
+   ppdesc);
+   }
+   return status;
 }
 
 /*
@@ -679,8 +675,16 @@ static NTSTATUS fget_nt_acl_common(vfs_handle_struct 
*handle, files_struct *fsp,
 static NTSTATUS get_nt_acl_common(vfs_handle_struct *handle,
 const char *name, uint32_t security_info, struct security_descriptor 
**ppdesc)
 {
-   return get_nt_acl_internal(handle, NULL,
+   NTSTATUS status = get_nt_acl_internal(handle, NULL,
name, security_info, ppdesc);
+   if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
+   /* Pull the ACL from the underlying system. */
+   status = SMB_VFS_NEXT_GET_NT_ACL(handle,
+   name,
+   security_info,
+   ppdesc);
+   }
+   return status;
 }
 

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

2009-12-02 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  f01a148... Ensure get_nt_acl_internal() only looks at the ACL 
blobs, not reads off the underlying filesystem. Ensure that vfs_acl_tdb.c 
returns NT_STATUS_NOT_FOUND, not NT_STATUS_OBJECT_NAME_NOT_FOUND when it can't 
find a blob matching the file. Jeremy. (cherry picked from commit 
486c8d57ec5a9aa63aff275621ff45c22b8cde61)
  from  358cca7... Fix bug #6837 - Too many open files when trying to 
access large number of files from Windows 7. Original patch by me fixed up with 
the correct open files number by jmaggar...@hotmail.com. Jeremy. (cherry picked 
from commit b6fdecd11210a3d2ff803bdc315aacd9f8b445a1)

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


- Log -
commit f01a14846f1ab1a5589cd780aa1c6ad45d73eccf
Author: Jeremy Allison j...@samba.org
Date:   Wed Dec 2 12:09:48 2009 -0800

Ensure get_nt_acl_internal() only looks at the ACL blobs, not
reads off the underlying filesystem. Ensure that vfs_acl_tdb.c
returns NT_STATUS_NOT_FOUND, not NT_STATUS_OBJECT_NAME_NOT_FOUND
when it can't find a blob matching the file.
Jeremy.
(cherry picked from commit 486c8d57ec5a9aa63aff275621ff45c22b8cde61)

---

Summary of changes:
 source3/modules/vfs_acl_common.c |   40 -
 source3/modules/vfs_acl_tdb.c|2 +-
 2 files changed, 23 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 116211c..ff97a04 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -161,7 +161,8 @@ static NTSTATUS create_acl_blob(const struct 
security_descriptor *psd,
 }
 
 /***
- Store a DATA_BLOB into an xattr given a pathname.
+ Pull a DATA_BLOB from an xattr given a pathname.
+ DOES NOT FALL BACK TO THE UNDERLYING ACLs ON THE FILESYSTEM.
 ***/
 
 static NTSTATUS get_nt_acl_internal(vfs_handle_struct *handle,
@@ -185,21 +186,8 @@ static NTSTATUS get_nt_acl_internal(vfs_handle_struct 
*handle,
 
status = get_acl_blob(talloc_tos(), handle, fsp, name, blob);
if (!NT_STATUS_IS_OK(status)) {
-   DEBUG(10, (get_acl_blob returned %s\n, nt_errstr(status)));
-   if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
-   /* Pull the ACL from the underlying system. */
-   if (fsp) {
-   status = SMB_VFS_NEXT_FGET_NT_ACL(handle,
-   fsp,
-   security_info,
-   ppdesc);
-   } else {
-   status = SMB_VFS_NEXT_GET_NT_ACL(handle,
-   name,
-   security_info,
-   ppdesc);
-   }
-   }
+   DEBUG(10, (get_nt_acl_internal: get_acl_blob returned %s\n,
+   nt_errstr(status)));
return status;
}
 
@@ -668,8 +656,16 @@ static int mkdir_acl_common(vfs_handle_struct *handle, 
const char *path, mode_t
 static NTSTATUS fget_nt_acl_common(vfs_handle_struct *handle, files_struct 
*fsp,
 uint32_t security_info, struct security_descriptor **ppdesc)
 {
-   return get_nt_acl_internal(handle, fsp,
+   NTSTATUS status = get_nt_acl_internal(handle, fsp,
NULL, security_info, ppdesc);
+   if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
+   /* Pull the ACL from the underlying system. */
+   status = SMB_VFS_NEXT_FGET_NT_ACL(handle,
+   fsp,
+   security_info,
+   ppdesc);
+   }
+   return status;
 }
 
 /*
@@ -679,8 +675,16 @@ static NTSTATUS fget_nt_acl_common(vfs_handle_struct 
*handle, files_struct *fsp,
 static NTSTATUS get_nt_acl_common(vfs_handle_struct *handle,
 const char *name, uint32_t security_info, struct security_descriptor 
**ppdesc)
 {
-   return get_nt_acl_internal(handle, NULL,
+   NTSTATUS status = get_nt_acl_internal(handle, NULL,
name, security_info, ppdesc);
+   if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
+   /* Pull the ACL from the underlying system. */
+   status = 

[SCM] Samba Shared Repository - branch master updated

2009-12-02 Thread Björn Jacke
The branch, master has been updated
   via  95c1862... s3: prefer posix_fallocate for doing strict allocate
  from  486c8d5... Ensure get_nt_acl_internal() only looks at the ACL 
blobs, not reads off the underlying filesystem. Ensure that vfs_acl_tdb.c 
returns NT_STATUS_NOT_FOUND, not NT_STATUS_OBJECT_NAME_NOT_FOUND when it can't 
find a blob matching the file. Jeremy.

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


- Log -
commit 95c18626107484d5d1d475e34fc4dde03cfe6ff5
Author: Björn Jacke b...@sernet.de
Date:   Wed Dec 2 15:13:37 2009 +0100

s3: prefer posix_fallocate for doing strict allocate

posix_fallocate is more efficient than manual zero'ing the file. When
preallocation in kernel space is supported it's extremely fast. Support for
preallocation at fs layer via posix_fallocate and fallocate at kernel site
can be found in Linux kernel 2.6.23/glibc 2.10 with ext4, XFS and OCFS2. 
Other
systems that I know of which support fast preallocation in kernel space are
AIX 6.1 with JFS2 and recent Solaris versions with ZFS maybe UFS2, too.

People who have a system with preallocation in kernel space might want to 
set
strict allocate = yes. This reduces file fragentation and it's also safer 
for
setups with quota being turned on.

As of today most systems still don't have preallocation in kernel space, and
that's why strict allocate = no will stay the default for now.

---

Summary of changes:
 source3/configure.in  |2 +-
 source3/include/proto.h   |1 +
 source3/lib/system.c  |   14 ++
 source3/modules/vfs_default.c |   25 +
 4 files changed, 37 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index de30f14..fb1d631 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1057,7 +1057,7 @@ AC_CHECK_FUNCS(setsid glob strpbrk crypt16 getauthuid)
 AC_CHECK_FUNCS(sigprocmask sigblock sigaction sigset innetgr setnetgrent 
getnetgrent endnetgrent)
 AC_CHECK_FUNCS(initgroups select poll rdchk getgrnam getgrent pathconf)
 AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups sysconf stat64 fstat64)
-AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt lseek64 ftruncate64)
+AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt lseek64 ftruncate64 
posix_fallocate posix_fallocate64)
 AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid getpwanam)
 AC_CHECK_FUNCS(opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64)
 AC_CHECK_FUNCS(getpwent_r)
diff --git a/source3/include/proto.h b/source3/include/proto.h
index f0ce7a3..7013709 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -932,6 +932,7 @@ int sys_fstat(int fd, SMB_STRUCT_STAT *sbuf,
 int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf,
  bool fake_dir_create_times);
 int sys_ftruncate(int fd, SMB_OFF_T offset);
+int sys_posix_fallocate(int fd, SMB_OFF_T offset, SMB_OFF_T len);
 SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence);
 int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence);
 SMB_OFF_T sys_ftell(FILE *fp);
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 86802d0..b18358d 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -610,6 +610,20 @@ int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf,
 }
 
 /***
+ An posix_fallocate() wrapper that will deal with 64 bit filesizes.
+/
+#if defined(HAVE_POSIX_FALLOCATE64) || defined(HAVE_POSIX_FALLOCATE)
+int sys_posix_fallocate(int fd, SMB_OFF_T offset, SMB_OFF_T len)
+{
+#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT)  defined(HAVE_OFF64_T)  
defined(HAVE_POSIX_FALLOCATE64)
+   return posix_fallocate64(fd, offset, len);
+#else
+   return posix_fallocate(fd, offset, len);
+#endif
+}
+#endif
+
+/***
  An ftruncate() wrapper that will deal with 64 bit filesizes.
 /
 
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 9abf792..da775d1 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -922,8 +922,6 @@ static int strict_allocate_ftruncate(vfs_handle_struct 
*handle, files_struct *fs
if (SMB_VFS_FSTAT(fsp, st) == -1)
return -1;
 
-   space_to_write = len - st.st_ex_size;
-
 #ifdef S_ISFIFO
if (S_ISFIFO(st.st_ex_mode))
return 0;
@@ -936,7 +934,28 @@ static int strict_allocate_ftruncate(vfs_handle_struct 
*handle, files_struct *fs
if (st.st_ex_size  len)
return sys_ftruncate(fsp-fh-fd, len);
 
+   /* for 

[SCM] Samba Shared Repository - branch master updated

2009-12-02 Thread Jeremy Allison
The branch, master has been updated
   via  148e79d... Ensure check_parent_acl_common() only looks at stored 
blobs - returns NT_STATUS_OK if there aren't any. Jeremy.
  from  95c1862... s3: prefer posix_fallocate for doing strict allocate

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


- Log -
commit 148e79d156d92b41dfe7d6ae6f8cd2e571a3bee6
Author: Jeremy Allison j...@samba.org
Date:   Wed Dec 2 12:29:16 2009 -0800

Ensure check_parent_acl_common() only looks at stored
blobs - returns NT_STATUS_OK if there aren't any.
Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index ff97a04..68bf0b0 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -493,14 +493,28 @@ static NTSTATUS check_parent_acl_common(vfs_handle_struct 
*handle,
return NT_STATUS_NO_MEMORY;
}
 
-   status = SMB_VFS_GET_NT_ACL(handle-conn,
+   status = get_nt_acl_internal(handle,
+   NULL,
parent_name,
(OWNER_SECURITY_INFORMATION |
 GROUP_SECURITY_INFORMATION |
 DACL_SECURITY_INFORMATION),
parent_desc);
+
+   if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
+   /* No Windows ACL stored as a blob. Let the
+* underlying filesystem take care of checking
+* permissions. */
+   DEBUG(10,(check_parent_acl_common: no Windows ACL blob 
+   stored on directory %s for 
+   path %s\n,
+   parent_name,
+   path ));
+   return NT_STATUS_OK;
+   }
+
if (!NT_STATUS_IS_OK(status)) {
-   DEBUG(10,(check_parent_acl_common: SMB_VFS_GET_NT_ACL 
+   DEBUG(10,(check_parent_acl_common: get_nt_acl_internal 
on directory %s for 
path %s returned %s\n,
parent_name,


-- 
Samba Shared Repository


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

2009-12-02 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  e0904e2... Ensure check_parent_acl_common() only looks at stored 
blobs - returns NT_STATUS_OK if there aren't any. Jeremy. (cherry picked from 
commit 148e79d156d92b41dfe7d6ae6f8cd2e571a3bee6)
  from  f01a148... Ensure get_nt_acl_internal() only looks at the ACL 
blobs, not reads off the underlying filesystem. Ensure that vfs_acl_tdb.c 
returns NT_STATUS_NOT_FOUND, not NT_STATUS_OBJECT_NAME_NOT_FOUND when it can't 
find a blob matching the file. Jeremy. (cherry picked from commit 
486c8d57ec5a9aa63aff275621ff45c22b8cde61)

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


- Log -
commit e0904e28f43e4fc3404df85967d088b9b8b8c7d2
Author: Jeremy Allison j...@samba.org
Date:   Wed Dec 2 12:29:16 2009 -0800

Ensure check_parent_acl_common() only looks at stored
blobs - returns NT_STATUS_OK if there aren't any.
Jeremy.
(cherry picked from commit 148e79d156d92b41dfe7d6ae6f8cd2e571a3bee6)

---

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


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index ff97a04..68bf0b0 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -493,14 +493,28 @@ static NTSTATUS check_parent_acl_common(vfs_handle_struct 
*handle,
return NT_STATUS_NO_MEMORY;
}
 
-   status = SMB_VFS_GET_NT_ACL(handle-conn,
+   status = get_nt_acl_internal(handle,
+   NULL,
parent_name,
(OWNER_SECURITY_INFORMATION |
 GROUP_SECURITY_INFORMATION |
 DACL_SECURITY_INFORMATION),
parent_desc);
+
+   if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
+   /* No Windows ACL stored as a blob. Let the
+* underlying filesystem take care of checking
+* permissions. */
+   DEBUG(10,(check_parent_acl_common: no Windows ACL blob 
+   stored on directory %s for 
+   path %s\n,
+   parent_name,
+   path ));
+   return NT_STATUS_OK;
+   }
+
if (!NT_STATUS_IS_OK(status)) {
-   DEBUG(10,(check_parent_acl_common: SMB_VFS_GET_NT_ACL 
+   DEBUG(10,(check_parent_acl_common: get_nt_acl_internal 
on directory %s for 
path %s returned %s\n,
parent_name,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-12-02 Thread Björn Jacke
The branch, master has been updated
   via  1d013fd... s3:build: fix shared library build on QNX
  from  148e79d... Ensure check_parent_acl_common() only looks at stored 
blobs - returns NT_STATUS_OK if there aren't any. Jeremy.

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


- Log -
commit 1d013fd03295433698f2b301dbf8324a3db528eb
Author: Björn Jacke b...@sernet.de
Date:   Thu Dec 3 00:02:44 2009 +0100

s3:build: fix shared library build on QNX

Fixes #6860. Thanks to Matt Kraai!

---

Summary of changes:
 source3/configure.in |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index fb1d631..32c9e3e 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1541,9 +1541,10 @@ DSO_EXPORTS=
 
   # and these are for particular systems
   case $host_os in
-   *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
-   case $host_os in *linux*)
-   AC_DEFINE(LINUX,1,[Whether the host os is 
linux]) ;;
+   *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu | *qnx*)
+   case $host_os in
+   *linux*) AC_DEFINE(LINUX,1,[Whether the host os 
is linux]) ;;
+   *qnx*) AC_DEFINE(QNX,1,[Whether the host os is 
qnx]) ;;
esac
BLDSHARED=true
LDSHFLAGS=-shared -Wl,-Bsymbolic


-- 
Samba Shared Repository


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

2009-12-02 Thread Björn Jacke
The branch, v3-5-test has been updated
   via  a1991b1... s3: prefer posix_fallocate for doing strict allocate
   via  7d53a5f... s3:build: fix shared library build on QNX
  from  e0904e2... Ensure check_parent_acl_common() only looks at stored 
blobs - returns NT_STATUS_OK if there aren't any. Jeremy. (cherry picked from 
commit 148e79d156d92b41dfe7d6ae6f8cd2e571a3bee6)

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


- Log -
commit a1991b17cdb38b1bffa32d2386132ae01f827cd0
Author: Björn Jacke b...@sernet.de
Date:   Wed Dec 2 15:13:37 2009 +0100

s3: prefer posix_fallocate for doing strict allocate

posix_fallocate is more efficient than manual zero'ing the file. When
preallocation in kernel space is supported it's extremely fast. Support for
preallocation at fs layer via posix_fallocate and fallocate at kernel site
can be found in Linux kernel 2.6.23/glibc 2.10 with ext4, XFS and OCFS2. 
Other
systems that I know of which support fast preallocation in kernel space are
AIX 6.1 with JFS2 and recent Solaris versions with ZFS maybe UFS2, too.

People who have a system with preallocation in kernel space might want to 
set
strict allocate = yes. This reduces file fragentation and it's also safer 
for
setups with quota being turned on.

As of today most systems still don't have preallocation in kernel space, and
that's why strict allocate = no will stay the default for now.

commit 7d53a5f728430013c7daca5b1301dc9271c29680
Author: Björn Jacke b...@sernet.de
Date:   Thu Dec 3 00:02:44 2009 +0100

s3:build: fix shared library build on QNX

Fixes #6860. Thanks to Matt Kraai!

---

Summary of changes:
 source3/configure.in  |9 +
 source3/include/proto.h   |1 +
 source3/lib/system.c  |   14 ++
 source3/modules/vfs_default.c |   25 +
 4 files changed, 41 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index 2f92a02..5f5cef9 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1007,7 +1007,7 @@ AC_CHECK_FUNCS(setsid glob strpbrk crypt16 getauthuid)
 AC_CHECK_FUNCS(sigprocmask sigblock sigaction sigset innetgr setnetgrent 
getnetgrent endnetgrent)
 AC_CHECK_FUNCS(initgroups select poll rdchk getgrnam getgrent pathconf)
 AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups sysconf stat64 fstat64)
-AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt lseek64 ftruncate64)
+AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt lseek64 ftruncate64 
posix_fallocate posix_fallocate64)
 AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid getpwanam)
 AC_CHECK_FUNCS(opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64)
 AC_CHECK_FUNCS(getpwent_r)
@@ -1491,9 +1491,10 @@ DSO_EXPORTS=
 
   # and these are for particular systems
   case $host_os in
-   *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
-   case $host_os in *linux*)
-   AC_DEFINE(LINUX,1,[Whether the host os is 
linux]) ;;
+   *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu | *qnx*)
+   case $host_os in
+   *linux*) AC_DEFINE(LINUX,1,[Whether the host os 
is linux]) ;;
+   *qnx*) AC_DEFINE(QNX,1,[Whether the host os is 
qnx]) ;;
esac
BLDSHARED=true
LDSHFLAGS=-shared -Wl,-Bsymbolic
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 52808f6..e3311ed 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -934,6 +934,7 @@ int sys_fstat(int fd, SMB_STRUCT_STAT *sbuf,
 int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf,
  bool fake_dir_create_times);
 int sys_ftruncate(int fd, SMB_OFF_T offset);
+int sys_posix_fallocate(int fd, SMB_OFF_T offset, SMB_OFF_T len);
 SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence);
 int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence);
 SMB_OFF_T sys_ftell(FILE *fp);
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 86802d0..b18358d 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -610,6 +610,20 @@ int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf,
 }
 
 /***
+ An posix_fallocate() wrapper that will deal with 64 bit filesizes.
+/
+#if defined(HAVE_POSIX_FALLOCATE64) || defined(HAVE_POSIX_FALLOCATE)
+int sys_posix_fallocate(int fd, SMB_OFF_T offset, SMB_OFF_T len)
+{
+#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT)  defined(HAVE_OFF64_T)  
defined(HAVE_POSIX_FALLOCATE64)
+   return posix_fallocate64(fd, offset, len);
+#else
+   

[SCM] Samba Shared Repository - branch master updated

2009-12-02 Thread Jeremy Allison
The branch, master has been updated
   via  365c6b4... Restructure the ACL code some more, get the internal 
semantics right. The previous bugs were due to the fact that 
get_nt_acl_internal() could return an NTSTATUS error if there was no stored ACL 
blob, but otherwise would return the underlying ACL from the filysystem. Fix 
this so it always returns a valid acl if it can, and if it does not its an 
error to be reported back to the client. This then changes the inherit acl 
code. Previously we were trying to match Windows by setting a minimal ACL on a 
new file that didn't inherit anything from a parent directory. This is silly - 
the returned ACL wouldn't match the underlying UNIX permissions. The current 
code will correctly inherit from a parent if a parent has any inheritable ACE 
entries that apply to the new object, but will return a mapping from the 
underlying UNIX permissions if the parent has no inheritable entries. This 
makes much more sense for new files/directories. Jeremy.
  from  1d013fd... s3:build: fix shared library build on QNX

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


- Log -
commit 365c6b4ce0bd84bfb1d9cec03bc835b92b1c5af7
Author: Jeremy Allison j...@samba.org
Date:   Wed Dec 2 15:02:28 2009 -0800

Restructure the ACL code some more, get the internal semantics
right. The previous bugs were due to the fact that get_nt_acl_internal()
could return an NTSTATUS error if there was no stored ACL blob, but
otherwise would return the underlying ACL from the filysystem. Fix
this so it always returns a valid acl if it can, and if it does not
its an error to be reported back to the client. This then changes
the inherit acl code. Previously we were trying to match Windows
by setting a minimal ACL on a new file that didn't inherit anything
from a parent directory. This is silly - the returned ACL wouldn't
match the underlying UNIX permissions. The current code will correctly
inherit from a parent if a parent has any inheritable ACE entries
that apply to the new object, but will return a mapping from the
underlying UNIX permissions if the parent has no inheritable entries.
This makes much more sense for new files/directories.
Jeremy.

---

Summary of changes:
 source3/include/proto.h  |1 +
 source3/lib/secdesc.c|   20 +++
 source3/modules/vfs_acl_common.c |  299 +-
 3 files changed, 151 insertions(+), 169 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 7013709..8f14ef8 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -691,6 +691,7 @@ SEC_DESC_BUF *dup_sec_desc_buf(TALLOC_CTX *ctx, 
SEC_DESC_BUF *src);
 NTSTATUS sec_desc_add_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, 
uint32 mask, size_t *sd_size);
 NTSTATUS sec_desc_mod_sid(SEC_DESC *sd, DOM_SID *sid, uint32 mask);
 NTSTATUS sec_desc_del_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, 
size_t *sd_size);
+bool sd_has_inheritable_components(const SEC_DESC *parent_ctr, bool container);
 NTSTATUS se_create_child_secdesc(TALLOC_CTX *ctx,
 SEC_DESC **ppsd,
size_t *psize,
diff --git a/source3/lib/secdesc.c b/source3/lib/secdesc.c
index 5e35181..d45be00 100644
--- a/source3/lib/secdesc.c
+++ b/source3/lib/secdesc.c
@@ -474,6 +474,26 @@ static bool is_inheritable_ace(const SEC_ACE *ace,
return false;
 }
 
+/*
+ * Does a security descriptor have any inheritable components for
+ * the newly created type ?
+ */
+
+bool sd_has_inheritable_components(const SEC_DESC *parent_ctr, bool container)
+{
+   unsigned int i;
+   const SEC_ACL *the_acl = parent_ctr-dacl;
+
+   for (i = 0; i  the_acl-num_aces; i++) {
+   const SEC_ACE *ace = the_acl-aces[i];
+
+   if (is_inheritable_ace(ace, container)) {
+   return true;
+   }
+   }
+   return false;
+}
+
 /* Create a child security descriptor using another security descriptor as
the parent container.  This child object can either be a container or
non-container object. */
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 68bf0b0..570d14b 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -162,7 +162,8 @@ static NTSTATUS create_acl_blob(const struct 
security_descriptor *psd,
 
 /***
  Pull a DATA_BLOB from an xattr given a pathname.
- DOES NOT FALL BACK TO THE UNDERLYING ACLs ON THE FILESYSTEM.
+ If the hash doesn't match, or doesn't exist - return the underlying
+ filesystem sd.
 

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

2009-12-02 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  3e1afbb... Restructure the ACL code some more, get the internal 
semantics right. The previous bugs were due to the fact that 
get_nt_acl_internal() could return an NTSTATUS error if there was no stored ACL 
blob, but otherwise would return the underlying ACL from the filysystem. Fix 
this so it always returns a valid acl if it can, and if it does not its an 
error to be reported back to the client. This then changes the inherit acl 
code. Previously we were trying to match Windows by setting a minimal ACL on a 
new file that didn't inherit anything from a parent directory. This is silly - 
the returned ACL wouldn't match the underlying UNIX permissions. The current 
code will correctly inherit from a parent if a parent has any inheritable ACE 
entries that apply to the new object, but will return a mapping from the 
underlying UNIX permissions if the parent has no inheritable entries. This 
makes much more sense for new files/directories. Jeremy. (cherry picked from 
commit 3
 65c6b4ce0bd84bfb1d9cec03bc835b92b1c5af7)
  from  a1991b1... s3: prefer posix_fallocate for doing strict allocate

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


- Log -
commit 3e1afbbae79ee23c6f3b701ae3bcb57156049787
Author: Jeremy Allison j...@samba.org
Date:   Wed Dec 2 15:02:28 2009 -0800

Restructure the ACL code some more, get the internal semantics
right. The previous bugs were due to the fact that get_nt_acl_internal()
could return an NTSTATUS error if there was no stored ACL blob, but
otherwise would return the underlying ACL from the filysystem. Fix
this so it always returns a valid acl if it can, and if it does not
its an error to be reported back to the client. This then changes
the inherit acl code. Previously we were trying to match Windows
by setting a minimal ACL on a new file that didn't inherit anything
from a parent directory. This is silly - the returned ACL wouldn't
match the underlying UNIX permissions. The current code will correctly
inherit from a parent if a parent has any inheritable ACE entries
that apply to the new object, but will return a mapping from the
underlying UNIX permissions if the parent has no inheritable entries.
This makes much more sense for new files/directories.
Jeremy.
(cherry picked from commit 365c6b4ce0bd84bfb1d9cec03bc835b92b1c5af7)

---

Summary of changes:
 source3/include/proto.h  |1 +
 source3/lib/secdesc.c|   20 +++
 source3/modules/vfs_acl_common.c |  299 +-
 3 files changed, 151 insertions(+), 169 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index e3311ed..f389a5f 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -691,6 +691,7 @@ SEC_DESC_BUF *dup_sec_desc_buf(TALLOC_CTX *ctx, 
SEC_DESC_BUF *src);
 NTSTATUS sec_desc_add_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, 
uint32 mask, size_t *sd_size);
 NTSTATUS sec_desc_mod_sid(SEC_DESC *sd, DOM_SID *sid, uint32 mask);
 NTSTATUS sec_desc_del_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, 
size_t *sd_size);
+bool sd_has_inheritable_components(const SEC_DESC *parent_ctr, bool container);
 NTSTATUS se_create_child_secdesc(TALLOC_CTX *ctx,
 SEC_DESC **ppsd,
size_t *psize,
diff --git a/source3/lib/secdesc.c b/source3/lib/secdesc.c
index 5e35181..d45be00 100644
--- a/source3/lib/secdesc.c
+++ b/source3/lib/secdesc.c
@@ -474,6 +474,26 @@ static bool is_inheritable_ace(const SEC_ACE *ace,
return false;
 }
 
+/*
+ * Does a security descriptor have any inheritable components for
+ * the newly created type ?
+ */
+
+bool sd_has_inheritable_components(const SEC_DESC *parent_ctr, bool container)
+{
+   unsigned int i;
+   const SEC_ACL *the_acl = parent_ctr-dacl;
+
+   for (i = 0; i  the_acl-num_aces; i++) {
+   const SEC_ACE *ace = the_acl-aces[i];
+
+   if (is_inheritable_ace(ace, container)) {
+   return true;
+   }
+   }
+   return false;
+}
+
 /* Create a child security descriptor using another security descriptor as
the parent container.  This child object can either be a container or
non-container object. */
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 68bf0b0..570d14b 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -162,7 +162,8 @@ static NTSTATUS create_acl_blob(const struct 
security_descriptor *psd,
 
 /***
  Pull a DATA_BLOB from an xattr given a pathname.
- DOES NOT FALL BACK TO THE UNDERLYING ACLs ON THE 

[SCM] Samba Shared Repository - branch master updated

2009-12-02 Thread Björn Jacke
The branch, master has been updated
   via  a2929a6... s3:build: remove redundant qnx block size definition
  from  365c6b4... Restructure the ACL code some more, get the internal 
semantics right. The previous bugs were due to the fact that 
get_nt_acl_internal() could return an NTSTATUS error if there was no stored ACL 
blob, but otherwise would return the underlying ACL from the filysystem. Fix 
this so it always returns a valid acl if it can, and if it does not its an 
error to be reported back to the client. This then changes the inherit acl 
code. Previously we were trying to match Windows by setting a minimal ACL on a 
new file that didn't inherit anything from a parent directory. This is silly - 
the returned ACL wouldn't match the underlying UNIX permissions. The current 
code will correctly inherit from a parent if a parent has any inheritable ACE 
entries that apply to the new object, but will return a mapping from the 
underlying UNIX permissions if the parent has no inheritable entries. This 
makes much more sense for new files/directories. Jeremy.

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


- Log -
commit a2929a638fa6824e38beec7eaa78ac108c522f50
Author: Björn Jacke b...@sernet.de
Date:   Thu Dec 3 00:12:53 2009 +0100

s3:build: remove redundant qnx block size definition

---

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


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index 32c9e3e..c7ad8e7 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1657,9 +1657,6 @@ DSO_EXPORTS=
AC_DEFINE(STAT_ST_BLOCKSIZE,8192,[The size of a block])
AC_DEFINE(POSIX_ACL_NEEDS_MASK,1,[Does a POSIX ACL need 
a mask element])
;;
-   *qnx*) AC_DEFINE(QNX,1,[Whether the host os is qnx])
-   AC_DEFINE(STAT_ST_BLOCKSIZE,512)
-   ;;
*osf*) AC_DEFINE(OSF1,1,[Whether the host os is osf1])
BLDSHARED=true
LDSHFLAGS=-shared


-- 
Samba Shared Repository


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

2009-12-02 Thread Björn Jacke
The branch, v3-5-test has been updated
   via  4fa4e67... s3:build: remove redundant qnx block size definition
  from  3e1afbb... Restructure the ACL code some more, get the internal 
semantics right. The previous bugs were due to the fact that 
get_nt_acl_internal() could return an NTSTATUS error if there was no stored ACL 
blob, but otherwise would return the underlying ACL from the filysystem. Fix 
this so it always returns a valid acl if it can, and if it does not its an 
error to be reported back to the client. This then changes the inherit acl 
code. Previously we were trying to match Windows by setting a minimal ACL on a 
new file that didn't inherit anything from a parent directory. This is silly - 
the returned ACL wouldn't match the underlying UNIX permissions. The current 
code will correctly inherit from a parent if a parent has any inheritable ACE 
entries that apply to the new object, but will return a mapping from the 
underlying UNIX permissions if the parent has no inheritable entries. This 
makes much more sense for new files/directories. Jeremy. (cherry picked from 
commit 3
 65c6b4ce0bd84bfb1d9cec03bc835b92b1c5af7)

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


- Log -
commit 4fa4e6738074d39d73acc82e04ee88c00529f6c3
Author: Björn Jacke b...@sernet.de
Date:   Thu Dec 3 00:12:53 2009 +0100

s3:build: remove redundant qnx block size definition

---

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


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index 5f5cef9..16eb5d1 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1607,9 +1607,6 @@ DSO_EXPORTS=
AC_DEFINE(STAT_ST_BLOCKSIZE,8192,[The size of a block])
AC_DEFINE(POSIX_ACL_NEEDS_MASK,1,[Does a POSIX ACL need 
a mask element])
;;
-   *qnx*) AC_DEFINE(QNX,1,[Whether the host os is qnx])
-   AC_DEFINE(STAT_ST_BLOCKSIZE,512)
-   ;;
*osf*) AC_DEFINE(OSF1,1,[Whether the host os is osf1])
BLDSHARED=true
LDSHFLAGS=-shared


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-12-02 Thread Andrew Tridgell
The branch, master has been updated
   via  8d7a43f... s4-drs: fixed UDV and overlapping sync calls in DRS
   via  b65b887... s4-drs: fixed updating of uSNChanged in replmd_modify
  from  a2929a6... s3:build: remove redundant qnx block size definition

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


- Log -
commit 8d7a43fed709b0ae4baaa861c30f2ee89a423dbb
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Dec 3 09:19:55 2009 +1100

s4-drs: fixed UDV and overlapping sync calls in DRS

When windows abandons a DRS sync, it will sometimes re-use the same bind 
handle for
a new sync. This means we need to check the DN of the sync and blank the 
getnc_state
if the DN has changed.

This also fixes the UDV to use the highest uSN for the partition, not for
the whole SAM.

commit b65b88740c4920232a02f8e3c535e31656697246
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Dec 2 17:14:40 2009 +1100

s4-drs: fixed updating of uSNChanged in replmd_modify

Updating of uSNChanged broke in a recent change

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c |5 +-
 source4/rpc_server/drsuapi/getncchanges.c   |   82 ---
 2 files changed, 44 insertions(+), 43 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c 
b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index bfde2df..9ed70d9 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -837,7 +837,6 @@ static int replmd_modify(struct ldb_module *module, struct 
ldb_request *req)
struct ldb_message *msg;
struct ldb_result *res;
time_t t = time(NULL);
-   uint64_t seq_num = 0;
int ret;
 
/* do not manipulate our control entries */
@@ -900,13 +899,13 @@ static int replmd_modify(struct ldb_module *module, 
struct ldb_request *req)
 
/* we only change whenChanged and uSNChanged if the seq_num
   has changed */
-   if (seq_num != 0) {
+   if (ac-seq_num != 0) {
if (add_time_element(msg, whenChanged, t) != LDB_SUCCESS) {
talloc_free(ac);
return ret;
}
 
-   if (add_uint64_element(msg, uSNChanged, seq_num) != 
LDB_SUCCESS) {
+   if (add_uint64_element(msg, uSNChanged, ac-seq_num) != 
LDB_SUCCESS) {
talloc_free(ac);
return ret;
}
diff --git a/source4/rpc_server/drsuapi/getncchanges.c 
b/source4/rpc_server/drsuapi/getncchanges.c
index 8155bef..c90c92a 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -132,6 +132,18 @@ static WERROR get_nc_changes_build_object(struct 
drsuapi_DsReplicaObjectListItem
 
obj-meta_data_ctr = talloc(obj, struct drsuapi_DsReplicaMetaDataCtr);
attids = talloc_array(obj, uint32_t, md.ctr.ctr1.count);
+
+   obj-object.identifier = talloc(obj, struct 
drsuapi_DsReplicaObjectIdentifier);
+   obj_dn = ldb_msg_find_attr_as_dn(sam_ctx, obj, msg, 
distinguishedName);
+   obj-object.identifier-dn = ldb_dn_get_linearized(obj_dn);
+   obj-object.identifier-guid = samdb_result_guid(msg, objectGUID);
+   sid = samdb_result_dom_sid(obj, msg, objectSid);
+   if (sid) {
+   dom_sid_split_rid(NULL, sid, NULL, rid);
+   obj-object.identifier-sid = *sid;
+   } else {
+   ZERO_STRUCT(obj-object.identifier-sid);
+   }

obj-meta_data_ctr-meta_data = talloc_array(obj, struct 
drsuapi_DsReplicaMetaData, md.ctr.ctr1.count);
for (n=i=0; imd.ctr.ctr1.count; i++) {
@@ -159,18 +171,6 @@ static WERROR get_nc_changes_build_object(struct 
drsuapi_DsReplicaObjectListItem
 
obj-meta_data_ctr-count = n;
 
-   obj-object.identifier = talloc(obj, struct 
drsuapi_DsReplicaObjectIdentifier);
-   obj_dn = ldb_msg_find_attr_as_dn(sam_ctx, obj, msg, 
distinguishedName);
-   obj-object.identifier-dn = ldb_dn_get_linearized(obj_dn);
-   obj-object.identifier-guid = samdb_result_guid(msg, objectGUID);
-   sid = samdb_result_dom_sid(obj, msg, objectSid);
-   if (sid) {
-   dom_sid_split_rid(NULL, sid, NULL, rid);
-   obj-object.identifier-sid = *sid;
-   } else {
-   ZERO_STRUCT(obj-object.identifier-sid);
-   }
-
obj-object.flags = DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER;
obj-object.attribute_ctr.num_attributes = obj-meta_data_ctr-count;
obj-object.attribute_ctr.attributes = talloc_array(obj, struct 
drsuapi_DsReplicaAttribute,
@@ -193,7 +193,8 @@ static WERROR get_nc_changes_build_object(struct 
drsuapi_DsReplicaObjectListItem
 
el 

[SCM] Samba Shared Repository - branch master updated

2009-12-02 Thread Günther Deschner
The branch, master has been updated
   via  9a3d9ab... s3-selftest: run LOCAL-NDR when running make selftest.
   via  450211b... s4-smbtorture: be very strict in checking 
spools_EnumPrinterKey results.
   via  f32ccc3... spoolss: hand-marshall the spoolss_StringArray2 struct 
for spoolss_EnumPrinterKey.
  from  8d7a43f... s4-drs: fixed UDV and overlapping sync calls in DRS

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


- Log -
commit 9a3d9abdd8e9737245e3cdd7f31d453c2062dba9
Author: Günther Deschner g...@samba.org
Date:   Thu Dec 3 00:46:47 2009 +0100

s3-selftest: run LOCAL-NDR when running make selftest.

Guenther

commit 450211b61016a4fed71eb116c1b526af0f365f13
Author: Günther Deschner g...@samba.org
Date:   Wed Dec 2 23:38:05 2009 +0100

s4-smbtorture: be very strict in checking spools_EnumPrinterKey results.

Guenther

commit f32ccc321a5467401781a0e2d4621175b6256368
Author: Günther Deschner g...@samba.org
Date:   Wed Dec 2 21:26:10 2009 +0100

spoolss: hand-marshall the spoolss_StringArray2 struct for 
spoolss_EnumPrinterKey.

This call is just driving me nuts :-)

Guenther

---

Summary of changes:
 librpc/gen_ndr/ndr_spoolss.c  |   46 
 librpc/gen_ndr/spoolss.h  |2 +-
 librpc/idl/spoolss.idl|2 +-
 librpc/ndr/ndr_spoolss_buf.c  |   62 +++--
 librpc/ndr/ndr_spoolss_buf.h  |2 +
 source3/script/tests/test_posix_s3.sh |2 +-
 source4/torture/rpc/spoolss.c |9 -
 source4/torture/rpc/spoolss_win.c |9 -
 8 files changed, 79 insertions(+), 55 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c
index 41d07d1..f783a83 100644
--- a/librpc/gen_ndr/ndr_spoolss.c
+++ b/librpc/gen_ndr/ndr_spoolss.c
@@ -8125,52 +8125,6 @@ _PUBLIC_ void ndr_print_spoolss_StringArray(struct 
ndr_print *ndr, const char *n
ndr-depth--;
 }
 
-_PUBLIC_ enum ndr_err_code ndr_push_spoolss_StringArray2(struct ndr_push *ndr, 
int ndr_flags, const struct spoolss_StringArray2 *r)
-{
-   if (ndr_flags  NDR_SCALARS) {
-   NDR_CHECK(ndr_push_align(ndr, 4));
-   NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
(ndr_size_spoolss_StringArray2(r, ndr-iconv_convenience, ndr-flags) - 4) / 
2));
-   {
-   uint32_t _flags_save_string_array = ndr-flags;
-   ndr_set_flags(ndr-flags, LIBNDR_FLAG_STR_NULLTERM);
-   {
-   struct ndr_push *_ndr_string;
-   NDR_CHECK(ndr_push_subcontext_start(ndr, 
_ndr_string, 0, (ndr_size_spoolss_StringArray2(r, ndr-iconv_convenience, 
ndr-flags) - 4) / 2 * 2));
-   NDR_CHECK(ndr_push_string_array(_ndr_string, 
NDR_SCALARS, r-string));
-   NDR_CHECK(ndr_push_subcontext_end(ndr, 
_ndr_string, 0, (ndr_size_spoolss_StringArray2(r, ndr-iconv_convenience, 
ndr-flags) - 4) / 2 * 2));
-   }
-   ndr-flags = _flags_save_string_array;
-   }
-   NDR_CHECK(ndr_push_trailer_align(ndr, 4));
-   }
-   if (ndr_flags  NDR_BUFFERS) {
-   }
-   return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_StringArray2(struct ndr_pull *ndr, 
int ndr_flags, struct spoolss_StringArray2 *r)
-{
-   if (ndr_flags  NDR_SCALARS) {
-   NDR_CHECK(ndr_pull_align(ndr, 4));
-   NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r-_ndr_size));
-   {
-   uint32_t _flags_save_string_array = ndr-flags;
-   ndr_set_flags(ndr-flags, LIBNDR_FLAG_STR_NULLTERM);
-   {
-   struct ndr_pull *_ndr_string;
-   NDR_CHECK(ndr_pull_subcontext_start(ndr, 
_ndr_string, 0, r-_ndr_size * 2));
-   NDR_CHECK(ndr_pull_string_array(_ndr_string, 
NDR_SCALARS, r-string));
-   NDR_CHECK(ndr_pull_subcontext_end(ndr, 
_ndr_string, 0, r-_ndr_size * 2));
-   }
-   ndr-flags = _flags_save_string_array;
-   }
-   NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
-   }
-   if (ndr_flags  NDR_BUFFERS) {
-   }
-   return NDR_ERR_SUCCESS;
-}
-
 _PUBLIC_ void ndr_print_spoolss_StringArray2(struct ndr_print *ndr, const char 
*name, const struct spoolss_StringArray2 *r)
 {
ndr_print_struct(ndr, name, spoolss_StringArray2);
diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h
index 8b9a1ee..e209cb4 100644
--- a/librpc/gen_ndr/spoolss.h
+++ b/librpc/gen_ndr/spoolss.h
@@ -1209,7 +1209,7 @@ 

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

2009-12-02 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  bd99ed7... s3-selftest: run LOCAL-NDR when running make selftest.
   via  6b8158d... s4-smbtorture: be very strict in checking 
spools_EnumPrinterKey results.
   via  0005a36... spoolss: hand-marshall the spoolss_StringArray2 struct 
for spoolss_EnumPrinterKey.
   via  91e9afb... samba-spoolss: use spoolss_StringArray2 in 
spoolss_EnumPrinterKey.
   via  46b5f05... spoolss: add spoolss_StringArray2.
   via  31217f3... s3-spoolss: move MAXDEVICENAME to spoolss idl.
  from  4fa4e67... s3:build: remove redundant qnx block size definition

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


- Log -
commit bd99ed71ed29012bddb815169166d7165e6167a7
Author: Günther Deschner g...@samba.org
Date:   Thu Dec 3 00:46:47 2009 +0100

s3-selftest: run LOCAL-NDR when running make selftest.

Guenther
(cherry picked from commit 9a3d9abdd8e9737245e3cdd7f31d453c2062dba9)

commit 6b8158ddfdce65e32ca39d8cc2c1d7b215cd22ff
Author: Günther Deschner g...@samba.org
Date:   Wed Dec 2 23:38:05 2009 +0100

s4-smbtorture: be very strict in checking spools_EnumPrinterKey results.

Guenther
(cherry picked from commit 450211b61016a4fed71eb116c1b526af0f365f13)

commit 0005a36b14808b67a4b97376b8305bd3145ea90a
Author: Günther Deschner g...@samba.org
Date:   Wed Dec 2 21:26:10 2009 +0100

spoolss: hand-marshall the spoolss_StringArray2 struct for 
spoolss_EnumPrinterKey.

This call is just driving me nuts :-)

Guenther
(cherry picked from commit f32ccc321a5467401781a0e2d4621175b6256368)

commit 91e9afbcd65500a37f947442955d9ca3e080982e
Author: Günther Deschner g...@samba.org
Date:   Wed Dec 2 14:25:31 2009 +0100

samba-spoolss: use spoolss_StringArray2 in spoolss_EnumPrinterKey.

This should finally resolve the endian issues we were seeing on sparc and is
much cleaner for spoolss clients and servers.

Guenther
(cherry picked from commit 5f60855ba2eb822dcb867378ff09278c42931b89)

commit 46b5f055ffc8fbdf622482cca746e00dcfac9ca0
Author: Günther Deschner g...@samba.org
Date:   Wed Dec 2 14:22:52 2009 +0100

spoolss: add spoolss_StringArray2.

The difference to spoolss_StringArray is that in spoolss_StringArray2 the 
string
array is put into a subcontext of _ndr_size.

Guenther
(cherry picked from commit 292af4fc046ff39ebd3ec853c402dc267a863fa6)

commit 31217f3edaf2565947d3e79f4d655503b013bd18
Author: Günther Deschner g...@samba.org
Date:   Tue Dec 1 02:38:19 2009 +0100

s3-spoolss: move MAXDEVICENAME to spoolss idl.

Guenther
(cherry picked from commit 91bb0659776d397bc4b8ca7a534f6f2327e2e6fe)

---

Summary of changes:
 librpc/gen_ndr/cli_spoolss.c  |8 ++--
 librpc/gen_ndr/cli_spoolss.h  |4 +-
 librpc/gen_ndr/ndr_spoolss.c  |   58 --
 librpc/gen_ndr/ndr_spoolss.h  |3 ++
 librpc/gen_ndr/spoolss.h  |8 -
 librpc/gen_ndr/srv_spoolss.c  |4 +-
 librpc/idl/spoolss.idl|   13 +--
 librpc/ndr/ndr_spoolss_buf.c  |   65 +
 librpc/ndr/ndr_spoolss_buf.h  |3 ++
 source3/include/nt_printing.h |2 -
 source3/rpc_client/cli_spoolss.c  |   24 ++--
 source3/rpc_server/srv_spoolss_nt.c   |2 +-
 source3/script/tests/test_posix_s3.sh |2 +-
 source4/torture/rpc/spoolss.c |   26 +
 source4/torture/rpc/spoolss_win.c |   28 +-
 15 files changed, 145 insertions(+), 105 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c
index aba70f2..0a5c2a6 100644
--- a/librpc/gen_ndr/cli_spoolss.c
+++ b/librpc/gen_ndr/cli_spoolss.c
@@ -12207,7 +12207,7 @@ struct tevent_req 
*rpccli_spoolss_EnumPrinterKey_send(TALLOC_CTX *mem_ctx,
  struct rpc_pipe_client 
*cli,
  struct policy_handle 
*_handle /* [in] [ref] */,
  const char *_key_name /* 
[in] [charset(UTF16)] */,
- uint16_t *_key_buffer /* 
[out] [ref,size_is(offered/2)] */,
+ struct 
spoolss_StringArray2 *_key_buffer /* [out] [ref] */,
  uint32_t _offered /* [in] 
 */,
  uint32_t *_needed /* 
[out] [ref] */)
 {
@@ -12278,7 +12278,7 @@ static void rpccli_spoolss_EnumPrinterKey_done(struct 
tevent_req *subreq)
}
 
/* Copy out parameters */
-   memcpy(state-orig.out.key_buffer, state-tmp.out.key_buffer, 

[SCM] Samba Shared Repository - branch master updated

2009-12-02 Thread Steven Danneman
The branch, master has been updated
   via  48358b3... s4/torture: add multiple lock cancel test
   via  ad9c5a7... s4/torture: add addition multiple lock tests
   via  dfbb92e... s4/torture: fix build warnings by removing unecessary 
const
   via  438b7c4... s4/torture: Add target functionality parameters to SMBv1 
BRL tests
  from  9a3d9ab... s3-selftest: run LOCAL-NDR when running make selftest.

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


- Log -
commit 48358b3eaa425d8fbfec7bfd8ccf56860b5a1ba0
Author: Steven Danneman steven.danne...@isilon.com
Date:   Wed Nov 25 17:39:42 2009 -0800

s4/torture: add multiple lock cancel test

See what happens when we have multiple outstanding lock requests and
we try to cancel both of them within a single LockingAndX.

On Windows, it seems only the first lock in the array is cancelled,
and the second is left pending.  Though, this behavior goes against
the MS-CIFS spec.

commit ad9c5a7b881bd28f408a178766a00098bab19157
Author: Steven Danneman steven.danne...@isilon.com
Date:   Mon Nov 30 17:05:27 2009 -0800

s4/torture: add addition multiple lock tests

* test that 2 locks in a single LockAndX are transactional
* test that 1 unlock and 1 lock in a single LockAndX are not
  transactional
* test that SMB2 doesn't like mixed lock/unlock in a single
  PDU

commit dfbb92e2a1c3478c9b1263adcc4818afe2acd6f7
Author: Steven Danneman steven.danne...@isilon.com
Date:   Tue Nov 24 18:38:46 2009 -0800

s4/torture: fix build warnings by removing unecessary const

commit 438b7c41aecaad55f03d2f19a0f33bb57decefa9
Author: Steven Danneman steven.danne...@isilon.com
Date:   Tue Nov 24 16:58:25 2009 -0800

s4/torture: Add target functionality parameters to SMBv1 BRL tests

Abstract the server requirements to pass some BRL tests.

* The new default for 64bit lock tests, is that the server should
  return STATUS_INVALID_LOCK_RANGE.
* Add parameter for targets that don't implement DENY_DOS

---

Summary of changes:
 source4/torture/raw/lock.c   |  195 --
 source4/torture/smb2/lock.c  |  241 +-
 source4/torture/smbtorture.c |7 +-
 source4/torture/smbtorture.h |9 ++
 4 files changed, 413 insertions(+), 39 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/raw/lock.c b/source4/torture/raw/lock.c
index 610cac9..f36d492 100644
--- a/source4/torture/raw/lock.c
+++ b/source4/torture/raw/lock.c
@@ -69,6 +69,19 @@
}} while (0)
 #define BASEDIR \\testlock
 
+#define TARGET_SUPPORTS_SMBLOCK(_tctx) \
+(torture_setting_bool(_tctx, smblock_pdu_support, true))
+#define TARGET_SUPPORTS_OPENX_DENY_DOS(_tctx) \
+(torture_setting_bool(_tctx, openx_deny_dos_support, true))
+#define TARGET_SUPPORTS_INVALID_LOCK_RANGE(_tctx) \
+(torture_setting_bool(_tctx, invalid_lock_range_support, true))
+#define TARGET_IS_W2K8(_tctx) (torture_setting_bool(_tctx, w2k8, false))
+#define TARGET_IS_WIN7(_tctx) (torture_setting_bool(_tctx, win7, false))
+#define TARGET_IS_WINDOWS(_tctx) ((torture_setting_bool(_tctx, w2k8, false)) 
|| \
+ (torture_setting_bool(_tctx, win7, false)))
+#define TARGET_IS_SAMBA3(_tctx) (torture_setting_bool(_tctx, samba3, false))
+#define TARGET_IS_SAMBA4(_tctx) (torture_setting_bool(_tctx, samba4, false))
+
 /*
   test SMBlock and SMBunlock ops
 */
@@ -80,6 +93,9 @@ static bool test_lock(struct torture_context *tctx, struct 
smbcli_state *cli)
int fnum;
const char *fname = BASEDIR \\test.txt;
 
+   if (!TARGET_SUPPORTS_SMBLOCK(tctx))
+   torture_skip(tctx, Target does not support the SMBlock PDU);
+
if (!torture_setup_dir(cli, BASEDIR)) {
return false;
}
@@ -361,7 +377,7 @@ static bool test_lockx(struct torture_context *tctx, struct 
smbcli_state *cli)
lock[0].pid++;
lock[0].count = 2;
status = smb_raw_lock(cli-tree, io);
-   if (TARGET_IS_WIN7(tctx) || TARGET_IS_SAMBA4(tctx))
+   if (TARGET_SUPPORTS_INVALID_LOCK_RANGE(tctx))
CHECK_STATUS(status, NT_STATUS_INVALID_LOCK_RANGE);
else
CHECK_STATUS(status, NT_STATUS_OK);
@@ -484,7 +500,7 @@ static bool test_async(struct torture_context *tctx,
int fnum;
const char *fname = BASEDIR \\test.txt;
time_t t;
-   struct smbcli_request *req;
+   struct smbcli_request *req, *req2;
struct smbcli_session_options options;
 
if (!torture_setup_dir(cli, BASEDIR)) {
@@ -510,6 +526,9 @@ static bool test_async(struct torture_context *tctx,
lock[0].pid = cli-session-pid;
lock[0].offset = 100;
lock[0].count = 10;
+   lock[1].pid = cli-session-pid;
+   

[SCM] Samba Shared Repository - branch master updated

2009-12-02 Thread Björn Jacke
The branch, master has been updated
   via  7c938d1... ѕ3: remove superfluous option check
  from  48358b3... s4/torture: add multiple lock cancel test

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


- Log -
commit 7c938d16a9cf4daa1d4a61399f326f2683d08af4
Author: Björn Jacke b...@sernet.de
Date:   Thu Dec 3 02:32:47 2009 +0100

ѕ3: remove superfluous option check

this function is only called when strict alloc is set, no reason to check 
that twice.

---

Summary of changes:
 source3/modules/vfs_default.c |   23 ++-
 1 files changed, 10 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index da775d1..3691fb0 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -915,6 +915,8 @@ static int strict_allocate_ftruncate(vfs_handle_struct 
*handle, files_struct *fs
SMB_OFF_T currpos = SMB_VFS_LSEEK(fsp, 0, SEEK_CUR);
unsigned char zero_space[4096];
SMB_OFF_T space_to_write;
+   uint64_t space_avail;
+   uint64_t bsize,dfree,dsize;
 
if (currpos == -1)
return -1;
@@ -956,19 +958,14 @@ static int strict_allocate_ftruncate(vfs_handle_struct 
*handle, files_struct *fs
 #endif
/* available disk space is enough or not? */
space_to_write = len - st.st_ex_size;
-   if (lp_strict_allocate(SNUM(fsp-conn))){
-   uint64_t space_avail;
-   uint64_t bsize,dfree,dsize;
-
-   space_avail = get_dfree_info(fsp-conn,
-fsp-fsp_name-base_name, false,
-bsize, dfree, dsize);
-   /* space_avail is 1k blocks */
-   if (space_avail == (uint64_t)-1 ||
-   ((uint64_t)space_to_write/1024  space_avail) ) 
{
-   errno = ENOSPC;
-   return -1;
-   }
+   space_avail = get_dfree_info(fsp-conn,
+fsp-fsp_name-base_name, false,
+bsize,dfree,dsize);
+   /* space_avail is 1k blocks */
+   if (space_avail == (uint64_t)-1 ||
+   ((uint64_t)space_to_write/1024  space_avail) ) {
+   errno = ENOSPC;
+   return -1;
}
 
/* Write out the real space on disk. */


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-12-02 Thread Steven Danneman
The branch, master has been updated
   via  76be0f6... s4/selftest: knownfail some locking tests until bugs are 
fixed
  from  7c938d1... ѕ3: remove superfluous option check

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


- Log -
commit 76be0f6a11dfadc94923a81ef984b6234db5c0b0
Author: Steven Danneman steven.danne...@isilon.com
Date:   Wed Dec 2 17:55:00 2009 -0800

s4/selftest: knownfail some locking tests until bugs are fixed

---

Summary of changes:
 source4/selftest/knownfail |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/selftest/knownfail b/source4/selftest/knownfail
index 2f75760..56bf718 100644
--- a/source4/selftest/knownfail
+++ b/source4/selftest/knownfail
@@ -63,3 +63,5 @@ samba4.ntvfs.cifs.base.createx_sharemodes_dir
 samba4.ntvfs.cifs.base.maximum_allowed
 samba4.base.createx_access # this test is broken for non-administrator users
 samba4.smb2.oplock # oplocks in the s4 SMB2 server are a mess
+samba4.raw.lock.*.async # bug 6960
+samba4.smb2.lock.*.MULTIPLE-UNLOCK # bug 6959


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-12-02 Thread Jeremy Allison
The branch, master has been updated
   via  dfcc411... Remove unneeded argument from can_set_delete_on_close(). 
Ensure can_set_delete_on_close() is correctly called before any setting of the 
disposition bit (clean up the do_unlink() call). Jeremy.
  from  76be0f6... s4/selftest: knownfail some locking tests until bugs are 
fixed

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


- Log -
commit dfcc4115ddc7c3bf7a69d7eb747c096cd217b8a6
Author: Jeremy Allison j...@samba.org
Date:   Wed Dec 2 18:06:40 2009 -0800

Remove unneeded argument from can_set_delete_on_close(). Ensure
can_set_delete_on_close() is correctly called before any setting
of the disposition bit (clean up the do_unlink() call).
Jeremy.

---

Summary of changes:
 source3/include/proto.h  |3 +--
 source3/locking/locking.c|   11 ++-
 source3/modules/onefs_open.c |4 ++--
 source3/smbd/open.c  |4 ++--
 source3/smbd/reply.c |   30 +++---
 source3/smbd/trans2.c|9 +
 6 files changed, 23 insertions(+), 38 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 8f14ef8..d8fa437 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3499,8 +3499,7 @@ bool del_share_mode(struct share_mode_lock *lck, 
files_struct *fsp);
 void del_deferred_open_entry(struct share_mode_lock *lck, uint16 mid);
 bool remove_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
 bool downgrade_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
-NTSTATUS can_set_delete_on_close(files_struct *fsp, bool delete_on_close,
-uint32 dosmode);
+NTSTATUS can_set_delete_on_close(files_struct *fsp, uint32 dosmode);
 void set_delete_on_close_token(struct share_mode_lock *lck, const 
UNIX_USER_TOKEN *tok);
 void set_delete_on_close_lck(struct share_mode_lock *lck, bool 
delete_on_close, const UNIX_USER_TOKEN *tok);
 bool set_delete_on_close(files_struct *fsp, bool delete_on_close, const 
UNIX_USER_TOKEN *tok);
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 5a6fdf0..26018f9 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -1307,18 +1307,11 @@ bool downgrade_share_oplock(struct share_mode_lock 
*lck, files_struct *fsp)
 }
 
 /
- Deal with the internal needs of setting the delete on close flag. Note that
- as the tdb locking is recursive, it is safe to call this from within 
- open_file_ntcreate. JRA.
+ Check if setting delete on close is allowed on this fsp.
 /
 
-NTSTATUS can_set_delete_on_close(files_struct *fsp, bool delete_on_close,
-uint32 dosmode)
+NTSTATUS can_set_delete_on_close(files_struct *fsp, uint32 dosmode)
 {
-   if (!delete_on_close) {
-   return NT_STATUS_OK;
-   }
-
/*
 * Only allow delete on close for writable files.
 */
diff --git a/source3/modules/onefs_open.c b/source3/modules/onefs_open.c
index fd12fff..b96c4b6 100644
--- a/source3/modules/onefs_open.c
+++ b/source3/modules/onefs_open.c
@@ -1328,7 +1328,7 @@ NTSTATUS onefs_open_file_ntcreate(connection_struct *conn,
 
/* Handle strange delete on close create semantics. */
if (create_options  FILE_DELETE_ON_CLOSE) {
-   status = can_set_delete_on_close(fsp, True, new_dos_attributes);
+   status = can_set_delete_on_close(fsp, new_dos_attributes);
 
if (!NT_STATUS_IS_OK(status)) {
/* Remember to delete the mode we just added. */
@@ -1686,7 +1686,7 @@ static NTSTATUS onefs_open_directory(connection_struct 
*conn,
 * always to be honored on close... See test 19 in Samba4 BASE-DELETE.
 */
if (create_options  FILE_DELETE_ON_CLOSE) {
-   status = can_set_delete_on_close(fsp, True, 0);
+   status = can_set_delete_on_close(fsp, 0);
if (!NT_STATUS_IS_OK(status) 
!NT_STATUS_EQUAL(status, NT_STATUS_DIRECTORY_NOT_EMPTY)) {
TALLOC_FREE(lck);
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 72f6a00..fd3c610 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2171,7 +2171,7 @@ static NTSTATUS open_file_ntcreate(connection_struct 
*conn,
/* Handle strange delete on close create semantics. */
if (create_options  FILE_DELETE_ON_CLOSE) {
 
-   status = can_set_delete_on_close(fsp, True, new_dos_attributes);
+   status = can_set_delete_on_close(fsp, new_dos_attributes);
 
if (!NT_STATUS_IS_OK(status)) {

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

2009-12-02 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  baa4727... Remove unneeded argument from can_set_delete_on_close(). 
Ensure can_set_delete_on_close() is correctly called before any setting of the 
disposition bit (clean up the do_unlink() call). Jeremy. (cherry picked from 
commit dfcc4115ddc7c3bf7a69d7eb747c096cd217b8a6)
  from  bd99ed7... s3-selftest: run LOCAL-NDR when running make selftest.

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


- Log -
commit baa4727b243ff2dfb78d3dd5fd29c8e9a3667c56
Author: Jeremy Allison j...@samba.org
Date:   Wed Dec 2 18:06:40 2009 -0800

Remove unneeded argument from can_set_delete_on_close(). Ensure
can_set_delete_on_close() is correctly called before any setting
of the disposition bit (clean up the do_unlink() call).
Jeremy.
(cherry picked from commit dfcc4115ddc7c3bf7a69d7eb747c096cd217b8a6)

---

Summary of changes:
 source3/include/proto.h  |3 +--
 source3/locking/locking.c|   11 ++-
 source3/modules/onefs_open.c |4 ++--
 source3/smbd/open.c  |4 ++--
 source3/smbd/reply.c |   30 +++---
 source3/smbd/trans2.c|9 +
 6 files changed, 23 insertions(+), 38 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index f389a5f..7a7d4f9 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3486,8 +3486,7 @@ bool del_share_mode(struct share_mode_lock *lck, 
files_struct *fsp);
 void del_deferred_open_entry(struct share_mode_lock *lck, uint16 mid);
 bool remove_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
 bool downgrade_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
-NTSTATUS can_set_delete_on_close(files_struct *fsp, bool delete_on_close,
-uint32 dosmode);
+NTSTATUS can_set_delete_on_close(files_struct *fsp, uint32 dosmode);
 void set_delete_on_close_token(struct share_mode_lock *lck, const 
UNIX_USER_TOKEN *tok);
 void set_delete_on_close_lck(struct share_mode_lock *lck, bool 
delete_on_close, const UNIX_USER_TOKEN *tok);
 bool set_delete_on_close(files_struct *fsp, bool delete_on_close, const 
UNIX_USER_TOKEN *tok);
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 5a6fdf0..26018f9 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -1307,18 +1307,11 @@ bool downgrade_share_oplock(struct share_mode_lock 
*lck, files_struct *fsp)
 }
 
 /
- Deal with the internal needs of setting the delete on close flag. Note that
- as the tdb locking is recursive, it is safe to call this from within 
- open_file_ntcreate. JRA.
+ Check if setting delete on close is allowed on this fsp.
 /
 
-NTSTATUS can_set_delete_on_close(files_struct *fsp, bool delete_on_close,
-uint32 dosmode)
+NTSTATUS can_set_delete_on_close(files_struct *fsp, uint32 dosmode)
 {
-   if (!delete_on_close) {
-   return NT_STATUS_OK;
-   }
-
/*
 * Only allow delete on close for writable files.
 */
diff --git a/source3/modules/onefs_open.c b/source3/modules/onefs_open.c
index fd12fff..b96c4b6 100644
--- a/source3/modules/onefs_open.c
+++ b/source3/modules/onefs_open.c
@@ -1328,7 +1328,7 @@ NTSTATUS onefs_open_file_ntcreate(connection_struct *conn,
 
/* Handle strange delete on close create semantics. */
if (create_options  FILE_DELETE_ON_CLOSE) {
-   status = can_set_delete_on_close(fsp, True, new_dos_attributes);
+   status = can_set_delete_on_close(fsp, new_dos_attributes);
 
if (!NT_STATUS_IS_OK(status)) {
/* Remember to delete the mode we just added. */
@@ -1686,7 +1686,7 @@ static NTSTATUS onefs_open_directory(connection_struct 
*conn,
 * always to be honored on close... See test 19 in Samba4 BASE-DELETE.
 */
if (create_options  FILE_DELETE_ON_CLOSE) {
-   status = can_set_delete_on_close(fsp, True, 0);
+   status = can_set_delete_on_close(fsp, 0);
if (!NT_STATUS_IS_OK(status) 
!NT_STATUS_EQUAL(status, NT_STATUS_DIRECTORY_NOT_EMPTY)) {
TALLOC_FREE(lck);
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 72f6a00..fd3c610 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2171,7 +2171,7 @@ static NTSTATUS open_file_ntcreate(connection_struct 
*conn,
/* Handle strange delete on close create semantics. */
if (create_options  FILE_DELETE_ON_CLOSE) {
 
-   status = can_set_delete_on_close(fsp, True, new_dos_attributes);
+ 

[SCM] Samba Shared Repository - branch master updated

2009-12-02 Thread Bo Yang
The branch, master has been updated
   via  cdb68bd... s3: Fix crash in winbindd;(bug#6879).
  from  dfcc411... Remove unneeded argument from can_set_delete_on_close(). 
Ensure can_set_delete_on_close() is correctly called before any setting of the 
disposition bit (clean up the do_unlink() call). Jeremy.

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


- Log -
commit cdb68bd2b61147df77b7f2de3fb4e29be07e7bd9
Author: Bo Yang boy...@samba.org
Date:   Fri Dec 4 12:53:38 2009 +0800

s3: Fix crash in winbindd;(bug#6879).

Signed-off-by: Bo Yang boy...@samba.org

---

Summary of changes:
 source3/winbindd/winbindd_rpc.c |   10 --
 1 files changed, 8 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c
index b926370..1018a29 100644
--- a/source3/winbindd/winbindd_rpc.c
+++ b/source3/winbindd/winbindd_rpc.c
@@ -1281,8 +1281,12 @@ NTSTATUS winbindd_lookup_names(TALLOC_CTX *mem_ctx,
 * This call can take a long time
 * allow the server to time out.
 * 35 seconds should do it.
+* NB
+* only do this when the undelying transport is named pipe.
 */
-   orig_timeout = rpccli_set_timeout(cli, 35000);
+   if (cli-transport-transport == NCACN_NP) {
+   orig_timeout = rpccli_set_timeout(cli, 35000);
+   }
 
status = lookup_names_fn(cli,
 mem_ctx,
@@ -1295,7 +1299,9 @@ NTSTATUS winbindd_lookup_names(TALLOC_CTX *mem_ctx,
 types);
 
/* And restore our original timeout. */
-   rpccli_set_timeout(cli, orig_timeout);
+   if (cli-transport-transport == NCACN_NP) {
+   rpccli_set_timeout(cli, orig_timeout);
+   }
 
if (!NT_STATUS_IS_OK(status)) {
return status;


-- 
Samba Shared Repository


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

2009-12-02 Thread Bo Yang
The branch, v3-5-test has been updated
   via  3c4f74b... s3: Fix crash in winbindd;(bug#6879).
  from  baa4727... Remove unneeded argument from can_set_delete_on_close(). 
Ensure can_set_delete_on_close() is correctly called before any setting of the 
disposition bit (clean up the do_unlink() call). Jeremy. (cherry picked from 
commit dfcc4115ddc7c3bf7a69d7eb747c096cd217b8a6)

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


- Log -
commit 3c4f74bbcbe7c9c7e50865adac2db70e48a2d82f
Author: Bo Yang boy...@samba.org
Date:   Fri Dec 4 12:53:38 2009 +0800

s3: Fix crash in winbindd;(bug#6879).

Signed-off-by: Bo Yang boy...@samba.org
(cherry picked from commit cdb68bd2b61147df77b7f2de3fb4e29be07e7bd9)

---

Summary of changes:
 source3/winbindd/winbindd_rpc.c |   10 --
 1 files changed, 8 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c
index d4e2ff2..b6cb56e 100644
--- a/source3/winbindd/winbindd_rpc.c
+++ b/source3/winbindd/winbindd_rpc.c
@@ -1276,8 +1276,12 @@ NTSTATUS winbindd_lookup_names(TALLOC_CTX *mem_ctx,
 * This call can take a long time
 * allow the server to time out.
 * 35 seconds should do it.
+* NB
+* only do this when the undelying transport is named pipe.
 */
-   orig_timeout = rpccli_set_timeout(cli, 35000);
+   if (cli-transport-transport == NCACN_NP) {
+   orig_timeout = rpccli_set_timeout(cli, 35000);
+   }
 
status = lookup_names_fn(cli,
 mem_ctx,
@@ -1290,7 +1294,9 @@ NTSTATUS winbindd_lookup_names(TALLOC_CTX *mem_ctx,
 types);
 
/* And restore our original timeout. */
-   rpccli_set_timeout(cli, orig_timeout);
+   if (cli-transport-transport == NCACN_NP) {
+   rpccli_set_timeout(cli, orig_timeout);
+   }
 
if (!NT_STATUS_IS_OK(status)) {
return status;


-- 
Samba Shared Repository


Build status as of Thu Dec 3 07:00:02 2009

2009-12-02 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2009-12-02 
00:00:03.0 -0700
+++ /home/build/master/cache/broken_results.txt 2009-12-03 00:00:15.0 
-0700
@@ -1,4 +1,4 @@
-Build status as of Wed Dec  2 07:00:02 2009
+Build status as of Thu Dec  3 07:00:02 2009
 
 Build counts:
 Tree Total  Broken Panic 
@@ -10,13 +10,13 @@
 lorikeet 0  0  0 
 pidl 2  2  0 
 ppp  16 0  0 
-rsync33 12 0 
+rsync7  1  0 
 samba-docs   0  0  0 
 samba-web0  0  0 
-samba_3_current 31 28 0 
-samba_3_master 31 24 4 
-samba_3_next 31 29 2 
-samba_4_0_test 33 33 1 
+samba_3_current 31 29 0 
+samba_3_master 31 28 4 
+samba_3_next 31 30 3 
+samba_4_0_test 33 33 0 
 talloc   3  1  0 
 tdb  3  1  0