/*
- * Copyright (c) 2000-2015 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2016 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
#define NFS_MFLAG_MUTEJUKEBOX 8 /* don't treat jukebox errors as unresponsive */
#define NFS_MFLAG_EPHEMERAL 9 /* ephemeral (mirror) mount */
#define NFS_MFLAG_NOCALLBACK 10 /* don't provide callback RPC service */
-#define NFS_MFLAG_NONAMEDATTR 11 /* don't use named attributes */
+#define NFS_MFLAG_NAMEDATTR 11 /* don't use named attributes */
#define NFS_MFLAG_NOACL 12 /* don't support ACLs */
#define NFS_MFLAG_ACLONLY 13 /* only support ACLs - not mode */
#define NFS_MFLAG_NFC 14 /* send NFC strings */
#include <sys/_types/_guid_t.h> /* for guid_t below */
#define MAXIDNAMELEN 1024
struct nfs_testmapid {
- uint32_t ntm_name2id; /* lookup name 2 id or id 2 name */
+ uint32_t ntm_lookup; /* lookup name 2 id or id 2 name */
uint32_t ntm_grpflag; /* Is this a group or user maping */
uint32_t ntm_id; /* id to map or return */
uint32_t pad;
guid_t ntm_guid; /* intermidiate guid used in conversion */
char ntm_name[MAXIDNAMELEN]; /* name to map or return */
};
-
+
+#define NTM_ID2NAME 0
+#define NTM_NAME2ID 1
+#define NTM_NAME2GUID 2
+#define NTM_GUID2NAME 3
+
/*
* fs.nfs sysctl(3) identifiers
*/
/* bits for nfs_idmap_ctrl: */
#define NFS_IDMAP_CTRL_USE_IDMAP_SERVICE 0x00000001 /* use the ID mapping service */
#define NFS_IDMAP_CTRL_FALLBACK_NO_COMMON_IDS 0x00000002 /* fallback should NOT handle common IDs like "root" and "nobody" */
-#define NFS_IDMAP_CTRL_FALLBACK_NO_WELLKNOWN_IDS 0x00000004 /* fallback should NOT handle the well known "XXX@" IDs */
-#define NFS_IDMAP_CTRL_UNKNOWN_IS_99 0x00000008 /* for unknown IDs use uid/gid 99 instead of -2/nobody */
-#define NFS_IDMAP_CTRL_COMPARE_RESULTS 0x00000010 /* compare results of ID mapping service and fallback */
#define NFS_IDMAP_CTRL_LOG_FAILED_MAPPINGS 0x00000020 /* log failed ID mapping attempts */
#define NFS_IDMAP_CTRL_LOG_SUCCESSFUL_MAPPINGS 0x00000040 /* log successful ID mapping attempts */
extern TAILQ_HEAD(nfsd_head, nfsd) nfsd_head, nfsd_queue;
+typedef int (*nfsrv_proc_t)(struct nfsrv_descript *, struct nfsrv_sock *,
+ vfs_context_t, mbuf_t *);
+
/* mutex for nfs server */
extern lck_mtx_t *nfsd_mutex;
extern int nfsd_thread_count, nfsd_thread_max;
#endif
/* nfs 4 default domain for user mapping */
-extern char nfs4_domain[MAXPATHLEN];
+extern char nfs4_default_domain[MAXPATHLEN];
__BEGIN_DECLS
uint32_t nfs4_ace_nfsmask_to_vfsrights(uint32_t);
uint32_t nfs4_ace_vfsrights_to_nfsmask(uint32_t);
int nfs4_id2guid(char *, guid_t *, int);
-int nfs4_guid2id(guid_t *, char *, int *, int);
+int nfs4_guid2id(guid_t *, char *, size_t *, int);
int nfs_parsefattr(struct nfsm_chain *, int, struct nfs_vattr *);
int nfs4_parsefattr(struct nfsm_chain *, struct nfs_fsattr *, struct nfs_vattr *, fhandle_t *, struct dqblk *, struct nfs_fs_locations *);