summaryrefslogtreecommitdiff
path: root/obnamlib/plugins/restore_plugin.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-01-19 12:22:31 +0000
committerLars Wirzenius <liw@liw.fi>2014-01-19 12:22:31 +0000
commit7f9a5a05bc732346deb3355f84edd05267742a17 (patch)
tree31a3f4e5115a4b21e07d306f6ed16dbf5f3fb50a /obnamlib/plugins/restore_plugin.py
parent90162b17e60669eac5d21cf653b9f72c1d4415c3 (diff)
downloadobnam-7f9a5a05bc732346deb3355f84edd05267742a17.tar.gz
Obey --always-set-setuid when restoring
Diffstat (limited to 'obnamlib/plugins/restore_plugin.py')
-rw-r--r--obnamlib/plugins/restore_plugin.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/obnamlib/plugins/restore_plugin.py b/obnamlib/plugins/restore_plugin.py
index 795ab7d5..9d913d25 100644
--- a/obnamlib/plugins/restore_plugin.py
+++ b/obnamlib/plugins/restore_plugin.py
@@ -219,8 +219,11 @@ class RestorePlugin(obnamlib.ObnamPlugin):
else:
self.restore_first_link(gen, pathname, metadata)
if set_metadata and self.write_ok:
+ always = self.app.settings['always-restore-setuid']
try:
- obnamlib.set_metadata(self.fs, './' + pathname, metadata)
+ obnamlib.set_metadata(
+ self.fs, './' + pathname, metadata,
+ always_set_id_bits=always)
except (IOError, OSError), e:
msg = ('Could not set metadata: %s: %d: %s' %
(pathname, e.errno, e.strerror))