]> git.armaanb.net Git - st.git/blobdiff - st.c
Revert "Simplify cursor color handling"
[st.git] / st.c
diff --git a/st.c b/st.c
index 0628707eae4bc351c483caf7477782d8273203b4..76bb3eafbe0ba110af5c85465f3a40906cf5f886 100644 (file)
--- a/st.c
+++ b/st.c
@@ -806,9 +806,17 @@ ttynew(char *line, char *cmd, char *out, char **args)
                        die("ioctl TIOCSCTTY failed: %s\n", strerror(errno));
                close(s);
                close(m);
+#ifdef __OpenBSD__
+               if (pledge("stdio getpw proc exec", NULL) == -1)
+                       die("pledge\n");
+#endif
                execsh(cmd, args);
                break;
        default:
+#ifdef __OpenBSD__
+               if (pledge("stdio rpath tty proc", NULL) == -1)
+                       die("pledge\n");
+#endif
                close(s);
                cmdfd = m;
                signal(SIGCHLD, sigchld);