[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Rdiff-backup-bugs] [bug #22407] UpdateError with hardlinked und suid fi
From: |
Christian Hattemer |
Subject: |
[Rdiff-backup-bugs] [bug #22407] UpdateError with hardlinked und suid files |
Date: |
Sun, 24 Feb 2008 21:49:36 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.8.0.7) Gecko/20061105 Firefox/1.5.0.7 |
URL:
<http://savannah.nongnu.org/bugs/?22407>
Summary: UpdateError with hardlinked und suid files
Project: rdiff-backup
Submitted by: krille
Submitted on: Sunday 02/24/2008 at 22:49
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Hi,
I'm using rdiff-backup 1.0.5 on NetBSD 4.0 and found the following problem:
If the backup contains files that are both hardlinked and have set user id
status and the writer-part of rdiff-backup is running as an unprivileged user,
then rdiff-backup will only mirror the first name of each set of hardlinked
files.
Example:
address@hidden:~ > rdiff-backup /usr/bin userbackup
UpdateError atq Updated mirror temp file userbackup/rdiff-backup.tmp.10 does
not match source
UpdateError atrm Updated mirror temp file userbackup/rdiff-backup.tmp.11 does
not match source
UpdateError batch Updated mirror temp file userbackup/rdiff-backup.tmp.18
does not match source
UpdateError chpass Updated mirror temp file userbackup/rdiff-backup.tmp.40
does not match source
UpdateError chsh Updated mirror temp file userbackup/rdiff-backup.tmp.41 does
not match source
UpdateError passwd Updated mirror temp file userbackup/rdiff-backup.tmp.243
does not match source
UpdateError systat Updated mirror temp file userbackup/rdiff-backup.tmp.335
does not match source
UpdateError yppasswd Updated mirror temp file userbackup/rdiff-backup.tmp.404
does not match source
The problematic files look like this:
address@hidden:/usr/bin > ll -i at atq atrm batch
8225590 -r-sr-xr-x 4 root wheel 27K Nov 10 15:02 at
8225590 -r-sr-xr-x 4 root wheel 27K Nov 10 15:02 atq
8225590 -r-sr-xr-x 4 root wheel 27K Nov 10 15:02 atrm
8225590 -r-sr-xr-x 4 root wheel 27K Nov 10 15:02 batch
In the mirror there's only at:
address@hidden:~/userbackup > ll at
-r-xr-xr-x 1 krille users 27K Nov 10 15:02 at
The metatdata shows this:
File at
Type reg
Size 28147
NumHardLinks 4
Inode 8225590
DeviceLoc 0
ModTime 1194703348
Uid 0
Uname root
Gid 0
Gname wheel
Permissions 2413
The other hardlinked names are missing.
If the writer-part of rdiff-backup is running as root, or if a file is only
hardlinked or only suid, but not both at the same time, then everything is
fine.
Here's some output with -v7 and a bit of my own debug output. This was
created by printing self.data and other.data in rpath.py:equal_loose().
Processing changed file at
Regular copying ('at',) to testbackup/rdiff-backup.tmp.9
Writing file object to testbackup/rdiff-backup.tmp.9
Copying attributes from ('at',) to testbackup/rdiff-backup.tmp.9
Setting time of testbackup/rdiff-backup.tmp.9 to 1167757801
self:{'uid': 0, 'perms': 2413, 'type': 'reg', 'gname': 'wheel', 'ctime':
1167766012, 'devloc': 0L, 'uname': 'root', 'nlink': 4, 'gid': 0, 'mtime':
1167757801, 'atime': 1203881372, 'inode': 3630396L, 'size': 28094L}
othe:{'uid': 1000, 'perms': 2413, 'type': 'reg', 'gname': 'users', 'ctime':
1203881961, 'devloc': 0L, 'uname': 'krille', 'nlink': 1, 'gid': 100, 'mtime':
1167757801, 'atime': 1203881961, 'inode': 1380740L, 'size': 28094L}
Renaming testbackup/rdiff-backup.tmp.9 to testbackup/at
Processing changed file atq
Hard linking testbackup/rdiff-backup.tmp.10 to testbackup/at
self:{'uid': 0, 'perms': 2413, 'type': 'reg', 'gname': 'wheel', 'ctime':
1167766012, 'devloc': 0L, 'uname': 'root', 'nlink': 4, 'gid': 0, 'mtime':
1167757801, 'atime': 1203881961, 'inode': 3630396L, 'size': 28094L}
othe:{'uid': 1000, 'perms': 365, 'type': 'reg', 'gname': 'users', 'ctime':
1203881961, 'devloc': 0L, 'uname': 'krille', 'nlink': 2, 'gid': 100, 'mtime':
1167757801, 'atime': 1203881961, 'inode': 1380740L, 'size': 28094L}
Deleting testbackup/rdiff-backup.tmp.10
It fails here since the perms are different. I think the real cause of this
is that the metadata for the new file wasn't recorded for some reason. (Please
note that this last example was created on a different version of the OS, but
that shouldn't make any difference.)
Could this be fixed?
BTW: Using --no-hard-links works around this problem. With this option
everything runs fine where it otherwise doesn't. However it seems that this
option doesn't operate as advertised in the man-page.
It says that the files won't be hardlinked on the mirror but that the
information would still be preserved in the metadata. However the files are
neither linked nor is the link information recorded in the metadata. Please
fix the code or the man-page, at your option.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?22407>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Rdiff-backup-bugs] [bug #22407] UpdateError with hardlinked und suid files,
Christian Hattemer <=