diff options
-rw-r--r-- | source3/auth/token_util.c | 1 | ||||
-rw-r--r-- | source3/include/includes.h | 1 | ||||
-rw-r--r-- | source3/include/proto.h | 17 | ||||
-rw-r--r-- | source3/lib/privileges.c | 1 | ||||
-rw-r--r-- | source3/lib/privileges.h | 18 | ||||
-rw-r--r-- | source3/passdb/account_pol.c | 2 | ||||
-rw-r--r-- | source3/registry/reg_backend_smbconf.c | 1 | ||||
-rw-r--r-- | source3/rpc_server/lsa/srv_lsa_nt.c | 1 | ||||
-rw-r--r-- | source3/rpc_server/winreg/srv_winreg_nt.c | 1 | ||||
-rw-r--r-- | source3/utils/net_sam.c | 1 |
10 files changed, 26 insertions, 18 deletions
diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c index af166760d0..da4745d833 100644 --- a/source3/auth/token_util.c +++ b/source3/auth/token_util.c @@ -33,6 +33,7 @@ #include "../lib/util/util_pw.h" #include "lib/winbind_util.h" #include "passdb.h" +#include "lib/privileges.h" /**************************************************************************** Check for a SID in an struct security_token diff --git a/source3/include/includes.h b/source3/include/includes.h index 9400c2d45f..297ec84a9f 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -534,7 +534,6 @@ typedef char fstring[FSTRING_LEN]; #include "../lib/util/charset/charset.h" #include "dynconfig.h" #include "debugparse.h" -#include "../libcli/security/privileges.h" #include "locking.h" #include "smb_perfcount.h" #include "smb.h" diff --git a/source3/include/proto.h b/source3/include/proto.h index d83d0d297c..54676e1d56 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -242,23 +242,6 @@ pid_t pidfile_pid(const char *name); void pidfile_create(const char *program_name); void pidfile_unlink(void); -/* The following definitions come from lib/privileges.c */ - -bool get_privileges_for_sids(uint64_t *privileges, struct dom_sid *slist, int scount); -NTSTATUS get_privileges_for_sid_as_set(TALLOC_CTX *mem_ctx, PRIVILEGE_SET **privileges, struct dom_sid *sid); -NTSTATUS privilege_enumerate_accounts(struct dom_sid **sids, int *num_sids); -NTSTATUS privilege_enum_sids(enum sec_privilege privilege, TALLOC_CTX *mem_ctx, - struct dom_sid **sids, int *num_sids); -bool grant_privilege_set(const struct dom_sid *sid, struct lsa_PrivilegeSet *set); -bool grant_privilege_by_name( const struct dom_sid *sid, const char *name); -bool revoke_all_privileges( const struct dom_sid *sid ); -bool revoke_privilege_set(const struct dom_sid *sid, struct lsa_PrivilegeSet *set); -bool revoke_privilege_by_name(const struct dom_sid *sid, const char *name); -NTSTATUS privilege_create_account(const struct dom_sid *sid ); -NTSTATUS privilege_delete_account(const struct dom_sid *sid); -bool is_privileged_sid( const struct dom_sid *sid ); -bool grant_all_privileges( const struct dom_sid *sid ); - /* The following definitions come from lib/recvfile.c */ ssize_t sys_recvfile(int fromfd, diff --git a/source3/lib/privileges.c b/source3/lib/privileges.c index 1d5d19d323..a793d77559 100644 --- a/source3/lib/privileges.c +++ b/source3/lib/privileges.c @@ -22,6 +22,7 @@ #include "includes.h" +#include "lib/privileges.h" #include "dbwrap.h" #include "libcli/security/privileges_private.h" #include "../libcli/security/security.h" diff --git a/source3/lib/privileges.h b/source3/lib/privileges.h new file mode 100644 index 0000000000..13bc3eb083 --- /dev/null +++ b/source3/lib/privileges.h @@ -0,0 +1,18 @@ +#include "../libcli/security/privileges.h" + +/* The following definitions come from lib/privileges.c */ + +bool get_privileges_for_sids(uint64_t *privileges, struct dom_sid *slist, int scount); +NTSTATUS get_privileges_for_sid_as_set(TALLOC_CTX *mem_ctx, PRIVILEGE_SET **privileges, struct dom_sid *sid); +NTSTATUS privilege_enumerate_accounts(struct dom_sid **sids, int *num_sids); +NTSTATUS privilege_enum_sids(enum sec_privilege privilege, TALLOC_CTX *mem_ctx, + struct dom_sid **sids, int *num_sids); +bool grant_privilege_set(const struct dom_sid *sid, struct lsa_PrivilegeSet *set); +bool grant_privilege_by_name( const struct dom_sid *sid, const char *name); +bool revoke_all_privileges( const struct dom_sid *sid ); +bool revoke_privilege_set(const struct dom_sid *sid, struct lsa_PrivilegeSet *set); +bool revoke_privilege_by_name(const struct dom_sid *sid, const char *name); +NTSTATUS privilege_create_account(const struct dom_sid *sid ); +NTSTATUS privilege_delete_account(const struct dom_sid *sid); +bool is_privileged_sid( const struct dom_sid *sid ); +bool grant_all_privileges( const struct dom_sid *sid ); diff --git a/source3/passdb/account_pol.c b/source3/passdb/account_pol.c index 7eeb38fdd8..c4a39e408f 100644 --- a/source3/passdb/account_pol.c +++ b/source3/passdb/account_pol.c @@ -24,6 +24,8 @@ #include "passdb.h" #include "dbwrap.h" #include "../libcli/security/security.h" +#include "lib/privileges.h" + static struct db_context *db; /* cache all entries for 60 seconds for to save ldap-queries (cache is updated diff --git a/source3/registry/reg_backend_smbconf.c b/source3/registry/reg_backend_smbconf.c index b96c73b47b..912f5eb1bf 100644 --- a/source3/registry/reg_backend_smbconf.c +++ b/source3/registry/reg_backend_smbconf.c @@ -20,6 +20,7 @@ #include "includes.h" #include "registry.h" +#include "lib/privileges.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_REGISTRY diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c index 9f2c496bc5..ca05a1ae70 100644 --- a/source3/rpc_server/lsa/srv_lsa_nt.c +++ b/source3/rpc_server/lsa/srv_lsa_nt.c @@ -44,6 +44,7 @@ #include "passdb.h" #include "auth.h" #include "ntdomain.h" +#include "lib/privileges.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV diff --git a/source3/rpc_server/winreg/srv_winreg_nt.c b/source3/rpc_server/winreg/srv_winreg_nt.c index 926d5d11ee..fedb665a30 100644 --- a/source3/rpc_server/winreg/srv_winreg_nt.c +++ b/source3/rpc_server/winreg/srv_winreg_nt.c @@ -29,6 +29,7 @@ #include "rpc_misc.h" #include "auth.h" #include "ntdomain.h" +#include "lib/privileges.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c index dfd9a78cc3..81e0fe8345 100644 --- a/source3/utils/net_sam.c +++ b/source3/utils/net_sam.c @@ -26,6 +26,7 @@ #include "../libcli/security/security.h" #include "lib/winbind_util.h" #include "passdb.h" +#include "lib/privileges.h" /* * Set a user's data |