Re: [RFC PATCH 1/4] util: Add virCommandGetGID and virCommandGetUID

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

 



On Mon, 2017-10-09 at 21:14 +0200, Marc Hartmayer wrote:
> These functions are used by an upcoming commit.
> 
> Signed-off-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxxxxxxx>
> Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxxxxxxx>
> ---
>  src/libvirt_private.syms |  2 ++
>  src/util/vircommand.c    | 14 ++++++++++++++
>  src/util/vircommand.h    |  4 ++++
>  3 files changed, 20 insertions(+)
> 
> diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
> index 9243c5591042..26c5ddb40505 100644
> --- a/src/libvirt_private.syms
> +++ b/src/libvirt_private.syms
> @@ -1506,6 +1506,8 @@ virCommandDaemonize;
>  virCommandDoAsyncIO;
>  virCommandExec;
>  virCommandFree;
> +virCommandGetGID;
> +virCommandGetUID;
>  virCommandHandshakeNotify;
>  virCommandHandshakeWait;
>  virCommandNew;
> diff --git a/src/util/vircommand.c b/src/util/vircommand.c
> index 60c1121dafea..fba73ca18eac 100644
> --- a/src/util/vircommand.c
> +++ b/src/util/vircommand.c
> @@ -1073,6 +1073,20 @@ virCommandSetPidFile(virCommandPtr cmd, const char *pidfile)
>  }
>  
>  
> +gid_t
> +virCommandGetGID(virCommandPtr cmd)
> +{
> +    return cmd->gid;
> +}
> +
> +
> +uid_t
> +virCommandGetUID(virCommandPtr cmd)
> +{
> +    return cmd->uid;
> +}
> +
> +
>  void
>  virCommandSetGID(virCommandPtr cmd, gid_t gid)
>  {
> diff --git a/src/util/vircommand.h b/src/util/vircommand.h
> index e7c2e513bae1..b401d7b238d7 100644
> --- a/src/util/vircommand.h
> +++ b/src/util/vircommand.h
> @@ -68,6 +68,10 @@ int virCommandPassFDGetFDIndex(virCommandPtr cmd,
>  void virCommandSetPidFile(virCommandPtr cmd,
>                            const char *pidfile) ATTRIBUTE_NONNULL(2);
>  
> +gid_t virCommandGetGID(virCommandPtr cmd) ATTRIBUTE_NONNULL(1);
> +
> +uid_t virCommandGetUID(virCommandPtr cmd) ATTRIBUTE_NONNULL(1);
> +
>  void virCommandSetGID(virCommandPtr cmd, gid_t gid);
>  
>  void virCommandSetUID(virCommandPtr cmd, uid_t uid);

ACK.
I guess the commit using those is still to come, right?
--
Cedric

--
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]
  Powered by Linux