Displaying 20 results from an estimated 1500 matches similar to: "[PATCH] umask: Use /proc/<PID>/status to read umask in Linux >= 4.7."
2016 Apr 13
3
[PATCH libguestfs] launch: Implement a safer getumask.
The current implementation of getumask involves writing a file with
mode 0777 and then testing what mode was created by the kernel. This
doesn't work properly if the user set a per-mount umask (or fmask/
dmask).
This alternative method was suggested by Josh Stone. By forking, we
can use the thread-unsafe method (calling umask) and pass the result
back over a pipe.
This change also fixes
2016 Apr 14
2
[PATCH v3 libguestfs] launch: Implement a safer getumask.
The current implementation of getumask involves writing a file with
mode 0777 and then testing what mode was created by the kernel. This
doesn't work properly if the user set a per-mount umask (or fmask/
dmask).
This alternative method was suggested by Josh Stone. By forking, we
can use the thread-unsafe method (calling umask) and pass the result
back over a pipe.
This change also fixes
2016 Apr 13
1
[PATCH v2 libguestfs] launch: Implement a safer getumask.
The current implementation of getumask involves writing a file with
mode 0777 and then testing what mode was created by the kernel. This
doesn't work properly if the user set a per-mount umask (or fmask/
dmask).
This alternative method was suggested by Josh Stone. By forking, we
can use the thread-unsafe method (calling umask) and pass the result
back over a pipe.
This change also fixes
2016 Apr 13
0
Re: [PATCH libguestfs] launch: Implement a safer getumask.
On 04/13/2016 03:43 PM, Richard W.M. Jones wrote:
> The current implementation of getumask involves writing a file with
> mode 0777 and then testing what mode was created by the kernel. This
> doesn't work properly if the user set a per-mount umask (or fmask/
> dmask).
>
> This alternative method was suggested by Josh Stone. By forking, we
> can use the thread-unsafe
2016 Apr 14
0
Re: [PATCH v3 libguestfs] launch: Implement a safer getumask.
On 04/14/2016 03:59 AM, Richard W.M. Jones wrote:
> The current implementation of getumask involves writing a file with
> mode 0777 and then testing what mode was created by the kernel. This
> doesn't work properly if the user set a per-mount umask (or fmask/
> dmask).
>
> This alternative method was suggested by Josh Stone. By forking, we
> can use the thread-unsafe
2016 Apr 14
2
[PATCH] Add safe wrapper around waitpid which deals with EINTR correctly.
As Eric Blake noted in:
https://www.redhat.com/archives/libguestfs/2016-April/msg00154.html
libguestfs doesn't correctly handle the case where waitpid receives a
SIGCHLD signal and the main program has registered a non-restartable
signal handler.
In this case waitpid would return -EINTR and we would print an error,
but actually we should retry this case.
This adds two new internal functions,
2010 Apr 15
2
Should umask takes effect when we create device file via mknod?
Hi all,
Currently, umask takes effect when we create device file via mknod, as
bellow commands show:
><fs> mknod-b 0760 8 1 /dev/sdf
><fs> ll /dev/sdf
brwxr----- 1 root root 8, 1 Apr 15 11:10 /sysroot/dev/sdf
But I wonder whether it is reasonable? For mknod(1), when we use option
-m mode, we set file permission bits to MODE, not a=rw - umask. Should
this also be applicable
2014 Jun 11
2
umask setting in /etc/profile not working
Hey all,
We have the following set in /etc/profile :
umask 0002
so that it will affect all users. That should create all files as 664 and
all directories as 775 if I'm not mistaken.
Well I logged into the machine after this was set and just created a file
as one of the users who complained about permissions settings on files. And
this is what I saw:
[user1 at qa_host ~]$ ls -l test_qa
2016 Apr 14
0
[PATCH] Add safe wrapper around waitpid which deals with EINTR correctly.
Thanks: Eric Blake.
---
src/Makefile.am | 1 +
src/command.c | 7 ++----
src/guestfs-internal.h | 4 +++
src/launch-direct.c | 11 +++------
src/launch-uml.c | 11 +++------
src/umask.c | 10 ++------
src/wait.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 84 insertions(+), 27 deletions(-)
create mode 100644
2016 May 23
0
Re: [PATCH] umask: Use /proc/<PID>/status to read umask in Linux >= 4.7.
On Mon, May 23, 2016 at 12:12:21PM +0300, Roman Kagan wrote:
> On Sat, May 21, 2016 at 01:14:40PM +0100, Richard W.M. Jones wrote:
> > + path = safe_asprintf (g, "/proc/%d/status", getpid ());
>
> Why not "/proc/self/status"?
Hmm indeed why not :-(
I will fix it ...
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read
2016 Aug 08
0
ANNOUNCE: libguestfs 1.34 released
I'm pleased to announce libguestfs 1.34, a library and set of tools
for accessing and modifying virtual machine disk images.
This release took about 8 months of work by many contributors.
Amongst the new features are large performance improvements,
substantial enhancements to virt-p2v & virt-v2v, better SELinux
support, and APIs for doing forensic analysis of disk images. See the
release
2016 Apr 14
2
Re: [PATCH v3 libguestfs] launch: Implement a safer getumask.
On Thu, Apr 14, 2016 at 07:38:23AM -0600, Eric Blake wrote:
> > + /* Read the umask. */
> > + if (read (fd[0], &mask, sizeof mask) != sizeof mask) {
> > + perrorf (g, "read");
> > + close (fd[0]);
> > + return -1;
>
> Oops - this strands a child process. You have to reap the child, even
> if the read() failed.
Bleah that was
2016 Feb 03
4
[PATCH v2 1/2] launch: add internal helper for socket paths creation
Introduce an internal helper to create paths for sockets -- will be
useful for changing later the logic for placing sockets.
Futhermore, check that the length of sockets won't overflow the buffer
for their filenames.
---
src/guestfs-internal.h | 1 +
src/launch-direct.c | 4 +++-
src/launch-libvirt.c | 10 ++++++----
src/launch.c | 17 +++++++++++++++++
4 files changed, 27
2016 Feb 02
0
Re: [PATCH 1/3] launch: add internal helper for socket paths creation
On Tue, Feb 02, 2016 at 03:27:39PM +0100, Pino Toscano wrote:
> Introduce an internal helper to create paths for sockets; will be useful
> for changing later the logic for placing sockets.
> ---
> src/guestfs-internal.h | 1 +
> src/launch-direct.c | 4 +++-
> src/launch-libvirt.c | 10 ++++++----
> src/launch.c | 15 +++++++++++++++
> 4 files changed, 25
2016 Feb 02
6
[PATCH 1/3] launch: add internal helper for socket paths creation
Introduce an internal helper to create paths for sockets; will be useful
for changing later the logic for placing sockets.
---
src/guestfs-internal.h | 1 +
src/launch-direct.c | 4 +++-
src/launch-libvirt.c | 10 ++++++----
src/launch.c | 15 +++++++++++++++
4 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h
index
2016 Jan 29
7
[PATCH 1/6] launch: unix: check for length of sockets
Error out early if the path to the socket will not fit into
sockaddr_un::sun_path, as we will not be able to connect to it.
---
src/launch-unix.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/launch-unix.c b/src/launch-unix.c
index 740c554..973e14b 100644
--- a/src/launch-unix.c
+++ b/src/launch-unix.c
@@ -47,6 +47,12 @@ launch_unix (guestfs_h *g, void *datav, const char
2009 Jan 09
1
setting umask for internal-sftp users
I'm running OpenSSH 5.1p1 on openSUSE 10.3 (i586) and I want to setup chroot jails for certain
SFTP-only users. I use the following lines in my sshd_config file:
Match Group sftponly
ChrootDirectory /home/chroot-%u
ForceCommand internal-sftp
It works great.
The problem is that some of my users need umask 002 for their uploads. I tried a few ways to
achieve this:
* set umask in sshrc,
2006 Sep 05
2
Mongrel and umask for uploaded files
So any files that are uploaded through my form are getting the following mode:
-rw-------
I need them to have:
-rw-r--r--
I''ve tried setting the umask in a script file called set_umask.rb as follows:
File.umask(022)
and then starting mongrel using:
mongrel_rails start -m config/mime.types -S set_umask.rb
but it doesn''t seem to change the mode that the files are created
2020 Jul 20
2
Apache umask
> On 7/13/20 6:40 PM, Emmett Culley via CentOS wrote:
>> I need to set the umask for apache to 002.? I've tried every idea I've
>> found on the internet, but nothing make a difference.? Most suggest that
>> I put "umask 002" in /etc/sysconfig/httpd, but that doesn't seem to make
>> a difference.? Other's suggest adding something to the
2010 Nov 02
1
SFTP subsystem and umask
Hello,
I have noticed that the -u parameter to the sftp-server or internal-sftp subsystem is not working correctly. For openssh-5.6p1 I believe that the problem lies in this code, starting at line 1414 in sftp-server.c:
----------------------------------------------------------
case 'u':
mask = (mode_t)strtonum(optarg, 0, 0777, &errmsg);
if (errmsg != NULL)