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:
parent
1a8af1e645
commit
2b436ead76
@ -723,7 +723,7 @@
|
|||||||
} else {
|
} else {
|
||||||
+ my ($uid, $gid);
|
+ my ($uid, $gid);
|
||||||
$tmpdir = File::Temp::tempdir(CLEANUP => 1);
|
$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;
|
+ my $cnt = chown $uid, $gid, $tmpdir;
|
||||||
+ die "could not create directory $tmpdir" if $cnt <= 0;
|
+ die "could not create directory $tmpdir" if $cnt <= 0;
|
||||||
+ $cnt = chmod 0770, $tmpdir;
|
+ $cnt = chmod 0770, $tmpdir;
|
||||||
|
@ -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>
|
Wed Feb 5 06:56:24 UTC 2020 - Dr. Werner Fink <werner@suse.de>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package texlive
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# 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): %{name}-filesystem
|
||||||
Requires(pre): /usr/bin/getent
|
Requires(pre): /usr/bin/getent
|
||||||
Requires(pre): /usr/sbin/groupadd
|
Requires(pre): /usr/sbin/groupadd
|
||||||
%if 0%{?suse_version} >= 1330
|
|
||||||
Requires(pre): user(nobody)
|
|
||||||
%endif
|
|
||||||
Requires(post): %{name}-filesystem
|
Requires(post): %{name}-filesystem
|
||||||
Requires(post): permissions
|
Requires(post): permissions
|
||||||
Requires: %{name}-gsftopk-bin
|
Requires: %{name}-gsftopk-bin
|
||||||
@ -4281,7 +4278,7 @@ fi
|
|||||||
|
|
||||||
%pre kpathsea-bin
|
%pre kpathsea-bin
|
||||||
%{_bindir}/getent group %{texgrp} > /dev/null 2>&1 || %{_sbindir}/groupadd -r %{?texgid:-g %texgid} %{texgrp}
|
%{_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 %{texusr} > /dev/null 2>&1 || %{_sbindir}/useradd -r %{?texuid:-u %texuid} -g %{texgrp} -d %{_fontcache} -s /bin/false %{texusr}
|
||||||
|
|
||||||
%post kpathsea-bin
|
%post kpathsea-bin
|
||||||
%if %{defined set_permissions}
|
%if %{defined set_permissions}
|
||||||
@ -4290,7 +4287,7 @@ fi
|
|||||||
|
|
||||||
%pre
|
%pre
|
||||||
%{_bindir}/getent group %{texgrp} > /dev/null 2>&1 || %{_sbindir}/groupadd -r %{?texgid:-g %texgid} %{texgrp}
|
%{_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 %{texusr} > /dev/null 2>&1 || %{_sbindir}/useradd -r %{?texuid:-u %texuid} -g %{texgrp} -d %{_fontcache} -s /bin/false %{texusr}
|
||||||
|
|
||||||
%post
|
%post
|
||||||
mkdir -p /var/run/texlive
|
mkdir -p /var/run/texlive
|
||||||
|
Loading…
Reference in New Issue
Block a user