source: vendor/3.6.23/source3/lib/privileges.h

Last change on this file was 740, checked in by Silvan Scherrer, 13 years ago

Samba Server: update vendor to 3.6.0

File size: 2.1 KB
Line 
1/*
2 Unix SMB/CIFS implementation.
3 Privileges handling functions
4 Copyright (C) Jean François Micouleau 1998-2001
5 Copyright (C) Simo Sorce 2002-2003
6 Copyright (C) Gerald (Jerry) Carter 2005
7 Copyright (C) Michael Adam 2007
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
21*/
22
23#ifndef _LIB_PRIVILEGES_H_
24#define _LIB_PRIVILEGES_H_
25
26#include "../libcli/security/privileges.h"
27
28/* The following definitions come from lib/privileges.c */
29
30bool get_privileges_for_sids(uint64_t *privileges, struct dom_sid *slist, int scount);
31NTSTATUS get_privileges_for_sid_as_set(TALLOC_CTX *mem_ctx, PRIVILEGE_SET **privileges, struct dom_sid *sid);
32NTSTATUS privilege_enumerate_accounts(struct dom_sid **sids, int *num_sids);
33NTSTATUS privilege_enum_sids(enum sec_privilege privilege, TALLOC_CTX *mem_ctx,
34 struct dom_sid **sids, int *num_sids);
35bool grant_privilege_set(const struct dom_sid *sid, struct lsa_PrivilegeSet *set);
36bool grant_privilege_by_name( const struct dom_sid *sid, const char *name);
37bool revoke_all_privileges( const struct dom_sid *sid );
38bool revoke_privilege_set(const struct dom_sid *sid, struct lsa_PrivilegeSet *set);
39bool revoke_privilege_by_name(const struct dom_sid *sid, const char *name);
40NTSTATUS privilege_create_account(const struct dom_sid *sid );
41NTSTATUS privilege_delete_account(const struct dom_sid *sid);
42bool is_privileged_sid( const struct dom_sid *sid );
43bool grant_all_privileges( const struct dom_sid *sid );
44
45#endif /* _LIB_PRIVILEGES_H_ */
Note: See TracBrowser for help on using the repository browser.