mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Don't fail if SELinux is diabled
but libvirt is built with --with-selinux. In this case getpeercon returns ENOPROTOOPT so don't return an error in that case but simply don't set seccon.
This commit is contained in:
parent
2e1cd8900f
commit
82eec793c7
@ -1171,7 +1171,7 @@ int virNetSocketGetSecurityContext(virNetSocketPtr sock,
|
|||||||
|
|
||||||
virObjectLock(sock);
|
virObjectLock(sock);
|
||||||
if (getpeercon(sock->fd, &seccon) < 0) {
|
if (getpeercon(sock->fd, &seccon) < 0) {
|
||||||
if (errno == ENOSYS) {
|
if (errno == ENOSYS || errno == ENOPROTOOPT) {
|
||||||
ret = 0;
|
ret = 0;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user