On a Monday in 2020, Prakhar Bansal wrote:
---
This also implements GetHostname - they would look nicer in separate pateches.
src/jailhouse/jailhouse_driver.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/jailhouse/jailhouse_driver.c b/src/jailhouse/jailhouse_driver.c index ac9da4c85d..75bf41fc11 100644 --- a/src/jailhouse/jailhouse_driver.c +++ b/src/jailhouse/jailhouse_driver.c @@ -32,8 +32,10 @@ #include "viralloc.h" #include "virfile.h" #include "virlog.h" +#include "virutil.h" #include "vircommand.h" #include "virpidfile.h" +#include "access/viraccessapicheck.h" #define VIR_FROM_THIS VIR_FROM_JAILHOUSE @@ -241,16 +243,19 @@ jailhouseStateInitialize(bool privileged G_GNUC_UNUSED, static const char * jailhouseConnectGetType(virConnectPtr conn) { - UNUSED(conn); - return NULL; + if (virConnectGetTypeEnsureACL(conn) < 0) + return NULL; + return "JAILHOUSE";
And this would look better as "Jailhouse". Jano
} static char * jailhouseConnectGetHostname(virConnectPtr conn) { - UNUSED(conn); - return NULL; + if (virConnectGetHostnameEnsureACL(conn) < 0) + return NULL; + + return virGetHostname(); } static int
Attachment:
signature.asc
Description: PGP signature