Date: Mon, 11 Dec 2006 21:40:18 GMT From: Todd Miller <millert@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 111484 for review Message-ID: <200612112140.kBBLeI3b096021@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=111484 Change 111484 by millert@millert_g5tower on 2006/12/11 21:39:58 Make the type of the cmd parameter of the ioctl/fsctl entry points consistent. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_file.c#10 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#25 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_pipe.c#9 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#33 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs.c#23 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#51 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_file.c#10 (text+ko) ==== @@ -116,7 +116,7 @@ } int -mac_file_check_ioctl(struct ucred *cred, struct fileglob *fg, u_long cmd) +mac_file_check_ioctl(struct ucred *cred, struct fileglob *fg, u_int cmd) { int error; ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#25 (text+ko) ==== @@ -132,7 +132,7 @@ int mac_file_check_get_offset(struct ucred *cred, struct fileglob *fg); int mac_file_check_inherit(struct ucred *cred, struct fileglob *fg); int mac_file_check_ioctl(struct ucred *cred, struct fileglob *fg, - u_long cmd); + unsigned int cmd); int mac_file_check_lock(struct ucred *cred, struct fileglob *fg, int op, struct flock *fl); int mac_file_check_mmap(struct ucred *cred, struct fileglob *fg, @@ -161,7 +161,8 @@ 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); +int mac_mount_check_fsctl(struct ucred *cred, struct mount *mp, + unsigned int cmd); 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); @@ -180,7 +181,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); + unsigned int 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,7 +343,8 @@ 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); +int mac_vnode_check_ioctl(struct ucred *cred, struct vnode *vp, + unsigned int cmd); 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#9 (text+ko) ==== @@ -122,7 +122,7 @@ return (error); } int -mac_pipe_check_ioctl(struct ucred *cred, struct pipe *cpipe, unsigned long cmd) +mac_pipe_check_ioctl(struct ucred *cred, struct pipe *cpipe, u_int cmd) { int error; ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#33 (text+ko) ==== @@ -726,7 +726,7 @@ struct ucred *cred, struct fileglob *fg, struct label *label, - unsigned long cmd + unsigned int cmd ); /** @brief Access control check for file locking @@ -1128,7 +1128,7 @@ struct ucred *cred, struct mount *mp, struct label *label, - int com + unsigned int cmd ); /** @brief Access control check for the retrieval of file system attributes @@ -1375,7 +1375,7 @@ struct ucred *cred, struct pipe *cpipe, struct label *pipelabel, - unsigned long cmd + unsigned int cmd ); /** @brief Access control check for pipe kqfilter @@ -4116,7 +4116,7 @@ struct ucred *cred, struct vnode *vp, struct label *label, - int com + unsigned int cmd ); /** @brief Access control check for vnode kqfilter ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs.c#23 (text+ko) ==== @@ -504,11 +504,11 @@ } int -mac_vnode_check_ioctl(struct ucred *cred, struct vnode *vp, int com) +mac_vnode_check_ioctl(struct ucred *cred, struct vnode *vp, u_int cmd) { int error; - MAC_CHECK(vnode_check_ioctl, cred, vp, vp->v_label, com); + MAC_CHECK(vnode_check_ioctl, cred, vp, vp->v_label, cmd); return (error); } @@ -875,11 +875,11 @@ } int -mac_mount_check_fsctl(struct ucred *cred, struct mount *mp, int com) +mac_mount_check_fsctl(struct ucred *cred, struct mount *mp, u_int cmd) { int error; - MAC_CHECK(mount_check_fsctl, cred, mp, mp->mnt_mntlabel, com); + MAC_CHECK(mount_check_fsctl, cred, mp, mp->mnt_mntlabel, cmd); return (error); } ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#51 (text+ko) ==== @@ -1603,7 +1603,7 @@ static int sebsd_pipe_check_ioctl(struct ucred *cred, struct pipe *pipe, - struct label *pipelabel, unsigned long cmd, void /* caddr_t */ *data) + struct label *pipelabel, unsigned int cmd) { return (pipe_has_perm(cred, pipe, FIFO_FILE__IOCTL)); @@ -3082,7 +3082,7 @@ */ static int sebsd_file_check_ioctl(struct ucred *cred, struct fileglob *fg, - struct label *fglabel, u_long com) + struct label *fglabel, unsigned int cmd) { return (file_has_perm(cred, fg, fglabel, 0)); @@ -3090,7 +3090,7 @@ static int sebsd_vnode_check_ioctl(struct ucred *cred, struct vnode *vp, - struct label *label, int com, caddr_t data) + struct label *label, unsigned int cmd) { return (vnode_has_perm(cred, vp, NULL, FILE__IOCTL));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612112140.kBBLeI3b096021>