lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160414091547.GB28599@redhat.com>
Date:	Thu, 14 Apr 2016 10:15:47 +0100
From:	"Richard W.M. Jones" <rjones@...hat.com>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
Cc:	linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
	hpa@...or.com, akpm@...ux-foundation.org, luto@...nel.org,
	viro@...iv.linux.org.uk, mathieu.desnoyers@...icios.com,
	zab@...hat.com, emunson@...mai.com, paulmck@...ux.vnet.ibm.com,
	aarcange@...hat.com, josh@...htriplett.org, xemul@...allels.com,
	milosz@...in.com, rostedt@...dmis.org, arnd@...db.de,
	ebiederm@...ssion.com, gorcunov@...nvz.org,
	iulia.manda21@...il.com, dave.hansen@...ux.intel.com,
	mguzik@...hat.com, adobriyan@...il.com, dave@...olabs.net,
	linux-api@...r.kernel.org, gorcunov@...il.com, fw@...eb.enyo.de,
	walters@...bum.org
Subject: Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

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@...hat.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ