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;
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,
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);
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);
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,
#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. */
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;
}
/*******************************************************************
- 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) */
}
/*******************************************************************
- 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;
}
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)
{
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;
/* 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)) {
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;
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;
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;
/* 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;
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;
}
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
********************************************************************/
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;
{
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) {
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");