]> git.hungrycats.org Git - linux/commitdiff
[PATCH] remove posix_acl_masq_nfs_mode
authorChristoph Hellwig <hch@lst.de>
Tue, 19 Oct 2004 01:02:30 +0000 (18:02 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 19 Oct 2004 01:02:30 +0000 (18:02 -0700)
Completely unused but exported function in fs/posix_acl.c

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/posix_acl.c
include/linux/posix_acl.h

index c802d5a2f16abcdcdcf04cbe6272e59bc604cb5a..97fbb86195ef1de23f8602d81941f1f6d388b719 100644 (file)
@@ -29,7 +29,6 @@ EXPORT_SYMBOL(posix_acl_equiv_mode);
 EXPORT_SYMBOL(posix_acl_from_mode);
 EXPORT_SYMBOL(posix_acl_create_masq);
 EXPORT_SYMBOL(posix_acl_chmod_masq);
-EXPORT_SYMBOL(posix_acl_masq_nfs_mode);
 EXPORT_SYMBOL(posix_acl_permission);
 
 /*
@@ -380,44 +379,3 @@ posix_acl_chmod_masq(struct posix_acl *acl, mode_t mode)
 
        return 0;
 }
-
-/*
- * Adjust the mode parameter so that NFSv2 grants nobody permissions
- * that may not be granted by the ACL. This is necessary because NFSv2
- * may compute access permissions on the client side, and may serve cached
- * data whenever it assumes access would be granted.  Since ACLs may also
- * be used to deny access to specific users, the minimal permissions
- * for secure operation over NFSv2 are very restrictive. Permissions
- * granted to users via Access Control Lists will not be effective over
- * NFSv2.
- *
- * Privilege escalation can only happen for read operations, as writes are
- * always carried out on the NFS server, where the proper access checks are
- * implemented.
- */
-int
-posix_acl_masq_nfs_mode(struct posix_acl *acl, mode_t *mode_p)
-{
-       struct posix_acl_entry *pa, *pe; int min_perm = S_IRWXO;
-
-       FOREACH_ACL_ENTRY(pa, acl, pe) {
-                switch(pa->e_tag) {
-                       case ACL_USER_OBJ:
-                               break;
-
-                       case ACL_USER:
-                       case ACL_GROUP_OBJ:
-                       case ACL_GROUP:
-                       case ACL_MASK:
-                       case ACL_OTHER:
-                               min_perm &= pa->e_perm;
-                               break;
-
-                       default:
-                               return -EIO;
-               }
-       }
-       *mode_p = (*mode_p & ~(S_IRWXG|S_IRWXO)) | (min_perm << 3) | min_perm;
-
-       return 0;
-}
index aff9a6adb39e0ebf0175a765d7c605410a2997d7..fc74ef3fef365e47082b6d76c25b7464db087923 100644 (file)
@@ -79,7 +79,6 @@ extern struct posix_acl *posix_acl_from_mode(mode_t, int);
 extern int posix_acl_equiv_mode(const struct posix_acl *, mode_t *);
 extern int posix_acl_create_masq(struct posix_acl *, mode_t *);
 extern int posix_acl_chmod_masq(struct posix_acl *, mode_t);
-extern int posix_acl_masq_nfs_mode(struct posix_acl *, mode_t *);
 
 extern struct posix_acl *get_posix_acl(struct inode *, int);
 extern int set_posix_acl(struct inode *, int, struct posix_acl *);