diff --git a/src/server/simpleslave.c b/src/server/simpleslave.c --- a/src/server/simpleslave.c +++ b/src/server/simpleslave.c @@ -32,14 +32,15 @@ int main(int argc, char *argv[]) { - char *datadir; char *server; char *username; - char *password; // @TODO: Binki: fill me with confiness + char *password; char *hostname; + cfg_opt_t myopts[] = { CFG_SIMPLE_STR("username", &username), + CFG_SIMPLE_STR("password", &password), CFG_SIMPLE_STR("datadir", &datadir), CFG_SIMPLE_STR("server", &server), CFG_SIMPLE_STR("hostname", &hostname), @@ -59,6 +60,7 @@ int main(int argc, char *argv[]) datadir = NULL; server = NULL; username = NULL; + password = NULL; char curopt; @@ -99,6 +101,11 @@ int main(int argc, char *argv[]) /* Notifies the user if there no username in .conf */ if(checkUsername(username)) return 1; + if(!password) + { + fprintf(stderr, "You haven't specified a password. Please edit your distrenslave.conf file appropriately\n"); + return 1; + } /* fprintf(stderr, "Connecting to server...\n");