Extended attribute support disabled on EPERM

Mathias Dietz MDIETZ at de.ibm.com
Fri Apr 7 09:35:55 GMT 2006


Hi all,

the extended attribute support failes on some machines.
In some cases the getxattr call returns a "operation not permitted" error
(EPERM) and
this causes samba to disable the extended attributes support for the whole
service/share.

I've build a small patch to fix this behavior. I would appreciate a review
on it.

--- dosmode.c.orig      2005-12-02 20:21:44.000000000 +0100
+++ dosmode.c   2006-04-07 10:24:13.000000000 +0200
@@ -196,7 +196,7 @@
        sizeret = SMB_VFS_GETXATTR(conn, path, SAMBA_XATTR_DOS_ATTRIB,
attrstr, sizeof(attrstr));
        if (sizeret == -1) {
 #if defined(ENOTSUP) && defined(ENOATTR)
-               if ((errno != ENOTSUP) && (errno != ENOATTR) && (errno !=
EACCES)) {
+               if ((errno != ENOTSUP) && (errno != ENOATTR) && (errno !=
EACCES) && (errno != EPERM)) {
                        DEBUG(1,("get_ea_dos_attributes: Cannot get
attribute from EA on file %s: Error = %s\n",
                                path, strerror(errno) ));
                        set_store_dos_attributes(SNUM(conn), False);


best regards

Mathias Dietz

------------------------------------------------------------------------
Filesystem Center of Competence
Software Development                              Dept. A182
IBM Deutschland GmbH
Hechtsheimer Strasse 2  Geb.83
D-55131 Mainz
Phone (+49)-6131-84-2027
Fax (+49)-6131-84-3111
E-Mail : MDietz at de.ibm.com
------------------------------------------------------------------------





More information about the samba-technical mailing list