AccountInfo.h revision 70e5a7403f0e0a3bd292b8287c5fed5772c15270
1633838b8255282d10af15c5c84cee5a51466712Bob Halley/*
5fa46bc91672ef5737aee6f99763161511566c24Tinderbox User * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * Copyright (C) 2001 Internet Software Consortium.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence *
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater * Permission to use, copy, modify, and/or distribute this software for any
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * purpose with or without fee is hereby granted, provided that the above
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * copyright notice and this permission notice appear in all copies.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence *
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * PERFORMANCE OF THIS SOFTWARE.
1633838b8255282d10af15c5c84cee5a51466712Bob Halley */
d25afd60ee2286cb171c4960a790f3d7041b6f85Bob Halley
28a8f5b0de57d269cf2845c69cb6abe18cbd3b3aMark Andrews/* $Id: AccountInfo.h,v 1.6 2007/06/19 23:47:07 tbox Exp $ */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence#define RTN_OK 0
d25afd60ee2286cb171c4960a790f3d7041b6f85Bob Halley#define RTN_NOACCOUNT 1
d25afd60ee2286cb171c4960a790f3d7041b6f85Bob Halley#define RTN_NOMEMORY 2
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley#define RTN_ERROR 10
72bdbe3c70f415a717f59f72d04590d70acb380eMark Andrews
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley#define SE_SERVICE_LOGON_PRIV L"SeServiceLogonRight"
ddfe394c061049bbd71125ad41c3dd3092b2bbfdAndreas Gustafsson
1e107b3d7b54de5022c3328423164e533afcc15eMark Andrews/*
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence * This routine retrieves the list of all Privileges associated with
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews * a given account as well as the groups to which it beongs
fca5f81ad69098ea8abba130c7f841c951ef91c2Bob Halley */
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrenceint
6cf369f528c4acd8182eada41ad83b8d97623db8Mark AndrewsGetAccountPrivileges(
364a82f7c25b62967678027043425201a5e5171aBob Halley char *name, /* Name of Account */
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley wchar_t **PrivList, /* List of Privileges returned */
9192e92f7d0f4e78385a1d5f9b6607cc5bf0e42aBob Halley unsigned int *PrivCount, /* Count of Privileges returned */
3f8be559f0871022c78a229bad0eb09560b90909Evan Hunt char **Groups, /* List of Groups to which account belongs */
6d5032f9a23fe1197610114983c9938ac419b20cBrian Wellington unsigned int *totalGroups, /* Count of Groups returned */
6d5032f9a23fe1197610114983c9938ac419b20cBrian Wellington int maxGroups /* Maximum number of Groups to return */
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley );
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley/*
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley * This routine creates an account with the given name which has just
95c86af1e92dae4ff837a39e7e2dcb7308dd9cceBob Halley * the logon service privilege and no membership of any groups,
95c86af1e92dae4ff837a39e7e2dcb7308dd9cceBob Halley * i.e. it's part of the None group.
95c86af1e92dae4ff837a39e7e2dcb7308dd9cceBob Halley */
95c86af1e92dae4ff837a39e7e2dcb7308dd9cceBob HalleyBOOL
95c86af1e92dae4ff837a39e7e2dcb7308dd9cceBob HalleyCreateServiceAccount(char *name, char *password);
95c86af1e92dae4ff837a39e7e2dcb7308dd9cceBob Halley