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

2012-09-27 Thread Karolin Seeger
The branch, v4-0-test has been updated
   via  17c5903 s3:smbd: release the share mode lock before calling 
exit_server() (bug #9191)
  from  9d6068c docs: Fix generating idmap manpages.

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


- Log -
commit 17c590338a9c506eb5864cd4f149311e205b1a90
Author: Stefan Metzmacher 
Date:   Fri Sep 21 20:36:16 2012 +0200

s3:smbd: release the share mode lock before calling exit_server() (bug 
#9191)

metze

Autobuild-User(master): Stefan Metzmacher 
Autobuild-Date(master): Fri Sep 21 22:36:57 CEST 2012 on sn-devel-104

Autobuild-User(v4-0-test): Karolin Seeger 
Autobuild-Date(v4-0-test): Thu Sep 27 10:41:27 CEST 2012 on sn-devel-104

---

Summary of changes:
 source3/smbd/open.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 0da2386..c23168c 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1461,6 +1461,7 @@ static void defer_open(struct share_mode_lock *lck,
DEBUG(0, ("Trying to defer an already deferred "
"request: mid=%llu, exiting\n",
(unsigned long long)req->mid));
+   TALLOC_FREE(lck);
exit_server("attempt to defer a deferred 
request");
}
}
@@ -1476,6 +1477,7 @@ static void defer_open(struct share_mode_lock *lck,
 
if (!push_deferred_open_message_smb(req, request_time, timeout,
   state->id, (char *)state, 
sizeof(*state))) {
+   TALLOC_FREE(lck);
exit_server("push_deferred_open_message_smb failed");
}
if (lck) {


-- 
Samba Shared Repository


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

2012-09-27 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  16a3b6e quota: add supprt for gfs2
  from  de0764d pam_winbind: match more return codes when wbcGetPwnam has 
failed.

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


- Log -
commit 16a3b6e02d1bb8345984ab6a8c81e446d8de2f54
Author: Björn Jacke 
Date:   Tue Sep 18 13:57:30 2012 +0200

quota: add supprt for gfs2

gfs2 uses the same generic quota interface as xfs and it has the same base
block/quota block size ratio and seems to work nice with the xfs quota 
module.

(People using gfs should be aware that quota reporting is lagging quite a 
bit
on gfs.  If you copy a file on a gfs volume the quota values are being 
updated
with a delay of 30s here with kernel 3.5. This reporting can lead to data
corruption if a client thinks he can write but actually he suddently can't.)
(cherry picked from commit 0b57d1c07520f4995412f224945324fef29f5989)

Fix bug #9172 - quota on gfs2 being reported wrong.

---

Summary of changes:
 source3/lib/sysquotas.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/sysquotas.c b/source3/lib/sysquotas.c
index 9fdf3a0..a2bd81a 100644
--- a/source3/lib/sysquotas.c
+++ b/source3/lib/sysquotas.c
@@ -176,6 +176,8 @@ static struct {
 } sys_quota_backends[] = {
 #ifdef HAVE_XFS_QUOTAS
{"xfs", sys_get_xfs_quota,  sys_set_xfs_quota},
+   {"gfs", sys_get_xfs_quota,  sys_set_xfs_quota},
+   {"gfs2", sys_get_xfs_quota, sys_set_xfs_quota},
 #endif /* HAVE_XFS_QUOTAS */
 #ifdef HAVE_NFS_QUOTAS
{"nfs", sys_get_nfs_quota,  sys_set_nfs_quota},


-- 
Samba Shared Repository


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

2012-09-27 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  bea4512 quota: add supprt for gfs2
  from  48d90a8 WHATSNEW: Start release notes for Samba 3.5.19.

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


- Log -
commit bea45125fc10d0eef02c5cedb5585f70eebe9450
Author: Björn Jacke 
Date:   Tue Sep 18 13:57:30 2012 +0200

quota: add supprt for gfs2

gfs2 uses the same generic quota interface as xfs and it has the same base
block/quota block size ratio and seems to work nice with the xfs quota 
module.

(People using gfs should be aware that quota reporting is lagging quite a 
bit
on gfs.  If you copy a file on a gfs volume the quota values are being 
updated
with a delay of 30s here with kernel 3.5. This reporting can lead to data
corruption if a client thinks he can write but actually he suddently can't.)
(cherry picked from commit 0b57d1c07520f4995412f224945324fef29f5989)

Fix bug #9172 - quota on gfs2 being reported wrong.
(cherry picked from commit 16a3b6e02d1bb8345984ab6a8c81e446d8de2f54)

---

Summary of changes:
 source3/lib/sysquotas.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/sysquotas.c b/source3/lib/sysquotas.c
index 3d4697c..6682a80 100644
--- a/source3/lib/sysquotas.c
+++ b/source3/lib/sysquotas.c
@@ -176,6 +176,8 @@ static struct {
 } sys_quota_backends[] = {
 #ifdef HAVE_XFS_QUOTAS
{"xfs", sys_get_xfs_quota,  sys_set_xfs_quota},
+   {"gfs", sys_get_xfs_quota,  sys_set_xfs_quota},
+   {"gfs2", sys_get_xfs_quota, sys_set_xfs_quota},
 #endif /* HAVE_XFS_QUOTAS */
{NULL,  NULL,   NULL}
 };


-- 
Samba Shared Repository


autobuild: intermittent test failure detected

2012-09-27 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-09-27-1412/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2012-09-27-1412/samba3.stderr
   http://git.samba.org/autobuild.flakey/2012-09-27-1412/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2012-09-27-1412/samba.stderr
   http://git.samba.org/autobuild.flakey/2012-09-27-1412/samba.stdout
  
The top commit at the time of the failure was:

commit aad669b53eca99f86c2e630bf3f2e9f594fed9c1
Author: Volker Lendecke 
Date:   Wed Sep 26 16:53:48 2012 -0700

s3: Fix some blank line endings

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Thu Sep 27 07:57:03 CEST 2012 on sn-devel-104


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

2012-09-27 Thread Karolin Seeger
The branch, v4-0-test has been updated
   via  164cb1c packaging/RHEL-CTDB: add "BUILD_GPFS=no configure.rpm" and 
"BUILD_GPFS=no makerpms.sh"
   via  4b59959 packaging/RHEL-CTDB: try harder to set $RPMVER
   via  cb57e4a packaging/RHEL-CTDB: fix the build
   via  9c1992c source3/script: fix installman.sh after the last 
build-manpages-nogit change
   via  bc3bd09 quota: add supprt for gfs2
  from  17c5903 s3:smbd: release the share mode lock before calling 
exit_server() (bug #9191)

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


- Log -
commit 164cb1c6ded399bab09327a09adba3673828bfd8
Author: Stefan Metzmacher 
Date:   Mon Sep 17 18:15:03 2012 +0200

packaging/RHEL-CTDB: add "BUILD_GPFS=no configure.rpm" and "BUILD_GPFS=no 
makerpms.sh"

metze
(cherry picked from commit 56956910051a8d11b36d125780fde048d29ad604)

The last 4 patches address bug #9198 - backport RHEL-CTDB packaging fixes.

Autobuild-User(v4-0-test): Karolin Seeger 
Autobuild-Date(v4-0-test): Thu Sep 27 14:27:03 CEST 2012 on sn-devel-104

commit 4b599598d44d333426d49daa668409c0cbb3a389
Author: Stefan Metzmacher 
Date:   Mon Sep 17 18:15:03 2012 +0200

packaging/RHEL-CTDB: try harder to set $RPMVER

metze
(cherry picked from commit 914fc4f265ef9f538fc5077fe0257565b282bd24)

commit cb57e4a181aa66cca019ef15156915b06d66ff05
Author: Stefan Metzmacher 
Date:   Mon Sep 17 18:15:03 2012 +0200

packaging/RHEL-CTDB: fix the build

metze
(cherry picked from commit 77f281a6d16cd9e7a787de8d954846a840fb03b0)

commit 9c1992c076df881541f7e6ef13c171bc31d17d3f
Author: Michael Adam 
Date:   Mon Sep 17 20:30:27 2012 -0400

source3/script: fix installman.sh after the last build-manpages-nogit change

commit cfdab79729e8507a7504b0224c60454d3bc40ffc
Author: Michael Adam 
Date:   Wed Sep 12 15:46:35 2012 +0200

release-scripts: let build-manpages-nogit store generated docs 
under ./bin/docs

not under ./docs

Signed-off-by: Stefan Metzmacher 

Signed-off-by: Stefan Metzmacher 
(cherry picked from commit 1a945686a6770a0ac17bded73201368f10c65bc9)

commit bc3bd09e6e39254303bc1758bd4858d5516f4317
Author: Björn Jacke 
Date:   Tue Sep 18 13:57:30 2012 +0200

quota: add supprt for gfs2

gfs2 uses the same generic quota interface as xfs and it has the same base
block/quota block size ratio and seems to work nice with the xfs quota 
module.

(People using gfs should be aware that quota reporting is lagging quite a 
bit
on gfs.  If you copy a file on a gfs volume the quota values are being 
updated
with a delay of 30s here with kernel 3.5. This reporting can lead to data
corruption if a client thinks he can write but actually he suddently can't.)
(cherry picked from commit 0b57d1c07520f4995412f224945324fef29f5989)

---

Summary of changes:
 packaging/RHEL-CTDB/configure.rpm   |   18 --
 packaging/RHEL-CTDB/makerpms.sh |3 +
 packaging/RHEL-CTDB/makespec.sh |   24 +++
 packaging/RHEL-CTDB/samba.spec.tmpl |  118 +++
 source3/lib/sysquotas.c |2 +
 source3/script/installman.sh|4 +-
 6 files changed, 81 insertions(+), 88 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/RHEL-CTDB/configure.rpm 
b/packaging/RHEL-CTDB/configure.rpm
index 5e2b88e..4387da1 100755
--- a/packaging/RHEL-CTDB/configure.rpm
+++ b/packaging/RHEL-CTDB/configure.rpm
@@ -2,14 +2,14 @@
 
 case `uname -m` in
x86_64)
-   _libarch=lib64
+   _libarch="/lib64"
;;
*)
-   _libarch=lib
+   _libarch="/lib"
;;
 esac
 
-_libarchdir=/usr/${_libarch}
+_libarchdir=/usr${_libarch}
 
 _prefix=/usr
 _sysconfdir=/etc
@@ -24,6 +24,12 @@ else
CC="gcc"
 fi
 
+shared_modules="idmap_rid,idmap_ad,idmap_tdb2"
+
+if test "x$BUILD_GPFS" != "xno"; then
+   shared_modules="${shared_modules},vfs_gpfs,vfs_tsmsm"
+fi
+
 ./autogen.sh
 
 CC="$CC" CFLAGS="-Wall -g -D_GNU_SOURCE -O3" ./configure -C \
@@ -32,7 +38,7 @@ CC="$CC" CFLAGS="-Wall -g -D_GNU_SOURCE -O3" ./configure -C \
--with-configdir=${_sysconfdir}/samba \
--libdir=${_libarchdir} \
--with-modulesdir=${_libarchdir}/samba \
-   --with-pammodulesdir=/${_libarch}/security \
+   --with-pammodulesdir=${_libarch}/security \
--with-lockdir=/var/lib/samba \
--with-logfilebase=/var/log/samba \
--mandir=${_mandir} \
@@ -44,14 +50,14 @@ CC="$CC" CFLAGS="-Wall -g -D_GNU_SOURCE -O3" ./configure -C 
\
--with-acl-support \
--with-ads \
--with-automount \
-   --with-fhs \
+   --enable-fhs \
--with-pam_smbpass \
--with-libsmbclien

[SCM] Samba Shared Repository - branch master updated

2012-09-27 Thread Jelmer Vernooij
The branch, master has been updated
   via  b7822a5 samba4-tests: Move 'samba.tests.source' up.
   via  0883e17 sanba.upgradehelpers: Use standard functionality for 
getting temp dir.
   via  2a797f2 s4-python: Various formatting fixes.
   via  6986f7b samba.tests.source: Check for trailing whitespace in Python 
files.
   via  f8aab2f smb.conf(5): Add basic documentation for 'dcerpc endpoint 
servers'.
  from  aad669b s3: Fix some blank line endings

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


- Log -
commit b7822a55c40c5c42356b263c3d7bc1998fb1a7d3
Author: Jelmer Vernooij 
Date:   Thu Sep 27 09:41:32 2012 -0700

samba4-tests: Move 'samba.tests.source' up.

We would like to run this as early as possible so we get a quick
failure when there is trailing whitespace.

Autobuild-User(master): Jelmer Vernooij 
Autobuild-Date(master): Thu Sep 27 20:26:27 CEST 2012 on sn-devel-104

commit 0883e174bfdec22a4ff373041afce396cfe7fd7b
Author: Jelmer Vernooij 
Date:   Thu Sep 27 09:34:36 2012 -0700

sanba.upgradehelpers: Use standard functionality for getting temp dir.

commit 2a797f29aa12f6847844af504026be52db659fbb
Author: Jelmer Vernooij 
Date:   Thu Sep 27 09:30:47 2012 -0700

s4-python: Various formatting fixes.

* Trailing whitespace
* use of "==" where "is" should be used
* double spaces

commit 6986f7bdda56d693c642945485006f9660053758
Author: Jelmer Vernooij 
Date:   Thu Sep 27 09:30:26 2012 -0700

samba.tests.source: Check for trailing whitespace in Python files.

commit f8aab2f55fb552c6fd1fc51106cc237f9a1fc32a
Author: Jelmer Vernooij 
Date:   Wed Sep 26 18:01:35 2012 -0700

smb.conf(5): Add basic documentation for 'dcerpc endpoint servers'.

---

Summary of changes:
 buildtools/wafsamba/nothreads.py   |6 +-
 buildtools/wafsamba/samba_abi.py   |2 +-
 buildtools/wafsamba/samba_autoconf.py  |   10 +-
 buildtools/wafsamba/samba_bundled.py   |2 +-
 buildtools/wafsamba/samba_deps.py  |8 +-
 buildtools/wafsamba/samba_dist.py  |4 +-
 buildtools/wafsamba/samba_headers.py   |1 -
 buildtools/wafsamba/samba_optimisation.py  |2 +-
 buildtools/wafsamba/samba_patterns.py  |2 +-
 buildtools/wafsamba/samba_utils.py |   10 +-
 buildtools/wafsamba/samba_version.py   |2 +-
 buildtools/wafsamba/stale_files.py |2 +-
 buildtools/wafsamba/wafsamba.py|4 +-
 .../smbdotconf/protocol/dcerpcendpointservers.xml  |   12 ++
 selftest/tests.py  |   23 
 selftest/wscript   |3 +-
 source4/scripting/bin/samba_dnsupdate  |   15 ++-
 source4/scripting/bin/samba_kcc|  117 +-
 source4/scripting/bin/samba_upgradeprovision   |   16 ++--
 source4/scripting/python/samba/__init__.py |2 +-
 source4/scripting/python/samba/dbchecker.py|8 +-
 source4/scripting/python/samba/drs_utils.py|2 +-
 source4/scripting/python/samba/kcc_utils.py|   46 
 source4/scripting/python/samba/ms_schema.py|   34 +++---
 source4/scripting/python/samba/netcmd/__init__.py  |2 +-
 .../scripting/python/samba/netcmd/delegation.py|6 +-
 source4/scripting/python/samba/netcmd/domain.py|   20 ++--
 source4/scripting/python/samba/netcmd/fsmo.py  |2 +-
 source4/scripting/python/samba/netcmd/gpo.py   |4 +-
 source4/scripting/python/samba/netcmd/ldapcmp.py   |7 +-
 source4/scripting/python/samba/netcmd/ntacl.py |   18 ++--
 source4/scripting/python/samba/netcmd/spn.py   |   14 +-
 source4/scripting/python/samba/ntacls.py   |   18 ++--
 .../scripting/python/samba/provision/__init__.py   |4 +-
 .../scripting/python/samba/provision/backend.py|2 +-
 source4/scripting/python/samba/schema.py   |8 +-
 source4/scripting/python/samba/tests/auth.py   |4 +-
 source4/scripting/python/samba/tests/core.py   |4 +-
 .../scripting/python/samba/tests/credentials.py|6 +-
 .../scripting/python/samba/tests/dcerpc/bare.py|   12 +-
 .../python/samba/tests/dcerpc/registry.py  |2 +-
 .../scripting/python/samba/tests/dcerpc/unix.py|2 +-
 source4/scripting/python/samba/tests/dns.py|4 +-
 source4/scripting/python/samba/tests/gensec.py |8 +-
 source4/scripting/python/samba/tests/provision.py  |2 +-
 source4/scripting/python/samba/tests/samba3.py |4 +-
 source4/scripting/python/samba/tests/samba3sam.py  |  132 ++--
 .../python/samba/tests/samba_tool/ntacl.py |8 +-
 source4/scripting/python/samba/tests/samdb.py   

[SCM] Samba Shared Repository - branch master updated

2012-09-27 Thread Jeremy Allison
The branch, master has been updated
   via  322e3d4 Fix bug #9209 - Parse of invalid SMB2 create blob can cause 
smbd crash.
  from  b7822a5 samba4-tests: Move 'samba.tests.source' up.

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


- Log -
commit 322e3d42f65dadabeccf8813fcb0e9b7d353ffb2
Author: Jeremy Allison 
Date:   Wed Sep 26 16:58:58 2012 -0700

Fix bug #9209 - Parse of invalid SMB2 create blob can cause smbd crash.

Ensure we correctly protect against blobs with data_offset==0
and data_length != 0.

Jeremy.

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Sep 27 22:07:02 CEST 2012 on sn-devel-104

---

Summary of changes:
 libcli/smb/smb2_create_blob.c |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/smb/smb2_create_blob.c b/libcli/smb/smb2_create_blob.c
index 189bcd1..92387db 100644
--- a/libcli/smb/smb2_create_blob.c
+++ b/libcli/smb/smb2_create_blob.c
@@ -66,9 +66,8 @@ NTSTATUS smb2_create_blob_parse(TALLOC_CTX *mem_ctx, const 
DATA_BLOB buffer,
name_offset + name_length > remaining ||
(data_offset & 0x7) != 0 ||
(data_offset && (data_offset < name_offset + name_length)) 
||
-   (data_offset && (data_offset > remaining)) ||
-   (data_offset && data_length &&
-   (data_offset + (uint64_t)data_length > 
remaining))) {
+   (data_offset > remaining) ||
+   (data_offset + (uint64_t)data_length > remaining)) {
return NT_STATUS_INVALID_PARAMETER;
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-09-27 Thread Simo Sorce
The branch, master has been updated
   via  a6be8a9 Support UPN_DNS_INFO in the PAC
  from  322e3d4 Fix bug #9209 - Parse of invalid SMB2 create blob can cause 
smbd crash.

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


- Log -
commit a6be8a97f705247c1b1cbb0595887d8924740a71
Author: Simo Sorce 
Date:   Thu Sep 27 14:12:06 2012 -0400

Support UPN_DNS_INFO in the PAC

Previously marked as UNKNOWN_12 the UPN_DNS_INFO is defined in MS-PAC

Autobuild-User(master): Simo Sorce 
Autobuild-Date(master): Fri Sep 28 01:13:44 CEST 2012 on sn-devel-104

---

Summary of changes:
 librpc/idl/krb5pac.idl |   16 +---
 1 files changed, 9 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/krb5pac.idl b/librpc/idl/krb5pac.idl
index 8a6540c..0fce16b 100644
--- a/librpc/idl/krb5pac.idl
+++ b/librpc/idl/krb5pac.idl
@@ -37,18 +37,20 @@ interface krb5pac
[size_is(num_transited_services)] lsa_String 
*transited_services;
} PAC_CONSTRAINED_DELEGATION;
 
+   typedef [public,bitmap32bit] bitmap {
+   UDI_ACCT_HAS_NO_UPN = 0x0001 /* 1= User account has no 
UPN */
+   } upn_dns_info_flags;
+
typedef struct {
[value(2*strlen_m(upn_name))] uint16 upn_size;
uint16 upn_offset;
[value(2*strlen_m(domain_name))] uint16 domain_size;
uint16 domain_offset;
-   uint16 unknown3; /* 0x01 */
-   uint16 unknown4;
-   uint32 unknown5;
+   upn_dns_info_flags flags;
+   uint32 padding;
[charset(UTF16)] uint8 upn_name[upn_size+2];
[charset(UTF16)] uint8 domain_name[domain_size+2];
-   uint32 unknown6; /* padding */
-   } PAC_UNKNOWN_12;
+   } PAC_UPN_DNS_INFO;
 
typedef [public] struct {
PAC_LOGON_INFO *info;
@@ -64,7 +66,7 @@ interface krb5pac
PAC_TYPE_KDC_CHECKSUM = 7,
PAC_TYPE_LOGON_NAME = 10,
PAC_TYPE_CONSTRAINED_DELEGATION = 11,
-   PAC_TYPE_UNKNOWN_12 = 12
+   PAC_TYPE_UPN_DNS_INFO = 12
} PAC_TYPE;
 
typedef struct {
@@ -78,12 +80,12 @@ interface krb5pac
[case(PAC_TYPE_LOGON_NAME)] PAC_LOGON_NAME logon_name;
[case(PAC_TYPE_CONSTRAINED_DELEGATION)][subcontext(0xFC01)]
PAC_CONSTRAINED_DELEGATION_CTR constrained_delegation;
+   [case(PAC_TYPE_UPN_DNS_INFO)]   PAC_UPN_DNS_INFO upn_dns_info;
/* when new PAC info types are added they are supposed to be 
done
   in such a way that they are backwards compatible with 
existing
   servers. This makes it safe to just use a [default] for
   unknown types, which lets us ignore the data */
[default]   [subcontext(0)] DATA_BLOB_REM unknown;
-   /* [case(PAC_TYPE_UNKNOWN_12)]  PAC_UNKNOWN_12 unknown; */
} PAC_INFO;
 
typedef [public,nopush,nopull,noprint] struct {


-- 
Samba Shared Repository


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

2012-09-27 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  d0eb11f Fix bug #9189 - SMB2 Create doesn't return correct MAX 
ACCESS access mask in blob.
   via  0a1f8e7 Add some const to can_delete_file_in_directory().
  from  16a3b6e quota: add supprt for gfs2

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


- Log -
commit d0eb11f521fb21dc0eed4279101e41102a123757
Author: Jeremy Allison 
Date:   Mon Sep 24 16:43:12 2012 -0700

Fix bug #9189 - SMB2 Create doesn't return correct MAX ACCESS access mask 
in blob.

If we aren't already granted DELETE access, check if we have
DELETE_CHILD in the containing directory.

commit 0a1f8e7de939c7eb71cfa8cc8f8eef4800d00b78
Author: Jeremy Allison 
Date:   Mon Sep 24 16:42:57 2012 -0700

Add some const to can_delete_file_in_directory().

---

Summary of changes:
 source3/smbd/file_access.c |2 +-
 source3/smbd/open.c|6 ++
 source3/smbd/proto.h   |2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/file_access.c b/source3/smbd/file_access.c
index bd65a70..1f5ee4f 100644
--- a/source3/smbd/file_access.c
+++ b/source3/smbd/file_access.c
@@ -87,7 +87,7 @@ bool can_access_file_acl(struct connection_struct *conn,
 /
 
 bool can_delete_file_in_directory(connection_struct *conn,
- struct smb_filename *smb_fname)
+ const struct smb_filename *smb_fname)
 {
TALLOC_CTX *ctx = talloc_tos();
char *dname = NULL;
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 7d6a25f..6b94a6d 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1410,6 +1410,12 @@ NTSTATUS smbd_calculate_access_mask(connection_struct 
*conn,
return NT_STATUS_ACCESS_DENIED;
}
 
+   if (!(access_granted & DELETE_ACCESS)) {
+   if (can_delete_file_in_directory(conn, 
smb_fname)) {
+   access_granted |= DELETE_ACCESS;
+   }
+   }
+
access_mask = access_granted;
} else {
access_mask = FILE_GENERIC_ALL;
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index e80e01e..d6f7511 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -301,7 +301,7 @@ bool can_access_file_acl(struct connection_struct *conn,
 const struct smb_filename *smb_fname,
 uint32_t access_mask);
 bool can_delete_file_in_directory(connection_struct *conn,
- struct smb_filename *smb_fname);
+ const struct smb_filename *smb_fname);
 bool can_access_file_data(connection_struct *conn,
  const struct smb_filename *smb_fname,
  uint32 access_mask);


-- 
Samba Shared Repository