X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fmain.c;h=dddc3e15f11652f8472bc56780d58e312f20cb92;hb=02492357cce066201a11993255120119c2703af1;hp=8a4532d584e105e4b6bcd82ba7350e999ca603c9;hpb=d00571d3c5365f40e7ec2ec3ab0f636afa0db480;p=src%2Fapp-framework-binder.git diff --git a/src/main.c b/src/main.c index 8a4532d5..dddc3e15 100644 --- a/src/main.c +++ b/src/main.c @@ -108,8 +108,8 @@ static AFB_options cliOptions [] = { {SET_CONFIG_EXIT ,0,"saveonly" , "Save config on disk and then exit"}, {SET_SMACK ,1,"smack" , "Set Smack Label [default demo]"}, - {SET_PLUGINS ,1,"mods" , "Enable module [default all]"}, - {SET_AUTH_TOKEN ,1,"token" , "Initial Secret [default=non]"}, + {SET_PLUGINS ,1,"plugins" , "Load Plugins from dir [default = PLUGIN_INSTALL_DIR"}, + {SET_AUTH_TOKEN ,1,"token" , "Initial Secret [default=no-session, --token="" for session without authentication]"}, {DISPLAY_VERSION ,0,"version" , "Display version and copyright"}, {DISPLAY_HELP ,0,"help" , "Display this help"}, @@ -159,7 +159,7 @@ void signalQuit (int signum) { fprintf (stderr," --%-15s %s\n", command, cliOptions[ind].help); } } - fprintf (stderr,"Example:\n %s\\\n --verbose --port=1234 --smack=xxxx --token='azerty' --mods=alsa:dbus\n", name); + fprintf (stderr,"Example:\n %s\\\n --verbose --port=1234 --smack=xxxx --token='azerty' --plugins=build/plugins\n", name); } // end printHelp /*---------------------------------------------------------- @@ -246,7 +246,7 @@ static void listenLoop (AFB_session *session) { fprintf (stderr, "hoops returned from infinite loop [report bug]\n"); } } - + /*--------------------------------------------------------- | main | Parse option and launch action @@ -357,7 +357,6 @@ int main(int argc, char *argv[]) { case SET_PLUGINS: if (optarg == 0) goto needValueForOption; - fprintf (stderr, "Not Implemented yet\n"); cliconfig.plugins = optarg; break; @@ -510,7 +509,7 @@ int main(int argc, char *argv[]) { } // let's not take the risk to run as ROOT - if (getuid() == 0) goto errorNoRoot; + //if (getuid() == 0) goto errorNoRoot; // check session dir and create if it does not exist if (sessionCheckdir (session) != AFB_SUCCESS) goto errSessiondir; @@ -597,9 +596,9 @@ errorSetuid: fprintf (stderr,"\nERR:AFB-daemon Failed to change UID to username=[%s]\n\n", session->config->setuid); exit (-1); -errorNoRoot: - fprintf (stderr,"\nERR:AFB-daemon Not allow to run as root [use --seteuid=username option]\n\n"); - exit (-1); +//errorNoRoot: +// fprintf (stderr,"\nERR:AFB-daemon Not allow to run as root [use --seteuid=username option]\n\n"); +// exit (-1); errorPidFile: fprintf (stderr,"\nERR:AFB-daemon Failed to write pid file [%s]\n\n", session->config->pidfile);