From: arseny@altlinux.org
To: devel@lists.altlinux.org
Subject: [devel] NobodySubjectPolicy implementation
Date: Tue, 19 Dec 2023 21:13:07 +0300
Message-ID: <ZYHdM2DMsVu9dgWp@cello> (raw)
[-- Attachment #1: Type: text/plain, Size: 2628 bytes --]
On Wed, Nov 15, 2023 at 04:00:56PM +0300, Arseny Maslennikov wrote:
> Hi!
> <...>
> === Предложение ===
>
> Вношу следующее предложение:
> - Сменить пользователю и группе nobody численный идентификатор с 99 на
> 65534. Для обозначения 99-го оставить другое имя, например, _nobody99;
> - Передать /var/nobody этому самому _nobody99;
Оказалось проще удалить этот каталог совсем; он не должен быть никому
нужен.
То, что получилось, можно наблюдать в задании:
https://git.altlinux.org/tasks/330460/
Есть пока и препятствия, о которых ниже.
> Для пакетов в Sisyphus:
> <...>
> - Рекомендовать мейнтейнерам не допускать, чтобы собираемые ими
> системные службы исполняли код под nobody;
> - Рекомендовать администраторам не запускать процессы под юзером и группой
> nobody.
За этим должен был следить brp-модуль при сборке пакета, который бы
запрещал класть в пакет systemd-юниты, указывающие nobody в User=,
Group=, SupplementaryGroups=. Но rpm-build перестаёт проходить проверки
из rpminstall-tests со следующей чудесной диагностикой[1]:
rpm --dbpath '/tmp/sh.Hh8cuteY/sh.DakRlnyW' --justdb -i RPMS/dummy/noarch/dummy-1-alt1.noarch.rpm
error: Couldn't create temporary file for posttrans filetriggers: Success
При этом создать под dbpath файлы для базы у него получается. Снаружи
fakeroot-окружения все эти временные каталоги имеют uid и gid rooter,
конечно.
[1] https://git.altlinux.org/tasks/336802/logs/events.1.1.log
> === Footprint ===
> <...>
> checkinstall-helper-sh-safely imz @everybody
Если в используемом выше /usr/sbin/sh-safely из этого пакета,
сбрасывающем привилегии до nobody, изменить это имя на _nobody99, то
симптом всё ещё воспроизводится, а если убрать "--chuid nobody:nobody",
то перестаёт.
Нужно разбираться.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next reply other threads:[~2023-12-19 18:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 18:13 arseny [this message]
2024-01-08 9:29 ` Arseny Maslennikov
2024-01-08 9:52 ` [devel] [#330460] TESTED (try 16) Arseny Maslennikov
2024-02-29 8:42 ` [devel] I: nobody-owned files in packages Arseny Maslennikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZYHdM2DMsVu9dgWp@cello \
--to=arseny@altlinux.org \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git