konakona/sst
make it work on sh shell(still make it work on other shell)
Commit 19f5cd7a9321 · konakona · 2026-11-17 19:59 +0700
Comments
No comments yet.
Diff
diff --git a/README b/README
--- a/README
+++ b/README
@@ -1,14 +1,16 @@
-# sst - simple secure terminal
+sst - simple secure terminal
+
+sst is a simple and secure terminal emulator for X that fork from st which sucks less.
-sst is a simple and secure terminal emulator for X that fork from [st](https://suckless.org/st) which sucks less.
+Requirements
+-------------
+
+In order to build sst you need the Xlib header files and use OpenBSD (even though you can compile
+it on other BSD OSes or linux distro but the security part only work on OpenBSD)
-# Requirements
-
-In order to build sst you need the Xlib header files.
-
-
-# Installation
+Installation
+------------
Edit config.mk to match your local setup (sst is installed into
the /usr/local namespace by default).
@@ -19,16 +21,17 @@
make clean install
-# Running sst
+Running sst
+-----------
-If you did not install st with make clean install, you must compile
+If you did not install sst with make clean install, you must compile
the st terminfo entry with the following command:
- tic -sx sst.info
+ tic -sx st.info
See the man page for additional details.
-# Credits
+Credits
-------
Based on st made by Hiltjo Posthuma <[email protected]> .
diff --git a/st.c b/st.c
--- a/st.c
+++ b/st.c
@@ -801,7 +801,7 @@
if (s > 2)
close(s);
#ifdef __OpenBSD__
- if (pledge("stdio getpw proc exec", NULL) == -1)
+ if (pledge("stdio rpath tty getpw proc exec", NULL) == -1)
die("pledge\n");
#endif
execsh(cmd, args);
diff --git a/x.c b/x.c
--- a/x.c
+++ b/x.c
@@ -2102,7 +2102,10 @@
snprintf(xauthority, sizeof(xauthority), "%s/.Xauthority", home ? home : "");
}
- if (unveil("/etc/fonts", "r") == -1 ||
+ if (unveil("/etc", "r") == -1 ||
+ unveil("/usr/lib", "r") == -1 ||
+ unveil("/usr/local/lib", "r") == -1 ||
+ unveil("/etc/fonts", "r") == -1 ||
unveil("/usr/share/fonts", "r") == -1 ||
unveil("/usr/X11R6/lib/X11/fonts", "r") == -1 ||
unveil("/usr/X11R6/lib/X11/xkb", "r") == -1 ||