diff --git a/rdo.c b/rdo.c index 0fb1162..bcb1862 100644 --- a/rdo.c +++ b/rdo.c @@ -9,6 +9,8 @@ #include #include "sessions.h" +#define VERSION "1.2" + void getconf(FILE* fp, const char* entry, char* result, size_t len_result) { char* line = NULL; size_t len = 0; @@ -49,8 +51,11 @@ int main(int argc, char** argv) { char username[64], wrong_pw_sleep[64], session_ttl[64], password[128]; unsigned int sleep_ms, tries, ts_ttl; - if (argc < 2) - errx(1, "Please specify a program to run"); + if (argc == 1) { + printf("RootDO version: %s\n\n", VERSION); + printf("Usage: %s [command]\n", argv[0]); + return 0; + } int ruid = getuid(); if (ruid == 0)