- if ((sys_llistxattr(".AppleDesktop", buf, ATTRNAMEBUFSIZ)) == -1
-) {
- LOG(log_warning, logtype_afpd, "Volume \"%s\" does not support Extended Attributes. Using ad format instead.",
+ mktemp(eaname);
+
+ process_uid = geteuid();
+ if (process_uid)
+ if (seteuid(0) == -1) {
+ LOG(log_error, logtype_logger, "check_ea_sys_support: can't seteuid(0): %s", strerror(errno));
+ exit(EXITERR_SYS);
+ }
+
+ if ((sys_setxattr(fname, eaname, eacontent, 4, 0)) == -1) {
+ LOG(log_warning, logtype_afpd, "volume \"%s\" does not support Extended Attributes, using ea:ad instead",