1
0
Fork 0
forked from soccera/rdo

Removed extra whitespace

This commit is contained in:
remoof 2021-07-15 12:46:27 +02:00
parent f443a37f12
commit a657d0c2f5

8
rdo.c
View file

@ -38,7 +38,7 @@ void runprog(int argc, char** argv) {
if (setgid(0) == -1)
err(1, "Could not setgid");
if (execvp(argv[0], argv) != 0)
if (execvp(argv[0], argv) != 0)
perror(argv[0]);
}
@ -51,7 +51,7 @@ int main(int argc, char** argv) {
errx(1, "Please specify a program to run");
FILE* fp = fopen("/etc/rdo.conf", "r");
if (!fp)
err(1, "Could not open /etc/rdo.conf");
@ -61,7 +61,7 @@ int main(int argc, char** argv) {
runprog(argc, argv);
return 0;
}
getconf(fp, "username", username, sizeof(username));
getconf(fp, "wrong_pw_sleep", wrong_pw_sleep, sizeof(wrong_pw_sleep));
sleep_ms = atoi(wrong_pw_sleep) * 1000;
@ -89,7 +89,7 @@ int main(int argc, char** argv) {
runprog(argc, argv);
return 0;
}
usleep(sleep_ms);
fprintf(stderr, "Wrong password.\n");
tries++;