On Mon, Oct 24, 2016 at 01:31:35PM -0600, Matthieu Herrb wrote:
> CVSROOT:      /cvs
> Module name:  xenocara
> Changes by:   matth...@cvs.openbsd.org        2016/10/24 13:31:35
> 
> Modified files:
>       app/xterm      : Makefile xterm.man xtermcfg.h 
> 
> Log message:
> Disable Tektronics 4014 emulation. ok natano@, naddy@, schwarze@
> 

Hi,

With the disabling of Tektronics emulation, the pledge(2) promises could
be reduced a bit: no more "cpath" should be required.

The commit message for 1.35 which introduced pledge(2) in xterm(1)
stated that "cpath" was for Tek emulation window. I also reviewed
several functions for ensuring no others use of "cpath" after pledging.

Ideally, additionnal review would be welcome: xterm(1) is a big program,
and #ifdef maze is a bit complex to follow :)

Thanks.
-- 
Sebastien Marie


Index: main.c
===================================================================
RCS file: /cvs/xenocara/app/xterm/main.c,v
retrieving revision 1.39
diff -u -p -r1.39 main.c
--- main.c      7 Aug 2016 21:27:36 -0000       1.39
+++ main.c      25 Oct 2016 06:41:00 -0000
@@ -2634,12 +2634,12 @@ main(int argc, char *argv[]ENVP_ARG)
         if (data &&
             (strstr(data, "exec-formatted") || strstr(data, 
"exec-selectable"))) {
 
-            if (pledge("stdio rpath wpath cpath id proc exec tty", NULL) == 
-1) {
+            if (pledge("stdio rpath wpath id proc exec tty", NULL) == -1) {
                 xtermWarning("pledge\n");
                 exit(1);
             }
         } else {
-            if (pledge("stdio rpath wpath cpath id proc tty", NULL) == -1) {
+            if (pledge("stdio rpath wpath id proc tty", NULL) == -1) {
                xtermWarning("pledge\n");
                exit(1);
            }

Reply via email to