Hi,

now that the 'video' promise is in, looking for okays to pledge
video(1).

with help & hints from semarie@.

Index: video.c
===================================================================
RCS file: /cvs/xenocara/app/video/video.c,v
retrieving revision 1.25
diff -u -r1.25 video.c
--- video.c     9 Apr 2018 18:16:44 -0000       1.25
+++ video.c     30 Dec 2018 09:39:27 -0000
@@ -1961,6 +1961,8 @@
        argv += optind;
 
        if (vid.mode & M_QUERY) {
+               if (pledge("stdio rpath wpath video", NULL) == -1)
+                       err(1, "pledge");
                dev_dump_query(&vid);
                cleanup(&vid, 0);
        }
@@ -1970,6 +1972,14 @@
 
        if (!setup(&vid))
                cleanup(&vid, 1);
+
+       if (vid.mode & M_IN_FILE) {
+               if (pledge("stdio", NULL) == -1)
+                       err(1, "pledge");
+       } else {
+               if (pledge("stdio rpath video", NULL) == -1)
+                       err(1, "pledge");
+       }
 
        if (!stream(&vid))
                cleanup(&vid, 1);

Reply via email to