[Pkg-samba-maint] [samba] 20/29: xattr: fix listing EAs on *BSD for non-root users

Jelmer Vernooij jelmer at moszumanska.debian.org
Fri Dec 6 23:16:46 UTC 2013


This is an automated email from the git hooks/post-receive script.

jelmer pushed a commit to branch samba_4.1
in repository samba.

commit 2cfa1ef6a9e2728c9cdd185d6d08a452e0485200
Author: Björn Jacke <bj at sernet.de>
Date:   Wed Nov 6 12:37:07 2013 +0100

    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 at sernet.de>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Fri Nov  8 20:43:30 CET 2013 on sn-devel-104
    (cherry picked from commit 374b2cfde74e0c61f4b2da724b30d0e430596092)
    
    Autobuild-User(v4-1-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-1-test): Tue Nov 12 13:28:26 CET 2013 on sn-devel-104
---
 lib/replace/xattr.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/replace/xattr.c b/lib/replace/xattr.c
index a26ff67..459b7f3 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:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list