ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Alexey V. Vissarionov" <gremlin@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] Как правильно определить, что мы внутри Hasher?
Date: Tue, 18 Aug 2020 01:59:02 +0300
Message-ID: <20200817225902.GF19101@altlinux.org> (raw)
In-Reply-To: <c381f1ee-42a1-90f7-3735-fab3451f15de@gmail.com>

On 2020-08-18 01:51:59 +0300, Leonid Krivoshein wrote:

 > Возможно вопрос совсем простой, но что-то не нахожу сходу
 > ответа.
 > $ hsh-run --rooter -- losetup -f 2>&1 |grep "No such device"
 > losetup: cannot find an unused loop device: No such device
 > Есть ли более правильный способ определения того, что это root
 > в хэшере, а не настоящий?

Я бы через сетевую подсистему тестировал... там, насколько помню,
unshare() делается с CLONE_NEWNET.

Попробуй hsh-run --rooter -- ip rou get 0


-- 
Alexey V. Vissarionov
gremlin ПРИ altlinux ТЧК org; +vii-cmiii-ccxxix-lxxix-xlii
GPG: 0D92F19E1C0DC36E27F61A29CD17E2B43D879005 @ hkp://keys.gnupg.net


  reply	other threads:[~2020-08-17 22:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-17 22:51 Leonid Krivoshein
2020-08-17 22:59 ` Alexey V. Vissarionov [this message]
2020-08-17 23:19   ` Leonid Krivoshein
2020-08-17 23:57     ` Dmitry V. Levin
2020-08-18  0:13       ` Leonid Krivoshein

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=20200817225902.GF19101@altlinux.org \
    --to=gremlin@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