sd-varlink: also validate peer ucred for SD_VARLINK_SERVER_MYSELF_ONLY

This commit is contained in:
Mike Yuan
2026-02-16 09:44:55 +01:00
parent 3482e4dd70
commit 122bde2c45
+1 -1
View File
@@ -3601,7 +3601,7 @@ _public_ int sd_varlink_server_add_connection_pair(
assert_return(input_fd >= 0, -EBADF);
assert_return(output_fd >= 0, -EBADF);
if ((server->flags & (SD_VARLINK_SERVER_ROOT_ONLY|SD_VARLINK_SERVER_ACCOUNT_UID)) != 0) {
if ((server->flags & (SD_VARLINK_SERVER_ROOT_ONLY|SD_VARLINK_SERVER_MYSELF_ONLY|SD_VARLINK_SERVER_ACCOUNT_UID)) != 0) {
if (override_ucred)
ucred = *override_ucred;