paranoia change - treat list_only like read_only and refuse all
authorAndrew Tridgell <tridge@samba.org>
Sat, 5 Dec 1998 01:56:45 +0000 (01:56 +0000)
committerAndrew Tridgell <tridge@samba.org>
Sat, 5 Dec 1998 01:56:45 +0000 (01:56 +0000)
syscalls that might change the filesystem. This shouldn't be needed,
but I like paranoid coding :)

syscall.c

index 558fe98..5876066 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -24,8 +24,9 @@
 
 extern int dry_run;
 extern int read_only;
+extern int list_only;
 
-#define CHECK_RO if (read_only) {errno = EROFS; return -1;}
+#define CHECK_RO if (read_only || list_only) {errno = EROFS; return -1;}
 
 int do_unlink(char *fname)
 {