[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Tue Mar 11 06:40:03 MDT 2014


The branch, master has been updated
       via  80e5ae1 vfs_catia: add chmod()
       via  e7856ed Add usable stream name defines
       via  8424d35 Fix a typo
      from  cff0f8e samba-tool: make provision check for bind version

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


- Log -----------------------------------------------------------------
commit 80e5ae1cefd86397200c4e322c93a89efcd6bad8
Author: Ralph Boehme <rb at sernet.de>
Date:   Mon Mar 10 17:14:38 2014 +0100

    vfs_catia: add chmod()
    
    Clients using UNIX extensions need chmod() to go through catia.
    
    Signed-off-by: Ralph Boehme <rb at sernet.de>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Tue Mar 11 13:39:17 CET 2014 on sn-devel-104

commit e7856ed58d993806dacc121d3af022d213f76af0
Author: Ralph Boehme <rb at sernet.de>
Date:   Mon Jan 13 14:03:45 2014 +0100

    Add usable stream name defines
    
    Add stream name defines that are usable with Samba's way of storing
    stream names internally.
    
    Signed-off-by: Ralph Boehme <rb at sernet.de>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Simo Sorce <idra at samba.org>

commit 8424d35919c52258774e76e34c087d9473cd8d88
Author: Ralph Boehme <rb at sernet.de>
Date:   Fri Feb 14 17:38:25 2014 +0100

    Fix a typo
    
    Signed-off-by: Ralph Boehme <rb at sernet.de>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Simo Sorce <idra at samba.org>

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

Summary of changes:
 source3/include/MacExtensions.h |   19 +++++++++++++------
 source3/modules/vfs_catia.c     |   20 ++++++++++++++++++++
 2 files changed, 33 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/MacExtensions.h b/source3/include/MacExtensions.h
index 6e911fe..a60f894 100644
--- a/source3/include/MacExtensions.h
+++ b/source3/include/MacExtensions.h
@@ -30,16 +30,23 @@
 #define DefaultStreamTestLen	6
 #define DefaultStreamTest		":$DATA"
 #define AFPDATA_STREAM 			"::$DATA"
-#define AFPINFO_STREAM 			":AFP_AfpInfo:$DATA"
-#define AFPRESOURCE_STREAM 		":AFP_Resource:$DATA"
-#define AFPCOMMENTS_STREAM 		":Comments:$DATA"
-#define AFPDESKTOP_STREAM 		":AFP_DeskTop:$DATA"
-#define AFPIDINDEX_STREAM 		":AFP_IdIndex:$DATA"
+
+#define AFPINFO_STREAM_NAME		":AFP_AfpInfo"
+#define AFPRESOURCE_STREAM_NAME		":AFP_Resource"
+#define AFPCOMMENTS_STREAM_NAME		":Comments"
+#define AFPDESKTOP_STREAM_NAME 		":AFP_DeskTop"
+#define AFPIDINDEX_STREAM_NAME 		":AFP_IdIndex"
+
+#define AFPINFO_STREAM 			AFPINFO_STREAM_NAME ":$DATA"
+#define AFPRESOURCE_STREAM 		AFPRESOURCE_STREAM_NAME ":$DATA"
+#define AFPCOMMENTS_STREAM 		AFPCOMMENTS_STREAM_NAME ":$DATA"
+#define AFPDESKTOP_STREAM 		AFPDESKTOP_STREAM_NAME ":$DATA"
+#define AFPIDINDEX_STREAM 		AFPIDINDEX_STREAM_NAME ":$DATA"
 
 /*
 ** NT's AFP_AfpInfo stream structure
 */
-#define APF_INFO_SIZE		0x3c		
+#define AFP_INFO_SIZE		0x3c
 #define AFP_Signature		0x41465000 
 #define AFP_Version			0x00000100
 #define AFP_BackupTime		0x00000080
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index 1a37dd2..6743dfe 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -549,6 +549,25 @@ static int catia_lchown(vfs_handle_struct *handle,
 	return ret;
 }
 
+static int catia_chmod(vfs_handle_struct *handle, const char *path, mode_t mode)
+{
+	char *name = NULL;
+	NTSTATUS status;
+	int ret;
+
+	status = catia_string_replace_allocate(handle->conn, path,
+					&name, vfs_translate_to_unix);
+	if (!NT_STATUS_IS_OK(status)) {
+		errno = map_errno_from_nt_status(status);
+		return -1;
+	}
+
+	ret = SMB_VFS_NEXT_CHMOD(handle, name, mode);
+	TALLOC_FREE(name);
+
+	return ret;
+}
+
 static int catia_rmdir(vfs_handle_struct *handle,
 		       const char *path)
 {
@@ -917,6 +936,7 @@ static struct vfs_fn_pointers vfs_catia_fns = {
 	.unlink_fn = catia_unlink,
 	.chown_fn = catia_chown,
 	.lchown_fn = catia_lchown,
+	.chmod_fn = catia_chmod,
 	.chdir_fn = catia_chdir,
 	.ntimes_fn = catia_ntimes,
 	.realpath_fn = catia_realpath,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list