mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
NetBSD doesn't have setresuid(). introcuce libxl__setresuid(), which on NetBSD assert() that it's never called (it should not be called when dm restriction is off, and NetBSD doesn't support dm restriction at this time). On linux and FreeBSD it just calls setresuid(). Signed-off-by: Manuel Bouyer <bouyer@netbsd.org> Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
24 lines
801 B
C
24 lines
801 B
C
/*
|
|
* Copyright (C) 2021
|
|
* Author Manuel Bouyer <bouyer@netbsd.org>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License as published
|
|
* by the Free Software Foundation; version 2.1 only. with the special
|
|
* exception on linking described in file LICENSE.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Lesser General Public License for more details.
|
|
*/
|
|
|
|
#include "libxl_osdeps.h" /* must come before any other headers */
|
|
|
|
#include "libxl_internal.h"
|
|
|
|
int libxl__setresuid(uid_t ruid, uid_t euid, uid_t suid)
|
|
{
|
|
return setresuid(ruid, euid, suid);
|
|
}
|