diff options
author | gfxmonk <tim@gfxmonk.net> | 2012-01-22 15:10:42 +1100 |
---|---|---|
committer | gfxmonk <tim@gfxmonk.net> | 2012-01-23 20:08:47 +1100 |
commit | d9a4ab87aca1d9484fe89085bf310591171412d8 (patch) | |
tree | e83f8a27fe716b91468707942aebe6225acfdc11 | |
parent | 559d249aa98d41993b5fb7f37afaa1ce57a3523a (diff) | |
download | xattr-d9a4ab87aca1d9484fe89085bf310591171412d8.tar.gz |
fixed logic error that prevented XATTR_NOFOLLOW flag from being respected when setting attributes
-rw-r--r-- | xattr/_xattr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xattr/_xattr.c b/xattr/_xattr.c index 630ec1d..ca794ee 100644 --- a/xattr/_xattr.c +++ b/xattr/_xattr.c @@ -80,7 +80,7 @@ static ssize_t xattr_setxattr(const char *path, const char *name, return -1; } - if (options & XATTR_XATTR_NOFOLLOW) { + if (nofollow) { rv = extattr_set_link(path, EXTATTR_NAMESPACE_USER, name, value, size); } @@ -175,7 +175,7 @@ static ssize_t xattr_fsetxattr(int fd, const char *name, void *value, return -1; } - if (options & XATTR_XATTR_NOFOLLOW) { + if (nofollow) { return -1; } else { @@ -447,7 +447,7 @@ static ssize_t xattr_setxattr(const char *path, const char *name, void *value, s } else if (options != 0) { return -1; } - if (options & XATTR_XATTR_NOFOLLOW) { + if (nofollow) { return lsetxattr(path, name, value, size, options); } else { return setxattr(path, name, value, size, options); |