X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fsilcd.c;h=2e65293e23900cee13f59635329a853457241e57;hb=33fde1853daddd7f34565507cb96652f0cec4ee2;hp=e5f45e3b850be4a7dc235729e55f287ee620409d;hpb=77599da05bae9b355f600d63f9be8c285ff0ea4d;p=silc.git diff --git a/apps/silcd/silcd.c b/apps/silcd/silcd.c index e5f45e3b..2e65293e 100644 --- a/apps/silcd/silcd.c +++ b/apps/silcd/silcd.c @@ -32,18 +32,20 @@ /* For now, we'll have this one server context global for this module. */ static SilcServer silcd; -static void silc_usage(); -static char *silc_server_create_identifier(); +static void silc_usage(void); +static char *silc_server_create_identifier(void); static int silc_server_create_key_pair(char *pkcs_name, int bits, char *path, char *identifier, SilcPublicKey *ret_pub_key, SilcPrivateKey *ret_prv_key); +static void silc_server_create_passphrase(void); /* Long command line options */ static struct option long_opts[] = { { "config-file", 1, NULL, 'f' }, + { "passphrase", 1, NULL, 'p' }, { "debug", 1, NULL, 'd' }, { "help", 0, NULL, 'h' }, { "foreground", 0, NULL, 'F' }, @@ -67,7 +69,7 @@ static int opt_bits = 1024; /* Prints out the usage of silc client */ -static void silc_usage() +static void silc_usage(void) { printf("\ Usage: silcd [options]\n\ @@ -119,7 +121,8 @@ static void silc_server_checkpid(SilcServer silcd) return; kill(oldpid, SIGCHLD); /* this signal does nothing, check if alive */ if (errno != ESRCH) { - fprintf(stderr, "\nI detected another daemon running with the same pid file.\n"); + fprintf(stderr, "\nI detected another daemon running with the " + "same pid file.\n"); fprintf(stderr, "Please change the config file, or erase the %s\n", silcd->config->server_info->pid_file); exit(1); @@ -156,7 +159,7 @@ int main(int argc, char **argv) /* Parse command line arguments */ if (argc > 1) { - while ((opt = getopt_long(argc, argv, "cf:d:hFVC:", + while ((opt = getopt_long(argc, argv, "f:d:hFVC:", long_opts, &option_index)) != EOF) { switch(opt) { @@ -298,7 +301,7 @@ int main(int argc, char **argv) /* Returns identifier string for public key generation. */ -static char *silc_server_create_identifier() +static char *silc_server_create_identifier(void) { char *username = NULL, *realname = NULL; char hostname[256], email[256];