mirror of https://gitee.com/openkylin/libvirt.git
Fix privileges on /var/run/libvirt directory
Previous commit
commit 32a9aac2e0
Author: William Jon McCann <william.jon.mccann@gmail.com>
Date: Thu May 3 12:36:27 2012 -0400
Use XDG Base Directories instead of storing in home directory
Accidentally changed the umask when creating /var/run/libvirt
to 077. This prevents /var/run/libvirt being readable by non-root,
which is required for non-root to connect to libvirtd. Fix the
code so that umask 077 is only used for the non-privileged libvirtd
instance.
This commit is contained in:
parent
19c08b5644
commit
0ec8262092
|
@ -1131,6 +1131,9 @@ int main(int argc, char **argv) {
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
if (privileged)
|
||||
old_umask = umask(022);
|
||||
else
|
||||
old_umask = umask(077);
|
||||
if (virFileMakePath(run_dir) < 0) {
|
||||
char ebuf[1024];
|
||||
|
|
Loading…
Reference in New Issue