X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/3e170ce000f1506b7b5d2c5c7faec85ceabb573d..f427ee49d309d8fc33ebf3042c3a775f2f530ded:/bsd/nfs/nfs_ioctl.h diff --git a/bsd/nfs/nfs_ioctl.h b/bsd/nfs/nfs_ioctl.h index 9b2cbb5ff..c4eff26ea 100644 --- a/bsd/nfs/nfs_ioctl.h +++ b/bsd/nfs/nfs_ioctl.h @@ -2,7 +2,7 @@ * Copyright (c) 2012,2015 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in @@ -11,10 +11,10 @@ * unlawful or unlicensed copies of an Apple operating system, or to * circumvent, violate, or enable the circumvention or violation of, any * terms of an Apple operating system software license agreement. - * + * * Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -22,7 +22,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ @@ -37,42 +37,47 @@ /* * fsctl (vnop_ioctl) to detroy the callers credentials associated with the vnode's mount */ -#define NFS_IOC_DESTROY_CRED _IO('n', 1) -#define NFS_FSCTL_DESTROY_CRED IOCBASECMD(NFS_IOC_DESTROY_CRED) +#define NFS_IOC_DESTROY_CRED _IO('n', 1) + /* - * fsclt (vnop_ioctl) to set the callers credentials associated with the vnode's mount + * fsctl (vnop_ioctl) to set the callers credentials associated with the vnode's mount */ - - -struct nfs_gss_principal -{ - uint32_t princlen; /* length of data */ - uint32_t nametype; /* nametype of data */ +struct nfs_gss_principal { + size_t princlen; /* length of data */ + uint32_t nametype; /* nametype of data */ #ifdef KERNEL - user32_addr_t principal; /* principal data in userspace */ + user32_addr_t principal; /* principal data in userspace */ #else - uint8_t *principal; + uint8_t *principal; #endif - uint32_t flags; /* Return flags */ + uint32_t flags; /* Return flags */ }; #ifdef KERNEL /* LP64 version of nfs_gss_principal */ -struct user_nfs_gss_principal -{ - uint32_t princlen; /* length of data */ - uint32_t nametype; /* nametype of data */ - user_addr_t principal; /* principal data in userspace */ - uint32_t flags; /* Returned flags */ +struct user_nfs_gss_principal { + size_t princlen; /* length of data */ + uint32_t nametype; /* nametype of data */ + user64_addr_t principal; /* principal data in userspace */ + uint32_t flags; /* Returned flags */ }; #endif /* If no credential was found returned NFS_IOC_NO_CRED_FLAG in the flags field. */ -#define NFS_IOC_NO_CRED_FLAG 1 /* No credential was found */ +#define NFS_IOC_NO_CRED_FLAG 1 /* No credential was found */ +#define NFS_IOC_INVALID_CRED_FLAG 2 /* Found a credential, but its not valid */ -#define NFS_IOC_SET_CRED _IOW('n', 2, struct nfs_gss_principal) -#define NFS_FSCTL_SET_CRED IOCBASECMD(NFS_IOC_SET_CRED) +#define NFS_IOC_SET_CRED _IOW('n', 2, struct nfs_gss_principal) + +#define NFS_IOC_GET_CRED _IOWR('n', 3, struct nfs_gss_principal) + +#define NFS_IOC_DISARM_TRIGGER _IO('n', 4) + +#ifdef KERNEL + +#define NFS_IOC_SET_CRED64 _IOW('n', 2, struct user_nfs_gss_principal) + +#define NFS_IOC_GET_CRED64 _IOWR('n', 3, struct user_nfs_gss_principal) +#endif -#define NFS_IOC_GET_CRED _IOWR('n', 3, struct nfs_gss_principal) -#define NFS_FSCTL_GET_CRED IOCBASECMD(NFS_IOC_GET_CRED) #endif