Libinfo-517.tar.gz
[apple/libinfo.git] / lookup.subproj / libinfo_muser.h
1 /*
2 * Copyright (c) 2015 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24 #ifndef _LIBINFO_MUSER_H_
25 #define _LIBINFO_MUSER_H_
26
27 /*
28 * SPI defining the interface between the libinfo "muser" module and
29 * the process providing the service.
30 */
31
32 #define kLibinfoMultiuserPortName "com.apple.system.libinfo.muser"
33
34 /* Request type: one of the kLIMMessageRequest* defines below */
35 #define kLIMMessageReqtype "reqtype"
36 /* Available: query whether the muser system is active */
37 #define kLIMMessageAvailable "available"
38 /* Query: request dependent query item */
39 #define kLIMMessageQuery "query"
40 /* Name: the name of the calling libinfo function */
41 #define kLIMMessageRPCName "procname"
42 /* Version: the API version of this request */
43 #define kLIMMessageVersion "version"
44
45 /*
46 * Request a passwd structure for a given username, query type should be
47 * an string value with the requested username.
48 */
49 #define kLIMMessageRequestUsername "username"
50 #define kLIMMessageRequestUID "uid"
51 #define kLIMMessageRequestGroupname "groupname"
52 #define kLIMMessageRequestGID "gid"
53 #define kLIMMessageRequestGrouplist "grouplist"
54
55 /* Reply keys from the availability query. */
56 #define kLIMMessageReplyAvailable "available" // bool
57
58 /* Reply keys from user queries. */
59 #define kLIMMessageReplyName "pw_name" // string
60 #define kLIMMessageReplyPasswd "pw_passwd" // string
61 #define kLIMMessageReplyUID "pw_uid" // int64
62 #define kLIMMessageReplyGID "pw_gid" // int64
63 #define kLIMMessageReplyHome "pw_dir" // string
64 #define kLIMMessageReplyShell "pw_shell" // string
65
66 /* Reply keys from group queries. */
67 #define kLIMMessageReplyGroupname "gr_name" // string
68 #define kLIMMessageReplyGroupID "gr_gid" // int64
69 #define kLIMMessageReplyGroupMembers "gr_members" // array of strings
70
71 /* Reply keys from grouplist queries. */
72 #define kLIMMessageReplyGrouplist "grouplist" // array of int64
73
74 #endif /* _LIBINFO_MUSER_H_ */