1*53ee8cc1Swenshuai.xi /* 2*53ee8cc1Swenshuai.xi * include/linux/nfs_idmap.h 3*53ee8cc1Swenshuai.xi * 4*53ee8cc1Swenshuai.xi * UID and GID to name mapping for clients. 5*53ee8cc1Swenshuai.xi * 6*53ee8cc1Swenshuai.xi * Copyright (c) 2002 The Regents of the University of Michigan. 7*53ee8cc1Swenshuai.xi * All rights reserved. 8*53ee8cc1Swenshuai.xi * 9*53ee8cc1Swenshuai.xi * Marius Aamodt Eriksen <marius@umich.edu> 10*53ee8cc1Swenshuai.xi * 11*53ee8cc1Swenshuai.xi * Redistribution and use in source and binary forms, with or without 12*53ee8cc1Swenshuai.xi * modification, are permitted provided that the following conditions 13*53ee8cc1Swenshuai.xi * are met: 14*53ee8cc1Swenshuai.xi * 15*53ee8cc1Swenshuai.xi * 1. Redistributions of source code must retain the above copyright 16*53ee8cc1Swenshuai.xi * notice, this list of conditions and the following disclaimer. 17*53ee8cc1Swenshuai.xi * 2. Redistributions in binary form must reproduce the above copyright 18*53ee8cc1Swenshuai.xi * notice, this list of conditions and the following disclaimer in the 19*53ee8cc1Swenshuai.xi * documentation and/or other materials provided with the distribution. 20*53ee8cc1Swenshuai.xi * 3. Neither the name of the University nor the names of its 21*53ee8cc1Swenshuai.xi * contributors may be used to endorse or promote products derived 22*53ee8cc1Swenshuai.xi * from this software without specific prior written permission. 23*53ee8cc1Swenshuai.xi * 24*53ee8cc1Swenshuai.xi * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 25*53ee8cc1Swenshuai.xi * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 26*53ee8cc1Swenshuai.xi * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27*53ee8cc1Swenshuai.xi * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28*53ee8cc1Swenshuai.xi * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 29*53ee8cc1Swenshuai.xi * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 30*53ee8cc1Swenshuai.xi * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 31*53ee8cc1Swenshuai.xi * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 32*53ee8cc1Swenshuai.xi * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 33*53ee8cc1Swenshuai.xi * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 34*53ee8cc1Swenshuai.xi * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35*53ee8cc1Swenshuai.xi */ 36*53ee8cc1Swenshuai.xi 37*53ee8cc1Swenshuai.xi #ifndef NFS_IDMAP_H 38*53ee8cc1Swenshuai.xi #define NFS_IDMAP_H 39*53ee8cc1Swenshuai.xi 40*53ee8cc1Swenshuai.xi /* XXX from bits/utmp.h */ 41*53ee8cc1Swenshuai.xi #define IDMAP_NAMESZ 128 42*53ee8cc1Swenshuai.xi 43*53ee8cc1Swenshuai.xi #define IDMAP_TYPE_USER 0 44*53ee8cc1Swenshuai.xi #define IDMAP_TYPE_GROUP 1 45*53ee8cc1Swenshuai.xi 46*53ee8cc1Swenshuai.xi #define IDMAP_CONV_IDTONAME 0 47*53ee8cc1Swenshuai.xi #define IDMAP_CONV_NAMETOID 1 48*53ee8cc1Swenshuai.xi 49*53ee8cc1Swenshuai.xi #define IDMAP_STATUS_INVALIDMSG 0x01 50*53ee8cc1Swenshuai.xi #define IDMAP_STATUS_AGAIN 0x02 51*53ee8cc1Swenshuai.xi #define IDMAP_STATUS_LOOKUPFAIL 0x04 52*53ee8cc1Swenshuai.xi #define IDMAP_STATUS_SUCCESS 0x08 53*53ee8cc1Swenshuai.xi 54*53ee8cc1Swenshuai.xi struct idmap_msg { 55*53ee8cc1Swenshuai.xi __u8 im_type; 56*53ee8cc1Swenshuai.xi __u8 im_conv; 57*53ee8cc1Swenshuai.xi char im_name[IDMAP_NAMESZ]; 58*53ee8cc1Swenshuai.xi __u32 im_id; 59*53ee8cc1Swenshuai.xi __u8 im_status; 60*53ee8cc1Swenshuai.xi }; 61*53ee8cc1Swenshuai.xi 62*53ee8cc1Swenshuai.xi 63*53ee8cc1Swenshuai.xi #endif /* NFS_IDMAP_H */ 64