Tuesday, September 26, 2017

Re: Fix pledge(2) on x11/st

I forgot to include the revision bump, again thanks to tb@, but I'll put
it in if this is OK.

On 22:13 Tue 26 Sep , Ricardo Mestre wrote:
> As pointed out by tb@ it's rather pointless calling pledge(2) just before
> execvp(3), so I dropped that chunk.
>
> Index: patches/patch-st_c
> ===================================================================
> RCS file: /cvs/ports/x11/st/patches/patch-st_c,v
> retrieving revision 1.3
> diff -u -p -u -r1.3 patch-st_c
> --- patches/patch-st_c 5 Apr 2017 21:29:57 -0000 1.3
> +++ patches/patch-st_c 26 Sep 2017 22:09:21 -0000
> @@ -1,6 +1,7 @@
> $OpenBSD: patch-st_c,v 1.3 2017/04/05 21:29:57 juanfra Exp $
> ---- st.c.orig Thu Aug 11 16:25:58 2016
> -+++ st.c Wed Mar 29 14:20:44 2017
> +Index: st.c
> +--- st.c.orig
> ++++ st.c
> @@ -1454,9 +1454,15 @@ ttynew(void)
> die("ioctl TIOCSCTTY failed: %s\n", strerror(errno));
> close(s);
> @@ -12,7 +13,7 @@ $OpenBSD: patch-st_c,v 1.3 2017/04/05 21
> execsh();
> break;
> default:
> -+ if (pledge("stdio rpath tty", NULL) == -1)
> ++ if (pledge("stdio rpath tty proc", NULL) == -1)
> + die("pledge\n");
> close(s);
> cmdfd = m;
>

No comments:

Post a Comment