New implementation of long variable names. Each variable has a
[pspp] / src / permissions.c
index 8737e631e5fa093eb6cfbb0c121abb9c0919898e..1c3ee1fc1c2adf61328fe00f074cd85d39315f9d 100644 (file)
@@ -14,8 +14,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA. */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA. */
 
 #include <config.h>
 #include "error.h"
@@ -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;