Module Name: src
Committed By: reinoud
Date: Thu Jul 30 12:13:51 UTC 2009
Modified Files:
src/sys/fs/udf: udf_vnops.c
Log Message:
Fix uid/gid check; it was checking if the old values would fit in 32 bits
instead of checking if the new values would.
To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/fs/udf/udf_vnops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/fs/udf/udf_vnops.c
diff -u src/sys/fs/udf/udf_vnops.c:1.53 src/sys/fs/udf/udf_vnops.c:1.54
--- src/sys/fs/udf/udf_vnops.c:1.53 Mon Jul 27 13:20:41 2009
+++ src/sys/fs/udf/udf_vnops.c Thu Jul 30 12:13:51 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_vnops.c,v 1.53 2009/07/27 13:20:41 reinoud Exp $ */
+/* $NetBSD: udf_vnops.c,v 1.54 2009/07/30 12:13:51 reinoud Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_vnops.c,v 1.53 2009/07/27 13:20:41 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_vnops.c,v 1.54 2009/07/30 12:13:51 reinoud Exp $");
#endif /* not lint */
@@ -969,9 +969,9 @@
new_gid = gid;
/* check if we can fit it in an 32 bits */
- if ((uid_t) ((uint32_t) uid) != uid)
+ if ((uid_t) ((uint32_t) new_uid) != new_uid)
return EINVAL;
- if ((gid_t) ((uint32_t) gid) != gid)
+ if ((gid_t) ((uint32_t) new_gid) != new_gid)
return EINVAL;
/* check permissions */