rsync uses lchmod and fails in Ubuntu >= 20.10 if /proc isn't mounted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GLibC |
Confirmed
|
Medium
|
|||
glibc (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Groovy |
Invalid
|
Undecided
|
Unassigned | ||
rsync (Ubuntu) |
Triaged
|
Low
|
Unassigned | ||
Groovy |
Won't Fix
|
Low
|
Unassigned |
Bug Description
Rsync in Ubuntu 20.10 fails when /proc isn't mounted, while it worked before.
This happens because AC_CHECK_
Steps to reproduce:
# Emulate /proc not being mounted
$ mount --bind / /mnt
$ chroot /mnt rsync -a /bin/ls .
rsync: [receiver] failed to set permissions on "/.ls.CDExhu": Operation not supported (95)
rsync error: some files/attrs were not transferred (see previous errors) (code 3) at main.c(1330) [sender=3.2.3]
I reported this issue upstream in https:/
Simple C code to reproduce the problem without rsync:
printf("lchmod returned: %d\n", lchmod("/tmp/ls", 0755));
If /tmp/ls is e.g. mode=0123, and needs to be changed, lchmod fails when /proc isn't mounted, yet it succeeds if it is mounted.
Python had a similar issue, and they ended up avoiding AC_CHECK_
https:/
https:/
```c
if test "$MACHDEP" != linux; then
AC_CHECK_
fi
```
So I'm not sure which package is causing the bug here. Should autoconf return false? Should libc implement lchown without the bug? Or should rsync skip lchmod under Linux, like python did?
no longer affects: | rsync |
Changed in glibc: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in rsync (Ubuntu): | |
importance: | Undecided → Low |
Changed in rsync (Ubuntu Groovy): | |
importance: | Undecided → Low |
Fixes for https:/ /sourceware. org/bugzilla/ show_bug. cgi?id= 14578 AT_SYMLINK_ NOFOLLOW) used to return ENOTSUP, now it returns EOPNOTSUPP which is different from ENOTSUP on some architectures, e.g. hppa.
introduced regressions in cases when /proc is not mounted:
- lchmod used to return ENOSYS, now it returns EOPNOTSUPP;
- fchmodat(