mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 14:57:42 +00: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);
|
||||
if (getpeercon(sock->fd, &seccon) < 0) {
|
||||
if (errno == ENOSYS) {
|
||||
if (errno == ENOSYS || errno == ENOPROTOOPT) {
|
||||
ret = 0;
|
||||
goto cleanup;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user