public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Kevin Fenzi <kevin@scrye.com>
To: git-commits@fedoraproject.org
Subject: [rpms/incron] rawhide: Disallow users passing their own config. Fixes rhbz#2568586
Date: Thu, 12 Nov 2026 01:37:28 GMT	[thread overview]
Message-ID: <179444744820.1.3943262951487995951.rpms-incron-0f4d3ebc61fe@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/incron
            Branch : rawhide
            Commit : 0f4d3ebc61fe8841f2114e344293607b0eceedf9
            Author : Kevin Fenzi <kevin@scrye.com>
            Date   : 2026-11-11T09:15:08-08:00
            Stats  : +20/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/incron/c/0f4d3ebc61fe8841f2114e344293607b0eceedf9?branch=rawhide

            Log:
            Disallow users passing their own config. Fixes rhbz#2568586

When users were passing their own config there was a check
that would emit a warning that the config would be ignored and
the default one would be used, but that part never worked
and it just used the user provided config.

This just errors out when a user passes their own config file.

This is a security problem as it would allow local users
to escalate their privs.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>

---
diff --git a/incron-0.5.12-nonroot-config.patch b/incron-0.5.12-nonroot-config.patch
new file mode 100644
index 0000000..72e2ccb
--- /dev/null
+++ b/incron-0.5.12-nonroot-config.patch
@@ -0,0 +1,13 @@
+diff --color -Nur incron-0.5.12.orig/ict-main.cpp incron-0.5.12/ict-main.cpp
+--- incron-0.5.12.orig/ict-main.cpp	2015-02-09 01:03:19.000000000 -0800
++++ incron-0.5.12/ict-main.cpp	2026-11-10 14:25:35.257418702 -0800
+@@ -502,7 +502,8 @@
+     std::string cfg(INCRON_CONFIG);
+     if (AppArgs::GetOption("config", cfg)) {
+       if (uid != 0) {
+-        fprintf(stderr, "insufficient privileges to use custom configuration (will use default)\n");
++        fprintf(stderr, "insufficient privileges to use custom configuration.\n");
++        return 1;
+       }
+       else if (euidaccess(cfg.c_str(), R_OK) != 0) {
+         perror("cannot read configuration file (will use default)");

diff --git a/incron.spec b/incron.spec
index 7cf62b6..a106b97 100644
--- a/incron.spec
+++ b/incron.spec
@@ -1,7 +1,7 @@
 Summary:     Inotify cron system
 Name:        incron
 Version:     0.5.12
-Release:     30%{?dist}
+Release:     31%{?dist}
 
 # Automatically converted from old format: GPLv2 - review is highly recommended.
 License:     GPL-2.0-only
@@ -12,6 +12,8 @@ Patch0:      incron-0.5.10-gcc.patch
 Patch1:      incron-0.5.12-prevent-zombies.patch
 # https://github.com/ar-/incron/pull/56
 Patch2:      56.patch
+# Non root users should not be allowed to pass their own config
+Patch3:      incron-0.5.12-nonroot-config.patch
 
 BuildRequires: systemd
 BuildRequires: gcc-c++
@@ -33,6 +35,7 @@ filesystem events rather than time periods.
 %patch -P0 -p1 -b .gcc
 %patch -P1 -p1
 %patch -P2 -p1
+%patch -P3 -p1
 
 %build
 make %{?_smp_mflags} CXXFLAGS="%{optflags} -std=c++14" LDFLAGS="%{__global_ldflags}"
@@ -73,6 +76,9 @@ make install-man MANPATH="%{buildroot}%{_mandir}" INSTALL="install -D -p"
 %dir %{_sysconfdir}/%{name}.d
 
 %changelog
+* Tue Nov 10 2026 Kevin Fenzi <kevin@scrye.com> - 0.5.12-31
+- Add Patch to stop non root users using their own config. Fixes rhbz#2568586
+
 * Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.12-30
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

                 reply	other threads:[~2026-11-12  1:37 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=179444744820.1.3943262951487995951.rpms-incron-0f4d3ebc61fe@fedoraproject.org \
    --to=kevin@scrye.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