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

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



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


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