Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1378632

Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

From "Richard W.M. Jones" <rjones@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]
Date 2016-04-14 11:20 +0200
Message-ID <rnLBp-7R1-29@gated-at.bofh.it> (permalink)
References <rnykN-65O-5@gated-at.bofh.it> <rnC53-x7-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Apr 14, 2016 at 09:09:38AM +1000, Stephen Rothwell wrote:
> Hi Richard,
> 
> On Wed, 13 Apr 2016 20:05:33 +0100 "Richard W.M. Jones" <rjones@redhat.com> wrote:
> >
> > It's not possible to read the process umask without also modifying it,
> > which is what umask(2) does.  A library cannot read umask safely,
> > especially if the main program might be multithreaded.
> 
> I was wondering if you really need to read the umask, or would just a
> "ignore umask" flag to open{,at} do what you want?

This would be very useful, although I think being able to read umask
is also useful.

---

FWIW I am currently developing a patch to add umask to
/proc/PID/status.  Will post it shortly once I've tested it properly.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask] "Richard W.M. Jones" <rjones@redhat.com> - 2016-04-13 21:10 +0200
  [PATCH v4 2/3] x86: Wire up new umask2 system call on x86. "Richard W.M. Jones" <rjones@redhat.com> - 2016-04-13 21:10 +0200
  umask2 man page (was: Re: [PATCH v4 0/3] vfs: Define new syscall  umask2 [formerly getumask]) "Richard W.M. Jones" <rjones@redhat.com> - 2016-04-13 21:40 +0200
  Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask] "H. Peter Anvin" <hpa@zytor.com> - 2016-04-13 21:50 +0200
    Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask] Florian Weimer <fw@deneb.enyo.de> - 2016-04-13 22:50 +0200
      Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask] "Richard W.M. Jones" <rjones@redhat.com> - 2016-04-13 23:00 +0200
  Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly  getumask] Stephen Rothwell <sfr@canb.auug.org.au> - 2016-04-14 01:10 +0200
    Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask] "Richard W.M. Jones" <rjones@redhat.com> - 2016-04-14 11:20 +0200

csiph-web