Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libvirt
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Libvirt Packaging Team
libvirt
Commits
7302affb
Commit
7302affb
authored
14 years ago
by
Guido Günther
Browse files
Options
Downloads
Patches
Plain Diff
New patch Make-sure-the-rundir-is-accessible-by-the-user.patch
Make sure the rundir is accessible by the user Closes: #614210
parent
28df4357
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/Make-sure-the-rundir-is-accessible-by-the-user.patch
+38
-0
38 additions, 0 deletions
...ches/Make-sure-the-rundir-is-accessible-by-the-user.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
39 additions
and
0 deletions
debian/patches/Make-sure-the-rundir-is-accessible-by-the-user.patch
0 → 100644
+
38
−
0
View file @
7302affb
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Wed, 9 Mar 2011 14:15:48 +0100
Subject: Make sure the rundir is accessible by the user
otherwise the user might not have enough permissions to access the
socket if root's umask is 077.
http://bugs.debian.org/614210
---
daemon/libvirtd.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index f4b3327..7ce75f4 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -3225,16 +3225,20 @@
int main(int argc, char **argv) {
/* Ensure the rundir exists (on tmpfs on some systems) */
if (geteuid() == 0) {
const char *rundir = LOCALSTATEDIR "/run/libvirt";
+ mode_t old_umask;
+ old_umask = umask(022);
if (mkdir (rundir, 0755)) {
if (errno != EEXIST) {
char ebuf[1024];
VIR_ERROR(_("unable to create rundir %s: %s"), rundir,
virStrerror(errno, ebuf, sizeof(ebuf)));
ret = VIR_DAEMON_ERR_RUNDIR;
+ umask(old_umask);
goto error;
}
}
+ umask(old_umask);
}
/* Beyond this point, nothing should rely on using
--
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
7302affb
...
...
@@ -8,3 +8,4 @@ Disable-CHECKSUM-rule.patch
Debianize-libvirt-guests.patch
Don-t-pass-empty-arguments-to-dnsmasq.patch
Do-not-add-drive-boot-on-param-when-a-kernel-is-spec.patch
Make-sure-the-rundir-is-accessible-by-the-user.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment