ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Sheplyakov <>
Subject: Re: [devel] OpenVZ/p8, bin/tar: Too many levels of symbolic links
Date: Mon, 12 Apr 2021 11:48:15 +0400
Message-ID: <> (raw)
In-Reply-To: <>

Добрый день!

On 12.04.2021 10:59, Sergey Afonin wrote:
> On Tuesday 30 March 2021, Dmitry V. Levin wrote:
>> Интересно, на каком системном вызове это происходит, и как он выглядит?
> Как раз подвернулся архив, на котором при распаковке вылезло:
> В strace это выглядит как-то так:
> newfstatat(AT_FDCWD, "inn/.git/hooks/pre-rebase.sample", {st_mode=S_IFREG|000, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
> unlinkat(AT_FDCWD, "inn/.git/hooks/pre-rebase.sample", 0) = 0
> symlinkat("/usr/share/git-core/hooks/pre-rebase", AT_FDCWD, "inn/.git/hooks/pre-rebase.sample") = > utimensat(AT_FDCWD, "inn/.git/hooks/pre-rebase.sample", [UTIME_OMIT, {tv_sec=1618208993, tv_nsec=0} /* 2021-04-12T06:29:53+0000 */], AT_SYMLINK_NOFOLLOW) = 0
> newfstatat(AT_FDCWD, "inn/.git/hooks/pre-rebase.sample", {st_mode=S_IFLNK|0777, st_size=36, ...}, AT_SYMLINK_NOFOLLOW) = 0
> openat(AT_FDCWD, "inn/.git/hooks/pre-rebase.sample", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = -1 ELOOP (Too many levels of symbolic links)

Сделали симлинк inn/.git/hooks/pre-rebase.sample (на /usr/share/git-core/hooks/pre-rebase).
И тут же пытаемся открыть с флагом O_NOFOLLOW.

              If the trailing component (i.e., basename) of pathname is  a  symbolic  link,
              then  the open fails, with the error ELOOP.  Symbolic links in earlier compo‐
              nents of the pathname will still be followed.  (Note  that  the  ELOOP  error
              that  can occur in this case is indistinguishable from the case where an open
              fails because there are too many symbolic links found while resolving  compo‐
              nents in the prefix part of the pathname.)

Работает, как задокументировано.

  reply	other threads:[~2021-04-12  7:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29  8:29 [devel] Сборка и OpenVZ/p8 =?utf-8?b?INC60L7QvdGC0LXQudC90LXRgA==?=, " Sergey Afonin
2021-03-30  9:43 ` Vitaly Lipatov
2021-03-30 10:07 ` Dmitry V. Levin
2021-04-12  6:59   ` [devel] OpenVZ/p8, " Sergey Afonin
2021-04-12  7:48     ` Alexey Sheplyakov [this message]
2021-04-12  9:31       ` Sergey Afonin
2021-04-12  9:41         ` Sergey Afonin
2021-06-01  5:53       ` [devel] symlinks in .git/hooks/ (OpenVZ/p8, bin/tar: Too many levels of symbolic links) Sergey Afonin
2021-06-01  6:00         ` Sergey Afonin
2022-12-08 11:48   ` [devel] Сборка и OpenVZ/p8, bin/tar: Too many levels of symbolic links Sergey Y. Afonin
2021-04-12 10:48 ` [devel] OpenVZ/p8 и контейнеры Sergey Afonin
2021-04-12 11:22   ` Sergey Afonin

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* 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 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/ \
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone