X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=ovsdb%2Fovsdb-server.c;h=900f4eccb1e63e58650cc2ec214b1d9b41a7513c;hb=f6b60e026eed9dcc68850c6f9e3b393e6a18fd49;hp=116c486b2e5b472c702ba0079f3fc81287d4ad44;hpb=a0d172519ccfd0a34e3a962197cede8fe7bd2d49;p=openvswitch diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index 116c486b..900f4ecc 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -25,7 +25,6 @@ #include "column.h" #include "command-line.h" #include "daemon.h" -#include "fault.h" #include "file.h" #include "json.h" #include "jsonrpc.h" @@ -38,6 +37,7 @@ #include "poll-loop.h" #include "process.h" #include "row.h" +#include "stream-ssl.h" #include "stream.h" #include "svec.h" #include "table.h" @@ -71,8 +71,8 @@ main(int argc, char *argv[]) bool exiting; int retval; + proctitle_init(argc, argv); set_program_name(argv[0]); - register_fault_handlers(); time_init(); vlog_init(); signal(SIGPIPE, SIG_IGN); @@ -93,7 +93,7 @@ main(int argc, char *argv[]) retval = unixctl_server_create(unixctl_path, &unixctl); if (retval) { - ovs_fatal(retval, "could not listen for control connections"); + exit(EXIT_FAILURE); } daemonize_complete(); @@ -204,6 +204,7 @@ parse_options(int argc, char *argv[], char **file_namep, OPT_DUMMY = UCHAR_MAX + 1, OPT_REMOTE, OPT_UNIXCTL, + OPT_BOOTSTRAP_CA_CERT, VLOG_OPTION_ENUMS, LEAK_CHECKER_OPTION_ENUMS }; @@ -215,6 +216,10 @@ parse_options(int argc, char *argv[], char **file_namep, DAEMON_LONG_OPTIONS, VLOG_LONG_OPTIONS, LEAK_CHECKER_LONG_OPTIONS, +#ifdef HAVE_OPENSSL + {"bootstrap-ca-cert", required_argument, 0, OPT_BOOTSTRAP_CA_CERT}, + STREAM_SSL_LONG_OPTIONS +#endif {0, 0, 0, 0}, }; char *short_options = long_options_to_short_options(long_options); @@ -248,6 +253,15 @@ parse_options(int argc, char *argv[], char **file_namep, DAEMON_OPTION_HANDLERS LEAK_CHECKER_OPTION_HANDLERS +#ifdef HAVE_OPENSSL + STREAM_SSL_OPTION_HANDLERS + + case OPT_BOOTSTRAP_CA_CERT: + stream_ssl_set_ca_cert_file(optarg, true); + break; +#endif + + case '?': exit(EXIT_FAILURE); @@ -279,7 +293,7 @@ usage(void) program_name, program_name); printf("\nJSON-RPC options (may be specified any number of times):\n" " --remote=REMOTE connect or listen to REMOTE\n"); - stream_usage("JSON-RPC", true, true); + stream_usage("JSON-RPC", true, true, true); daemon_usage(); vlog_usage(); printf("\nOther options:\n"