Index: uspace/lib/c/generic/vfs/vfs.c
===================================================================
--- uspace/lib/c/generic/vfs/vfs.c	(revision 0b18364c6fa42d415600ee3c44b15f8f5ad21769)
+++ uspace/lib/c/generic/vfs/vfs.c	(revision 1393bbb9580f084075c057cedc39f77e37da345e)
@@ -329,4 +329,11 @@
 static int open_internal(const char *abs, size_t abs_size, int lflag, int oflag)
 {
+	// FIXME: Some applications call this incorrectly.
+	if ((oflag & (O_RDONLY|O_WRONLY|O_RDWR)) == 0) {
+		oflag |= O_RDWR;
+	}
+
+	assert((((oflag & O_RDONLY) != 0) + ((oflag & O_WRONLY) != 0) + ((oflag & O_RDWR) != 0)) == 1);
+	
 	async_exch_t *exch = vfs_exchange_begin();
 	
