Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add @group auth and overrides to "auth user" daemon config.
[rsync/rsync.git]
/
lib
/
sysxattrs.c
diff --git
a/lib/sysxattrs.c
b/lib/sysxattrs.c
index
1512518
..
d55ee0c
100644
(file)
--- a/
lib/sysxattrs.c
+++ b/
lib/sysxattrs.c
@@
-145,8
+145,8
@@
static ssize_t read_xattr(int attrfd, void *buf, size_t buflen)
ret = -1;
} else {
size_t bufpos;
ret = -1;
} else {
size_t bufpos;
- for (bufpos = 0; bufpos <
buflen
; ) {
- ssize_t cnt = read(attrfd, buf + bufpos,
buflen
- bufpos);
+ for (bufpos = 0; bufpos <
sb.st_size
; ) {
+ ssize_t cnt = read(attrfd, buf + bufpos,
sb.st_size
- bufpos);
if (cnt <= 0) {
if (cnt < 0 && errno == EINTR)
continue;
if (cnt <= 0) {
if (cnt < 0 && errno == EINTR)
continue;
@@
-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;
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; ) {
return -1;
for (bufpos = 0; bufpos < size; ) {
@@
-217,7
+217,7
@@
int sys_lremovexattr(const char *path, const char *name)
int attrdirfd;
int ret;
int attrdirfd;
int ret;
- if ((attrdirfd = attropen(path, ".", O_RD
WR
)) < 0)
+ if ((attrdirfd = attropen(path, ".", O_RD
ONLY
)) < 0)
return -1;
ret = unlinkat(attrdirfd, name, 0);
return -1;
ret = unlinkat(attrdirfd, name, 0);