提交 2e88eeeb 编写于 作者: M Marc Hartmayer 提交者: Daniel P. Berrange

util: Add virCommandGetGID and virCommandGetUID

These functions are used by an upcoming commit.
Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
上级 9020c7d7
......@@ -1506,6 +1506,8 @@ virCommandDaemonize;
virCommandDoAsyncIO;
virCommandExec;
virCommandFree;
virCommandGetGID;
virCommandGetUID;
virCommandHandshakeNotify;
virCommandHandshakeWait;
virCommandNew;
......
......@@ -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)
{
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册