public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michal Schmidt <mschmidt@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/icecream] epel10.2: set cap bounding set properly and check for capng errors
Date: Thu, 30 Jul 2026 16:31:17 GMT	[thread overview]
Message-ID: <178542907740.1.2488631210469669701.rpms-icecream-97af90e7a51f@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/icecream
Branch : epel10.2
Commit : 97af90e7a51f0f14e3a02ef7482a09494c30bfc9
Author : Michal Schmidt <mschmidt@redhat.com>
Date   : 2013-08-30T22:49:15+02:00
Stats  : +36/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/icecream/c/97af90e7a51f0f14e3a02ef7482a09494c30bfc9?branch=epel10.2

Log:
set cap bounding set properly and check for capng errors

---
diff --git a/0008-daemon-set-capability-bounding-set.patch b/0008-daemon-set-capability-bounding-set.patch
new file mode 100644
index 0000000..1472723
--- /dev/null
+++ b/0008-daemon-set-capability-bounding-set.patch
@@ -0,0 +1,34 @@
+From 69e7fd2d9db8bf17d357c12a36b7a31f9db42d8d Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt@redhat.com>
+Date: Fri, 30 Aug 2013 21:25:47 +0200
+Subject: [PATCH 8/8] daemon: set capability bounding set
+
+---
+ daemon/main.cpp | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/daemon/main.cpp b/daemon/main.cpp
+index 387d4e2..11d1d2c 100644
+--- a/daemon/main.cpp
++++ b/daemon/main.cpp
+@@ -1802,10 +1802,15 @@ int main( int argc, char ** argv )
+         }
+ 
+ #ifdef HAVE_LIBCAP_NG
++        int r;
+         capng_clear(CAPNG_SELECT_BOTH);
+         capng_update(CAPNG_ADD, (capng_type_t)(CAPNG_EFFECTIVE|CAPNG_PERMITTED), CAP_SYS_CHROOT);
+-        capng_change_id(d.user_uid, d.user_gid, CAPNG_NO_FLAG);
+-        capng_apply(CAPNG_SELECT_BOTH);
++        r = capng_change_id(d.user_uid, d.user_gid,
++                            (capng_flags_t)(CAPNG_DROP_SUPP_GRP|CAPNG_CLEAR_BOUNDING));
++        if (r) {
++            log_error() << "Error: capng_change_id failed: " << r << endl;
++            exit(EXIT_SETUID_FAILED);
++        }
+ #endif
+     } else {
+         d.noremote = true;
+-- 
+1.8.3.1
+

diff --git a/icecream.spec b/icecream.spec
index 81b75f3..c8f1949 100644
--- a/icecream.spec
+++ b/icecream.spec
@@ -29,6 +29,7 @@ Patch0004:	0004-Mac-brew-has-docbook2man-instead-of-docbook-to-man.patch
 Patch0005:	0005-Revert-chmod-chown-envs-dir-when-preparing-this.patch
 Patch0006:	0006-icecc-create-env-avoid-tar-looking-at-etc-passwd.patch
 Patch0007:	0007-daemon-main-do-not-create-run-icecc-by-ourselves.patch
+Patch0008:	0008-daemon-set-capability-bounding-set.patch
 
 Patch10000:	%{name}-cleanup-conffile.patch
 
@@ -84,6 +85,7 @@ This package contains development files for %{name}.
 %patch0005 -p1
 %patch0006 -p1
 %patch0007 -p1
+%patch0008 -p1
 %patch10000 -p0
 sed -e 's|@LIBDIR@|%{_libdir}|g;s|@LIBEXECDIR@|%{_libexecdir}|g' %{SOURCE1} > icecream.sh
 sed -e 's|@LIBDIR@|%{_libdir}|g;s|@LIBEXECDIR@|%{_libexecdir}|g' %{SOURCE2} > icecream.csh

                 reply	other threads:[~2026-07-30 16:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178542907740.1.2488631210469669701.rpms-icecream-97af90e7a51f@fedoraproject.org \
    --to=mschmidt@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox