B<xen-qemuuser-shared>
(in which case different guests will not
be protected against each other).
-And if you do not create the user,
-the restriction request will be silently ineffective!
=item
goto end_search;
}
+ if (!libxl_defbool_val(b_info->u.hvm.dm_restrict)) {
+ LOGD(DEBUG, guest_domid,
+ "dm_restrict disabled, starting QEMU as root");
+ goto end_search;
+ }
+
user = GCSPRINTF("%s%d", LIBXL_QEMU_USER_BASE, guest_domid);
ret = libxl__dm_runas_helper(gc, user);
if (ret < 0)
goto end_search;
}
- user = NULL;
- LOGD(DEBUG, guest_domid, "Could not find user %s, starting QEMU as root",
- LIBXL_QEMU_USER_SHARED);
+ LOGD(ERROR, guest_domid,
+ "Could not find user %s%d or %s, cannot restrict",
+ LIBXL_QEMU_USER_BASE, guest_domid, LIBXL_QEMU_USER_SHARED);
+ return ERROR_INVAL;
end_search:
if (user != NULL && strcmp(user, "root")) {