Commit 8bdd6f89 authored by dgaudet's avatar dgaudet

Set symlink permissions properly. (Patch from Andrew Ferguson.)


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@758 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 6307c52c
New in v1.0.5 (????/??/??)
--------------------------
Set symlink permissions properly. (Patch from Andrew Ferguson.)
Fix a traceback due to an off-by-1 error in "--remove-older-than nB".
Fix a security violation when restoring from a remote repository.
......
......@@ -95,7 +95,12 @@ def copy(rpin, rpout, compress = 0):
if rpin.isreg(): copy_reg_file(rpin, rpout, compress)
elif rpin.isdir(): rpout.mkdir()
elif rpin.issym(): rpout.symlink(rpin.readlink())
elif rpin.issym():
# some systems support permissions for symlinks, but
# only by setting at creation via the umask
os.umask(0777 - rpin.getperms())
rpout.symlink(rpin.readlink())
os.umask(077) # restore rdiff-backup standard umask
elif rpin.ischardev():
major, minor = rpin.getdevnums()
rpout.makedev("c", major, minor)
......
New in v1.1.6 (????/??/??)
--------------------------
Set symlink permissions properly. (Patch from Andrew Ferguson.)
Selection fix: empty directories could sometimes be improperly
excluded if certain include expressions involving a non-trailing '**'
were used. Bug reported by Toni Price.
......
......@@ -100,7 +100,12 @@ def copy(rpin, rpout, compress = 0):
if rpin.isreg(): return copy_reg_file(rpin, rpout, compress)
elif rpin.isdir(): rpout.mkdir()
elif rpin.issym(): rpout.symlink(rpin.readlink())
elif rpin.issym():
# some systems support permissions for symlinks, but
# only by setting at creation via the umask
os.umask(0777 - rpin.getperms())
rpout.symlink(rpin.readlink())
os.umask(077) # restore rdiff-backup standard umask
elif rpin.ischardev():
major, minor = rpin.getdevnums()
rpout.makedev("c", major, minor)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment