Skip to content

Commit 9b5555a

Browse files
committed
style(windows): clang-format the threaded ancestor signatures
CI lint flagged two continuation lines from the previous commit. Formatting collapsed the runtime-directory call onto one line, so the contract pin that asserted ancestor=false there stopped matching; the pin now keys on the formatted text. Both revert directions re-verified: capability-only fails, and relaxing the runtime directory to ancestor=true fails. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent 9a53074 commit 9b5555a

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

‎src/daemon/ipc.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4120,7 +4120,7 @@ static bool win_file_acl_secure(win_security_t *security, HANDLE file, DWORD mut
41204120
size_t sid_capacity = (size_t)header->AceSize - sid_offset;
41214121
bool creator_owner_inherit_only = (header->AceFlags & INHERIT_ONLY_ACE) != 0U;
41224122
if (!win_bounded_sid_trusted(security, sid, sid_capacity, creator_owner_inherit_only,
4123-
ancestor)) {
4123+
ancestor)) {
41244124
/* Name the untrusted identity class so a harness/profile ACL leak
41254125
* (an inherited Users / Authenticated Users / Everyone ACE) is
41264126
* distinguishable from a genuinely hostile grant. */
@@ -4219,8 +4219,7 @@ static bool win_runtime_directory_secure(const wchar_t *runtime_dir) {
42194219
}
42204220
bool final_private =
42214221
secure_result == ERROR_SUCCESS &&
4222-
win_file_security_secure(&security, directory, true, win_private_mutation_rights(),
4223-
false);
4222+
win_file_security_secure(&security, directory, true, win_private_mutation_rights(), false);
42244223
(void)CloseHandle(directory);
42254224
win_security_destroy(&security);
42264225
return valid_handle && owner_ok && final_private;

‎tests/test_windows_bundle_contract.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ require(
446446
# APP_PACKAGE identifier authority
447447
"sid[7] != 15U",
448448
# the private runtime directory is validated with ancestor=false
449-
"win_private_mutation_rights(),\n false)",
449+
"win_private_mutation_rights(), false)",
450450
)
451451
),
452452
"AppContainer SIDs must be tolerated on ancestors ONLY, covering both package "

0 commit comments

Comments
 (0)