mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
util: Add virCommandGetGID and virCommandGetUID
These functions are used by an upcoming commit. Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
This commit is contained in:
parent
9020c7d7e4
commit
2e88eeebb1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user