diff options
| author | Björn Jacke <bj@sernet.de> | 2013-11-06 12:37:07 +0100 |
|---|---|---|
| committer | Jeremy Allison <jra@samba.org> | 2013-11-08 20:43:29 +0100 |
| commit | 374b2cfde74e0c61f4b2da724b30d0e430596092 (patch) | |
| tree | ac9b6437c666cbfda84e0582ab4804cd1fc802d8 /lib/replace | |
| parent | 12a2230581b3ff5c7a29819532652d7ddfe61521 (diff) | |
| download | samba-374b2cfde74e0c61f4b2da724b30d0e430596092.tar.gz samba-374b2cfde74e0c61f4b2da724b30d0e430596092.tar.xz samba-374b2cfde74e0c61f4b2da724b30d0e430596092.zip | |
xattr: fix listing EAs on *BSD for non-root users
Thanks to Stefan Rompf for reporting.
This fixes bug #10247
Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Nov 8 20:43:30 CET 2013 on sn-devel-104
Diffstat (limited to 'lib/replace')
| -rw-r--r-- | lib/replace/xattr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/replace/xattr.c b/lib/replace/xattr.c index a26ff674a1..459b7f3b65 100644 --- a/lib/replace/xattr.c +++ b/lib/replace/xattr.c @@ -194,6 +194,10 @@ static ssize_t bsd_attr_list (int type, extattr_arg arg, char *list, size_t size char *buf; /* Iterate through extattr(2) namespaces */ for(t = 0; t < ARRAY_SIZE(extattr); t++) { + if (t != EXTATTR_NAMESPACE_USER && geteuid() != 0) { + /* ignore all but user namespace when we are not root, see bug 10247 */ + continue; + } switch(type) { #if defined(HAVE_EXTATTR_LIST_FILE) case 0: |
