Bug 284089 - security/sssd2: Fix a typo in a patch
Summary: security/sssd2: Fix a typo in a patch
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: John Hixson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-15 20:08 UTC by Mark Johnston
Modified: 2025-02-04 18:01 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (jhixson)


Attachments
proposed patch (1.05 KB, patch)
2025-01-15 20:08 UTC, Mark Johnston
no flags Details | Diff
proposed patch (1.27 KB, patch)
2025-01-20 15:55 UTC, Mark Johnston
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Johnston freebsd_committer freebsd_triage 2025-01-15 20:08:44 UTC
Created attachment 256723 [details]
proposed patch

There is a typo in the patch added in commit ee81c8e455ef.  This patch fixes it.
Comment 1 Gleb Popov freebsd_committer freebsd_triage 2025-01-16 04:18:56 UTC
LGTM
Comment 2 Mark Johnston freebsd_committer freebsd_triage 2025-01-20 15:55:24 UTC
Created attachment 256844 [details]
proposed patch

Updated patch fixes another possible bug: before, if the caller asked us to populate a table, we would return ENOENT if no entries were added, but this is contrary to the previous behaviour.
Comment 3 Mark Johnston freebsd_committer freebsd_triage 2025-02-03 15:37:58 UTC
John, if you have a bit of time, could you please approve the patch?  I'm happy to push it to the ports repo myself if that's easier for you.
Comment 4 Gleb Popov freebsd_committer freebsd_triage 2025-02-03 16:17:30 UTC
You can push with

Approved by: jhixson (maintainer timeout)
Comment 5 commit-hook freebsd_committer freebsd_triage 2025-02-04 18:00:49 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7b3028c92e9d74b96c801355ad68b16d9aa22a62

commit 7b3028c92e9d74b96c801355ad68b16d9aa22a62
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-01-15 19:59:24 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-02-04 17:59:22 +0000

    security/sssd2: Fix two bugs in the find_uid patch

    The UID check was added in commit 9a40ff81f4ea ("security/sssd2:
    Reimplement UID-finding using sysctl") and is supposed to exclude kernel
    processes, retaining the behaviour of commit ee81c8e455ef
    ("security/sssd2: Add patch to enumerate UIDs").

    However, it mistakenly skipped over processes with UID 0, which could
    cause the lookup to fail.  Fix the typo.

    Also return success if the caller asked us to populate a table and no
    entries were added.  This matches the previous behaviour.

    PR:             284089
    Approved by:    jhixson (maintainer timeout)
    Reviewed by:    arrowd
    Sponsored by:   Klara, Inc.

 security/sssd2/Makefile                          | 1 +
 security/sssd2/files/patch-src__util__find_uid.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)