Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix bugs in Radio sequence, parameters, add ping/refresh
[src/app-framework-binder.git]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index
8a4532d
..
aa0e9bc
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-109,7
+109,7
@@
static AFB_options cliOptions [] = {
{SET_SMACK ,1,"smack" , "Set Smack Label [default demo]"},
{SET_PLUGINS ,1,"mods" , "Enable module [default all]"},
{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_AUTH_TOKEN ,1,"token" , "Initial Secret [default=no
-session, --token="" for session without authenticatio
n]"},
{DISPLAY_VERSION ,0,"version" , "Display version and copyright"},
{DISPLAY_HELP ,0,"help" , "Display this help"},
{DISPLAY_VERSION ,0,"version" , "Display version and copyright"},
{DISPLAY_HELP ,0,"help" , "Display this help"},
@@
-246,7
+246,7
@@
static void listenLoop (AFB_session *session) {
fprintf (stderr, "hoops returned from infinite loop [report bug]\n");
}
}
fprintf (stderr, "hoops returned from infinite loop [report bug]\n");
}
}
-
+
/*---------------------------------------------------------
| main
| Parse option and launch action
/*---------------------------------------------------------
| main
| Parse option and launch action
@@
-510,7
+510,7
@@
int main(int argc, char *argv[]) {
}
// let's not take the risk to run as ROOT
}
// 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;
// check session dir and create if it does not exist
if (sessionCheckdir (session) != AFB_SUCCESS) goto errSessiondir;
@@
-597,9
+597,9
@@
errorSetuid:
fprintf (stderr,"\nERR:AFB-daemon Failed to change UID to username=[%s]\n\n", session->config->setuid);
exit (-1);
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);
errorPidFile:
fprintf (stderr,"\nERR:AFB-daemon Failed to write pid file [%s]\n\n", session->config->pidfile);