Skip to content

privsep: Test defines for all ioctls#627

Merged
rsmarples merged 1 commit into
masterfrom
ps_ioctl
Jun 7, 2026
Merged

privsep: Test defines for all ioctls#627
rsmarples merged 1 commit into
masterfrom
ps_ioctl

Conversation

@rsmarples

Copy link
Copy Markdown
Member

No description provided.

@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3b72a15c-d996-482b-960b-2ad8cb0c619f

📥 Commits

Reviewing files that changed from the base of the PR and between 840f56d and 7c87862.

📒 Files selected for processing (1)
  • src/privsep-root.c

Walkthrough

This PR adjusts platform-specific conditional compilation in the ioctl allowlist within the privilege separation root handler. The SIOCSIFADDR and SIOCAIFADDR case labels are now guarded by their respective #ifdef directives while remaining fallthrough entries to the shared SIOCDIFADDR handler.

Changes

Conditional ioctl allowlist compilation

Layer / File(s) Summary
Conditional compilation of address ioctls
src/privsep-root.c
The SIOCSIFADDR and SIOCAIFADDR case labels in ps_root_doioctl are conditionally compiled with their respective #ifdef guards while preserving fallthrough behavior to the shared SIOCDIFADDR case.

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive No description was provided by the author, making it impossible to evaluate relevance to the changeset. Add a pull request description explaining the purpose and rationale for conditionally compiling the ioctl allowlist cases.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'privsep: Test defines for all ioctls' clearly describes the main change: adding ifdef guards to test whether ioctl symbols are defined in the privsep code.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ps_ioctl

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Infer (1.2.0)
src/privsep-root.c

In file included from src/privsep-root.c:50:
In file included from src/dhcp6.h:32:
src/dhcpcd.h:38:10: fatal error: 'config.h' file not found
38 | #include "config.h"
| ^~~~~~~~~~
1 error generated.
Error: the following clang command did not run successfully:
/opt/infer-linux-x86_64-v1.2.0/lib/infer/facebook-clang-plugins/clang/install/bin/clang-18
@/tmp/coderabbit-infer/7c87862266ccd2c9624c5837760ecb46eba5970f-bd31ebf9f6198ac9/tmp/clang_command_.tmp.b87850.txt
++Contents of '/tmp/coderabbit-infer/7c87862266ccd2c9624c5837760ecb46eba5970f-bd31ebf9f6198ac9/tmp/clang_command_.tmp.b87850.txt':
"-cc1" "-load"
"/opt/infer-linux-x86_64-v1.2.0/lib/infer/infer/bin/../../facebook-clang-plugins/libtooling/build/FacebookClangPlugin.dylib"
"-add-plugin" "BiniouASTExporter" "-plugin-arg-BiniouASTExporter" "-"
"-plugin-arg-BiniouASTExporter" "PREPEND_CURRENT_DIR=1"
"-plugin-arg-BiniouASTExporter" "MAX_STRING_SIZE=65535" "-cc1" "-triple"
"x86_64-unkn

... [truncated 757 characters] ...

/opt/infer-linux-x86_64-v1.2.0/lib/infer/facebook-clang-plugins/clang/install/lib/clang/18/include"
"-internal-isystem" "/usr/local/include" "-internal-isystem"
"/usr/lib/gcc/x86_64-linux-gnu/12/../../../../x86_64-linux-gnu/include"
"-internal-externc-isystem" "/usr/include/x86_64-linux-gnu"
"-internal-externc-isystem" "/include" "-internal-externc-isystem"
"/usr/include" "-Wno-ignored-optimization-argument" "-Wno-everything"
"-ferror-limit" "19" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf"
"-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o"
"/tmp/coderabbit-infer/bd31ebf9f6198ac9/file.o" "-x" "c"
"src/privsep-root.c" "-O0" "-fno-builtin" "-include"
"/opt/infer-linux-x86_64-v1.2.0/lib/infer/infer/bin/../lib/clang_wrappers/global_defines.h"
"-Wno-everything"


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rsmarples rsmarples merged commit 9066456 into master Jun 7, 2026
6 checks passed
@rsmarples rsmarples deleted the ps_ioctl branch June 7, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant