Re: [PATCHv3 2/2] security: Add a new func use stat to get process DAC label

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

 



On 12/05/2014 01:20 AM, Luyao Huang wrote:
> When use qemuProcessAttach to attach a qemu process, cannot
> get a right DAC label. Add a new func to get process label
> via stat func. Do not remove virDomainDefGetSecurityLabelDef
> before try to use stat to get process DAC label, because
> There are some other func call virSecurityDACGetProcessLabel.
> 
> v2 add support freeBSD.
> v3 use snprintf instead of VirAsprintf and move the error
> settings in virSecurityDACGetProcessLabelInternal.
> 

v2 and v3 comments belong...

> Signed-off-by: Luyao Huang <lhuang@xxxxxxxxxx>
> ---

...here, where they are visible to reviewers, but will not be included
in git history (when the committer uses 'git am', anything after --- is
stripped).  A year from now, we won't care how many preliminary versions
of a patch went to the list, only the one version that is in git.

>  src/security/security_dac.c | 85 +++++++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 82 insertions(+), 3 deletions(-)
> 
> diff --git a/src/security/security_dac.c b/src/security/security_dac.c
> index 85253af..8fd1e6e 100644
> --- a/src/security/security_dac.c
> +++ b/src/security/security_dac.c
> @@ -22,6 +22,12 @@
>  #include <sys/types.h>
>  #include <sys/stat.h>
>  #include <fcntl.h>
> +#include <errno.h>

Isn't errno.h implicitly included by our generic headers, such as
"internal.h"?

-- 
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]