From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0498F1382C5 for ; Sun, 25 Apr 2021 01:01:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4E09AE0826; Sun, 25 Apr 2021 01:01:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 229D9E0826 for ; Sun, 25 Apr 2021 01:01:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 41E833412E6 for ; Sun, 25 Apr 2021 01:01:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 675E7702 for ; Sun, 25 Apr 2021 01:01:38 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1619312490.388a0ec1751688351781ddfd6175bc4e902356d1.whissi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/incron/files/, sys-process/incron/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-process/incron/files/incron-0.5.12-issue25.patch sys-process/incron/incron-0.5.12_p20191114-r1.ebuild sys-process/incron/incron-0.5.12_p20191114.ebuild X-VCS-Directories: sys-process/incron/files/ sys-process/incron/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 388a0ec1751688351781ddfd6175bc4e902356d1 X-VCS-Branch: master Date: Sun, 25 Apr 2021 01:01:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 67bf1d8d-8c1b-42f8-9075-4a3ae0e854de X-Archives-Hash: 7dd390e9224ead782d8c9f7396012bee commit: 388a0ec1751688351781ddfd6175bc4e902356d1 Author: Thomas Deutschmann gentoo org> AuthorDate: Sun Apr 25 01:00:45 2021 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sun Apr 25 01:01:30 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=388a0ec1 sys-process/incron: Fix crash when accessing path of.. ...created/moved dir in watched directory. Closes: https://bugs.gentoo.org/785448 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Thomas Deutschmann gentoo.org> .../incron/files/incron-0.5.12-issue25.patch | 40 ++++++++++++++++++++++ ...14.ebuild => incron-0.5.12_p20191114-r1.ebuild} | 7 ++-- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/sys-process/incron/files/incron-0.5.12-issue25.patch b/sys-process/incron/files/incron-0.5.12-issue25.patch new file mode 100644 index 00000000000..8883aec180a --- /dev/null +++ b/sys-process/incron/files/incron-0.5.12-issue25.patch @@ -0,0 +1,40 @@ +https://bugs.gentoo.org/785448 + +Origin: https://github.com/ar-/incron/issues/25#issuecomment-583796322 + +--- old/usertable.cpp ++++ new/usertable.cpp +@@ -370,20 +370,21 @@ void UserTable::OnEvent(InotifyEvent& rEvt) + { + InotifyWatch* pW = rEvt.GetWatch(); + IncronTabEntry* pE = FindEntry(pW); ++ std::string pW_path = pW->GetPath(); + + // no entry found - this shouldn't occur + if (pE == NULL) + return; + + // discard event if user has no access rights to watch path +- if (!(m_fSysTable || MayAccess(pW->GetPath(), DONT_FOLLOW(rEvt.GetMask())))) ++ if (!(m_fSysTable || MayAccess(pW_path, DONT_FOLLOW(rEvt.GetMask())))) + return; + + //#if 0 + // log output for each dir + file + event + std::string events; + rEvt.DumpTypes(events); +- syslog(LOG_INFO, "PATH (%s) FILE (%s) EVENT (%s)", pW->GetPath().c_str() , IncronTabEntry::GetSafePath(rEvt.GetName()).c_str() , events.c_str()); ++ syslog(LOG_INFO, "PATH (%s) FILE (%s) EVENT (%s)", pW_path.c_str() , IncronTabEntry::GetSafePath(rEvt.GetName()).c_str() , events.c_str()); + //#endif + + // add new watch for newly created subdirs +@@ -422,7 +423,7 @@ void UserTable::OnEvent(InotifyEvent& rEvt) + else { + cmd.append(cs.substr(oldpos, pos-oldpos)); + if (cs[px] == '@') { // base path +- cmd.append(IncronTabEntry::GetSafePath(pW->GetPath())); ++ cmd.append(IncronTabEntry::GetSafePath(pW_path)); + oldpos = pos + 2; + } + else if (cs[px] == '#') { // file name + diff --git a/sys-process/incron/incron-0.5.12_p20191114.ebuild b/sys-process/incron/incron-0.5.12_p20191114-r1.ebuild similarity index 88% rename from sys-process/incron/incron-0.5.12_p20191114.ebuild rename to sys-process/incron/incron-0.5.12_p20191114-r1.ebuild index 28928d33fc2..7e7ab9ba0fb 100644 --- a/sys-process/incron/incron-0.5.12_p20191114.ebuild +++ b/sys-process/incron/incron-0.5.12_p20191114-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" @@ -20,7 +20,10 @@ IUSE="" DEPEND="" RDEPEND="" -PATCHES=( "${FILESDIR}"/${PN}-0.5.12-use-execl-instead-system.patch ) +PATCHES=( + "${FILESDIR}"/${PN}-0.5.12-use-execl-instead-system.patch + "${FILESDIR}"/${PN}-0.5.12-issue25.patch +) # < 2.6.18 => INOTIFY, >= 2.6.18 => INOTIFY_USER # It should be ok to expect at least 2.6.18