forked from soccera/rdo
Removed extra whitespace
This commit is contained in:
parent
f443a37f12
commit
a657d0c2f5
1 changed files with 4 additions and 4 deletions
8
rdo.c
8
rdo.c
|
@ -38,7 +38,7 @@ void runprog(int argc, char** argv) {
|
||||||
if (setgid(0) == -1)
|
if (setgid(0) == -1)
|
||||||
err(1, "Could not setgid");
|
err(1, "Could not setgid");
|
||||||
|
|
||||||
if (execvp(argv[0], argv) != 0)
|
if (execvp(argv[0], argv) != 0)
|
||||||
perror(argv[0]);
|
perror(argv[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ int main(int argc, char** argv) {
|
||||||
errx(1, "Please specify a program to run");
|
errx(1, "Please specify a program to run");
|
||||||
|
|
||||||
FILE* fp = fopen("/etc/rdo.conf", "r");
|
FILE* fp = fopen("/etc/rdo.conf", "r");
|
||||||
|
|
||||||
if (!fp)
|
if (!fp)
|
||||||
err(1, "Could not open /etc/rdo.conf");
|
err(1, "Could not open /etc/rdo.conf");
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ int main(int argc, char** argv) {
|
||||||
runprog(argc, argv);
|
runprog(argc, argv);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
getconf(fp, "username", username, sizeof(username));
|
getconf(fp, "username", username, sizeof(username));
|
||||||
getconf(fp, "wrong_pw_sleep", wrong_pw_sleep, sizeof(wrong_pw_sleep));
|
getconf(fp, "wrong_pw_sleep", wrong_pw_sleep, sizeof(wrong_pw_sleep));
|
||||||
sleep_ms = atoi(wrong_pw_sleep) * 1000;
|
sleep_ms = atoi(wrong_pw_sleep) * 1000;
|
||||||
|
@ -89,7 +89,7 @@ int main(int argc, char** argv) {
|
||||||
runprog(argc, argv);
|
runprog(argc, argv);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
usleep(sleep_ms);
|
usleep(sleep_ms);
|
||||||
fprintf(stderr, "Wrong password.\n");
|
fprintf(stderr, "Wrong password.\n");
|
||||||
tries++;
|
tries++;
|
||||||
|
|
Loading…
Add table
Reference in a new issue