1 /*	$NetBSD: AccountInfo.h,v 1.4 2014/12/10 04:37:55 christos Exp $	*/
2 
3 /*
4  * Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
5  * Copyright (C) 2001  Internet Software Consortium.
6  *
7  * Permission to use, copy, modify, and/or distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
12  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
14  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
16  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /* Id: AccountInfo.h,v 1.6 2007/06/19 23:47:07 tbox Exp  */
21 
22 
23 #define RTN_OK		0
24 #define RTN_NOACCOUNT	1
25 #define RTN_NOMEMORY	2
26 #define RTN_ERROR	10
27 
28 #define SE_SERVICE_LOGON_PRIV	L"SeServiceLogonRight"
29 
30 /*
31  * This routine retrieves the list of all Privileges associated with
32  * a given account as well as the groups to which it beongs
33  */
34 int
35 GetAccountPrivileges(
36 	char *name,			/* Name of Account */
37 	wchar_t **PrivList,		/* List of Privileges returned */
38 	unsigned int *PrivCount,	/* Count of Privileges returned */
39 	char **Groups,		/* List of Groups to which account belongs */
40 	unsigned int *totalGroups,	/* Count of Groups returned */
41 	int maxGroups		/* Maximum number of Groups to return */
42 	);
43 
44 /*
45  * This routine creates an account with the given name which has just
46  * the logon service privilege and no membership of any groups,
47  * i.e. it's part of the None group.
48  */
49 BOOL
50 CreateServiceAccount(char *name, char *password);
51