[SCM] Samba Shared Repository - branch master updated

Ralph Böhme slow at samba.org
Fri Oct 13 19:45:02 UTC 2017


The branch, master has been updated
       via  5f52a0f s4/torture: vfs_fruit: test xattr unpacking
       via  c5b25d4 s4/torture: vfs_fruit: replace AppleDouble data blob with xattr data
       via  d706832 vfs_fruit: on-access conversion of AppleDouble xattr data
       via  ce516a3 vfs_fruit: static string fruit_catia_maps
       via  386249e vfs_fruit: pass smb_fname to ad_convert
       via  fb137d6 vfs_fruit: unpack AppleDouble xattr header if present
       via  ab8d019 vfs_fruit: allocate ad_data buffer up to AD_XATTR_MAX_HDR_SIZE bytes
       via  b5a664e vfs_fruit: add AppleDouble xattr structure definitions
       via  3d7932a vfs_fruit: fix ftruncating resource fork
       via  f8bd63e vfs_catia: factor out mapping functions
      from  156015a selftest: add some debugging to test_give_owner.sh

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


- Log -----------------------------------------------------------------
commit 5f52a0fbe8c9f52c6fed206fd5cd47bd0de867a1
Author: Ralph Boehme <slow at samba.org>
Date:   Wed Oct 11 16:04:58 2017 +0200

    s4/torture: vfs_fruit: test xattr unpacking
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13076
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Ralph Böhme <slow at samba.org>
    Autobuild-Date(master): Fri Oct 13 21:44:02 CEST 2017 on sn-devel-144

commit c5b25d40e1ab3906805538abdb8f07a934c629f7
Author: Ralph Boehme <slow at samba.org>
Date:   Mon Oct 9 16:18:18 2017 +0200

    s4/torture: vfs_fruit: replace AppleDouble data blob with xattr data
    
    The osx_adouble_w_xattr datablob is used to test conversion from sidecar
    ._ file metdata to Samba compatible ._ file.
    
    The previous data blob didn't contain xattr data, the new one does.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13076
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit d7068324407a9a0b94d992b539631246e97c9098
Author: Ralph Boehme <slow at samba.org>
Date:   Wed Oct 11 12:58:59 2017 +0200

    vfs_fruit: on-access conversion of AppleDouble xattr data
    
    This finally adds on-access conversion of xattr data stored in sidecar
    AppleDouble files.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13076
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit ce516a34972f51eda48c1536858d47dc230ea99a
Author: Ralph Boehme <slow at samba.org>
Date:   Tue Oct 10 19:13:36 2017 +0200

    vfs_fruit: static string fruit_catia_maps
    
    In a later commit these will be used somewhere else too.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13076
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit 386249eea3a13303744dbab88480e80790138329
Author: Ralph Boehme <slow at samba.org>
Date:   Tue Oct 10 16:15:49 2017 +0200

    vfs_fruit: pass smb_fname to ad_convert
    
    This will be needed in a later commit when converting xattrs in sidecar
    AppleDouble files.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13076
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit fb137d6070c8cd872a66a4628b0e392cf40c180e
Author: Ralph Boehme <slow at samba.org>
Date:   Tue Oct 10 16:06:33 2017 +0200

    vfs_fruit: unpack AppleDouble xattr header if present
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13076
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit ab8d01959b906d0b2873357f836bff72d209ff98
Author: Ralph Boehme <slow at samba.org>
Date:   Tue Oct 10 16:04:29 2017 +0200

    vfs_fruit: allocate ad_data buffer up to AD_XATTR_MAX_HDR_SIZE bytes
    
    This is in preperation of reading potential xattr header data from the
    AppleDouble file, not just reading a fixed amount of bytes.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13076
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit b5a664e2580d8823f4f2d3e7e516b576317eb290
Author: Ralph Boehme <slow at samba.org>
Date:   Tue Oct 10 16:03:13 2017 +0200

    vfs_fruit: add AppleDouble xattr structure definitions
    
    Reference:
    https://opensource.apple.com/source/xnu/xnu-4570.1.46/bsd/vfs/vfs_xattr.c
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13076
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit 3d7932a33263514785fa3e95e2d5502bc02b4ea4
Author: Ralph Boehme <slow at samba.org>
Date:   Wed Oct 11 18:11:12 2017 +0200

    vfs_fruit: fix ftruncating resource fork
    
    fruit_ftruncate_rsrc_adouble() is called to effectively ftruncate() the
    ._ AppleDouble file to the requested size.
    
    The VFS function SMB_VFS_NEXT_FTRUNCATE() otoh would attempt to truncate
    to fsp *stream* in any way the next VFS module seems fit. As we know
    we're stacked with a streams module, the module will attempt to truncate
    the stream. So we're not truncating the ._ file.
    
    This went unnoticed as the AppleDouble file header contains the
    authorative resource fork size that was updated correctly.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13076
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit f8bd63e19c8b1c063dd6f41b405d6864a9b546ff
Author: Ralph Boehme <slow at samba.org>
Date:   Wed Oct 11 11:35:15 2017 +0200

    vfs_catia: factor out mapping functions
    
    This moves the core mapping functions to a seperate file and makes them
    global.
    
    string_replace_init_map() is called to parse a mapping in string and
    produce a mapping object that can then be passed to
    string_replace_allocate() to do the actual mapping of a string.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13076
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

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

Summary of changes:
 source3/modules/string_replace.c                   | 178 ++++++++++
 .../passwd_proto.h => modules/string_replace.h}    |  26 +-
 source3/modules/vfs_catia.c                        | 167 ++-------
 source3/modules/vfs_fruit.c                        | 381 +++++++++++++++++++--
 source3/modules/wscript_build                      |   7 +-
 source4/torture/vfs/fruit.c                        | 171 +++++++--
 6 files changed, 712 insertions(+), 218 deletions(-)
 create mode 100644 source3/modules/string_replace.c
 copy source3/{utils/passwd_proto.h => modules/string_replace.h} (54%)


Changeset truncated at 500 lines:

diff --git a/source3/modules/string_replace.c b/source3/modules/string_replace.c
new file mode 100644
index 0000000..88b53fb
--- /dev/null
+++ b/source3/modules/string_replace.c
@@ -0,0 +1,178 @@
+/*
+ * Unix SMB/CIFS implementation.
+ *
+ * Copyright (C) Volker Lendecke, 2005
+ * Copyright (C) Aravind Srinivasan, 2009
+ * Copyright (C) Guenter Kukkukk, 2013
+ * Copyright (C) Ralph Boehme, 2017
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "includes.h"
+#include "smbd/smbd.h"
+#include "string_replace.h"
+
+#define MAP_SIZE        0xFF
+#define MAP_NUM         0x101 /* max unicode charval / MAP_SIZE */
+#define T_OFFSET(_v_)   ((_v_ % MAP_SIZE))
+#define T_START(_v_)    (((_v_ / MAP_SIZE) * MAP_SIZE))
+#define T_PICK(_v_)     ((_v_ / MAP_SIZE))
+
+struct char_mappings {
+	smb_ucs2_t entry[MAP_SIZE][2];
+};
+
+static bool build_table(struct char_mappings **cmaps, int value)
+{
+	int i;
+	int start = T_START(value);
+
+	(*cmaps) = talloc_zero(NULL, struct char_mappings);
+
+	if (!*cmaps)
+		return False;
+
+	for (i = 0; i < MAP_SIZE;i++) {
+		(*cmaps)->entry[i][vfs_translate_to_unix] = start + i;
+		(*cmaps)->entry[i][vfs_translate_to_windows] = start + i;
+	}
+
+	return True;
+}
+
+static void set_tables(struct char_mappings **cmaps,
+		       long unix_map,
+		       long windows_map)
+{
+	int i;
+
+	/* set unix -> windows */
+	i = T_OFFSET(unix_map);
+	cmaps[T_PICK(unix_map)]->entry[i][vfs_translate_to_windows] = windows_map;
+
+	/* set windows -> unix */
+	i = T_OFFSET(windows_map);
+	cmaps[T_PICK(windows_map)]->entry[i][vfs_translate_to_unix] = unix_map;
+}
+
+static bool build_ranges(struct char_mappings **cmaps,
+			 long unix_map,
+			 long windows_map)
+{
+
+	if (!cmaps[T_PICK(unix_map)]) {
+		if (!build_table(&cmaps[T_PICK(unix_map)], unix_map))
+			return False;
+	}
+
+	if (!cmaps[T_PICK(windows_map)]) {
+		if (!build_table(&cmaps[T_PICK(windows_map)], windows_map))
+			return False;
+	}
+
+	set_tables(cmaps, unix_map, windows_map);
+
+	return True;
+}
+
+struct char_mappings **string_replace_init_map(const char **mappings)
+{
+	int i;
+	char *tmp;
+	fstring mapping;
+	long unix_map, windows_map;
+	struct char_mappings **cmaps = NULL;
+
+	if (mappings == NULL) {
+		return NULL;
+	}
+
+	cmaps = TALLOC_ZERO(NULL, MAP_NUM * sizeof(struct char_mappings *));
+	if (cmaps == NULL) {
+		return NULL;
+	}
+
+	/*
+	 * catia mappings are of the form :
+	 * UNIX char (in 0xnn hex) : WINDOWS char (in 0xnn hex)
+	 *
+	 * multiple mappings are comma separated in smb.conf
+	 */
+
+	for (i = 0; mappings[i]; i++) {
+		fstrcpy(mapping, mappings[i]);
+		unix_map = strtol(mapping, &tmp, 16);
+		if (unix_map == 0 && errno == EINVAL) {
+			DEBUG(0, ("INVALID CATIA MAPPINGS - %s\n", mapping));
+			continue;
+		}
+		windows_map = strtol(++tmp, NULL, 16);
+		if (windows_map == 0 && errno == EINVAL) {
+			DEBUG(0, ("INVALID CATIA MAPPINGS - %s\n", mapping));
+			continue;
+		}
+
+		if (!build_ranges(cmaps, unix_map, windows_map)) {
+			DEBUG(0, ("TABLE ERROR - CATIA MAPPINGS - %s\n", mapping));
+			continue;
+		}
+	}
+
+	return cmaps;
+}
+
+NTSTATUS string_replace_allocate(connection_struct *conn,
+				 const char *name_in,
+				 struct char_mappings **cmaps,
+				 TALLOC_CTX *mem_ctx,
+				 char **mapped_name,
+				 enum vfs_translate_direction direction)
+{
+	static smb_ucs2_t *tmpbuf = NULL;
+	smb_ucs2_t *ptr = NULL;
+	struct char_mappings *map = NULL;
+	size_t converted_size;
+	bool ok;
+
+	ok = push_ucs2_talloc(talloc_tos(), &tmpbuf, name_in,
+			      &converted_size);
+	if (!ok) {
+		return map_nt_error_from_unix(errno);
+	}
+
+	for (ptr = tmpbuf; *ptr; ptr++) {
+		if (*ptr == 0) {
+			break;
+		}
+		if (cmaps == NULL) {
+			continue;
+		}
+		map = cmaps[T_PICK((*ptr))];
+		if (map == NULL) {
+			/* nothing to do */
+			continue;
+		}
+
+		*ptr = map->entry[T_OFFSET((*ptr))][direction];
+	}
+
+	ok = pull_ucs2_talloc(mem_ctx, mapped_name, tmpbuf,
+			      &converted_size);
+	TALLOC_FREE(tmpbuf);
+	if (!ok) {
+		return map_nt_error_from_unix(errno);
+	}
+	return NT_STATUS_OK;
+}
diff --git a/source3/utils/passwd_proto.h b/source3/modules/string_replace.h
similarity index 54%
copy from source3/utils/passwd_proto.h
copy to source3/modules/string_replace.h
index 104e00a..d7c9b52 100644
--- a/source3/utils/passwd_proto.h
+++ b/source3/modules/string_replace.h
@@ -1,10 +1,10 @@
 /*
  * Unix SMB/CIFS implementation.
- * collected prototypes header
  *
- * frozen from "make proto" in May 2008
- *
- * Copyright (C) Michael Adam 2008
+ * Copyright (C) Volker Lendecke, 2005
+ * Copyright (C) Aravind Srinivasan, 2009
+ * Copyright (C) Guenter Kukkukk, 2013
+ * Copyright (C) Ralph Boehme, 2017
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -13,20 +13,20 @@
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef _PASSWD_PROTO_H_
-#define _PASSWD_PROTO_H_
-
-
-/* The following definitions come from utils/passwd_util.c  */
+struct char_mappings;
 
-char *stdin_new_passwd( void);
-char *get_pass( const char *prompt, bool stdin_get);
+struct char_mappings **string_replace_init_map(const char **mappings);
 
-#endif /*  _PASSWD_PROTO_H_  */
+NTSTATUS string_replace_allocate(connection_struct *conn,
+				 const char *name_in,
+				 struct char_mappings **cmaps,
+				 TALLOC_CTX *mem_ctx,
+				 char **mapped_name,
+				 enum vfs_translate_direction direction);
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index c47b64d..ce760ce 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -31,23 +31,13 @@
 #include "smbd/smbd.h"
 #include "lib/util/tevent_unix.h"
 #include "lib/util/tevent_ntstatus.h"
+#include "string_replace.h"
 
 static int vfs_catia_debug_level = DBGC_VFS;
 
 #undef DBGC_CLASS
 #define DBGC_CLASS vfs_catia_debug_level
 
-#define GLOBAL_SNUM     0xFFFFFFF
-#define MAP_SIZE        0xFF
-#define MAP_NUM         0x101 /* max unicode charval / MAP_SIZE */
-#define T_OFFSET(_v_)   ((_v_ % MAP_SIZE))
-#define T_START(_v_)    (((_v_ / MAP_SIZE) * MAP_SIZE))
-#define T_PICK(_v_)     ((_v_ / MAP_SIZE))
-
-struct char_mappings {
-	smb_ucs2_t entry[MAP_SIZE][2];
-};
-
 struct share_mapping_entry {
 	int snum;
 	struct share_mapping_entry *next;
@@ -65,66 +55,13 @@ struct catia_cache {
 
 struct share_mapping_entry *srt_head = NULL;
 
-static bool build_table(struct char_mappings **cmaps, int value)
-{
-	int i;
-	int start = T_START(value);
-
-	(*cmaps) = talloc_zero(NULL, struct char_mappings);
-
-	if (!*cmaps)
-		return False;
-
-	for (i = 0; i < MAP_SIZE;i++) {
-		(*cmaps)->entry[i][vfs_translate_to_unix] = start + i;
-		(*cmaps)->entry[i][vfs_translate_to_windows] = start + i;
-	}
-
-	return True;
-}
-
-static void set_tables(struct char_mappings **cmaps,
-		       long unix_map,
-		       long windows_map)
-{
-	int i;
-
-	/* set unix -> windows */
-	i = T_OFFSET(unix_map);
-	cmaps[T_PICK(unix_map)]->entry[i][vfs_translate_to_windows] = windows_map;
-
-	/* set windows -> unix */
-	i = T_OFFSET(windows_map);
-	cmaps[T_PICK(windows_map)]->entry[i][vfs_translate_to_unix] = unix_map;
-}
-
-static bool build_ranges(struct char_mappings **cmaps,
-			 long unix_map,
-			 long windows_map)
-{
-
-	if (!cmaps[T_PICK(unix_map)]) {
-		if (!build_table(&cmaps[T_PICK(unix_map)], unix_map))
-			return False;
-	}
-
-	if (!cmaps[T_PICK(windows_map)]) {
-		if (!build_table(&cmaps[T_PICK(windows_map)], windows_map))
-			return False;
-	}
-
-	set_tables(cmaps, unix_map, windows_map);
-
-	return True;
-}
-
 static struct share_mapping_entry *get_srt(connection_struct *conn,
 					   struct share_mapping_entry **global)
 {
 	struct share_mapping_entry *share;
 
 	for (share = srt_head; share != NULL; share = share->next) {
-		if (share->snum == GLOBAL_SNUM)
+		if (share->snum == GLOBAL_SECTION_SNUM)
 			(*global) = share;
 
 		if (share->snum == SNUM(conn))
@@ -136,61 +73,24 @@ static struct share_mapping_entry *get_srt(connection_struct *conn,
 
 static struct share_mapping_entry *add_srt(int snum, const char **mappings)
 {
+	struct share_mapping_entry *sme = NULL;
 
-	char *tmp;
-	fstring mapping;
-	int i;
-	long unix_map, windows_map;
-	struct share_mapping_entry *ret = NULL;
+	sme = TALLOC_ZERO(NULL, sizeof(struct share_mapping_entry));
+	if (sme == NULL)
+		return sme;
 
-	ret = (struct share_mapping_entry *)
-		TALLOC_ZERO(NULL, sizeof(struct share_mapping_entry) +
-		(mappings ? (MAP_NUM * sizeof(struct char_mappings *)) : 0));
+	sme->snum = snum;
+	sme->next = srt_head;
+	srt_head = sme;
 
-	if (!ret)
-		return ret;
-
-	ret->snum = snum;
-
-	ret->next = srt_head;
-	srt_head = ret;
-
-	if (mappings) {
-		ret->mappings = (struct char_mappings**) ((unsigned char*) ret +
-		    sizeof(struct share_mapping_entry));
-		memset(ret->mappings, 0,
-		    MAP_NUM * sizeof(struct char_mappings *));
-	} else {
-		ret->mappings = NULL;
-		return ret;
+	if (mappings == NULL) {
+		sme->mappings = NULL;
+		return sme;
 	}
 
-	/*
-	 * catia mappings are of the form :
-	 * UNIX char (in 0xnn hex) : WINDOWS char (in 0xnn hex)
-	 *
-	 * multiple mappings are comma separated in smb.conf
-	 */
-	for (i=0;mappings[i];i++) {
-		fstrcpy(mapping, mappings[i]);
-		unix_map = strtol(mapping, &tmp, 16);
-		if (unix_map == 0 && errno == EINVAL) {
-			DEBUG(0, ("INVALID CATIA MAPPINGS - %s\n", mapping));
-			continue;
-		}
-		windows_map = strtol(++tmp, NULL, 16);
-		if (windows_map == 0 && errno == EINVAL) {
-			DEBUG(0, ("INVALID CATIA MAPPINGS - %s\n", mapping));
-			continue;
-		}
-
-		if (!build_ranges(ret->mappings, unix_map, windows_map)) {
-			DEBUG(0, ("TABLE ERROR - CATIA MAPPINGS - %s\n", mapping));
-			continue;
-		}
-	}
+	sme->mappings = string_replace_init_map(mappings);
 
-	return ret;
+	return sme;
 }
 
 static bool init_mappings(connection_struct *conn,
@@ -211,7 +111,7 @@ static bool init_mappings(connection_struct *conn,
 	if (!global) {
 		/* global setting */
 		mappings = lp_parm_string_list(-1, "catia", "mappings", NULL);
-		global = add_srt(GLOBAL_SNUM, mappings);
+		global = add_srt(GLOBAL_SECTION_SNUM, mappings);
 	}
 
 	/* no global setting - what about share level ? */
@@ -236,12 +136,8 @@ static NTSTATUS catia_string_replace_allocate(connection_struct *conn,
 					      char **mapped_name,
 					enum vfs_translate_direction direction)
 {
-	static smb_ucs2_t *tmpbuf = NULL;
-	smb_ucs2_t *ptr;
 	struct share_mapping_entry *selected;
-	struct char_mappings *map = NULL;
-	size_t converted_size;
-	TALLOC_CTX *ctx = talloc_tos();
+	NTSTATUS status;
 
 	if (!init_mappings(conn, &selected)) {
 		/* No mappings found. Just use the old name */
@@ -253,30 +149,13 @@ static NTSTATUS catia_string_replace_allocate(connection_struct *conn,
 		return NT_STATUS_OK;
 	}
 
-	if ((push_ucs2_talloc(ctx, &tmpbuf, name_in,
-			      &converted_size)) == false) {
-		return map_nt_error_from_unix(errno);
-	}
-	ptr = tmpbuf;
-	for(;*ptr;ptr++) {
-		if (*ptr == 0)
-			break;
-		map = selected->mappings[T_PICK((*ptr))];
-
-		/* nothing to do */
-		if (!map)
-			continue;
-
-		*ptr = map->entry[T_OFFSET((*ptr))][direction];
-	}
-
-	if ((pull_ucs2_talloc(ctx, mapped_name, tmpbuf,
-			      &converted_size)) == false) {
-		TALLOC_FREE(tmpbuf);
-		return map_nt_error_from_unix(errno);
-	}
-	TALLOC_FREE(tmpbuf);
-	return NT_STATUS_OK;
+	status = string_replace_allocate(conn,
+					 name_in,
+					 selected->mappings,
+					 talloc_tos(),
+					 mapped_name,
+					 direction);
+	return status;
 }
 
 static DIR *catia_opendir(vfs_handle_struct *handle,
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index 5c9e680..2771980 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -33,6 +33,7 @@
 #include "lib/util/tevent_ntstatus.h"
 #include "lib/util/tevent_unix.h"
 #include "offload_token.h"
+#include "string_replace.h"
 
 /*
  * Enhanced OS X and Netatalk compatibility
@@ -178,6 +179,19 @@ static const struct enum_list fruit_encoding[] = {
 	{ -1, NULL}
 };
 
+static const char *fruit_catia_maps =
+	"0x01:0xf001,0x02:0xf002,0x03:0xf003,0x04:0xf004,"
+	"0x05:0xf005,0x06:0xf006,0x07:0xf007,0x08:0xf008,"
+	"0x09:0xf009,0x0a:0xf00a,0x0b:0xf00b,0x0c:0xf00c,"
+	"0x0d:0xf00d,0x0e:0xf00e,0x0f:0xf00f,0x10:0xf010,"
+	"0x11:0xf011,0x12:0xf012,0x13:0xf013,0x14:0xf014,"
+	"0x15:0xf015,0x16:0xf016,0x17:0xf017,0x18:0xf018,"
+	"0x19:0xf019,0x1a:0xf01a,0x1b:0xf01b,0x1c:0xf01c,"
+	"0x1d:0xf01d,0x1e:0xf01e,0x1f:0xf01f,"
+	"0x22:0xf020,0x2a:0xf021,0x3a:0xf022,0x3c:0xf023,"
+	"0x3e:0xf024,0x3f:0xf025,0x5c:0xf026,0x7c:0xf027,"
+	"0x0d:0xf00d";
+
 /*****************************************************************************
  * Defines, functions and data structures that deal with AppleDouble
  *****************************************************************************/


-- 
Samba Shared Repository



More information about the samba-cvs mailing list