]> git.sur5r.net Git - bacula/bacula/commit
Fix bug #1807
authorMarco van Wieringen <mvw@planets.elm.net>
Fri, 6 Jan 2012 19:42:22 +0000 (20:42 +0100)
committerMarco van Wieringen <mvw@planets.elm.net>
Fri, 6 Jan 2012 19:42:22 +0000 (20:42 +0100)
commitaeff2004c3fba81ca569cbcc25ec8ba2638bf565
treeaf350d5382173a2f4e0d6ee9336123eb91c3cae2
parent631daef97aa1f7108f892c78f9ceca86920f6635
Fix bug #1807

Put the restore of xattr and acl streams on a restore stack
which gets popped after the actual file properties are restored.
As directories are never extracted those are excluded from
the delayed restore stack and have their streams processed
when we receive them.

This way we don't clobber the security info due to executing
chown and chmod calls on the restored file. We now first
restore the whole file and properties and then all of its
acls and extended attributes.

We only exclude the Solaris extended attribute streams as we
could have multiple of those with the maximum size and that
would use to much internal memory. For all other platforms
we only have one xattr stream with a maximum of 1 Mb so that
doesn't put to much stress on the filed. Solaris extensible
attributes are delayed restored. Restoring the Solaris
native extended attributes early should be no problem as they
are restored into a seperate namingspace and have file like
content. Security specific info is stored in extensible
attributes and those are delayed restored.

ACL streams are all so small that it makes no sense to
exclude them and we really want to always extract acl streams
after doing a chown and chmod because otherwise we might
reset the acl being restored earlier.
bacula/src/filed/restore.c
bacula/src/filed/restore.h