parent
58f8102d14
commit
5e60b6fe12
@ -0,0 +1 @@
|
|||||||
|
/kwrited-5.2.0.tar.xz
|
@ -0,0 +1,49 @@
|
|||||||
|
diff --git a/kwrited.cpp b/kwrited.cpp
|
||||||
|
index a4dac6b..1eaef2a 100644
|
||||||
|
--- a/kwrited.cpp
|
||||||
|
+++ b/kwrited.cpp
|
||||||
|
@@ -34,11 +34,13 @@
|
||||||
|
# include <signal.h>
|
||||||
|
# include <sys/types.h>
|
||||||
|
# include <unistd.h>
|
||||||
|
+# include <grp.h>
|
||||||
|
#else
|
||||||
|
# include <kpluginfactory.h>
|
||||||
|
# include <kpluginloader.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+
|
||||||
|
static inline KAboutData aboutData()
|
||||||
|
{
|
||||||
|
return KAboutData("kwrited", i18n("kwrited"), PROJECT_VERSION);
|
||||||
|
@@ -60,6 +62,7 @@ int main(int argc, char **argv)
|
||||||
|
//drop elevated privileges temporarily
|
||||||
|
original_euid = geteuid();
|
||||||
|
original_egid = getegid();
|
||||||
|
+ setgroups(0, 0); // Remove any extraneous groups
|
||||||
|
seteuid(getuid());
|
||||||
|
setegid(getgid());
|
||||||
|
|
||||||
|
@@ -111,6 +114,7 @@ KWrited::KWrited() : QObject()
|
||||||
|
|
||||||
|
#if defined(BUILD_AS_EXECUTABLE)
|
||||||
|
//drop privileges again
|
||||||
|
+ setgroups(0, 0);
|
||||||
|
seteuid(getuid());
|
||||||
|
setegid(getgid());
|
||||||
|
#endif
|
||||||
|
@@ -131,6 +135,7 @@ KWrited::~KWrited()
|
||||||
|
|
||||||
|
#if defined(BUILD_AS_EXECUTABLE)
|
||||||
|
//drop privileges again
|
||||||
|
+ setgroups(0, 0);
|
||||||
|
seteuid(getuid());
|
||||||
|
setegid(getgid());
|
||||||
|
#endif
|
||||||
|
@@ -156,4 +161,4 @@ void KWrited::block_in()
|
||||||
|
|
||||||
|
#if !defined(BUILD_AS_EXECUTABLE)
|
||||||
|
#include "kwrited.moc"
|
||||||
|
-#endif
|
||||||
|
\ No newline at end of file
|
||||||
|
+#endif
|
@ -0,0 +1,99 @@
|
|||||||
|
Name: kwrited
|
||||||
|
Version: 5.2.0
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: KDE Write Daemon
|
||||||
|
|
||||||
|
License: GPLv2+
|
||||||
|
URL: https://projects.kde.org/projects/kde/workspace/kwrited
|
||||||
|
|
||||||
|
%global revision %(echo %{version} | cut -d. -f3)
|
||||||
|
%if %{revision} >= 50
|
||||||
|
%global stable unstable
|
||||||
|
%else
|
||||||
|
%global stable stable
|
||||||
|
%endif
|
||||||
|
Source0: http://download.kde.org/%{stable}/plasma/%{version}/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
|
Patch0: kwrited-call-setgroups.patch
|
||||||
|
|
||||||
|
BuildRequires: qt5-qtbase-devel
|
||||||
|
BuildRequires: qt5-qtx11extras-devel
|
||||||
|
|
||||||
|
BuildRequires: kf5-rpm-macros
|
||||||
|
BuildRequires: extra-cmake-modules
|
||||||
|
|
||||||
|
BuildRequires: kf5-kpty-devel
|
||||||
|
BuildRequires: kf5-kdelibs4support-devel
|
||||||
|
|
||||||
|
Requires: kf5-filesystem
|
||||||
|
|
||||||
|
# Owns /usr/share/knotifications5
|
||||||
|
Requires: kf5-knotifications
|
||||||
|
|
||||||
|
# TODO: Remove once kwrited is split from kde-workspace
|
||||||
|
Conflicts: kde-workspace < 5.0.0-1
|
||||||
|
|
||||||
|
%description
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{name}-%{version}
|
||||||
|
|
||||||
|
%patch0 -p1 -b .setgroups
|
||||||
|
|
||||||
|
%build
|
||||||
|
mkdir -p %{_target_platform}
|
||||||
|
pushd %{_target_platform}
|
||||||
|
%{cmake_kf5} ..
|
||||||
|
popd
|
||||||
|
|
||||||
|
make %{?_smp_mflags} -C %{_target_platform}
|
||||||
|
|
||||||
|
%install
|
||||||
|
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc COPYING
|
||||||
|
%{_bindir}/kwrited
|
||||||
|
%{_sysconfdir}/xdg/autostart/kwrited-autostart.desktop
|
||||||
|
%{_kf5_datadir}/knotifications5/kwrited.notifyrc
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Jan 26 2015 Daniel Vrátil <dvratil@redhat.com> - 5.2.0-1
|
||||||
|
- Plasma 5.2.0
|
||||||
|
|
||||||
|
* Mon Jan 12 2015 Daniel Vrátil <dvratil@redhat.com> - 5.1.95-1.beta
|
||||||
|
- Plasma 5.1.95 Beta
|
||||||
|
|
||||||
|
* Tue Jan 06 2015 Daniel Vrátil <dvratil@redhat.com> - 5.1.2-3
|
||||||
|
- missing %%config
|
||||||
|
- add patch to call setgroups(0, 0)
|
||||||
|
- deps fix
|
||||||
|
|
||||||
|
* Wed Dec 17 2014 Daniel Vrátil <dvratil@redhat.com> - 5.1.2-2
|
||||||
|
- Plasma 5.1.2
|
||||||
|
|
||||||
|
* Fri Nov 07 2014 Daniel Vrátil <dvratil@redhat.com> - 5.1.1-1
|
||||||
|
- Plasma 5.1.1
|
||||||
|
|
||||||
|
* Tue Oct 14 2014 Daniel Vrátil <dvratil@redhat.com> - 5.1.0.1-1
|
||||||
|
- Plasma 5.1.0.1
|
||||||
|
|
||||||
|
* Thu Oct 09 2014 Daniel Vrátil <dvratil@redhat.com> - 5.1.0-1
|
||||||
|
- Plasma 5.1.0
|
||||||
|
|
||||||
|
* Tue Sep 16 2014 Daniel Vrátil <dvratil@redhat.com> - 5.0.2-1
|
||||||
|
- Plasma 5.0.2
|
||||||
|
|
||||||
|
* Sun Aug 10 2014 Daniel Vrátil <dvratil@redhat.com> - 5.0.1-1
|
||||||
|
- Plasma 5.0.1
|
||||||
|
|
||||||
|
* Wed Jul 23 2014 Daniel Vrátil <dvratil@redhat.com> - 5.0.0-2
|
||||||
|
- Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 16 2014 Daniel Vrátil <dvratil@redhat.com> - 5.0.0-1
|
||||||
|
- Plasma 5.0.0
|
||||||
|
|
||||||
|
* Thu May 15 2014 Daniel Vrátil <dvratil@redhat.com> - 4.90.1-1.20140515gitc11b832c
|
||||||
|
- Intial snapshot
|
Loading…
Reference in new issue