Accepting request 1090926 from Publishing:TeXLive

- For creation of ls-R after transactional update used secure
  way via setpriv(8) (boo#1212006)

OBS-URL: https://build.opensuse.org/request/show/1090926
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/texlive-filesystem?expand=0&rev=56
This commit is contained in:
Dominique Leuenberger 2023-06-06 17:55:28 +00:00 committed by Git OBS Bridge
commit 540811c657
2 changed files with 14 additions and 6 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jun 5 11:12:19 UTC 2023 - Dr. Werner Fink <werner@suse.de>
- For creation of ls-R after transactional update used secure
way via setpriv(8) (boo#1212006)
-------------------------------------------------------------------
Thu May 25 10:58:46 UTC 2023 - Dr. Werner Fink <werner@suse.de>

View File

@ -46,16 +46,18 @@ if test -n "$1" -a "$1" = force; then
useradd -U -d /var/cache/texmf/fonts -c "System user for mktex" -s "/usr/sbin/nologin" mktex
fi
test -e /var/cache/texmf/fonts/ls-R || {
echo '% ls-R -- filename database for kpathsea; do not change this line.' > /var/cache/texmf/fonts/ls-R
chmod 0664 /var/cache/texmf/fonts/ls-R
chown mktex:mktex /var/cache/texmf/fonts/ls-R
setpriv --reuid mktex --regid mktex --init-groups bash -c \
"umask 0002
set -C
echo '% ls-R -- filename database for kpathsea; do not change this line.' > /var/cache/texmf/fonts/ls-R"
}
for lsr in /var/lib/texmf/ls-R /var/lib/texmf/dist/ls-R /var/lib/texmf/main/ls-R
do
test -e $lsr && continue
echo '% ls-R -- filename database for kpathsea; do not change this line.' > $lsr
chmod 0664 $lsr
chgrp mktex $lsr
setpriv --ruid root --regid mktex --init-groups bash -c \
"umask 0002
set -C
echo '% ls-R -- filename database for kpathsea; do not change this line.' > $lsr"
done
fi