[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Wed Aug 15 10:06:03 MDT 2012


The branch, master has been updated
       via  65976d6 s3-vfs: Set errno in xattr emulation
       via  cc3bdaa s3-vfs: Avoid loops in VFS modules: call _NEXT functions in xattr emulation
       via  898c5e1 s3-vfs: ensure we strictly free the talloc_stackframe
       via  f9b9433 s4-selftest: Fix test name for samba.tests.dcerpc.bare
       via  fd42bc1 librpc/idl: Make smb_acl_t public so we can pull/push it as a blob
      from  d2d5fb1 libcli/smb: verify decrypted SMB2 pdus correctly

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


- Log -----------------------------------------------------------------
commit 65976d680acd48aa9f59664f715fa9ce40185955
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Aug 15 22:22:26 2012 +1000

    s3-vfs: Set errno in xattr emulation
    
    The caller may check this errno.
    
    Andrew Bartlett
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Wed Aug 15 18:05:33 CEST 2012 on sn-devel-104

commit cc3bdaaf0a5586e0f840466719f9f8387c5cddd0
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Aug 15 22:21:48 2012 +1000

    s3-vfs: Avoid loops in VFS modules: call _NEXT functions in xattr emulation
    
    We need to call the next module in the stack otherwise we will loop if
    the stat call is in turn implemented in terms of extended attribute
    lookup.
    
    Andrew Bartlett

commit 898c5e140ddca47eac9e2150fb571d6eac3ed7d2
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Aug 15 21:22:18 2012 +1000

    s3-vfs: ensure we strictly free the talloc_stackframe
    
    We must do this when leaving the function or else in development, we
    will panic.
    
    Andrew Bartlett

commit f9b9433b752a663cdfda03967bd969cac5cf16bf
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Aug 15 20:33:46 2012 +1000

    s4-selftest: Fix test name for samba.tests.dcerpc.bare

commit fd42bc1846929d163cdf25a0e66feba16bffc442
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Aug 15 20:33:27 2012 +1000

    librpc/idl: Make smb_acl_t public so we can pull/push it as a blob

-----------------------------------------------------------------------

Summary of changes:
 librpc/idl/smb_acl.idl                             |    2 +-
 source3/modules/vfs_posix_eadb.c                   |    9 +++++++--
 source3/modules/vfs_xattr_tdb.c                    |   16 +++++++++-------
 source3/modules/wscript_build                      |    9 +++++++++
 .../scripting/python/samba/tests/dcerpc/bare.py    |    2 +-
 5 files changed, 27 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/smb_acl.idl b/librpc/idl/smb_acl.idl
index 9586958..856312f 100644
--- a/librpc/idl/smb_acl.idl
+++ b/librpc/idl/smb_acl.idl
@@ -48,7 +48,7 @@ interface smb_acl
 		gid_t gid;
 	} smb_acl_entry;
 	
-	typedef struct {
+	[public] typedef struct {
 		int	size;
 		int	count;
 		int	next;
diff --git a/source3/modules/vfs_posix_eadb.c b/source3/modules/vfs_posix_eadb.c
index e1b90ff..fff7c11 100644
--- a/source3/modules/vfs_posix_eadb.c
+++ b/source3/modules/vfs_posix_eadb.c
@@ -52,6 +52,11 @@ static ssize_t posix_eadb_getattr(struct tdb_wrap *db_ctx,
 
 	status = pull_xattr_blob_tdb_raw(db_ctx, talloc_tos(), name, fname, fd, size, &blob);
 
+	if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
+		errno = ENOATTR;
+		return -1;
+	}
+
 	if (!NT_STATUS_IS_OK(status)) {
 		DEBUG(10, ("posix_eadb_fetch_attrs failed: %s\n",
 			   nt_errstr(status)));
@@ -293,9 +298,9 @@ static int posix_eadb_unlink(vfs_handle_struct *handle,
 	}
 
 	if (lp_posix_pathnames()) {
-		ret = SMB_VFS_LSTAT(handle->conn, smb_fname_tmp);
+		ret = SMB_VFS_NEXT_LSTAT(handle, smb_fname_tmp);
 	} else {
-		ret = SMB_VFS_STAT(handle->conn, smb_fname_tmp);
+		ret = SMB_VFS_NEXT_STAT(handle, smb_fname_tmp);
 	}
 	if (ret == -1) {
 		goto out;
diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c
index 0352539..719ac0c 100644
--- a/source3/modules/vfs_xattr_tdb.c
+++ b/source3/modules/vfs_xattr_tdb.c
@@ -50,6 +50,7 @@ static ssize_t xattr_tdb_getxattr(struct vfs_handle_struct *handle,
 
 	xattr_size = xattr_tdb_getattr(db, frame, &id, name, &blob);
 	if (xattr_size < 0) {
+		errno = ENOATTR;
 		TALLOC_FREE(frame);
 		return -1;
 	}
@@ -74,9 +75,9 @@ static ssize_t xattr_tdb_fgetxattr(struct vfs_handle_struct *handle,
 	DATA_BLOB blob;
 	TALLOC_CTX *frame = talloc_stackframe();
 
-	SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1);
+	SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, TALLOC_FREE(frame); return -1);
 
-	if (SMB_VFS_FSTAT(fsp, &sbuf) == -1) {
+	if (SMB_VFS_NEXT_FSTAT(handle, fsp, &sbuf) == -1) {
 		TALLOC_FREE(frame);
 		return -1;
 	}
@@ -85,6 +86,7 @@ static ssize_t xattr_tdb_fgetxattr(struct vfs_handle_struct *handle,
 
 	xattr_size = xattr_tdb_getattr(db, frame, &id, name, &blob);
 	if (xattr_size < 0) {
+		errno = ENOATTR;
 		TALLOC_FREE(frame);
 		return -1;
 	}
@@ -128,7 +130,7 @@ static int xattr_tdb_fsetxattr(struct vfs_handle_struct *handle,
 
 	SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1);
 
-	if (SMB_VFS_FSTAT(fsp, &sbuf) == -1) {
+	if (SMB_VFS_NEXT_FSTAT(handle, fsp, &sbuf) == -1) {
 		return -1;
 	}
 
@@ -165,7 +167,7 @@ static ssize_t xattr_tdb_flistxattr(struct vfs_handle_struct *handle,
 
 	SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1);
 
-	if (SMB_VFS_FSTAT(fsp, &sbuf) == -1) {
+	if (SMB_VFS_NEXT_FSTAT(handle, fsp, &sbuf) == -1) {
 		return -1;
 	}
 
@@ -201,7 +203,7 @@ static int xattr_tdb_fremovexattr(struct vfs_handle_struct *handle,
 
 	SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1);
 
-	if (SMB_VFS_FSTAT(fsp, &sbuf) == -1) {
+	if (SMB_VFS_NEXT_FSTAT(handle, fsp, &sbuf) == -1) {
 		return -1;
 	}
 
@@ -272,9 +274,9 @@ static int xattr_tdb_unlink(vfs_handle_struct *handle,
 	}
 
 	if (lp_posix_pathnames()) {
-		ret = SMB_VFS_LSTAT(handle->conn, smb_fname_tmp);
+		ret = SMB_VFS_NEXT_LSTAT(handle, smb_fname_tmp);
 	} else {
-		ret = SMB_VFS_STAT(handle->conn, smb_fname_tmp);
+		ret = SMB_VFS_NEXT_STAT(handle, smb_fname_tmp);
 	}
 	if (ret == -1) {
 		goto out;
diff --git a/source3/modules/wscript_build b/source3/modules/wscript_build
index aaefd98..4043292 100644
--- a/source3/modules/wscript_build
+++ b/source3/modules/wscript_build
@@ -5,6 +5,7 @@ VFS_AUDIT_SRC = '''vfs_audit.c'''
 VFS_EXTD_AUDIT_SRC = '''vfs_extd_audit.c'''
 VFS_FULL_AUDIT_SRC = '''vfs_full_audit.c'''
 VFS_FAKE_PERMS_SRC = '''vfs_fake_perms.c'''
+VFS_FAKE_ACLS_SRC = '''vfs_fake_acls.c'''
 VFS_RECYCLE_SRC = '''vfs_recycle.c'''
 VFS_NETATALK_SRC = '''vfs_netatalk.c'''
 VFS_DEFAULT_QUOTA_SRC = '''vfs_default_quota.c'''
@@ -104,6 +105,14 @@ bld.SAMBA3_MODULE('vfs_fake_perms',
                  internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_fake_perms'),
                  enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_fake_perms'))
 
+bld.SAMBA3_MODULE('vfs_fake_acls',
+                 subsystem='vfs',
+                 source=VFS_FAKE_ACLS_SRC,
+                 deps='acl attr samba-util',
+                 init_function='',
+                 internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_fake_acls'),
+                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_fake_acls'))
+
 bld.SAMBA3_MODULE('vfs_recycle',
                  subsystem='vfs',
                  source=VFS_RECYCLE_SRC,
diff --git a/source4/scripting/python/samba/tests/dcerpc/bare.py b/source4/scripting/python/samba/tests/dcerpc/bare.py
index 08f4ec1..04d470e 100644
--- a/source4/scripting/python/samba/tests/dcerpc/bare.py
+++ b/source4/scripting/python/samba/tests/dcerpc/bare.py
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-"""Tests for samba.dcerpc.bare."""
+"""Tests for samba.tests.dcerpc.bare."""
 
 from samba.dcerpc import ClientConnection
 import samba.tests


-- 
Samba Shared Repository


More information about the samba-cvs mailing list