SHA256
1
0
forked from pool/texlive

Avoid user/group nobody

OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive?expand=0&rev=348
This commit is contained in:
Dr. Werner Fink 2020-02-20 08:58:22 +00:00 committed by Git OBS Bridge
parent 1a8af1e645
commit 2b436ead76
3 changed files with 11 additions and 9 deletions

View File

@ -723,7 +723,7 @@
} else {
+ my ($uid, $gid);
$tmpdir = File::Temp::tempdir(CLEANUP => 1);
+ if ($> == 0 && ($uid=getpwnam("nobody")) && ($gid=getgrnam("mktex"))) {
+ if ($> == 0 && ($uid=getpwnam("mktex")) && ($gid=getgrnam("mktex"))) {
+ my $cnt = chown $uid, $gid, $tmpdir;
+ die "could not create directory $tmpdir" if $cnt <= 0;
+ $cnt = chmod 0770, $tmpdir;

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 20 06:21:10 UTC 2020 - Dr. Werner Fink <werner@suse.de>
- Switch also to user mktex in fmtutil script (boo#1159740)
-------------------------------------------------------------------
Wed Feb 5 06:56:24 UTC 2020 - Dr. Werner Fink <werner@suse.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package texlive
#
# Copyright (c) 2020 SUSE LLC.
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -1440,9 +1440,6 @@ URL: http://www.tug.org/texlive/
Requires(pre): %{name}-filesystem
Requires(pre): /usr/bin/getent
Requires(pre): /usr/sbin/groupadd
%if 0%{?suse_version} >= 1330
Requires(pre): user(nobody)
%endif
Requires(post): %{name}-filesystem
Requires(post): permissions
Requires: %{name}-gsftopk-bin
@ -4280,8 +4277,8 @@ fi
%endif
%pre kpathsea-bin
%{_bindir}/getent group %{texgrp} > /dev/null 2>&1 || %{_sbindir}/groupadd -r %{?texgid:-g %texgid} %{texgrp}
%{_bindir}/getent passwd %{texusr} > /dev/null 2>&1 || %{_sbindir}/useradd -r %{?texuid:-u %texuid} -g %{texgrp} -d %{_fontcache} -s /bin/false %{texusr}
%{_bindir}/getent group %{texgrp} > /dev/null 2>&1 || %{_sbindir}/groupadd -r %{?texgid:-g %texgid} %{texgrp}
%{_bindir}/getent group %{texusr} > /dev/null 2>&1 || %{_sbindir}/useradd -r %{?texuid:-u %texuid} -g %{texgrp} -d %{_fontcache} -s /bin/false %{texusr}
%post kpathsea-bin
%if %{defined set_permissions}
@ -4289,8 +4286,8 @@ fi
%endif
%pre
%{_bindir}/getent group %{texgrp} > /dev/null 2>&1 || %{_sbindir}/groupadd -r %{?texgid:-g %texgid} %{texgrp}
%{_bindir}/getent passwd %{texusr} > /dev/null 2>&1 || %{_sbindir}/useradd -r %{?texuid:-u %texuid} -g %{texgrp} -d %{_fontcache} -s /bin/false %{texusr}
%{_bindir}/getent group %{texgrp} > /dev/null 2>&1 || %{_sbindir}/groupadd -r %{?texgid:-g %texgid} %{texgrp}
%{_bindir}/getent group %{texusr} > /dev/null 2>&1 || %{_sbindir}/useradd -r %{?texuid:-u %texuid} -g %{texgrp} -d %{_fontcache} -s /bin/false %{texusr}
%post
mkdir -p /var/run/texlive