Bug 2095461
| Summary: | [RFE] sane-backends use systems-sysusers | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Pat Riehecky <riehecky> | |
| Component: | sane-backends | Assignee: | Zdenek Dohnal <zdohnal> | |
| Status: | CLOSED ERRATA | QA Contact: | Petr Dancak <pdancak> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | CentOS Stream | CC: | bstinson, jorton, jwboyer, pdancak, psklenar | |
| Target Milestone: | rc | Keywords: | FutureFeature, Triaged | |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
|
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | sane-backends-1.0.32-7.el9 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2106390 (view as bug list) | Environment: | ||
| Last Closed: | 2022-11-15 10:43:31 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Deadline: | 2022-08-29 | |||
Hi Pat, thank you for reporting the feature request and the intent to contribute to CentOS Stream! The feature looks fine from my POV - it migrates saned user, which is used by sane-backends-daemon, from being generated via useradd and groupadd commands to being handled completely by systemd-usersys service. saned in CentOS Stream will be created by using a uniform syntax and admins can check which package (sane-backends-daemon in this case) requires saned user and can even override it. The ticket will be now reviewed by QE and once there is a decision, we will set the appropriate flags in bugzilla. Proposal how to test: --------------------- 1) check if saned exists in /etc/group and /etc/passwd 2) check if saned exists in output of 'systemd-analyze cat-config sysusers.d/' 3) check whether scanning via saned works - use USB scanner from our minilab and connect it to device/VM with RHEL/CentOS Stream 9 - install sane-backends-daemon - set /etc/sane/saned.conf with client's IP (localhost) and other stuff according 'man saned' - enable sane in firewall - 'sudo firewall-cmd --add-service=sane' - start saned.socket - set /etc/sane.d/net.conf according the comments (set connection timeout and put 'localhost' into saned host part) in it - 'scanimage -L' must contain an entry starting with 'net:localhost' - use this entry for scanning and an output file must be generated - 'scanimage -d <device_uri from the found entry> > out.pnm' ======================================================== Petr, Joe, would you mind reviewing the RFE proposal as well? (In reply to Zdenek Dohnal from comment #2) > The feature looks fine from my POV - it migrates saned user, which is used > by sane-backends-daemon, from being generated via useradd and groupadd > commands to being handled completely by systemd-usersys service. saned in > CentOS Stream will be created by using a uniform syntax and admins can check > which package (sane-backends-daemon in this case) requires saned user and > can even override it. Additional notes: - the change is about a different source of creation of saned group, which doesn't have a breaking impact on customers - once tested that group and user is created, the change does not break anything else Hi Pat, the bug has passed the engineering review, so the merge request can be created referencing this bug. Please post a link to the merge request here once you have it ready. Thank you in advance! Note for QE: systemd-sysusers does not remove the created user/group from /etc/group and /etc/passwd once the package which dynamically allocs the user/group is removed. It is designed like this to protect files with user:group set to the dynamically allocated user/group from losing its user:group. (In reply to Zdenek Dohnal from comment #2) > - set /etc/sane/saned.conf with client's IP (localhost) and other stuff > according 'man saned' The path is /etc/sane.d/saned.conf. The PR is fine now, I'm setting the flags for getting the PR into CentOS Stream. Committed as https://gitlab.com/redhat/centos-stream/rpms/sane-backends/-/commit/2af54a34f2ad10ab51a90f99975550a36fc08812?merge_request_iid=4 . Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (sane-backends bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:8249 |
Description of problem: sane-backends has static useradd scripts Version-Release number of selected component (if applicable): sane-backends-1.0.32-6.el9 How reproducible: 100% Steps to Reproduce: 1.review %pre 2. 3. Actual results: %pre daemon getent group saned >/dev/null || groupadd -r saned getent passwd saned >/dev/null || \ useradd -r -g saned -d %{_datadir}/sane -s /sbin/nologin \ -c "SANE scanner daemon user" saned exit 0 Expected results: use of system-sysusers Additional info: https://www.freedesktop.org/software/systemd/man/systemd-sysusers.html https://fedoraproject.org/wiki/Changes/Adopting_sysusers.d_format