Created
October 17, 2009 15:41
-
-
Save bdrewery/212374 to your computer and use it in GitHub Desktop.
FreeBSD patch for non-root screen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To run screen as non-root: | |
chmod 0111 /usr/local/bin/screen | |
chown nobody:utmp /usr/local/bin/screen | |
# Run this. Add into /etc/rc.local as well if you have clear_tmp_enable="YES" | |
install -d -o root -g wheel -m 1777 /tmp/uscreens | |
Add this to /usr/local/etc/pkgtools.conf in the AFTERINSTALL block as so for auto fixing screen on portupgrade: | |
AFTERINSTALL = { | |
'sysutils/screen' => sprintf('chmod 0111 /usr/local/bin/screen; chown nobody:utmp /usr/local/bin/screen;'), | |
} | |
--- pty.c.orig 2009-06-07 16:07:51.000000000 -0500 | |
+++ pty.c 2009-06-07 16:10:40.000000000 -0500 | |
@@ -314,7 +314,7 @@ | |
#endif | |
/***************************************************************/ | |
- | |
+/* | |
#if defined(HAVE_OPENPTY) && !defined(PTY_DONE) | |
#define PTY_DONE | |
int | |
@@ -331,7 +331,7 @@ | |
return f; | |
} | |
#endif | |
- | |
+*/ | |
/***************************************************************/ | |
#ifndef PTY_DONE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment