[libvirt] [PATCH 2/3] Don't raise errors in the selinux restore code
Eric Blake
eblake at redhat.com
Fri May 28 13:03:44 UTC 2010
On 05/28/2010 05:52 AM, Daniel P. Berrange wrote:
> The restore code is done in places where errors cannot be
> raised, since they will overwrite over pre-existing errors.
>
> * src/security/security_selinux.c: Only warn about failures
> in label restore, don't report errors
> ---
> src/security/security_selinux.c | 17 ++++++++++-------
> 1 files changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
> index 383e189..fdbd12b 100644
> --- a/src/security/security_selinux.c
> +++ b/src/security/security_selinux.c
> @@ -347,6 +347,9 @@ SELinuxSetFilecon(const char *path, char *tcon)
> return 0;
> }
>
> +
> +/* This method shouldn't raise errors, since they'll overwrite
> + * errors that the caller(s) are already dealing with */
> static int
> SELinuxRestoreSecurityFileLabel(const char *path)
ACK.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100528/8e6c91c4/attachment-0001.sig>
More information about the libvir-list
mailing list