From 486ecd3d9cf796c36a7f87622a7235ce95dbdac5 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Wed, 2 Sep 2009 07:36:57 -0700 Subject: [PATCH] Fix attropen() flags for writing an xattr on solaris. --- lib/sysxattrs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sysxattrs.c b/lib/sysxattrs.c index 76b6802d..ec11d7d9 100644 --- a/lib/sysxattrs.c +++ b/lib/sysxattrs.c @@ -193,7 +193,7 @@ int sys_lsetxattr(const char *path, const char *name, const void *value, size_t size_t bufpos; mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP; - if ((attrfd = attropen(path, name, O_CREAT|O_WRONLY|O_NOFOLLOW, mode)) < 0) + if ((attrfd = attropen(path, name, O_CREAT|O_TRUNC|O_WRONLY, mode)) < 0) return -1; for (bufpos = 0; bufpos < size; ) { -- 2.34.1