]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- chown during create in rollback
authorArvin Schnell <aschnell@suse.de>
Wed, 16 Feb 2011 16:07:13 +0000 (17:07 +0100)
committerArvin Schnell <aschnell@suse.de>
Wed, 16 Feb 2011 16:07:13 +0000 (17:07 +0100)
snapper/File.cc

index 8a7d2eed06167e4e9fd98a8b2735b322ee5e5808..eded5b0524b422b6b99f98eda84939c3bc1cad31 100644 (file)
@@ -362,6 +362,7 @@ namespace snapper
                case S_IFDIR: {
                    mkdir(getAbsolutePath(LOC_SYSTEM).c_str(), 0);
                    chmod(getAbsolutePath(LOC_SYSTEM).c_str(), fs.st_mode);
+                   chown(getAbsolutePath(LOC_SYSTEM).c_str(), fs.st_uid, fs.st_gid);
                } break;
 
                case S_IFREG: {
@@ -373,6 +374,7 @@ namespace snapper
                    string tmp;
                    readlink(getAbsolutePath(LOC_PRE), tmp);
                    symlink(tmp, getAbsolutePath(LOC_SYSTEM));
+                   lchown(getAbsolutePath(LOC_SYSTEM).c_str(), fs.st_uid, fs.st_gid);
                } break;
            }
        }