summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2014-02-09 07:09:28 -0600
committerepoch <epoch@hacking.allowed.org>2014-02-09 07:09:28 -0600
commit0aa07718054116019222cbd69b81f1508bfa8dc0 (patch)
tree2723341fb1b4c0196f61823933ab0fee4a022a99 /shell
parent2bf21d6516ed44567e9cf842b25fc30a3affc03f (diff)
downloadsegfault-0aa07718054116019222cbd69b81f1508bfa8dc0.tar.gz
segfault-0aa07718054116019222cbd69b81f1508bfa8dc0.zip
added minimal startup scripts.
deleted a bunch of shit from compile.sh cleaned segfault a bit. made the shell script not auto-generated. everything expects /home/segfault/ to be where segfault gets ran. you have to do the chdir yourself now.
Diffstat (limited to 'shell')
-rwxr-xr-xshell10
1 files changed, 6 insertions, 4 deletions
diff --git a/shell b/shell
index 582bd88..f493979 100755
--- a/shell
+++ b/shell
@@ -1,5 +1,7 @@
#!/bin/sh
-# this file is generated by compile.sh. do not edit directly
-cd "/root/services/segfault"
-kill `pgrep -P 1 -f "tail -f ./files/cmd_in"`
-setuidgid segfault tail -f ./files/cmd_in | setuidgid segfault su -l segfault > ./files/cmd_out 2>&1
+#this is to keep stale tails from hanging around...
+kill `pgrep -P 1 -f "tail -f /home/segfault/files/cmd_in"`
+mkdir -p /home/segfault/files
+mkfifo /home/segfault/files/cmd_in
+mkfifo /home/segfault/files/cmd_out
+tail -f /home/segfault/files/cmd_in | su -l segfault > /home/segfault/files/cmd_out 2>&1