ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Arseny Maslennikov <arseny@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] PrivateTmp=true для сеанса обновлённого p9
Date: Thu, 22 Apr 2021 16:51:55 +0300
Message-ID: <YIF/e3C2X5HPRTl9@cello> (raw)
In-Reply-To: <fb8ef6fb-77ed-5ac8-f626-bf51db7456c1@rosalinux.ru>

[-- Attachment #1: Type: text/plain, Size: 2558 bytes --]

On Thu, Apr 22, 2021 at 03:26:12PM +0300, Mikhail Novosyolov wrote:
> 
> 22.04.2021 15:00, Arseny Maslennikov пишет:
> > On Thu, Apr 22, 2021 at 02:19:34PM +0300, Andrey Cherepanov wrote:
> >> Кто-нибудь знает, как вычислить виновника, устанавливающего PrivateTmp=true
> >> для сеанса пользователя для обновлённой системы на p9?
> > % man systemd.directives | grep -A4 PrivateTmp
> >        PrivateTmp=
> >            systemd.exec(5)
> >
> >        PrivateUsers=
> >            systemd.exec(5)
> > --
> >        PrivateTmp
> >            org.freedesktop.systemd1(5)
> >
> >        PrivateUsers
> >            org.freedesktop.systemd1(5)
> >
> >
> > Как понять выражение "PrivateTmp=true для сеанса пользователя"?
> > Эта директива может быть назначена только юниту.
> Сеанс пользователя - user-UID.slice - является унитом. pam_systemd работает.

Я был не слишком подробен.
1) Не любому юниту, а только сервису, маунту, свапу и (почему-то) сокету, см. org.freedesktop.systemd1(5).
2) Slice — это, конечно, тип юнита, но не сеанс пользователя; сеансом
можно разве что session-$ID.scope назвать, который как раз порождается
pam_systemd(8).
3) systemd.exec(5):
       PrivateTmp=
           Takes a boolean argument. If true, sets up a new
           file system namespace for the executed processes
           and mounts private /tmp/ and /var/tmp/ directories
           inside it that are not shared by processes outside
           of the namespace. This is useful to secure access
<...>
           This option is only available for system services
           and is not supported for services running in
           per-user instances of the service manager.

Т. е. в пользовательской инит-последовательности директива неприменима
(иначе некрасиво получается: чтобы mount namespace сделать, надо либо
userns городить, либо привилегии повышать...).

По конкретному вопросу Андрея — подозреваю, какой-то ещё pam-модуль старается.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-04-22 13:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-22 12:00 ` Arseny Maslennikov
2021-04-22 12:26   ` Mikhail Novosyolov
2021-04-22 13:51     ` Arseny Maslennikov [this message]
2021-04-22 13:08 ` Alexey Shabalin
2021-04-22 16:20   ` Andrey Cherepanov
2021-04-22 16:25     ` Dmitry V. Levin
2021-04-22 16:27       ` Andrey Cherepanov
2021-04-22 17:40     ` Anton Farygin
2021-04-23  7:05       ` Andrey Cherepanov
2021-04-23  7:07         ` Denis Medvedev
2021-04-23  7:35           ` Alexey V. Vissarionov
2021-04-23  9:01               ` Denis Medvedev
2021-04-23  9:09               ` Anton Farygin
2021-04-23 10:29               ` Ivan A. Melnikov
2021-04-22 16:22   ` Andrey Cherepanov
2021-04-22 16:40   ` Anton Farygin
2021-04-22 17:41     ` Vitaly Lipatov
2021-04-22 17:43       ` Anton Farygin
2021-04-22 18:05         ` Vitaly Lipatov
2021-04-22 18:14           ` Anton Farygin
2021-04-22 20:55     ` [devel] Абстрактный сокет (Was: PrivateTmp=true для сеанса обновлённого p9) Vladimir D. Seleznev
2021-04-23  3:50       ` Anton Farygin

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=YIF/e3C2X5HPRTl9@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