mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
libcli/security: conditional ace err messages don't hardcode offset
Usually the conditions are embedded in part of some SDDL, and the offset from the beginning of the condtions is a bit useless and confusing. Callers of sddl_decode_err_msg get the offset from the beginning of the SDDL which is a different and more useful number. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
c31d41d721
commit
ffa08426e0
@ -1268,7 +1268,6 @@ static void comp_error(struct ace_condition_sddl_compiler_context *comp,
|
||||
if (msg == NULL) {
|
||||
goto fail;
|
||||
}
|
||||
comp->message_offset = comp->offset;
|
||||
|
||||
if (comp->message == NULL) {
|
||||
/*
|
||||
@ -1276,13 +1275,8 @@ static void comp_error(struct ace_condition_sddl_compiler_context *comp,
|
||||
*
|
||||
* This is the common case.
|
||||
*/
|
||||
comp->message = talloc_asprintf(comp->mem_ctx,
|
||||
"%"PRIu32": %s",
|
||||
comp->offset, msg);
|
||||
TALLOC_FREE(msg);
|
||||
if (comp->message == NULL) {
|
||||
goto fail;
|
||||
}
|
||||
comp->message_offset = comp->offset;
|
||||
comp->message = msg;
|
||||
return;
|
||||
}
|
||||
/*
|
||||
@ -1290,8 +1284,8 @@ static void comp_error(struct ace_condition_sddl_compiler_context *comp,
|
||||
* This is unlikely to happen.
|
||||
*/
|
||||
comp->message = talloc_asprintf(comp->mem_ctx,
|
||||
"%s AND THEN %"PRIu32": %s",
|
||||
comp->message, comp->offset,
|
||||
"%s AND THEN %s",
|
||||
comp->message,
|
||||
msg);
|
||||
TALLOC_FREE(msg);
|
||||
if (comp->message == NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user