Here is attached a proposed patch that adds EA support for FreeBSD 5.x and, possibly, latest NetBSD versions. It need to be verified for the usage of Samba-specific memory and string management functions, but otherwise should be ok. It was already used with the Samba port on FreeBSD as a default one and didn't create any problems. For NetBSD absence of *_link functions may require additional stub code that will implement them via readlink and *_file calls. Luke, can you, please check it? Timur aka BaT
Created attachment 1138 [details] EA supporting code
Created attachment 1139 [details] Required configure checks
I've applied patches to 3.0.14pre1-SVN-build-6243 It fails to compile with this error messages: Compiling lib/system.c In file included from include/includes.h:451, from lib/system.c:22: /usr/local/include/ldap.h:649: warning: declaration of 'oid' shadows a global declaration /usr/include/krb5_asn1.h:23: warning: shadowed declaration is here lib/system.c: In function `sys_getxattr': lib/system.c:1379: error: `EXTATTR_NAMESPACE_SYSTEM' undeclared (first use in this function) lib/system.c:1379: error: (Each undeclared identifier is reported only once lib/system.c:1379: error: for each function it appears in.) lib/system.c:1379: error: `EXTATTR_NAMESPACE_USER' undeclared (first use in this function) lib/system.c:1382: warning: implicit declaration of function `extattr_get_file' lib/system.c: In function `sys_lgetxattr': lib/system.c:1406: error: `EXTATTR_NAMESPACE_SYSTEM' undeclared (first use in this function) lib/system.c:1406: error: `EXTATTR_NAMESPACE_USER' undeclared (first use in this function) lib/system.c:1409: warning: implicit declaration of function `extattr_get_link' lib/system.c: In function `sys_fgetxattr': lib/system.c:1433: error: `EXTATTR_NAMESPACE_SYSTEM' undeclared (first use in this function) lib/system.c:1433: error: `EXTATTR_NAMESPACE_USER' undeclared (first use in this function) lib/system.c:1436: warning: implicit declaration of function `extattr_get_fd' lib/system.c: At top level: lib/system.c:1463: error: `EXTATTR_NAMESPACE_SYSTEM' undeclared here (not in a function) lib/system.c:1463: error: initializer element is not constant lib/system.c:1463: error: (near initialization for `extattr[0].space') lib/system.c:1463: error: initializer element is not constant lib/system.c:1463: error: (near initialization for `extattr[0]') lib/system.c:1464: error: `EXTATTR_NAMESPACE_USER' undeclared here (not in a function) lib/system.c:1464: error: initializer element is not constant lib/system.c:1464: error: (near initialization for `extattr[1].space') lib/system.c:1464: error: initializer element is not constant lib/system.c:1464: error: (near initialization for `extattr[1]') lib/system.c: In function `bsd_attr_list': lib/system.c:1482: warning: implicit declaration of function `extattr_list_file' lib/system.c:1487: warning: implicit declaration of function `extattr_list_link' lib/system.c:1492: warning: implicit declaration of function `extattr_list_fd' lib/system.c: In function `sys_removexattr': lib/system.c:1672: warning: implicit declaration of function `extattr_delete_file' lib/system.c: In function `sys_lremovexattr': lib/system.c:1696: warning: implicit declaration of function `extattr_delete_link' lib/system.c: In function `sys_fremovexattr': lib/system.c:1720: warning: implicit declaration of function `extattr_delete_fd' lib/system.c: In function `sys_setxattr': lib/system.c:1750: warning: implicit declaration of function `extattr_set_file' lib/system.c: In function `sys_lsetxattr': lib/system.c:1778: warning: implicit declaration of function `extattr_set_link' lib/system.c: In function `sys_fsetxattr': lib/system.c:1806: warning: implicit declaration of function `extattr_set_fd' *** Error code 1 Stop in /usr/home/alex/samba-3_0/source.
FreeBSD 5.4-PRERELEASE gcc version 3.4.2 [FreeBSD] 20040728
Applied - thanks a *lot* for this work ! Jeremy.
EA support works with FreeBSD 5.4-RELEASE Samba 3.0.14pre1-SVN-build-6269
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.