Skip to content

get_client_cred: Pass correct option level value on FreeBSD#8471

Merged
ikerexxe merged 2 commits into
SSSD:masterfrom
arrowd:getsockopt-freebsd-fix
Feb 27, 2026
Merged

get_client_cred: Pass correct option level value on FreeBSD#8471
ikerexxe merged 2 commits into
SSSD:masterfrom
arrowd:getsockopt-freebsd-fix

Conversation

@arrowd

@arrowd arrowd commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request correctly introduces a platform-independent way to specify the socket option level for retrieving peer credentials, which is necessary for supporting FreeBSD and macOS. However, the use of SOL_LOCAL for FreeBSD is problematic as it is not a standard macro on that platform and will likely cause compilation errors. The documentation referenced in the code itself suggests using 0 as the level for FreeBSD.

Comment thread src/shared/cred.h
Comment thread src/responder/common/responder_common.c Outdated
@arrowd
arrowd force-pushed the getsockopt-freebsd-fix branch from dbe335a to f3e322c Compare February 23, 2026 09:08
Comment thread src/shared/cred.h
@alexey-tikhonov alexey-tikhonov self-assigned this Feb 23, 2026
@alexey-tikhonov alexey-tikhonov added the no-backport This should go to target branch only. label Feb 23, 2026
@alexey-tikhonov

Copy link
Copy Markdown
Member

Please rebase this and other open PRs (#8469 was merged)

@arrowd
arrowd force-pushed the getsockopt-freebsd-fix branch 2 times, most recently from 26b8813 to 632049a Compare February 23, 2026 16:06
@alexey-tikhonov

Copy link
Copy Markdown
Member

Could you please rebase again? #8449 was merged.

@arrowd
arrowd force-pushed the getsockopt-freebsd-fix branch from 632049a to 57be285 Compare February 24, 2026 18:24
@alexey-tikhonov
alexey-tikhonov self-requested a review February 25, 2026 08:19
@alexey-tikhonov

Copy link
Copy Markdown
Member

Looks like

ret = getsockopt(sockfd, SOL_SOCKET, SSS_PEERCRED_SOCKET_OPTION, &server_cred,
also needs update.

@alexey-tikhonov

Copy link
Copy Markdown
Member

ACK

@alexey-tikhonov alexey-tikhonov added coverity Trigger a coverity scan and removed coverity Trigger a coverity scan labels Feb 25, 2026
@alexey-tikhonov

Copy link
Copy Markdown
Member

Note: Covscan is green.

@ikerexxe ikerexxe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

…ress() and get_client_cred()

Reviewed-by: Alexey Tikhonov <[email protected]>
Reviewed-by: Iker Pedrosa <[email protected]>
Reviewed-by: Alexey Tikhonov <[email protected]>
Reviewed-by: Iker Pedrosa <[email protected]>
@sssd-bot

Copy link
Copy Markdown
Contributor

The pull request was accepted by @ikerexxe with the following PR CI status:


🟢 CodeQL (success)
🟢 osh-diff-scan:fedora-rawhide-x86_64:upstream (success)
🟢 rpm-build:centos-stream-10-x86_64:upstream (success)
🟢 rpm-build:fedora-42-x86_64:upstream (success)
🟢 rpm-build:fedora-43-x86_64:upstream (success)
🟢 rpm-build:fedora-44-x86_64:upstream (success)
🟢 rpm-build:fedora-rawhide-x86_64:upstream (success)
🟢 Analyze (target) / cppcheck (success)
🟢 Build / freebsd (success)
🟢 Build / make-distcheck (success)
🟢 ci / intgcheck (centos-10) (success)
🟢 ci / intgcheck (fedora-42) (success)
🟢 ci / intgcheck (fedora-43) (success)
🟢 ci / intgcheck (fedora-44) (success)
🟢 ci / intgcheck (fedora-45) (success)
🟢 ci / prepare (success)
🟢 ci / system (centos-10) (success)
🟢 ci / system (fedora-42) (success)
🟢 ci / system (fedora-43) (success)
🟢 ci / system (fedora-44) (success)
🟢 ci / system (fedora-45) (success)
➖ Coverity scan / coverity (skipped)
🟢 Static code analysis / codeql (success)
🟢 Static code analysis / pre-commit (success)
🟢 Static code analysis / python-system-tests (success)


There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging.

@sssd-bot
sssd-bot force-pushed the getsockopt-freebsd-fix branch from e29efaa to 8a0fade Compare February 27, 2026 08:11
@ikerexxe
ikerexxe merged commit 64ee91f into SSSD:master Feb 27, 2026
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accepted no-backport This should go to target branch only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants