zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: Zsh doing weird symlinks /pid-*/*
Date: Thu, 02 Aug 2012 06:40:08 -0700	[thread overview]
Message-ID: <120802064008.ZM12237@torch.brasslantern.com> (raw)
In-Reply-To: <501A4499.2020607@gmail.com>

On Aug 2, 11:12am, Piotr Karbowski wrote:
}
} Recently I put a zsh on a box with grsecurity's RBAC enabled and 
} noticed, that zsh trying to create a weird symlink like 
} /pid-2031/host-localhost, whats is the reason to do so?

It's creating a dummy symlink that points to a non-existent file as
a way to atomically create a synchronization lock file and also store
useful information about which process and host acquired the lock (in
case the filesytem on which the lock is needed is an NFS share).

At the time this was invented, no one considered that there might be a
reason for a security policy to deny a symlink to a file that could
not possibly exist.  (In fact there probably wasn't any security
mechanism for doing so, at that time.)

Is there a target path for such a symlink that will not be denied?
Perhaps prefix the path with "/tmp"?  (Src/hist.c, search for "pidbuf")

Meanwhile this probably needs to be something we test for in configure,
though whether it succeeds may depend on who is running the build ...


      reply	other threads:[~2012-08-02 13:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-02  9:12 Piotr Karbowski
2012-08-02 13:40 ` Bart Schaefer [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=120802064008.ZM12237@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).