diff options
| author | login (tilde.institute) <login@tilde.institute> | 2020-07-14 14:55:04 -0400 |
|---|---|---|
| committer | login (tilde.institute) <login@tilde.institute> | 2020-07-14 14:55:04 -0400 |
| commit | 08783c2043ba8cf9837267905a32e515a4300c2e (patch) | |
| tree | 4dfb33fe078f172f4327e95f2a6eaf9b72b504f5 | |
| parent | b73e169b72daff3f1edf991cd6e0613f44d6f3c4 (diff) | |
| download | tcoin-08783c2043ba8cf9837267905a32e515a4300c2e.tar.gz | |
Updated tcoin.cpp and pcoin.cpp
1. Removed unneeded WHOAMI_PATH preprocessor constant from pcoin.cpp.
2. Updated WHOAMI_PATH for tilde.institute to use "id -ru" to get the real uid on OpenBSD (/usr/bin/whoami doesn't get the real username on OpenBSD).
| -rw-r--r-- | 1 | 0 | ||||
| -rw-r--r-- | pcoin.cpp | 1 | ||||
| -rw-r--r-- | tcoin.cpp | 8 |
3 files changed, 6 insertions, 3 deletions
@@ -43,7 +43,6 @@ #ifndef KROWBAR_OFF #define KROWBAR_SCORE_PATH "/home/krowbar/Code/irc/data/tildescores.txt" #endif -#define WHOAMI_PATH "/usr/bin/whoami" #ifndef DA_OFF #define TROIDO_DACOINS_CMD "cd /home/troido/daily_adventure/client/ && /home/troido/daily_adventure/client/daclient printinfo 2>&1 | /bin/grep -oP '(?<=\"Coins\", )\[[:digit:]]+'" #endif @@ -38,7 +38,11 @@ #ifndef KROWBAR_OFF #define KROWBAR_SCORE_PATH "/home/krowbar/Code/irc/data/tildescores.txt" #endif -#define WHOAMI_PATH "/usr/bin/whoami" +#ifndef TILDEINSTITUTE + #define WHOAMI_PATH "/usr/bin/whoami" +#else + #define WHOAMI_PATH "/usr/bin/getent passwd $(/usr/bin/id -ru) | /usr/bin/cut -d: -f1" +#endif #ifndef DA_OFF #define TROIDO_DACOINS_CMD "cd /home/troido/daily_adventure/client/ && /home/troido/daily_adventure/client/daclient printinfo 2>&1 | /bin/grep -oP '(?<=\"Coins\", )[[:digit:]]+'" #endif @@ -1543,7 +1547,7 @@ int main(int argc, char *argv[]) { std::string salt_file = std::string(TCOIN_SALT_PATH) + get_username() + std::string("_salt.txt"); std::string password_file = std::string(TCOIN_PASS_PATH) + get_username() + std::string("_password.txt"); - execl(TCOIN_SCRYPT_PATH, "scrypt", "enc", salt_file.c_str(), password_file.c_str(), NULL); + execl(TCOIN_SCRYPT_PATH, "scrypt", "enc", "-m", "0.25", "-t", "10", salt_file.c_str(), password_file.c_str(), NULL); } if(argc==2 && !strctcmp(argv[1], code2)) { |