Common IDmap defines. include/linux/idmap.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 62 insertions(+) diff -puN /dev/null include/linux/idmap.h --- /dev/null 2002-12-13 17:52:05.000000000 -0500 +++ linux-2.5.68-marius/include/linux/idmap.h 2003-05-18 02:47:46.000000000 -0400 @@ -0,0 +1,62 @@ +/* + * include/linux/idmap.h + * + * Message specification for UID and GID to name mapping for clients. + * + * Copyright (c) 2003 The Regents of the University of Michigan. + * All rights reserved. + * + * Marius Aamodt Eriksen + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef LINUX_IDMAP_H +#define LINUX_IDMAP_H + +#define IDMAP_TYPE_USER 0 +#define IDMAP_TYPE_GROUP 1 + +#define IDMAP_TRANS_IDTONAME 0 +#define IDMAP_TRANS_NAMETOID 1 + +#define IDMAP_STATUS_INVALIDMSG 0x01 +#define IDMAP_STATUS_AGAIN 0x02 +#define IDMAP_STATUS_FAIL 0x04 +#define IDMAP_STATUS_SUCCESS 0x08 + +/* XXX get (include) from bits/utmp.h */ +#define IDMAP_NAMESZ 128 + +struct idmap_msg { + uint8_t im_type; + uint8_t im_conv; + char im_name[IDMAP_NAMESZ]; + uint32_t im_id; + uint8_t im_status; +}; + +#endif /* LINUX_IDMAP_H */ _