Added a signal handler to delete temp casefiles on SIGINT and SIGQUIT.
[pspp-builds.git] / src / permissions.c
index 8737e631e5fa093eb6cfbb0c121abb9c0919898e..f0ea817f9416bf670586e2ffcb7f64463ae280cb 100644 (file)
@@ -25,6 +25,7 @@
 #include <unistd.h>
 #include <errno.h>
 
+#include "settings.h"
 #include "command.h"
 #include "error.h"
 #include "lexer.h"
@@ -95,6 +96,13 @@ change_permissions(const char *filename, enum PER per)
   struct stat buf;
   mode_t mode;
 
+  if ( safer_mode() )
+    {
+      msg (SE, _("This command not allowed when the SAFER option is set."));
+      return CMD_FAILURE;
+    }
+
+
   if ( -1 == stat(filename, &buf) ) 
     {
       const int errnum = errno;