summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/nt_printing.h2
-rw-r--r--source3/include/proto.h12
-rw-r--r--source3/include/rpc_secdes.h6
-rw-r--r--source3/lib/secdesc.c18
-rw-r--r--source3/printing/nt_printing.c24
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c4
-rw-r--r--source3/rpcclient/cmd_lsarpc.c2
-rw-r--r--source3/rpcclient/cmd_samr.c2
8 files changed, 32 insertions, 38 deletions
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index 713443a4fa..0241a54b79 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -100,7 +100,7 @@ typedef struct nt_printer_info_level_2
fstring datatype;
fstring parameters;
NT_PRINTER_DATA *data;
- SEC_DESC_BUF *secdesc_buf;
+ struct sec_desc_buf *secdesc_buf;
uint32 changeid;
uint32 c_setprinter;
uint32 setuptime;
diff --git a/source3/include/proto.h b/source3/include/proto.h
index eb9c63c5ac..69e64d71f0 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -694,7 +694,7 @@ ssize_t drain_socket(int sockfd, size_t count);
uint32_t get_sec_info(const SEC_DESC *sd);
SEC_DESC *sec_desc_merge(TALLOC_CTX *ctx, SEC_DESC *new_sdb, SEC_DESC *old_sdb);
-SEC_DESC_BUF *sec_desc_merge_buf(TALLOC_CTX *ctx, SEC_DESC_BUF *new_sdb, SEC_DESC_BUF *old_sdb);
+struct sec_desc_buf *sec_desc_merge_buf(TALLOC_CTX *ctx, struct sec_desc_buf *new_sdb, struct sec_desc_buf *old_sdb);
SEC_DESC *make_sec_desc(TALLOC_CTX *ctx,
enum security_descriptor_revision revision,
uint16 type,
@@ -713,8 +713,8 @@ NTSTATUS unmarshall_sec_desc_buf(TALLOC_CTX *mem_ctx, uint8_t *data, size_t len,
struct sec_desc_buf **psecdesc_buf);
SEC_DESC *make_standard_sec_desc(TALLOC_CTX *ctx, const DOM_SID *owner_sid, const DOM_SID *grp_sid,
SEC_ACL *dacl, size_t *sd_size);
-SEC_DESC_BUF *make_sec_desc_buf(TALLOC_CTX *ctx, size_t len, SEC_DESC *sec_desc);
-SEC_DESC_BUF *dup_sec_desc_buf(TALLOC_CTX *ctx, SEC_DESC_BUF *src);
+struct sec_desc_buf *make_sec_desc_buf(TALLOC_CTX *ctx, size_t len, SEC_DESC *sec_desc);
+struct sec_desc_buf *dup_sec_desc_buf(TALLOC_CTX *ctx, struct sec_desc_buf *src);
NTSTATUS sec_desc_add_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, uint32 mask, size_t *sd_size);
NTSTATUS sec_desc_mod_sid(SEC_DESC *sd, DOM_SID *sid, uint32 mask);
NTSTATUS sec_desc_del_sid(TALLOC_CTX *ctx, SEC_DESC **psd, DOM_SID *sid, size_t *sd_size);
@@ -727,7 +727,7 @@ NTSTATUS se_create_child_secdesc(TALLOC_CTX *ctx,
const DOM_SID *group_sid,
bool container);
NTSTATUS se_create_child_secdesc_buf(TALLOC_CTX *ctx,
- SEC_DESC_BUF **ppsdb,
+ struct sec_desc_buf **ppsdb,
const SEC_DESC *parent_ctr,
bool container);
@@ -4793,8 +4793,8 @@ bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx,
WERROR delete_printer_driver(struct pipes_struct *rpc_pipe,
const struct spoolss_DriverInfo8 *r,
uint32 version, bool delete_files );
-WERROR nt_printing_setsec(const char *sharename, SEC_DESC_BUF *secdesc_ctr);
-bool nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, SEC_DESC_BUF **secdesc_ctr);
+WERROR nt_printing_setsec(const char *sharename, struct sec_desc_buf *secdesc_ctr);
+bool nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, struct sec_desc_buf **secdesc_ctr);
void map_printer_permissions(SEC_DESC *sd);
void map_job_permissions(SEC_DESC *sd);
bool print_access_check(struct auth_serversupplied_info *server_info, int snum,
diff --git a/source3/include/rpc_secdes.h b/source3/include/rpc_secdes.h
index 6db3f2d7c7..0d3db799f4 100644
--- a/source3/include/rpc_secdes.h
+++ b/source3/include/rpc_secdes.h
@@ -91,12 +91,6 @@ typedef struct security_descriptor SEC_DESC;
#define _SEC_DESC
#endif
-#ifndef _SEC_DESC_BUF
-/* SEC_DESC_BUF */
-typedef struct sec_desc_buf SEC_DESC_BUF;
-#define _SEC_DESC_BUF
-#endif
-
/* A type to describe the mapping of generic access rights to object
specific access rights. */
diff --git a/source3/lib/secdesc.c b/source3/lib/secdesc.c
index 7f28c87886..b3505e7e1b 100644
--- a/source3/lib/secdesc.c
+++ b/source3/lib/secdesc.c
@@ -63,10 +63,10 @@ uint32_t get_sec_info(const SEC_DESC *sd)
security descriptor new_sec.
********************************************************************/
-SEC_DESC_BUF *sec_desc_merge_buf(TALLOC_CTX *ctx, SEC_DESC_BUF *new_sdb, SEC_DESC_BUF *old_sdb)
+struct sec_desc_buf *sec_desc_merge_buf(TALLOC_CTX *ctx, struct sec_desc_buf *new_sdb, struct sec_desc_buf *old_sdb)
{
DOM_SID *owner_sid, *group_sid;
- SEC_DESC_BUF *return_sdb;
+ struct sec_desc_buf *return_sdb;
SEC_ACL *dacl, *sacl;
SEC_DESC *psd = NULL;
uint16 secdesc_type;
@@ -373,14 +373,14 @@ SEC_DESC *make_standard_sec_desc(TALLOC_CTX *ctx, const DOM_SID *owner_sid, cons
}
/*******************************************************************
- Creates a SEC_DESC_BUF structure.
+ Creates a struct sec_desc_buf structure.
********************************************************************/
-SEC_DESC_BUF *make_sec_desc_buf(TALLOC_CTX *ctx, size_t len, SEC_DESC *sec_desc)
+struct sec_desc_buf *make_sec_desc_buf(TALLOC_CTX *ctx, size_t len, SEC_DESC *sec_desc)
{
- SEC_DESC_BUF *dst;
+ struct sec_desc_buf *dst;
- if((dst = TALLOC_ZERO_P(ctx, SEC_DESC_BUF)) == NULL)
+ if((dst = TALLOC_ZERO_P(ctx, struct sec_desc_buf)) == NULL)
return NULL;
/* max buffer size (allocated size) */
@@ -394,10 +394,10 @@ SEC_DESC_BUF *make_sec_desc_buf(TALLOC_CTX *ctx, size_t len, SEC_DESC *sec_desc)
}
/*******************************************************************
- Duplicates a SEC_DESC_BUF structure.
+ Duplicates a struct sec_desc_buf structure.
********************************************************************/
-SEC_DESC_BUF *dup_sec_desc_buf(TALLOC_CTX *ctx, SEC_DESC_BUF *src)
+struct sec_desc_buf *dup_sec_desc_buf(TALLOC_CTX *ctx, struct sec_desc_buf *src)
{
if(src == NULL)
return NULL;
@@ -673,7 +673,7 @@ NTSTATUS se_create_child_secdesc(TALLOC_CTX *ctx,
}
NTSTATUS se_create_child_secdesc_buf(TALLOC_CTX *ctx,
- SEC_DESC_BUF **ppsdb,
+ struct sec_desc_buf **ppsdb,
const SEC_DESC *parent_ctr,
bool container)
{
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 1f8012767f..141966ebdc 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -333,8 +333,8 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, TDB_DATA key,
TDB_DATA data, void *state )
{
NTSTATUS status;
- SEC_DESC_BUF *sd_orig = NULL;
- SEC_DESC_BUF *sd_new, *sd_store;
+ struct sec_desc_buf *sd_orig = NULL;
+ struct sec_desc_buf *sd_new, *sd_store;
SEC_DESC *sec, *new_sec;
TALLOC_CTX *ctx = state;
int result, i;
@@ -413,7 +413,7 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, TDB_DATA key,
/* store it back */
sd_size = ndr_size_security_descriptor(sd_store->sd, 0)
- + sizeof(SEC_DESC_BUF);
+ + sizeof(struct sec_desc_buf);
status = marshall_sec_desc_buf(ctx, sd_store, &data.dptr, &data.dsize);
if (!NT_STATUS_IS_OK(status)) {
@@ -5480,10 +5480,10 @@ WERROR delete_printer_driver(struct pipes_struct *rpc_pipe,
Store a security desc for a printer.
****************************************************************************/
-WERROR nt_printing_setsec(const char *sharename, SEC_DESC_BUF *secdesc_ctr)
+WERROR nt_printing_setsec(const char *sharename, struct sec_desc_buf *secdesc_ctr)
{
- SEC_DESC_BUF *new_secdesc_ctr = NULL;
- SEC_DESC_BUF *old_secdesc_ctr = NULL;
+ struct sec_desc_buf *new_secdesc_ctr = NULL;
+ struct sec_desc_buf *old_secdesc_ctr = NULL;
TALLOC_CTX *mem_ctx = NULL;
TDB_DATA kbuf;
TDB_DATA dbuf;
@@ -5584,13 +5584,13 @@ WERROR nt_printing_setsec(const char *sharename, SEC_DESC_BUF *secdesc_ctr)
Construct a default security descriptor buffer for a printer.
****************************************************************************/
-static SEC_DESC_BUF *construct_default_printer_sdb(TALLOC_CTX *ctx)
+static struct sec_desc_buf *construct_default_printer_sdb(TALLOC_CTX *ctx)
{
SEC_ACE ace[5]; /* max number of ace entries */
int i = 0;
uint32_t sa;
SEC_ACL *psa = NULL;
- SEC_DESC_BUF *sdb = NULL;
+ struct sec_desc_buf *sdb = NULL;
SEC_DESC *psd = NULL;
DOM_SID adm_sid;
size_t sd_size;
@@ -5668,7 +5668,7 @@ static SEC_DESC_BUF *construct_default_printer_sdb(TALLOC_CTX *ctx)
Get a security desc for a printer.
****************************************************************************/
-bool nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, SEC_DESC_BUF **secdesc_ctr)
+bool nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, struct sec_desc_buf **secdesc_ctr)
{
TDB_DATA kbuf;
TDB_DATA dbuf;
@@ -5720,7 +5720,7 @@ bool nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, SEC_DESC_BUF **s
/* Change sd owner to workgroup administrator */
if (secrets_fetch_domain_sid(lp_workgroup(), &owner_sid)) {
- SEC_DESC_BUF *new_secdesc_ctr = NULL;
+ struct sec_desc_buf *new_secdesc_ctr = NULL;
SEC_DESC *psd = NULL;
size_t size;
@@ -5859,7 +5859,7 @@ void map_job_permissions(SEC_DESC *sd)
bool print_access_check(struct auth_serversupplied_info *server_info, int snum,
int access_type)
{
- SEC_DESC_BUF *secdesc = NULL;
+ struct sec_desc_buf *secdesc = NULL;
uint32 access_granted;
NTSTATUS status;
const char *pname;
@@ -5898,7 +5898,7 @@ bool print_access_check(struct auth_serversupplied_info *server_info, int snum,
}
if (access_type == JOB_ACCESS_ADMINISTER) {
- SEC_DESC_BUF *parent_secdesc = secdesc;
+ struct sec_desc_buf *parent_secdesc = secdesc;
/* Create a child security descriptor to check permissions
against. This is because print jobs are child objects
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 53d5e6f8a3..50d40e1dce 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -5400,9 +5400,9 @@ WERROR _spoolss_AbortPrinter(pipes_struct *p,
********************************************************************/
static WERROR update_printer_sec(struct policy_handle *handle,
- pipes_struct *p, SEC_DESC_BUF *secdesc_ctr)
+ pipes_struct *p, struct sec_desc_buf *secdesc_ctr)
{
- SEC_DESC_BUF *new_secdesc_ctr = NULL, *old_secdesc_ctr = NULL;
+ struct sec_desc_buf *new_secdesc_ctr = NULL, *old_secdesc_ctr = NULL;
WERROR result;
int snum;
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c
index 04aec66217..bc9efcd21c 100644
--- a/source3/rpcclient/cmd_lsarpc.c
+++ b/source3/rpcclient/cmd_lsarpc.c
@@ -1038,7 +1038,7 @@ static NTSTATUS cmd_lsa_query_secobj(struct rpc_pipe_client *cli,
{
struct policy_handle pol;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- SEC_DESC_BUF *sdb;
+ struct sec_desc_buf *sdb;
uint32 sec_info = DACL_SECURITY_INFORMATION;
if (argc < 1 || argc > 2) {
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c
index e21a57fba7..e61f590271 100644
--- a/source3/rpcclient/cmd_samr.c
+++ b/source3/rpcclient/cmd_samr.c
@@ -2161,7 +2161,7 @@ static NTSTATUS cmd_samr_query_sec_obj(struct rpc_pipe_client *cli,
uint32 sec_info = DACL_SECURITY_INFORMATION;
uint32 user_rid = 0;
TALLOC_CTX *ctx = NULL;
- SEC_DESC_BUF *sec_desc_buf=NULL;
+ struct sec_desc_buf *sec_desc_buf=NULL;
bool domain = False;
ctx=talloc_init("cmd_samr_query_sec_obj");