]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- check permissions of .snapshots
authorArvin Schnell <aschnell@suse.de>
Wed, 5 Sep 2012 12:06:59 +0000 (14:06 +0200)
committerArvin Schnell <aschnell@suse.de>
Wed, 5 Sep 2012 12:06:59 +0000 (14:06 +0200)
snapper/Filesystem.cc

index 526a0e70916ce6d2f0dd3d3adf607f7fad5a6910..7312f6dc0ee9e048084e693f92d6d60578eaf06d 100644 (file)
@@ -269,7 +269,13 @@ namespace snapper
 
        if (stat.st_uid != 0 || stat.st_gid != 0)
        {
-           y2err("owner of .snapshots wrong");
+           y2err("owner/group of .snapshots wrong");
+           throw IOErrorException();
+       }
+
+       if (stat.st_mode & S_IWOTH)
+       {
+           y2err("permissions of .snapshots wrong");
            throw IOErrorException();
        }
 
@@ -711,7 +717,13 @@ namespace snapper
 
        if (stat.st_uid != 0 || stat.st_gid != 0)
        {
-           y2err("owner of .snapshots wrong");
+           y2err("owner/group of .snapshots wrong");
+           throw IOErrorException();
+       }
+
+       if (stat.st_mode & S_IWOTH)
+       {
+           y2err("permissions of .snapshots wrong");
            throw IOErrorException();
        }