OBS-URL: https://build.opensuse.org/request/show/423993 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/lxcfs?expand=0&rev=6
39 lines
943 B
Diff
39 lines
943 B
Diff
From 6f0f6b832b5312e510add2fc4c571376184b59b8 Mon Sep 17 00:00:00 2001
|
|
From: Christian Brauner <cbrauner@suse.de>
|
|
Date: Sun, 21 Aug 2016 00:02:32 +0200
|
|
Subject: [PATCH 09/24] bindings: enable access to /var/lib/lxcfs/cgroup
|
|
|
|
Signed-off-by: Christian Brauner <cbrauner@suse.de>
|
|
---
|
|
bindings.c | 11 +++++++++--
|
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/bindings.c b/bindings.c
|
|
index 0cc926b..6ae0c06 100644
|
|
--- a/bindings.c
|
|
+++ b/bindings.c
|
|
@@ -1909,11 +1909,18 @@ out:
|
|
|
|
int cg_access(const char *path, int mode)
|
|
{
|
|
+ int ret;
|
|
const char *cgroup;
|
|
- char *last = NULL, *path1, *path2, * cgdir = NULL, *controller;
|
|
+ char *path1, *path2, *controller;
|
|
+ char *last = NULL, *cgdir = NULL;
|
|
struct cgfs_files *k = NULL;
|
|
struct fuse_context *fc = fuse_get_context();
|
|
- int ret;
|
|
+
|
|
+ if (strcmp(path, "/cgroup") == 0) {
|
|
+ if ((mode & W_OK) == 0)
|
|
+ return -EACCES;
|
|
+ return 0;
|
|
+ }
|
|
|
|
if (!fc)
|
|
return -EIO;
|
|
--
|
|
2.9.3
|
|
|