]> err.no Git - linux-2.6/blobdiff - fs/xfs/xfs_acl.c
Merge git://git.infradead.org/mtd-2.6
[linux-2.6] / fs / xfs / xfs_acl.c
index 33c5f402b4ed143111e6e112f7b684d9e9b9fa93..2539af34eb6376cd48c948f84398d1b9d843b443 100644 (file)
@@ -1,33 +1,19 @@
 /*
- * Copyright (c) 2001-2002 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2001-2002,2005 Silicon Graphics, Inc.
+ * All Rights Reserved.
  *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
  * published by the Free Software Foundation.
  *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like.  Any license provided herein, whether implied or
- * otherwise, applies only to this software file.  Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA  94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 #include "xfs.h"
 #include "xfs_fs.h"
@@ -50,6 +36,7 @@
 #include "xfs_mac.h"
 #include "xfs_attr.h"
 
+#include <linux/capability.h>
 #include <linux/posix_acl_xattr.h>
 
 STATIC int     xfs_acl_setmode(vnode_t *, xfs_acl_t *, int *);
@@ -408,7 +395,7 @@ xfs_acl_allow_set(
  * The access control process to determine the access permission:
  *     if uid == file owner id, use the file owner bits.
  *     if gid == file owner group id, use the file group bits.
- *     scan ACL for a maching user or group, and use matched entry
+ *     scan ACL for a matching user or group, and use matched entry
  *     permission. Use total permissions of all matching group entries,
  *     until all acl entries are exhausted. The final permission produced
  *     by matching acl entry or entries needs to be & with group permission.
@@ -450,6 +437,7 @@ xfs_acl_access(
        int             seen_userobj = 0;
 
        matched.ae_tag = 0;     /* Invalid type */
+       matched.ae_perm = 0;
        md >>= 6;       /* Normalize the bits for comparison */
 
        for (i = 0; i < fap->acl_cnt; i++) {