Re: [chrony-dev] [PATCH] Add support for OpenBSD

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Wed, Dec 22, 2021 at 07:04:16PM +0000, Shaun Ren wrote:
>  7 files changed, 283 insertions(+)
>  create mode 100644 sys_openbsd.c
>  create mode 100644 sys_openbsd.h

How many users do you estimate are interested in this? I don't
remember any requests here. If someone decided to run OpenBSD, I'd
expect them to strongly prefer openntpd, but maybe that's just my
impression.

If this is accepted, will you stay around and support it?

>  void
>  PRV_Initialise(void)
>  {
> @@ -667,6 +732,12 @@ PRV_StartHelper(void)
>      /* ignore signals, the process will exit on OP_QUIT request */
>      UTI_SetQuitSignalsHandler(SIG_IGN, 1);
>  
> +
> +#ifdef OPENBSD
> +    if (pledge("stdio unix settime", NULL) == -1)
> +      LOG_FATAL("pledge() failed");
> +#endif

Would it make sense to move this to sys_openbsd.c as a syscall filter
option?

> +#ifdef FEAT_PRIVDROP
> +void
> +SYS_OpenBSD_DropRoot(uid_t uid, gid_t gid, SYS_ProcessContext context, int clock_control)
> +{
> +  if (context == SYS_MAIN_PROCESS)
> +    PRV_StartHelper();
> +
> +  UTI_DropRoot(uid, gid);
> +
> +  if (pledge("stdio rpath wpath cpath unix inet dns settime", NULL) == -1)
> +    LOG_FATAL("pledge() failed");

Same here?

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/