diff options
Diffstat (limited to 'ntcoin_openbsd_tildeinstitute')
-rwxr-xr-x | ntcoin_openbsd_tildeinstitute | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/ntcoin_openbsd_tildeinstitute b/ntcoin_openbsd_tildeinstitute index dfd4141..aae37d0 100755 --- a/ntcoin_openbsd_tildeinstitute +++ b/ntcoin_openbsd_tildeinstitute @@ -17,8 +17,10 @@ then #define TCOIN_PASS_PATH "'`/usr/local/bin/grealpath -s $1`'/tcoin/passwords/" #define TCOIN_PROG_ACT_PATH "'`/usr/local/bin/grealpath -s $1`'/tcoin/program_accounting/" #define PROG_ACT_W_SLASH "program_accounting/" +#define LS_PATH "/bin/ls" +#define PIPED_WORD_COUNT_CMD " | /usr/bin/wc -c" +#define PCOIN_KEY_PATH "'`/usr/local/bin/grealpath -s $1`'/tcoin/secrets/pcoin_keys" #define PCOIN_KEY_PATH_W_SLASH "'`/usr/local/bin/grealpath -s $1`'/tcoin/secrets/pcoin_keys/" -#define LS_PCOIN_KEY_CMD "/bin/ls '`/usr/local/bin/grealpath -s $1`'/tcoin/secrets/pcoin_keys" #define TCOIN_CODEZ_PATH "'`/usr/local/bin/grealpath -s $1`'/tcoin/secrets/tcoin_codez" #define TCOIN_BIN_PATH_W_SPACE "'`/usr/local/bin/grealpath -s $2`'/tcoin " #define TCOIN_PATH_W_SLASH "'`/usr/local/bin/grealpath -s $1`'/tcoin/" @@ -125,7 +127,7 @@ else /bin/echo "Sorry, '`/usr/local/bin/grealpath -s $1`/tcoin/secrets/tcoin_codez' already exists." exit 1 else - /bin/echo "`cat /dev/urandom | gbase64 | ghead -c 512 | tr -d '\n' | tr '+' '-' | tr '/' '_'` `cat /dev/urandom | gbase64 | ghead -c 512 | tr -d '\n' | tr '+' '-' | tr '/' '_'`" > "`/usr/local/bin/grealpath -s $1`/tcoin/secrets/tcoin_codez" + /bin/echo "`cat /dev/urandom | gbase64 | ghead -c 512 | tr -d '\n' | tr '+' '-' | tr '/' '_'` `cat /dev/urandom | gbase64 | ghead -c 512 | tr -d '\n' | tr '+' '-' | tr '/' '_'` `cat /dev/urandom | gbase64 | ghead -c 512 | tr -d '\n' | tr '+' '-' | tr '/' '_'`" > "`/usr/local/bin/grealpath -s $1`/tcoin/secrets/tcoin_codez" /bin/chmod 400 "`/usr/local/bin/grealpath -s $1`/tcoin/secrets/tcoin_codez" fi fi @@ -145,6 +147,22 @@ else /bin/cp ./scrypt "`/usr/local/bin/grealpath -s $1`/tcoin/bin/scrypt" /bin/chmod 500 "`/usr/local/bin/grealpath -s $1`/tcoin/bin/scrypt" fi + if [ -e "`/usr/local/bin/grealpath -s $1`/tcoin/bin/popen2.c" ] + then + /bin/echo "Sorry, '`/usr/local/bin/grealpath -s $1`/tcoin/bin/popen2.c' already exists." + exit 1 + else + /bin/cp ./popen2.c "`/usr/local/bin/grealpath -s $1`/tcoin/bin/popen2.c" + /bin/chmod 500 "`/usr/local/bin/grealpath -s $1`/tcoin/bin/popen2.c" + fi + if [ -e "`/usr/local/bin/grealpath -s $1`/tcoin/bin/popen2.h" ] + then + /bin/echo "Sorry, '`/usr/local/bin/grealpath -s $1`/tcoin/bin/popen2.h' already exists." + exit 1 + else + /bin/cp ./popen2.h "`/usr/local/bin/grealpath -s $1`/tcoin/bin/popen2.h" + /bin/chmod 500 "`/usr/local/bin/grealpath -s $1`/tcoin/bin/popen2.h" + fi if [ -e "`/usr/local/bin/grealpath -s $1`/tcoin/bin/tcoin_defs.cpp" ] then /bin/echo "Sorry, '`/usr/local/bin/grealpath -s $1`/tcoin/bin/tcoin_defs.cpp' already exists." @@ -156,6 +174,9 @@ else #define TCOIN_PASS_PATH "'`/usr/local/bin/grealpath -s $1`'/tcoin/passwords/" #define TCOIN_PROG_ACT_PATH "'`/usr/local/bin/grealpath -s $1`'/tcoin/program_accounting/" #define PROG_ACT_W_SLASH "program_accounting/" +#define LS_PATH "/bin/ls" +#define PIPED_WORD_COUNT_CMD " | /usr/bin/wc -c" +#define PCOIN_KEY_PATH "'`/usr/local/bin/grealpath -s $1`'/tcoin/secrets/pcoin_keys" #define PCOIN_KEY_PATH_W_SLASH "'`/usr/local/bin/grealpath -s $1`'/tcoin/secrets/pcoin_keys/" #define TCOIN_CODEZ_PATH "'`/usr/local/bin/grealpath -s $1`'/tcoin/secrets/tcoin_codez" #define TCOIN_BIN_PATH_W_SPACE "'`/usr/local/bin/grealpath -s $2`'/tcoin " @@ -179,12 +200,15 @@ else #define TCOIN_PASS_PATH "'`/usr/local/bin/grealpath -s $1`'/tcoin/passwords/" #define TCOIN_PROG_ACT_PATH "'`/usr/local/bin/grealpath -s $1`'/tcoin/program_accounting/" #define PROG_ACT_W_SLASH "program_accounting/" +#define LS_PATH "/bin/ls" +#define PIPED_WORD_COUNT_CMD " | /usr/bin/wc -c" +#define PCOIN_KEY_PATH "'`/usr/local/bin/grealpath -s $1`'/tcoin/secrets/pcoin_keys" #define PCOIN_KEY_PATH_W_SLASH "'`/usr/local/bin/grealpath -s $1`'/tcoin/secrets/pcoin_keys/" -#define LS_PCOIN_KEY_CMD "/bin/ls '`/usr/local/bin/grealpath -s $1`'/tcoin/secrets/pcoin_keys" #define TCOIN_CODEZ_PATH "'`/usr/local/bin/grealpath -s $1`'/tcoin/secrets/tcoin_codez" #define TCOIN_PATH_W_SLASH "'`/usr/local/bin/grealpath -s $1`'/tcoin/" #define TCOIN_SCRYPT_PATH "'`/usr/local/bin/grealpath -s $1`'/tcoin/bin/scrypt" #define PCOIN_BIN_PATH "'`/usr/local/bin/grealpath -s $2`'/pcoin" +#define TCOIN_BIN_PATH_W_SPACE "'`/usr/local/bin/grealpath -s $2`'/tcoin " #define PCOIN_BIN_PATH_W_SPACE "'`/usr/local/bin/grealpath -s $2`'/pcoin " #define KROWBAR_OFF #define DA_OFF @@ -198,7 +222,7 @@ else exit 1 else /bin/echo '#!/usr/local/bin/bash -(/usr/local/bin/eg++ -I"'`/usr/local/bin/grealpath -s $1`'/tcoin/bin" "'`/bin/pwd`'/tcoin.cpp" -o "'`/usr/local/bin/grealpath -s $1`'/tcoin/bin/tcoin" -std=c++11) \ +(/usr/local/bin/eg++ -I"'`/usr/local/bin/grealpath -s $1`'/tcoin/bin" "'`/bin/pwd`'/tcoin.cpp" "'`/usr/local/bin/grealpath -s $1`'/tcoin/bin/popen2.c" -o "'`/usr/local/bin/grealpath -s $1`'/tcoin/bin/tcoin" -std=c++11) \ && (/bin/chmod 550 "'`/usr/local/bin/grealpath -s $1`'/tcoin/bin/tcoin") \ && (/bin/chmod u+s "'`/usr/local/bin/grealpath -s $1`'/tcoin/bin/tcoin") \ && (([ -f "'`/usr/local/bin/grealpath -s $2`'/tcoin" ] && (/bin/chmod u+w "'`/usr/local/bin/grealpath -s $2`'/tcoin")) || /usr/bin/true) \ @@ -220,7 +244,7 @@ else exit 1 else /bin/echo '#!/usr/local/bin/bash -(/usr/local/bin/eg++ -I"'`/usr/local/bin/grealpath -s $1`'/tcoin/bin" "'`/bin/pwd`'/pcoin.cpp" -o "'`/usr/local/bin/grealpath -s $1`'/tcoin/bin/pcoin" -std=c++11) \ +(/usr/local/bin/eg++ -I"'`/usr/local/bin/grealpath -s $1`'/tcoin/bin" "'`/bin/pwd`'/pcoin.cpp" "'`/usr/local/bin/grealpath -s $1`'/tcoin/bin/popen2.c" -o "'`/usr/local/bin/grealpath -s $1`'/tcoin/bin/pcoin" -std=c++11) \ && (/bin/chmod 550 "'`/usr/local/bin/grealpath -s $1`'/tcoin/bin/pcoin") \ && (/bin/chmod u+s "'`/usr/local/bin/grealpath -s $1`'/tcoin/bin/pcoin") \ && (([ -f "'`/usr/local/bin/grealpath -s $2`'/pcoin" ] && (/bin/chmod u+w "'`/usr/local/bin/grealpath -s $2`'/pcoin")) || /usr/bin/true) \ |