Re: [PATCH] Don't fail if SELinux is diabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/20/2013 01:04 PM, Guido Günther wrote:

s/diabled/disabled/ in the subject

> but libvirt is built with --with-selinux. In this case getpeercon
> returns ENOPROTOOPT so dont' return an error in that case but simply

s/dont'/don't/

> don't set seccon.
> ---
>  src/rpc/virnetsocket.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

ACK.

> 
> diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
> index 39504ac..c4fd9ee 100644
> --- a/src/rpc/virnetsocket.c
> +++ b/src/rpc/virnetsocket.c
> @@ -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;
>          }
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]