]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- first try to access config template
authorArvin Schnell <aschnell@suse.de>
Tue, 26 Apr 2011 15:22:09 +0000 (17:22 +0200)
committerArvin Schnell <aschnell@suse.de>
Tue, 26 Apr 2011 15:22:09 +0000 (17:22 +0200)
snapper/Snapper.cc

index 0ff3ad7cb82dded4bcc674e5ad18b61f2479c162..b084f35c275688655d89a72aa700b4f925a0841b 100644 (file)
@@ -543,6 +543,11 @@ namespace snapper
        y2mil("config_name:" << config_name << " subvolume:" << subvolume <<
              " template_name:" << template_name);
 
+       if (access(string(CONFIGTEMPLATEDIR "/" + template_name).c_str(), R_OK) != 0)
+       {
+           throw AddConfigFailedException("cannot access template config");
+       }
+
        try
        {
            SysconfigFile sysconfig(SYSCONFIGFILE);