summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-18 01:16:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:29 -0500
commitb02c5abfb470575a67ced192b2913b5a1c73dd3e (patch)
tree74469dac6ab1533fa12acbed6a534a0b9e448097
parentb706555b3a4ed3c8d459ae86b4c332fa41041f57 (diff)
downloadsamba-b02c5abfb470575a67ced192b2913b5a1c73dd3e.tar.gz
samba-b02c5abfb470575a67ced192b2913b5a1c73dd3e.tar.bz2
samba-b02c5abfb470575a67ced192b2913b5a1c73dd3e.zip
r4262: a sniff from kukks showed that the FILE_ATTRIBUTE_NORMAL handling in
pvfs was not correct. This should fix a xcopy bug on OS/2. (This used to be commit 7251f1fcdd8980e9c49a58e665374025e07bb8d0)
-rw-r--r--source4/lib/util_str.c1
-rw-r--r--source4/ntvfs/posix/pvfs_fileinfo.c9
-rw-r--r--source4/ntvfs/posix/pvfs_util.c3
3 files changed, 1 insertions, 12 deletions
diff --git a/source4/lib/util_str.c b/source4/lib/util_str.c
index 9fd6dd5356..82481cca26 100644
--- a/source4/lib/util_str.c
+++ b/source4/lib/util_str.c
@@ -1120,6 +1120,7 @@ char *attrib_string(TALLOC_CTX *mem_ctx, uint32_t attrib)
{'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},
diff --git a/source4/ntvfs/posix/pvfs_fileinfo.c b/source4/ntvfs/posix/pvfs_fileinfo.c
index aafecf0950..888d5f78c0 100644
--- a/source4/ntvfs/posix/pvfs_fileinfo.c
+++ b/source4/ntvfs/posix/pvfs_fileinfo.c
@@ -57,15 +57,6 @@ static uint32_t dos_mode_from_stat(struct pvfs_state *pvfs, struct stat *st)
if (S_ISDIR(st->st_mode))
result = FILE_ATTRIBUTE_DIRECTORY | (result & FILE_ATTRIBUTE_READONLY);
- if (!(result &
- (FILE_ATTRIBUTE_READONLY|
- FILE_ATTRIBUTE_ARCHIVE|
- FILE_ATTRIBUTE_SYSTEM|
- FILE_ATTRIBUTE_HIDDEN|
- FILE_ATTRIBUTE_DIRECTORY))) {
- result |= FILE_ATTRIBUTE_NORMAL;
- }
-
return result;
}
diff --git a/source4/ntvfs/posix/pvfs_util.c b/source4/ntvfs/posix/pvfs_util.c
index 67dd9d22b3..6026b9fbf3 100644
--- a/source4/ntvfs/posix/pvfs_util.c
+++ b/source4/ntvfs/posix/pvfs_util.c
@@ -70,9 +70,6 @@ NTSTATUS pvfs_match_attrib(struct pvfs_state *pvfs, struct pvfs_filename *name,
*/
uint32_t pvfs_attrib_normalise(uint32_t attrib)
{
- if (attrib == 0) {
- attrib = FILE_ATTRIBUTE_NORMAL;
- }
if (attrib != FILE_ATTRIBUTE_NORMAL) {
attrib &= ~FILE_ATTRIBUTE_NORMAL;
}