These functions are used by an upcoming commit.
Signed-off-by: Marc Hartmayer <mhartmay(a)linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
---
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);
--
2.5.5