mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 15:29:56 +00:00
accept commands from root
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>
This commit is contained in:
parent
2dcb28a9d0
commit
d8cc9804ae
@ -237,9 +237,9 @@ int lxc_af_unix_rcv_credential(int fd, void *data, size_t size)
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user