From: "Dmitry V. Levin" <ldv@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] /etc/profile.d/*-agent.sh
Date: Mon, 8 Feb 2010 19:46:46 +0300
Message-ID: <20100208164646.GE11910@wo.int.altlinux.org> (raw)
In-Reply-To: <201002081916.11410.zerg@altlinux.org>
[-- Attachment #1: Type: text/plain, Size: 919 bytes --]
On Mon, Feb 08, 2010 at 07:16:10PM +0300, Sergey V Turchin wrote:
> On Monday 08 February 2010, Dmitry V. Levin wrote:
>
> [...]
> > Тогда надо думать, как преодолеть race condition.
> А в чем он состоит?
Сейчас есть 2 race:
- статический: какой -agent.sh запустится первым, зависит от того, какое
имя будет у файла в каталоге /etc/profile.d/;
- TOCTOU: может быть запущено более одного агента, если в промежутке между
проверкой $GNUPGHOME/GPG_AGENT_INFO и записью в этот файл параллельно
произойдёт ещё одна проверка.
Соответственно, пути преодоления race вырисовываются такие:
- TOCTOU: нужно использовать механизм блокировок:
eval $(script-that-locks-GNUPGHOME-and-handles-GPG_AGENT_INFO)
- либо будет единственный /etc/profile.d/*-agent.sh на все случаи жизни, либо
будет дополнительный конфигурационный параметр для управления поведением
разных /etc/profile.d/*-agent.sh
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2010-02-08 16:46 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-07 23:10 ` [devel] [SCM] packages/gnupg2: tags/2.0.11-alt2 Dmitry V. Levin
2010-02-08 10:53 ` Sergey V Turchin
2010-02-08 11:02 ` Dmitry V. Levin
2010-02-08 11:10 ` Valery V. Inozemtsev
2010-02-08 11:12 ` Alexey Shabalin
2010-02-08 11:22 ` Valery V. Inozemtsev
2010-02-08 11:27 ` Dmitry V. Levin
2010-02-08 11:34 ` Valery V. Inozemtsev
2010-02-08 11:39 ` Dmitry V. Levin
2010-02-08 11:48 ` Valery V. Inozemtsev
2010-02-08 11:55 ` Sergey V Turchin
2010-02-08 12:01 ` Dmitry V. Levin
2010-02-08 11:11 ` Alexey Shabalin
2010-02-08 11:16 ` Dmitry V. Levin
2010-02-08 11:28 ` Alexey Shabalin
2010-02-08 11:36 ` Dmitry V. Levin
2010-02-08 11:52 ` Sergey V Turchin
2010-02-08 12:09 ` Dmitry V. Levin
2010-02-08 12:17 ` Sergey V Turchin
2010-02-08 13:16 ` [devel] /etc/profile.d/*-agent.sh Dmitry V. Levin
2010-02-08 13:29 ` Sergey V Turchin
2010-02-08 14:32 ` Alexey Shabalin
2010-02-08 15:14 ` Dmitry V. Levin
2010-02-08 15:18 ` Sergey V Turchin
2010-02-08 15:45 ` Dmitry V. Levin
2010-02-08 16:16 ` Sergey V Turchin
2010-02-08 16:46 ` Dmitry V. Levin [this message]
2010-02-08 17:02 ` Sergey V Turchin
2010-02-08 17:09 ` Sergey V Turchin
2010-02-08 17:12 ` Sergey V Turchin
2010-02-08 17:17 ` Dmitry V. Levin
2010-02-08 17:26 ` Sergey V Turchin
2010-02-09 1:56 ` [devel] new gnupg-agent.sh Dmitry V. Levin
2010-02-09 12:37 ` Sergey V Turchin
2010-02-09 15:01 ` Dmitry V. Levin
2010-02-09 15:18 ` Valery V. Inozemtsev
2010-02-09 15:33 ` Dmitry V. Levin
2010-02-09 15:40 ` Valery V. Inozemtsev
2010-02-09 16:03 ` Dmitry V. Levin
2010-02-10 6:59 ` Valery V. Inozemtsev
2010-02-09 7:36 ` [devel] /etc/profile.d/*-agent.sh Anton Farygin
2010-02-09 11:29 ` Dmitry V. Levin
2010-02-09 11:45 ` Anton Farygin
2010-02-09 11:51 ` Anton Farygin
2010-02-09 12:02 ` Konstantin Pavlov
2010-02-09 12:08 ` Dmitry V. Levin
2010-02-09 13:07 ` Anton Farygin
2010-02-09 15:36 ` Alexey I. Froloff
2010-02-08 11:39 ` [devel] [SCM] packages/gnupg2: tags/2.0.11-alt2 Valery V. Inozemtsev
2010-02-08 12:02 ` Michael Shigorin
2010-02-08 12:21 ` Sergey V Turchin
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=20100208164646.GE11910@wo.int.altlinux.org \
--to=ldv@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