Need to use O_RDONLY in solaris sys_lremovexattr().
[rsync/rsync.git] / lib / sysxattrs.c
index ec11d7d..d55ee0c 100644 (file)
@@ -217,7 +217,7 @@ int sys_lremovexattr(const char *path, const char *name)
        int attrdirfd;
        int ret;
 
-       if ((attrdirfd = attropen(path, ".", O_RDWR)) < 0)
+       if ((attrdirfd = attropen(path, ".", O_RDONLY)) < 0)
                return -1;
 
        ret = unlinkat(attrdirfd, name, 0);