[740] | 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 |
|
---|
| 30 | bool get_privileges_for_sids(uint64_t *privileges, struct dom_sid *slist, int scount);
|
---|
| 31 | NTSTATUS get_privileges_for_sid_as_set(TALLOC_CTX *mem_ctx, PRIVILEGE_SET **privileges, struct dom_sid *sid);
|
---|
| 32 | NTSTATUS privilege_enumerate_accounts(struct dom_sid **sids, int *num_sids);
|
---|
| 33 | NTSTATUS privilege_enum_sids(enum sec_privilege privilege, TALLOC_CTX *mem_ctx,
|
---|
| 34 | struct dom_sid **sids, int *num_sids);
|
---|
| 35 | bool grant_privilege_set(const struct dom_sid *sid, struct lsa_PrivilegeSet *set);
|
---|
| 36 | bool grant_privilege_by_name( const struct dom_sid *sid, const char *name);
|
---|
| 37 | bool revoke_all_privileges( const struct dom_sid *sid );
|
---|
| 38 | bool revoke_privilege_set(const struct dom_sid *sid, struct lsa_PrivilegeSet *set);
|
---|
| 39 | bool revoke_privilege_by_name(const struct dom_sid *sid, const char *name);
|
---|
| 40 | NTSTATUS privilege_create_account(const struct dom_sid *sid );
|
---|
| 41 | NTSTATUS privilege_delete_account(const struct dom_sid *sid);
|
---|
| 42 | bool is_privileged_sid( const struct dom_sid *sid );
|
---|
| 43 | bool grant_all_privileges( const struct dom_sid *sid );
|
---|
| 44 |
|
---|
| 45 | #endif /* _LIB_PRIVILEGES_H_ */
|
---|