/*-1* SPDX-License-Identifier: BSD-3-Clause2*3* Copyright (c) 1989, 19934* The Regents of the University of California. All rights reserved.5*6* This code is derived from software contributed to Berkeley by7* Rick Macklem at The University of Guelph.8*9* Redistribution and use in source and binary forms, with or without10* modification, are permitted provided that the following conditions11* are met:12* 1. Redistributions of source code must retain the above copyright13* notice, this list of conditions and the following disclaimer.14* 2. Redistributions in binary form must reproduce the above copyright15* notice, this list of conditions and the following disclaimer in the16* documentation and/or other materials provided with the distribution.17* 3. Neither the name of the University nor the names of its contributors18* may be used to endorse or promote products derived from this software19* without specific prior written permission.20*21* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND22* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE23* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE24* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE25* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL26* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS27* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)28* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT29* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY30* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF31* SUCH DAMAGE.32*/3334#ifndef _NFS_NFSID_H_35#define _NFS_NFSID_H_3637/* Definitions for id<-->name mapping. */38struct nfsd_idargs {39int nid_flag; /* Flags (see below) */40uid_t nid_uid; /* user/group id */41gid_t nid_gid;42int nid_usermax; /* Upper bound on user name cache */43int nid_usertimeout;/* User name timeout (minutes) */44u_char *nid_name; /* Name */45int nid_namelen; /* and its length */46gid_t *nid_grps; /* and the list */47int nid_ngroup; /* Size of groups list */48};4950/* And bits for nid_flag */51#define NFSID_INITIALIZE 0x000152#define NFSID_ADDUID 0x000253#define NFSID_DELUID 0x000454#define NFSID_ADDUSERNAME 0x000855#define NFSID_DELUSERNAME 0x001056#define NFSID_ADDGID 0x002057#define NFSID_DELGID 0x004058#define NFSID_ADDGROUPNAME 0x008059#define NFSID_DELGROUPNAME 0x010060#define NFSID_SYSSPACE 0x02006162#if defined(_KERNEL) || defined(KERNEL)63/*64* Define just enough NFSv4 id<-->name mappings to make things work65* until the nfsuserd(8) is running.66* XXX These name/ids must be kept the same as what is in /etc/passwd67* and /etc/group.68*/69struct nfs_prime_userd {70int flag;71uid_t uid;72gid_t gid;73char *nam;74};7576int nfssvc_idname(struct nfsd_idargs *);77#endif7879#endif /* _NFS_NFSID_H */808182