Rebase against 0cdc3b092cbe13b8a029e12fda32b5f5ef04641e.

This commit is contained in:
Alistair Leslie-Hughes 2024-09-12 08:59:57 +10:00
parent 52f5128abc
commit ce31cba943
2 changed files with 15 additions and 15 deletions

View File

@ -1,4 +1,4 @@
From 94f5ff2ca72ce78d339f1247adc58a10b1690af4 Mon Sep 17 00:00:00 2001
From 2b9d0c9e955f188d5e5ba2311ed96ff9821f7d44 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 30 Mar 2015 12:32:34 +0200
Subject: [PATCH] server: Add a helper function set_sd_from_token_internal to
@ -10,10 +10,10 @@ Subject: [PATCH] server: Add a helper function set_sd_from_token_internal to
2 files changed, 40 insertions(+), 22 deletions(-)
diff --git a/server/object.c b/server/object.c
index 907bc087444..494d6e94569 100644
index 1a3bff65969..d46dbf01b6f 100644
--- a/server/object.c
+++ b/server/object.c
@@ -538,8 +538,9 @@ struct security_descriptor *default_get_sd( struct object *obj )
@@ -563,8 +563,9 @@ struct security_descriptor *default_get_sd( struct object *obj )
return obj->sd;
}
@ -25,7 +25,7 @@ index 907bc087444..494d6e94569 100644
{
struct security_descriptor new_sd, *new_sd_ptr;
int present;
@@ -548,8 +549,6 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri
@@ -573,8 +574,6 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri
struct acl *replaced_sacl = NULL;
char *ptr;
@ -34,7 +34,7 @@ index 907bc087444..494d6e94569 100644
new_sd.control = sd->control & ~SE_SELF_RELATIVE;
if (set_info & OWNER_SECURITY_INFORMATION && sd->owner_len)
@@ -557,10 +556,10 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri
@@ -582,10 +581,10 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri
owner = sd_get_owner( sd );
new_sd.owner_len = sd->owner_len;
}
@ -48,7 +48,7 @@ index 907bc087444..494d6e94569 100644
}
else if (token)
{
@@ -574,10 +573,10 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri
@@ -599,10 +598,10 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri
group = sd_get_group( sd );
new_sd.group_len = sd->group_len;
}
@ -62,7 +62,7 @@ index 907bc087444..494d6e94569 100644
}
else if (token)
{
@@ -595,20 +594,20 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri
@@ -620,20 +619,20 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri
else if (set_info & LABEL_SECURITY_INFORMATION && present)
{
const struct acl *old_sacl = NULL;
@ -88,7 +88,7 @@ index 907bc087444..494d6e94569 100644
}
else
new_sd.sacl_len = 0;
@@ -622,12 +621,12 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri
@@ -647,12 +646,12 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri
}
else
{
@ -104,7 +104,7 @@ index 907bc087444..494d6e94569 100644
}
else if (token)
{
@@ -643,7 +642,7 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri
@@ -668,7 +667,7 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri
if (!ptr)
{
free( replaced_sacl );
@ -113,8 +113,8 @@ index 907bc087444..494d6e94569 100644
}
new_sd_ptr = (struct security_descriptor*)ptr;
@@ -658,9 +657,25 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri
memcpy( ptr, dacl, new_sd.dacl_len );
@@ -679,9 +678,25 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri
mem_append( ptr, dacl, new_sd.dacl_len );
free( replaced_sacl );
- free( obj->sd );
@ -143,10 +143,10 @@ index 907bc087444..494d6e94569 100644
/** Set the security descriptor using the current primary token for defaults. */
diff --git a/server/object.h b/server/object.h
index c98e45125a0..f4261d0d585 100644
index e38913d430d..e61d29d91ea 100644
--- a/server/object.h
+++ b/server/object.h
@@ -173,6 +173,9 @@ extern struct fd *no_get_fd( struct object *obj );
@@ -175,6 +175,9 @@ extern struct fd *no_get_fd( struct object *obj );
extern unsigned int default_map_access( struct object *obj, unsigned int access );
extern struct security_descriptor *default_get_sd( struct object *obj );
extern int default_set_sd( struct object *obj, const struct security_descriptor *sd, unsigned int set_info );
@ -157,5 +157,5 @@ index c98e45125a0..f4261d0d585 100644
unsigned int set_info, struct token *token );
extern WCHAR *no_get_full_name( struct object *obj, data_size_t *ret_len );
--
2.34.1
2.45.2

View File

@ -1 +1 @@
ee5bd3bab82903b26e360d077c93af4a26158367
0cdc3b092cbe13b8a029e12fda32b5f5ef04641e