supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Laurent Bercot <ska-supervision@skarnet.org>
To: Vallo Kallaste <kalts@estpak.ee>
Cc: supervision@list.skarnet.org
Subject: Re: s6-log does not obey umask
Date: Wed, 14 Nov 2012 03:29:02 +0100	[thread overview]
Message-ID: <20121114022902.GA25513@skarnet.org> (raw)
In-Reply-To: <20121113204647.GA22147@hape.internal>

> I am not sure if it is intended behaviour or not.
> echo |/command/umask 0027 s6-log /some/dir will create lock and
> state files with permissions 0640, but current with 0744. It is the
> world-readable bit I am concerned with.

 It is intentional. When the current file is created, it actually
respects the umask. When s6-log exits, it uses the fchmod() system call,
which doesn't take the umask into account, to chmod the current file to
744, which is a marker that says "processed, safe file".

 There is no security problem : the /some/dir directory will have
restricted, umask-following, rights, so the "current" file will be
unreadable by others anyway.

-- 
 Laurent


  reply	other threads:[~2012-11-14  2:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-13 20:46 Vallo Kallaste
2012-11-14  2:29 ` Laurent Bercot [this message]
2012-11-14  8:57   ` Vallo Kallaste
2012-11-14  9:27     ` Laurent Bercot
2012-12-13 15:24       ` Vallo Kallaste
2012-12-14  5:21         ` Laurent Bercot

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=20121114022902.GA25513@skarnet.org \
    --to=ska-supervision@skarnet.org \
    --cc=kalts@estpak.ee \
    --cc=supervision@list.skarnet.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.
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).