diff options
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | plpfuse/fuse.c | 12 |
2 files changed, 7 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 7b6f5e7..5cda2ff 100644 --- a/configure.ac +++ b/configure.ac @@ -109,7 +109,7 @@ AC_SUBST(LIBHISTORY) # FUSE for plpfuse AC_CHECK_HEADER(fuse.h,, [AC_MSG_ERROR([Need fuse.h to build plpfuse])]) -AC_CHECK_LIB(fuse,fuse_new,, +AC_CHECK_LIB(fuse,fuse_new, [true], [AC_MSG_ERROR([Need libfuse to build plpfuse])]) # check for a supported version of FUSE @@ -133,7 +133,7 @@ AC_RUN_IFELSE([ # check for libattr for plpfuse AC_CHECK_HEADER(attr/attributes.h,, [AC_MSG_ERROR([Need libattr to build plpfuse])]) -AC_CHECK_LIB(attr, attr_set,, +AC_CHECK_LIB(attr, attr_set, [true], [AC_MSG_ERROR([Need libattr to build plpfuse])]) dnl these three are for solaris diff --git a/plpfuse/fuse.c b/plpfuse/fuse.c index 883f1d8..3cce988 100644 --- a/plpfuse/fuse.c +++ b/plpfuse/fuse.c @@ -450,7 +450,7 @@ static int plp_setxattr(const char *path, const char *name, const char *value, s { debuglog("plp_setxattr `%s'", ++path); if (strcmp(name, XATTR_NAME) == 0) { - long psidattr, pattr, psize, ptime; + long psisattr, psidattr; char oxattr[XATTR_MAXLEN + 1], nxattr[XATTR_MAXLEN + 1]; if (flags & XATTR_CREATE) { @@ -460,14 +460,12 @@ static int plp_setxattr(const char *path, const char *name, const char *value, s strncpy(nxattr, value, size < XATTR_MAXLEN ? size : XATTR_MAXLEN); nxattr[XATTR_MAXLEN] = '\0'; - if (rfsv_getattr(path, &pattr, &psize, &ptime)) - return rfsv_isalive() ? -ENOENT : -NO_PSION; /* Need to undo earlier increment of path when calling plp_getxattr */ plp_getxattr(path - 1, name, oxattr, XATTR_MAXLEN); - psidattr = pattr; - xattr2pattr(&pattr, &psidattr, oxattr, value); - debuglog("attrs set %x delete %x; %s, %s", pattr, psidattr, oxattr, value); - if (rfsv_setattr(path, pattr, psidattr)) + psisattr = psidattr = 0; + xattr2pattr(&psisattr, &psidattr, oxattr, value); + debuglog("attrs set %x delete %x; %s, %s", psisattr, psidattr, oxattr, value); + if (rfsv_setattr(path, psisattr, psidattr)) return rfsv_isalive() ? -EACCES : -NO_PSION; debuglog("setxattr succeeded"); |