Commands should be accepted when they are coming from root.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Michel Normand <normand@fr.ibm.com>
---
 src/lxc/af_unix.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: lxc/src/lxc/af_unix.c
===================================================================
--- lxc.orig/src/lxc/af_unix.c
+++ lxc/src/lxc/af_unix.c
@@ -237,9 +237,9 @@ int lxc_af_unix_rcv_credential(int fd, v
             cmsg->cmsg_level == SOL_SOCKET &&
             cmsg->cmsg_type == SCM_CREDENTIALS) {
                 cred = *((struct ucred *) CMSG_DATA(cmsg));
-		if (cred.uid != getuid() || cred.gid != getgid()) {
+		if (cred.uid && (cred.uid != getuid() || cred.gid != getgid())) {
 			INFO("message denied for '%d/%d'", cred.uid, cred.gid);
-			return -EPERM;
+			return -EACCES;
 		}
         }
 out:



