[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] bacula ACL restore errors when replace=never


Kern's recent changes to the trunk restore code also fixed parts of the bug I 
described in this thread. Thanks again for that.

However, the ACLs are restored (and thus overwritten) for files that already 
exist, despite a "replace=never" flag. The attached revised version of my 
patch should fix that.

The notes below still apply to this.

On Wednesday 10 September 2008, Bastian Friedrich wrote:
> I still have a problem, though:
> When creating directories, the internal "extract" flag always is false,
> independently of whether the directory was in fact created, or whether it
> did already exist. The "makepath" function in findlib does not return
> information about whether it created any paths. Due to this, we can only
> _always_ or _never_ set directory ACLs during restore. I chose "always",
> but that means that "replace=never" restores overwrite already existing
> ACLs.
> The patch is restricted to ACLs; other stream types as restored in
> restore.c probably have similar concerns, but I did not check that.
> Feel free to use the patch; you have my signed FLA.

Best regards

Collax GmbH . Burkheimer Straße 3 . 79111 Freiburg . Germany
p: +49 (0) 761-45684-24
f: +49 (0) 761-45684-10        www.collax.com

Geschäftsführer: William K. Hite / Boris Nalbach
AG München HRB 158898 . Ust.-IdNr: DE 814464942
\ The facts, although interesting, are irrelevant.
--- bacula-2.5-20081006svn/src/filed/restore.c.ok	2008-10-04 17:38:04.000000000 +0200
+++ bacula-2.5-20081006svn/src/filed/restore.c	2008-10-06 11:09:26.000000000 +0200
@@ -571,6 +571,7 @@
+	 if (!rctx.extract && attr->type != FT_DIREND) break;
          if (have_acl) {
             pm_strcpy(jcr->acl_text, sd->msg);
             Dmsg2(400, "Restoring ACL type 0x%2x <%s>\n", BACL_TYPE_ACCESS, jcr->acl_text);
@@ -583,6 +584,7 @@
+	 if (!rctx.extract && attr->type != FT_DIREND) break;
          if (have_acl) {
             pm_strcpy(jcr->acl_text, sd->msg);
             Dmsg2(400, "Restoring ACL type 0x%2x <%s>\n", BACL_TYPE_DEFAULT, jcr->acl_text);
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
Bacula-devel mailing list

This mailing list archive is a service of Copilotco.