mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-09-05 15:41:23 +03:00
drm: stop leaking the authorized _drm fd into forked children
libc::dup() does not copy the close-on-exec flag, so the dup'd _drm socket fd was inherited by every child this process forks. This process is the ROOT service and it does fork synchronously elsewhere (the loginctl active-uid lookup), and that fd is an ALREADY-AUTHORIZED channel to the one thing on the box that hands out scanout dma-bufs. F_DUPFD_CLOEXEC instead. Measured the difference rather than assuming it: dup() leaves FD_CLOEXEC clear, F_DUPFD_CLOEXEC sets it. Also the last two artifact sources without the stub check: - --package + --drm stages the .so straight out of a bundle somebody else produced, with no _assert_so_has_egl. Third source, same exposure as DRMTAP_PREBUILT_DIR, now asserted like the other two. All three artifact paths are covered. - the workflow triggers omitted src/server.rs, src/server/input_service.rs and src/platform/linux.rs, which all carry DRM wiring (warm_availability, the cursor path in run_cursor, the producer start and get_cursor/get_cursor_data), so a PR touching only those skipped the entire drm verification. Added to BOTH mirrored lists and asserted equal (15 == 15).
This commit is contained in:
12
.github/workflows/drm-capture.yml
vendored
12
.github/workflows/drm-capture.yml
vendored
@@ -33,6 +33,12 @@ on:
|
||||
- "src/server/drm_capturer.rs"
|
||||
- "src/server/wayland.rs"
|
||||
- "src/server/display_service.rs"
|
||||
# These three carry DRM wiring too (warm_availability, the cursor path in run_cursor, and the
|
||||
# producer start + get_cursor/get_cursor_data), so a PR touching only them must not skip the
|
||||
# whole drm verification.
|
||||
- "src/server.rs"
|
||||
- "src/server/input_service.rs"
|
||||
- "src/platform/linux.rs"
|
||||
- "build.py"
|
||||
- ".github/workflows/drm-capture.yml"
|
||||
push:
|
||||
@@ -51,6 +57,12 @@ on:
|
||||
- "src/server/drm_capturer.rs"
|
||||
- "src/server/wayland.rs"
|
||||
- "src/server/display_service.rs"
|
||||
# These three carry DRM wiring too (warm_availability, the cursor path in run_cursor, and the
|
||||
# producer start + get_cursor/get_cursor_data), so a PR touching only them must not skip the
|
||||
# whole drm verification.
|
||||
- "src/server.rs"
|
||||
- "src/server/input_service.rs"
|
||||
- "src/platform/linux.rs"
|
||||
- "build.py"
|
||||
- ".github/workflows/drm-capture.yml"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user