Module Name:    src
Committed By:   manu
Date:           Fri Jul 19 07:32:35 UTC 2013

Modified Files:
        src/lib/libperfuse: ops.c

Log Message:
Catch open without FREAD|FWRITE (it should not happen)


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/lib/libperfuse/ops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libperfuse/ops.c
diff -u src/lib/libperfuse/ops.c:1.61 src/lib/libperfuse/ops.c:1.62
--- src/lib/libperfuse/ops.c:1.61	Thu Jul 18 09:01:20 2013
+++ src/lib/libperfuse/ops.c	Fri Jul 19 07:32:35 2013
@@ -1,4 +1,4 @@
-/*  $NetBSD: ops.c,v 1.61 2013/07/18 09:01:20 manu Exp $ */
+/*  $NetBSD: ops.c,v 1.62 2013/07/19 07:32:35 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -1391,6 +1391,10 @@ perfuse_node_open(struct puffs_usermount
 		if (pnd->pnd_flags & PND_RFH)
 			mode &= ~FREAD;
 		break;
+	default:
+		DWARNX("open without either FREAD nor FWRITE");
+		error = EPERM;
+		goto out;
 	}
 	
 	/*

Reply via email to