[SCM] Samba Shared Repository - branch master updated - 2c8cf0b394e8625017a1290f73d0007d3b5b6d20

Jelmer Vernooij jelmer at samba.org
Sun Oct 19 08:45:34 GMT 2008


The branch, master has been updated
       via  2c8cf0b394e8625017a1290f73d0007d3b5b6d20 (commit)
       via  c484b0465c8c2298c8d439677412f34e6bdd17f1 (commit)
      from  694a579cb8d418a4feb441a77c0dc000023f2c6e (commit)

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


- Log -----------------------------------------------------------------
commit 2c8cf0b394e8625017a1290f73d0007d3b5b6d20
Merge: c484b0465c8c2298c8d439677412f34e6bdd17f1 694a579cb8d418a4feb441a77c0dc000023f2c6e
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sun Oct 19 10:45:25 2008 +0200

    Merge branch 'master' of ssh://git.samba.org/data/git/samba into strhex

commit c484b0465c8c2298c8d439677412f34e6bdd17f1
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sun Oct 19 10:45:02 2008 +0200

    Move SMB-specific attribute function to SMB client library.

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

Summary of changes:
 lib/util/util_str.c          |   48 +----------------------------------------
 source4/libcli/raw/rawfile.c |   44 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 46 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/util_str.c b/lib/util/util_str.c
index 231f7f2..6f8a921 100644
--- a/lib/util/util_str.c
+++ b/lib/util/util_str.c
@@ -22,8 +22,9 @@
 */
 
 #include "includes.h"
-#include "libcli/raw/smb.h"
 #include "system/locale.h"
+#undef strncasecmp
+#undef strcasemp
 
 /**
  * @file
@@ -405,51 +406,6 @@ _PUBLIC_ size_t ascii_len_n(const char *src, size_t n)
 	return len;
 }
 
-
-/**
- Return a string representing a CIFS attribute for a file.
-**/
-_PUBLIC_ char *attrib_string(TALLOC_CTX *mem_ctx, uint32_t attrib)
-{
-	int i, len;
-	const struct {
-		char c;
-		uint16_t attr;
-	} attr_strs[] = {
-		{'V', FILE_ATTRIBUTE_VOLUME},
-		{'D', FILE_ATTRIBUTE_DIRECTORY},
-		{'A', FILE_ATTRIBUTE_ARCHIVE},
-		{'H', FILE_ATTRIBUTE_HIDDEN},
-		{'S', FILE_ATTRIBUTE_SYSTEM},
-		{'N', FILE_ATTRIBUTE_NORMAL},
-		{'R', FILE_ATTRIBUTE_READONLY},
-		{'d', FILE_ATTRIBUTE_DEVICE},
-		{'t', FILE_ATTRIBUTE_TEMPORARY},
-		{'s', FILE_ATTRIBUTE_SPARSE},
-		{'r', FILE_ATTRIBUTE_REPARSE_POINT},
-		{'c', FILE_ATTRIBUTE_COMPRESSED},
-		{'o', FILE_ATTRIBUTE_OFFLINE},
-		{'n', FILE_ATTRIBUTE_NONINDEXED},
-		{'e', FILE_ATTRIBUTE_ENCRYPTED}
-	};
-	char *ret;
-
-	ret = talloc_array(mem_ctx, char, ARRAY_SIZE(attr_strs)+1);
-	if (!ret) {
-		return NULL;
-	}
-
-	for (len=i=0; i<ARRAY_SIZE(attr_strs); i++) {
-		if (attrib & attr_strs[i].attr) {
-			ret[len++] = attr_strs[i].c;
-		}
-	}
-
-	ret[len] = 0;
-
-	return ret;
-}
-
 /**
  Set a boolean variable from the text value stored in the passed string.
  Returns true in success, false if the passed string does not correctly 
diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c
index d39c615..d174fbf 100644
--- a/source4/libcli/raw/rawfile.c
+++ b/source4/libcli/raw/rawfile.c
@@ -30,6 +30,50 @@
 	if (!req) return NULL; \
 } while (0)
 
+/**
+ Return a string representing a CIFS attribute for a file.
+**/
+_PUBLIC_ char *attrib_string(TALLOC_CTX *mem_ctx, uint32_t attrib)
+{
+	int i, len;
+	const struct {
+		char c;
+		uint16_t attr;
+	} attr_strs[] = {
+		{'V', FILE_ATTRIBUTE_VOLUME},
+		{'D', FILE_ATTRIBUTE_DIRECTORY},
+		{'A', FILE_ATTRIBUTE_ARCHIVE},
+		{'H', FILE_ATTRIBUTE_HIDDEN},
+		{'S', FILE_ATTRIBUTE_SYSTEM},
+		{'N', FILE_ATTRIBUTE_NORMAL},
+		{'R', FILE_ATTRIBUTE_READONLY},
+		{'d', FILE_ATTRIBUTE_DEVICE},
+		{'t', FILE_ATTRIBUTE_TEMPORARY},
+		{'s', FILE_ATTRIBUTE_SPARSE},
+		{'r', FILE_ATTRIBUTE_REPARSE_POINT},
+		{'c', FILE_ATTRIBUTE_COMPRESSED},
+		{'o', FILE_ATTRIBUTE_OFFLINE},
+		{'n', FILE_ATTRIBUTE_NONINDEXED},
+		{'e', FILE_ATTRIBUTE_ENCRYPTED}
+	};
+	char *ret;
+
+	ret = talloc_array(mem_ctx, char, ARRAY_SIZE(attr_strs)+1);
+	if (!ret) {
+		return NULL;
+	}
+
+	for (len=i=0; i<ARRAY_SIZE(attr_strs); i++) {
+		if (attrib & attr_strs[i].attr) {
+			ret[len++] = attr_strs[i].c;
+		}
+	}
+
+	ret[len] = 0;
+
+	return ret;
+}
+
 /****************************************************************************
  Rename a file - async interface
 ****************************************************************************/


-- 
Samba Shared Repository


More information about the samba-cvs mailing list