PERFORCE change 111041 for review
Todd Miller
millert at FreeBSD.org
Mon Dec 4 10:31:42 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=111041
Change 111041 by millert at millert_g5tower on 2006/12/04 18:29:50
Eliminate 'data' argument to fsctl()/ioctl() framework/policy
entrypoints.
Affected files ...
.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/sys_pipe.c#5 edit
.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_syscalls.c#18 edit
.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_vnops.c#8 edit
.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#23 edit
.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_pipe.c#8 edit
.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#31 edit
.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs.c#22 edit
Differences ...
==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/sys_pipe.c#5 (text+ko) ====
@@ -1300,7 +1300,7 @@
PIPE_LOCK(mpipe);
#ifdef MAC
- error = mac_pipe_check_ioctl(kauth_cred_get(), mpipe, cmd, data);
+ error = mac_pipe_check_ioctl(kauth_cred_get(), mpipe, cmd);
if (error) {
PIPE_UNLOCK(mpipe);
==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_syscalls.c#18 (text+ko) ====
@@ -5337,7 +5337,7 @@
if ((error = namei(&nd))) goto FSCtl_Exit;
#ifdef MAC
- error = mac_mount_check_fsctl(context.vc_ucred, vnode_mount(nd.ni_vp), cmd, data);
+ error = mac_mount_check_fsctl(context.vc_ucred, vnode_mount(nd.ni_vp), cmd);
if (error) {
vnode_put(nd.ni_vp);
nameidone(&nd);
==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_vnops.c#8 (text+ko) ====
@@ -857,7 +857,7 @@
context.vc_ucred = p->p_ucred; /* XXX kauth_cred_get() ??? */
#ifdef MAC
- error = mac_vnode_check_ioctl(context.vc_ucred, vp, com, data);
+ error = mac_vnode_check_ioctl(context.vc_ucred, vp, com);
if (error)
goto out;
#endif
==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#23 (text+ko) ====
@@ -161,8 +161,7 @@
void mac_mbuf_tag_copy(struct m_tag *m, struct m_tag *mtag);
void mac_mbuf_tag_destroy(struct m_tag *mtag);
int mac_mbuf_tag_init(struct m_tag *, int how);
-int mac_mount_check_fsctl(struct ucred *cred, struct mount *mp,
- int com, caddr_t data);
+int mac_mount_check_fsctl(struct ucred *cred, struct mount *mp, int com);
int mac_mount_check_getattr(struct ucred *cred, struct mount *mp,
struct vfs_attr *vfa);
int mac_mount_check_label_update(struct ucred *cred, struct mount *mp);
@@ -181,7 +180,7 @@
void mac_mount_label_init(struct mount *);
int mac_mount_label_internalize(struct label *, char *string);
int mac_pipe_check_ioctl(struct ucred *cred, struct pipe *cpipe,
- unsigned long cmd, void *data);
+ unsigned long cmd);
int mac_pipe_check_kqfilter(struct ucred *cred, struct knote *kn,
struct pipe *cpipe);
int mac_pipe_check_read(struct ucred *cred, struct pipe *cpipe);
@@ -342,8 +341,7 @@
struct attrlist *alist);
int mac_vnode_check_getextattr(struct ucred *cred, struct vnode *vp,
const char *name, struct uio *uio);
-int mac_vnode_check_ioctl(struct ucred *cred, struct vnode *vp, int com,
- caddr_t data);
+int mac_vnode_check_ioctl(struct ucred *cred, struct vnode *vp, int com);
int mac_vnode_check_kqfilter(struct ucred *active_cred,
struct ucred *file_cred, struct knote *kn, struct vnode *vp);
int mac_vnode_check_label_update(struct ucred *cred, struct vnode *vp,
==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_pipe.c#8 (text+ko) ====
@@ -122,12 +122,11 @@
return (error);
}
int
-mac_pipe_check_ioctl(struct ucred *cred, struct pipe *cpipe,
- unsigned long cmd, void *data)
+mac_pipe_check_ioctl(struct ucred *cred, struct pipe *cpipe, unsigned long cmd)
{
int error;
- MAC_CHECK(pipe_check_ioctl, cred, cpipe, cpipe->pipe_label, cmd, data);
+ MAC_CHECK(pipe_check_ioctl, cred, cpipe, cpipe->pipe_label, cmd);
return (error);
}
==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#31 (text+ko) ====
@@ -1111,7 +1111,6 @@
@param mp The mount point
@param label Label associated with the mount point
@param com Filesystem-dependent request code; see fsctl(2)
- @param data Request-specific information; see fsctl(2)
Determine whether the subject identified by the credential can perform
the volume operation indicated by com.
@@ -1128,8 +1127,7 @@
struct ucred *cred,
struct mount *mp,
struct label *label,
- int com,
- caddr_t data
+ int com
);
/**
@brief Access control check for the retrieval of file system attributes
@@ -1360,7 +1358,6 @@
@param cpipe Object to be accessed
@param pipelabel The label on the pipe
@param cmd The ioctl command; see ioctl(2)
- @param data Request-specific information; see ioctl(2)
Determine whether the subject identified by the credential can perform
the ioctl operation indicated by cmd.
@@ -1377,8 +1374,7 @@
struct ucred *cred,
struct pipe *cpipe,
struct label *pipelabel,
- unsigned long cmd,
- void *data
+ unsigned long cmd
);
/**
@brief Access control check for pipe kqfilter
@@ -4092,7 +4088,6 @@
@param vp Object vnode
@param label Policy label for vp
@param com Device-dependent request code; see ioctl(2)
- @param data Request-specific information; see ioctl(2)
Determine whether the subject identified by the credential can perform
the ioctl operation indicated by com.
@@ -4109,8 +4104,7 @@
struct ucred *cred,
struct vnode *vp,
struct label *label,
- int com,
- caddr_t data
+ int com
);
/**
@brief Access control check for vnode kqfilter
==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs.c#22 (text+ko) ====
@@ -504,12 +504,11 @@
}
int
-mac_vnode_check_ioctl(struct ucred *cred, struct vnode *vp, int com,
- caddr_t data)
+mac_vnode_check_ioctl(struct ucred *cred, struct vnode *vp, int com)
{
int error;
- MAC_CHECK(vnode_check_ioctl, cred, vp, vp->v_label, com, data);
+ MAC_CHECK(vnode_check_ioctl, cred, vp, vp->v_label, com);
return (error);
}
@@ -876,12 +875,11 @@
}
int
-mac_mount_check_fsctl(struct ucred *cred, struct mount *mp, int com,
- caddr_t data)
+mac_mount_check_fsctl(struct ucred *cred, struct mount *mp, int com)
{
int error;
- MAC_CHECK(mount_check_fsctl, cred, mp, mp->mnt_mntlabel, com, data);
+ MAC_CHECK(mount_check_fsctl, cred, mp, mp->mnt_mntlabel, com);
return (error);
}
More information about the trustedbsd-cvs
mailing list