sys_solaris: add support for dropping root privileges

On Solaris, use the privops helper for the ntp_adjtime(),
settimeofday(), and bind() system calls.
This commit is contained in:
Miroslav Lichvar
2015-12-10 11:39:40 +01:00
parent 8a95631e39
commit 67b108d1ce
4 changed files with 21 additions and 0 deletions

View File

@@ -28,8 +28,10 @@
#include "sysincl.h"
#include "privops.h"
#include "sys_solaris.h"
#include "sys_timex.h"
#include "util.h"
/* ================================================== */
@@ -48,3 +50,14 @@ SYS_Solaris_Finalise(void)
{
SYS_Timex_Finalise();
}
/* ================================================== */
#ifdef FEAT_PRIVDROP
void
SYS_Solaris_DropRoot(uid_t uid, gid_t gid)
{
PRV_StartHelper();
UTI_DropRoot(uid, gid);
}
#endif