Bugzilla – Attachment 190706 Details for
Bug 41458
SIP passes UID instead of GID to Net::Server causing error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41458: Pass a valid GID to Net::Server for SIP
Bug-41458-Pass-a-valid-GID-to-NetServer-for-SIP.patch (text/plain), 1.56 KB, created by
David Nind
on 2025-12-23 22:28:01 UTC
(
hide
)
Description:
Bug 41458: Pass a valid GID to Net::Server for SIP
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-12-23 22:28:01 UTC
Size:
1.56 KB
patch
obsolete
>From cacb7613eb1ad13901efd56e8062c173bf857233 Mon Sep 17 00:00:00 2001 >From: Slava Shishkin <slavashishkin@gmail.com> >Date: Tue, 16 Dec 2025 19:27:38 +0200 >Subject: [PATCH] Bug 41458: Pass a valid GID to Net::Server for SIP > >When starting SIP, Koha passes an incorrect value to the >Net::Server "group" parameter, which can generate an >error in the logs": > Couldn't become gid "<uid>": Operation not permitted > >This change ensures that a valid numeric GID is passed instead. > >Test plan: >1. Enter KTD shell. >2. To reproduce the error: sudo groupmod -g 8001 kohadev-koha >3. Restart SIP: sudo koha-sip --restart kohadev >4. Check SIP logs: > /var/log/koha/kohadev/sip-output.log >5. Observe the error: > Couldn't become gid "<uid>": Operation not permitted >6. Apply this patch. >7. Repeat steps 2 to 4. >8. Verify that the "Couldn't become gid" error is no longer logged. > >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/SIP/SIPServer.pm | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/C4/SIP/SIPServer.pm b/C4/SIP/SIPServer.pm >index cd407fda73..5801db7c03 100644 >--- a/C4/SIP/SIPServer.pm >+++ b/C4/SIP/SIPServer.pm >@@ -87,7 +87,11 @@ if ( defined( $config->{'server-params'} ) ) { > > # Add user and group to prevent warn from Net::Server. > push @params, 'user=' . $>; >-push @params, 'group=' . $>; >+ >+# $) can contain supplementary groups like "1010 1010" -> Net::Server tries setgroups() and fails. >+my ($egid) = split /\s+/, $); >+$egid ||= $(; # fallback to real gid just in case >+push @params, 'group=' . $egid; > > # > # This is the main event. >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41458
:
190555
| 190706