From: Serge Hallyn <serge.hal...@ubuntu.com>

We were trying to chown and chmod it to the same permissions as
the container's lxcpath.  I think that's the wrong thing to do.

Signed-off-by: Serge Hallyn <serge.hal...@ubuntu.com>
---
 src/lxc/lxclock.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/src/lxc/lxclock.c b/src/lxc/lxclock.c
index 43e76fa..b595455 100644
--- a/src/lxc/lxclock.c
+++ b/src/lxc/lxclock.c
@@ -45,7 +45,6 @@ static char *lxclock_name(const char *p, const char *n)
        int len;
        char *dest;
        const char *rundir;
-       struct stat sb;
 
        /* lockfile will be:
         * "/run" + "/lock/lxc/$lxcpath/$lxcname + '\0' if root
@@ -77,15 +76,6 @@ static char *lxclock_name(const char *p, const char *n)
                return NULL;
        }
 
-       ret = stat(p, &sb);
-       if (ret == 0) {
-               // best effort.  If this fails, ignore it
-               if (chown(dest, sb.st_uid, sb.st_gid) < 0)
-                       ERROR("Failed ot set owner for lockdir %s\n", dest);
-               if (chmod(dest, sb.st_mode) < 0)
-                       ERROR("Failed to set mode for lockdir %s\n", dest);
-       }
-
        ret = snprintf(dest, len, "%s/lock/lxc/%s/%s", rundir, p, n);
        if (ret < 0 || ret >= len) {
                free(dest);
-- 
1.8.1.2


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to