Bugzilla – Attachment 190555 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 This change ensures that a valid numeric GID is passed instead.
Bug-41458-Pass-a-valid-GID-to-NetServer-This-chang.patch (text/plain), 1.26 KB, created by
Slava Shishkin
on 2025-12-16 17:28:37 UTC
(
hide
)
Description:
Bug 41458: Pass a valid GID to Net::Server This change ensures that a valid numeric GID is passed instead.
Filename:
MIME Type:
Creator:
Slava Shishkin
Created:
2025-12-16 17:28:37 UTC
Size:
1.26 KB
patch
obsolete
>From 050cb9f9fbfb100e330b9731a6ae0199398a64d6 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 This change > ensures that a valid numeric GID is passed instead. > >KTD Test Plan: >1) Enter KTD shell. >2) Restart SIP: > sudo koha-sip --restart kohadev >3) Check SIP logs: > /var/log/koha/kohadev/sip-output.log >4) Observe the error: > Couldn't become gid "<uid>": Operation not permitted >5) Apply this patch. >6) Repeat step 2. >7) Verify that the "Couldn't become gid" error is no longer logged. >--- > 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 cd407fda738..5801db7c034 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.52.0
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