[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 15/24] Make libs/light build on NetBSD
--- tools/libs/light/libxl_dm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/libs/light/libxl_dm.c b/tools/libs/light/libxl_dm.c index 5948ace60d..c93bdf2cc9 100644 --- a/tools/libs/light/libxl_dm.c +++ b/tools/libs/light/libxl_dm.c @@ -3659,6 +3659,14 @@ static int kill_device_model_uid_child(libxl__destroy_devicemodel_state *ddms, LOGD(DEBUG, domid, "DM reaper: calling setresuid(%d, %d, 0)", reaper_uid, dm_kill_uid); +#ifdef __NetBSD__ + r = setuid(dm_kill_uid); + if (r) { + LOGED(ERROR, domid, "setuid to %d", dm_kill_uid); + rc = rc ?: ERROR_FAIL; + goto out; + } +#else /* __NetBSD__ */ r = setresuid(reaper_uid, dm_kill_uid, 0); if (r) { LOGED(ERROR, domid, "setresuid to (%d, %d, 0)", @@ -3666,6 +3674,7 @@ static int kill_device_model_uid_child(libxl__destroy_devicemodel_state *ddms, rc = rc ?: ERROR_FAIL; goto out; } +#endif /* __NetBSD__ */ /* * And kill everyone but me. -- 2.28.0
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |