summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorDerrell Lipman <derrell.lipman@unwireduniverse.com>2008-01-23 20:50:24 -0500
committerDerrell Lipman <derrell.lipman@unwireduniverse.com>2008-01-23 20:50:24 -0500
commit2e7e3095a65f6c76a2b68a82b5a0f50ffab50614 (patch)
tree0404b99f6e9bfa2b81f66f558cbf301378cbbef6 /source3/libsmb
parentffc84a10447a1bd3329b874b9e1bd4c6e6c2ff66 (diff)
parente0021b586d0c882fcc5ce0566dbbbd76f163d170 (diff)
downloadsamba-2e7e3095a65f6c76a2b68a82b5a0f50ffab50614.tar.gz
samba-2e7e3095a65f6c76a2b68a82b5a0f50ffab50614.tar.bz2
samba-2e7e3095a65f6c76a2b68a82b5a0f50ffab50614.zip
Merge branch 'setxattr-dos-mode' into v3-2-test
(This used to be commit 4c08725a42a8babf0f078fb4b221a96f58deeb50)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/libsmbclient.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c
index fbcb7f64e2..2eb580a52d 100644
--- a/source3/libsmb/libsmbclient.c
+++ b/source3/libsmb/libsmbclient.c
@@ -4689,7 +4689,15 @@ dos_attr_parse(SMBCCTX *context,
frame = talloc_stackframe();
while (next_token_talloc(frame, &p, &tok, "\t,\r\n")) {
if (StrnCaseCmp(tok, "MODE:", 5) == 0) {
- dad->mode = strtol(tok+5, NULL, 16);
+ long request = strtol(tok+5, NULL, 16);
+ if (request == 0) {
+ dad->mode = (request |
+ (IS_DOS_DIR(dad->mode)
+ ? FILE_ATTRIBUTE_DIRECTORY
+ : FILE_ATTRIBUTE_NORMAL));
+ } else {
+ dad->mode = request;
+ }
continue;
}