ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Shabalin <a.shabalin@gmail.com>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] polkit without systemd
Date: Mon, 1 Sep 2014 21:20:28 +0400
Message-ID: <CAEdvWkRtua-=6QaE3UG5jwgqaA3MrozRxQ71Noa90yGh3ma6=Q@mail.gmail.com> (raw)
In-Reply-To: <20140901170828.GB28393@altlinux.org>

1 сентября 2014 г., 21:08 пользователь Dmitry V. Levin
<ldv@altlinux.org> написал:
> On Mon, Sep 01, 2014 at 08:45:51PM +0400, Alexey Shabalin wrote:
>> 1 сентября 2014 г., 20:21 пользователь Dmitry V. Levin
>> <ldv@altlinux.org> написал:
>> > On Mon, Sep 01, 2014 at 05:02:42PM +0400, Alexey Shabalin wrote:
>> >> - вместо прямого запуска systemd-logind запускать скрипт systemd-logind-launch:
>> >> --------------------
>> >> if ! mountpoint -q /sys/fs/cgroup; then
>> >>     mount -t tmpfs -o uid=0,gid=0,mode=0755 none /sys/fs/cgroup
>> >> fi
>> >> if ! mountpoint -q /sys/fs/cgroup/systemd; then
>> >>     mkdir -p /sys/fs/cgroup/systemd
>> >>     mount -t cgroup -o nosuid,noexec,nodev,none,name=systemd systemd
>> >> /sys/fs/cgroup/systemd
>> >> fi
>> >> mkdir -p /run/systemd
>> >
>> > Проверьте, все ли здесь правильно с правами.
>> > Скорее всего, 0755 на /run/systemd - это неправильно.
>>
>> # mount| grep /sys/fs/cgroup
>> tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
>> cgroup on /sys/fs/cgroup/systemd type cgroup
>> (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
>> cgroup on /sys/fs/cgroup/cpuset type cgroup
>> (rw,nosuid,nodev,noexec,relatime,cpuset)
>>
>> в mount-setup.c это определено так:
>>
>>         { "tmpfs",      "/sys/fs/cgroup",            "tmpfs",
>> "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME,
>>           NULL,       MNT_FATAL|MNT_IN_CONTAINER },
>
> А какие права должны быть у /run/systemd?
Извиняюсь, не то прислал.
вот в mount-setup.c:

        /* Create a few directories we always want around, Note that
         * sd_booted() checks for /run/systemd/system, so this mkdir
         * really needs to stay for good, otherwise software that
         * copied sd-daemon.c into their sources will misdetect
         * systemd. */
        mkdir_label("/run/systemd", 0755);
        mkdir_label("/run/systemd/system", 0755);
        mkdir_label("/run/systemd/inaccessible", 0000);

а что смущает? какие должны быть?

>> >> exec /lib/systemd/systemd-logind
>> >> ------------------------
>> >>
>> >> - в этом скрипте,при монтировании  /sys/fs/cgroup,
>> >> /sys/fs/cgroup/systemd, мы обманываем logind, как будто он работает
>> >> под systemd. Но из этого обмана надо исключить тех, кого мы обманывать
>> >> не хотим -  service, chkconfig
>> >> service использует утилиту sd_booted. её лучше переписать, и научить
>> >> использовать функцию sd_booted из libsystemd (например так
>> >> http://git.pld-linux.org/?p=packages/systemd.git;a=blob;f=systemd_booted.c)
>> >
>> > После коммита
>> > http://cgit.freedesktop.org/systemd/systemd/commit/?id=v198-67-g66e4118
>> > в функции sd_booted из libsystemd осталась только одна проверка:
>> > test -d /run/systemd/system/
>> > Наверное, мы тоже можем так сделать.
>> В общем я это и имел ввиду, проверять только /run/systemd/system.
>> Только вдруг это изменится в будущем, поэтому и предложил линковаться
>> с libsystemd.
>
> Не хочу линковаться с libsystemd. :)
>
>
> --
> ldv
>
> _______________________________________________
> Devel mailing list
> Devel@lists.altlinux.org
> https://lists.altlinux.org/mailman/listinfo/devel



-- 
Alexey Shabalin

      reply	other threads:[~2014-09-01 17:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-01 13:02 Alexey Shabalin
2014-09-01 14:28 ` Денис Смирнов
2014-09-02 12:45   ` Mikhail Efremov
2014-09-19 14:51     ` Mikhail Efremov
2014-09-19 19:15       ` Alexey Shabalin
2014-09-22  9:40         ` Mikhail Efremov
2014-09-23 10:08           ` Mikhail Efremov
2014-09-26  8:08             ` Mikhail Efremov
2014-10-02 17:27               ` Mikhail Efremov
2014-09-01 16:21 ` Dmitry V. Levin
2014-09-01 16:45   ` Alexey Shabalin
2014-09-01 17:08     ` Dmitry V. Levin
2014-09-01 17:20       ` Alexey Shabalin [this message]

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='CAEdvWkRtua-=6QaE3UG5jwgqaA3MrozRxQ71Noa90yGh3ma6=Q@mail.gmail.com' \
    --to=a.shabalin@gmail.com \
    --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