mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
Pure cosmetics, trying to get my group policy diff smaller.
Gunther
(This used to be commit d7346e9360
)
This commit is contained in:
parent
6346ab79a6
commit
f12770079b
@ -44,15 +44,18 @@ NTSTATUS gpo_explode_filesyspath(TALLOC_CTX *mem_ctx,
|
|||||||
if (!next_token_talloc(mem_ctx, &file_sys_path, server, "\\")) {
|
if (!next_token_talloc(mem_ctx, &file_sys_path, server, "\\")) {
|
||||||
return NT_STATUS_INVALID_PARAMETER;
|
return NT_STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
NT_STATUS_HAVE_NO_MEMORY(*server);
|
||||||
|
|
||||||
if (!next_token_talloc(mem_ctx, &file_sys_path, service, "\\")) {
|
if (!next_token_talloc(mem_ctx, &file_sys_path, service, "\\")) {
|
||||||
return NT_STATUS_INVALID_PARAMETER;
|
return NT_STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
NT_STATUS_HAVE_NO_MEMORY(*service);
|
||||||
|
|
||||||
if ((*nt_path = talloc_asprintf(mem_ctx, "\\%s", file_sys_path))
|
if ((*nt_path = talloc_asprintf(mem_ctx, "\\%s", file_sys_path))
|
||||||
== NULL) {
|
== NULL) {
|
||||||
return NT_STATUS_NO_MEMORY;
|
return NT_STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
NT_STATUS_HAVE_NO_MEMORY(*nt_path);
|
||||||
|
|
||||||
if ((path = talloc_asprintf(mem_ctx,
|
if ((path = talloc_asprintf(mem_ctx,
|
||||||
"%s/%s",
|
"%s/%s",
|
||||||
@ -65,9 +68,8 @@ NTSTATUS gpo_explode_filesyspath(TALLOC_CTX *mem_ctx,
|
|||||||
return NT_STATUS_NO_MEMORY;
|
return NT_STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((*unix_path = talloc_strdup(mem_ctx, path)) == NULL) {
|
*unix_path = talloc_strdup(mem_ctx, path);
|
||||||
return NT_STATUS_NO_MEMORY;
|
NT_STATUS_HAVE_NO_MEMORY(*unix_path);
|
||||||
}
|
|
||||||
|
|
||||||
TALLOC_FREE(path);
|
TALLOC_FREE(path);
|
||||||
return NT_STATUS_OK;
|
return NT_STATUS_OK;
|
||||||
@ -124,36 +126,23 @@ NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx,
|
|||||||
result = gpo_explode_filesyspath(mem_ctx, gpo->file_sys_path,
|
result = gpo_explode_filesyspath(mem_ctx, gpo->file_sys_path,
|
||||||
&server, &service, &nt_path,
|
&server, &service, &nt_path,
|
||||||
&unix_path);
|
&unix_path);
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
NT_STATUS_NOT_OK_RETURN(result);
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
result = gpo_prepare_local_store(mem_ctx, unix_path);
|
result = gpo_prepare_local_store(mem_ctx, unix_path);
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
NT_STATUS_NOT_OK_RETURN(result);
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
unix_ini_path = talloc_asprintf(mem_ctx, "%s/%s", unix_path, GPT_INI);
|
unix_ini_path = talloc_asprintf(mem_ctx, "%s/%s", unix_path, GPT_INI);
|
||||||
nt_ini_path = talloc_asprintf(mem_ctx, "%s\\%s", nt_path, GPT_INI);
|
nt_ini_path = talloc_asprintf(mem_ctx, "%s\\%s", nt_path, GPT_INI);
|
||||||
if (!unix_path || !nt_ini_path) {
|
NT_STATUS_HAVE_NO_MEMORY(unix_ini_path);
|
||||||
result = NT_STATUS_NO_MEMORY;
|
NT_STATUS_HAVE_NO_MEMORY(nt_ini_path);
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
result = gpo_copy_file(mem_ctx, cli, nt_ini_path, unix_ini_path);
|
result = gpo_copy_file(mem_ctx, cli, nt_ini_path, unix_ini_path);
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
NT_STATUS_NOT_OK_RETURN(result);
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
result = gpo_sync_directories(mem_ctx, cli, nt_path, unix_path);
|
result = gpo_sync_directories(mem_ctx, cli, nt_path, unix_path);
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
NT_STATUS_NOT_OK_RETURN(result);
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
result = NT_STATUS_OK;
|
return NT_STATUS_OK;
|
||||||
|
|
||||||
out:
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************
|
/****************************************************************
|
||||||
|
@ -117,10 +117,10 @@ static bool gpo_sync_files(struct sync_context *ctx)
|
|||||||
ctx) == -1) {
|
ctx) == -1) {
|
||||||
DEBUG(1,("listing [%s] failed with error: %s\n",
|
DEBUG(1,("listing [%s] failed with error: %s\n",
|
||||||
ctx->mask, cli_errstr(ctx->cli)));
|
ctx->mask, cli_errstr(ctx->cli)));
|
||||||
return False;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return True;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************
|
/****************************************************************
|
||||||
|
@ -27,7 +27,7 @@ bool ads_parse_gp_ext(TALLOC_CTX *mem_ctx,
|
|||||||
const char *extension_raw,
|
const char *extension_raw,
|
||||||
struct GP_EXT **gp_ext)
|
struct GP_EXT **gp_ext)
|
||||||
{
|
{
|
||||||
bool ret = False;
|
bool ret = false;
|
||||||
struct GP_EXT *ext = NULL;
|
struct GP_EXT *ext = NULL;
|
||||||
char **ext_list = NULL;
|
char **ext_list = NULL;
|
||||||
char **ext_strings = NULL;
|
char **ext_strings = NULL;
|
||||||
@ -134,7 +134,7 @@ bool ads_parse_gp_ext(TALLOC_CTX *mem_ctx,
|
|||||||
|
|
||||||
*gp_ext = ext;
|
*gp_ext = ext;
|
||||||
|
|
||||||
ret = True;
|
ret = true;
|
||||||
|
|
||||||
parse_error:
|
parse_error:
|
||||||
TALLOC_FREE(ext_list);
|
TALLOC_FREE(ext_list);
|
||||||
@ -659,7 +659,7 @@ ADS_STATUS ads_get_sid_token(ADS_STRUCT *ads,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
new_token = create_local_nt_token(mem_ctx, &object_sid, False,
|
new_token = create_local_nt_token(mem_ctx, &object_sid, false,
|
||||||
num_token_sids, token_sids);
|
num_token_sids, token_sids);
|
||||||
ADS_ERROR_HAVE_NO_MEMORY(new_token);
|
ADS_ERROR_HAVE_NO_MEMORY(new_token);
|
||||||
|
|
||||||
@ -713,7 +713,7 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
|
|||||||
ADS_STATUS status;
|
ADS_STATUS status;
|
||||||
struct GP_LINK gp_link;
|
struct GP_LINK gp_link;
|
||||||
const char *parent_dn, *site_dn, *tmp_dn;
|
const char *parent_dn, *site_dn, *tmp_dn;
|
||||||
bool add_only_forced_gpos = False;
|
bool add_only_forced_gpos = false;
|
||||||
|
|
||||||
ZERO_STRUCTP(gpo_list);
|
ZERO_STRUCTP(gpo_list);
|
||||||
|
|
||||||
@ -793,7 +793,7 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
|
|||||||
/* block inheritance from now on */
|
/* block inheritance from now on */
|
||||||
if (gp_link.gp_opts &
|
if (gp_link.gp_opts &
|
||||||
GPOPTIONS_BLOCK_INHERITANCE) {
|
GPOPTIONS_BLOCK_INHERITANCE) {
|
||||||
add_only_forced_gpos = True;
|
add_only_forced_gpos = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = add_gplink_to_gpo_list(ads,
|
status = add_gplink_to_gpo_list(ads,
|
||||||
@ -839,7 +839,7 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
|
|||||||
/* block inheritance from now on */
|
/* block inheritance from now on */
|
||||||
if (gp_link.gp_opts &
|
if (gp_link.gp_opts &
|
||||||
GPOPTIONS_BLOCK_INHERITANCE) {
|
GPOPTIONS_BLOCK_INHERITANCE) {
|
||||||
add_only_forced_gpos = True;
|
add_only_forced_gpos = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = add_gplink_to_gpo_list(ads,
|
status = add_gplink_to_gpo_list(ads,
|
||||||
|
@ -28,13 +28,13 @@ static bool gpo_sd_check_agp_object_guid(const struct security_ace_object *objec
|
|||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
|
|
||||||
if (!object) {
|
if (!object) {
|
||||||
return False;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = GUID_from_string(ADS_EXTENDED_RIGHT_APPLY_GROUP_POLICY,
|
status = GUID_from_string(ADS_EXTENDED_RIGHT_APPLY_GROUP_POLICY,
|
||||||
&ext_right_apg_guid);
|
&ext_right_apg_guid);
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
return False;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (object->flags) {
|
switch (object->flags) {
|
||||||
@ -52,7 +52,7 @@ static bool gpo_sd_check_agp_object_guid(const struct security_ace_object *objec
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return False;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************
|
/****************************************************************
|
||||||
@ -61,7 +61,7 @@ static bool gpo_sd_check_agp_object_guid(const struct security_ace_object *objec
|
|||||||
static bool gpo_sd_check_agp_object(const SEC_ACE *ace)
|
static bool gpo_sd_check_agp_object(const SEC_ACE *ace)
|
||||||
{
|
{
|
||||||
if (!sec_ace_object(ace->type)) {
|
if (!sec_ace_object(ace->type)) {
|
||||||
return False;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return gpo_sd_check_agp_object_guid(&ace->object.object);
|
return gpo_sd_check_agp_object_guid(&ace->object.object);
|
||||||
|
Loading…
Reference in New Issue
Block a user