Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1381402
| From | "Richard W.M. Jones" <rjones@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 0/2] vfs: Define new syscall getumask. |
| Date | 2016-04-18 11:20 +0200 |
| Message-ID | <rpdvA-2TT-1@gated-at.bofh.it> (permalink) |
| References | <rnsyK-1lV-23@gated-at.bofh.it> <rnvdh-3q8-27@gated-at.bofh.it> <rp6u6-5tz-3@gated-at.bofh.it> <rp6DN-5xU-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, Apr 17, 2016 at 06:57:36PM -0700, Josh Triplett wrote: > O_NOUMASK seems potentially useful to support implementation of umask > entirely in userspace, which also addresses thread-safety. A program > could read its process umask out at startup, handle umask entirely in > userspace (including for threads), and only interact with the system > umask after fork and before exec. I had a look at O_NOUMASK and there are a few problems: It's relatively easy to implement for open(2). A few filesystems implement their own open so I had to go into those filesystems and modify how they handle current_umask too. And FUSE support is tricky so I passed on that. The real problem is that mkdir/mkdirat/mknod/mknodat are affected by umask, but there is no convenient flags parameter to pass the O_NOUMASK flag. So I think the patch only half-solves the problem. I have a patch which needs a bit more testing, which I can post if you think that's helpful, but I don't think it would be acceptable in its current state. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v2 0/2] vfs: Define new syscall getumask. "H. Peter Anvin" <hpa@zytor.com> - 2016-04-18 03:50 +0200
Re: [PATCH v2 0/2] vfs: Define new syscall getumask. Josh Triplett <josh@joshtriplett.org> - 2016-04-18 04:00 +0200
Re: [PATCH v2 0/2] vfs: Define new syscall getumask. "Richard W.M. Jones" <rjones@redhat.com> - 2016-04-18 11:20 +0200
Re: [PATCH v2 0/2] vfs: Define new syscall getumask. "H. Peter Anvin" <hpa@zytor.com> - 2016-04-18 12:10 +0200
csiph-web