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