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

Eric Blake eblake at redhat.com
Fri Dec 5 16:50:54 UTC 2014


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 at redhat.com>
> ---

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141205/089d8a78/attachment-0001.sig>


More information about the libvir-list mailing list