From 845113106a8792553f0816a2c9a677282d7d591fd275453dd52e50022f08c157 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 24 Sep 2010 07:10:52 +0000 Subject: [PATCH] Accepting request 44299 from Base:System Copy from Base:System/findutils based on submit request 44299 from user WernerFink OBS-URL: https://build.opensuse.org/request/show/44299 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/findutils?expand=0&rev=22 --- findutils.changes | 6 ++++++ findutils.spec | 18 ++++++++++++++++-- nobody-wrapper.tar.bz2 | 3 +++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 nobody-wrapper.tar.bz2 diff --git a/findutils.changes b/findutils.changes index 0b1d6ba..63d4fad 100644 --- a/findutils.changes +++ b/findutils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jul 30 18:53:26 CEST 2010 - werner@suse.de + +- Add a simple wrapper for user root to switch over to user nobody + for the command ls and find without using su. + ------------------------------------------------------------------- Thu Apr 1 12:22:10 CEST 2010 - pth@suse.de diff --git a/findutils.spec b/findutils.spec index b83fb62..5601d56 100644 --- a/findutils.spec +++ b/findutils.spec @@ -22,12 +22,13 @@ Url: http://www.gnu.org/software/findutils/ License: GPLv3+ Group: Productivity/File utilities Version: 4.4.2 -Release: 2 +Release: 7 Summary: The GNU versions of find utilities (find and xargs) # retreived from http://ftp.gnu.org/pub/gnu/findutils/findutils-4.4.2.tar.gz Source: findutils-%{version}.tar.bz2 Source1: sysconfig.locate Source2: cron.daily.updatedb +Source3: nobody-wrapper.tar.bz2 # Use /proc/mounts instead of /etc/mtab as autofs entries are only # listed in the kernels >= 2.6.32 Patch0: findutils-use_proc_mounts.patch @@ -83,7 +84,7 @@ job will update the files database every night or shortly after switching on the computer. %prep -%setup -q +%setup -q -b 3 %patch0 %patch1 -p1 %patch2 -p1 @@ -106,6 +107,10 @@ export DEFAULT_ARG_SIZE="(31u * 1024u)" --enable-d_type-optimisation make %{?_smp_mflags} +pushd ../nobody-wrapper + gcc $RPM_OPT_FLAGS -o nobody nobody.c +popd + %check make check @@ -123,6 +128,13 @@ mv $RPM_BUILD_ROOT{%{_bindir},/bin}/find # create /usr/bin/find -> /bin/find symlink ln -sf ../../bin/find $RPM_BUILD_ROOT%{_bindir} +pushd ../nobody-wrapper + mkdir $RPM_BUILD_ROOT%{_sbindir}/ + mkdir $RPM_BUILD_ROOT%{_mandir}/man8 + install -m 0755 nobody $RPM_BUILD_ROOT%{_sbindir}/ + install -m 0644 nobody.8 $RPM_BUILD_ROOT%{_mandir}/man8/ +popd + %clean rm -rf $RPM_BUILD_ROOT @@ -141,9 +153,11 @@ rm -rf $RPM_BUILD_ROOT /bin/find %{_bindir}/find %{_bindir}/xargs +%{_sbindir}/nobody %doc %{_infodir}/find.info*.gz %doc %{_mandir}/man1/find.1.gz %doc %{_mandir}/man1/xargs.1.gz +%doc %{_mandir}/man8/nobody.8.gz %files lang -f %{name}.lang %defattr(-,root,root,-) diff --git a/nobody-wrapper.tar.bz2 b/nobody-wrapper.tar.bz2 new file mode 100644 index 0000000..511f447 --- /dev/null +++ b/nobody-wrapper.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5987c255cfb25812d62c1283d597df2d858e8a46456908af75ae24c8800e19a3 +size 2532