Module Name:    src
Committed By:   manu
Date:           Tue Aug  9 09:06:52 UTC 2011

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

Log Message:
Fix uninitiaized variable usage (never though lint would miss that when
used by return statement) that caused unprivilegied user to fail on
unlink(2) and rename(2) operations.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 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.37 src/lib/libperfuse/ops.c:1.38
--- src/lib/libperfuse/ops.c:1.37	Tue Aug  2 16:57:16 2011
+++ src/lib/libperfuse/ops.c	Tue Aug  9 09:06:52 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: ops.c,v 1.37 2011/08/02 16:57:16 manu Exp $ */
+/*  $NetBSD: ops.c,v 1.38 2011/08/09 09:06:52 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -241,7 +241,7 @@
 {
 	uid_t uid;
 	struct puffs_node *tdir;
-	int sticky, owner, error;
+	int sticky, owner;
 
 	tdir = PERFUSE_NODE_DATA(targ)->pnd_parent;
 
@@ -264,9 +264,9 @@
 	owner = puffs_pn_getvap(targ)->va_uid == uid;
 
 	if (sticky && !owner)
-		error = EACCES;
+		return EACCES;
 
-	return error;	
+	return 0;
 }
 
 

Reply via email to