Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2009-09-16 20:23:51 +0400
committerChristopher Faylor <me@cgf.cx>2009-09-16 20:23:51 +0400
commita7f01125771dc56bf0f0794f2a8f6f00bbb74c20 (patch)
tree61d309196f903ecef57424c84c3770ae3f8a7600 /winsup/cygwin/ntea.cc
parent4834826e92b7a53767b425f805de8cddef329c3a (diff)
* ntea.c (write_ea): Don't abort if not-samba.
Diffstat (limited to 'winsup/cygwin/ntea.cc')
-rw-r--r--winsup/cygwin/ntea.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ntea.cc b/winsup/cygwin/ntea.cc
index 5b4ec3b53..744076ef7 100644
--- a/winsup/cygwin/ntea.cc
+++ b/winsup/cygwin/ntea.cc
@@ -214,11 +214,16 @@ write_ea (HANDLE hdl, path_conv &pc, const char *name, const char *value,
user namespace item, we remove the leading namespace from the name.
This keeps tools like attr/getfattr/setfattr happy. Otherwise
setting the EA fails as if we don't have the permissions. */
- if (pc.fs_is_samba () && ascii_strncasematch (name, "user.", 5))
+ /* Samba hides the user namespace from Windows clients. If we try to
+ retrieve a user namespace item, we remove the leading namespace from
+ the name, otherwise the search fails. */
+ if (!pc.fs_is_samba ())
+ /* nothing to do */;
+ else if (ascii_strncasematch (name, "user.", 5))
name += 5;
else
{
- set_errno (EOPNOTSUPP);
+ set_errno (ENOATTR);
goto out;
}