* Rename demon -> daemon
This commit is contained in:
parent
dd2ac56af8
commit
ff37ce808c
7 changed files with 11 additions and 13 deletions
|
|
@ -745,7 +745,7 @@ main(int argc,
|
||||||
}
|
}
|
||||||
if (group_name2gid(backend_group, &gid) < 0){
|
if (group_name2gid(backend_group, &gid) < 0){
|
||||||
clicon_log(LOG_ERR, "'%s' does not seem to be a valid user group.\n" /* \n required here due to multi-line log */
|
clicon_log(LOG_ERR, "'%s' does not seem to be a valid user group.\n" /* \n required here due to multi-line log */
|
||||||
"The config demon requires a valid group to create a server UNIX socket\n"
|
"The config daemon requires a valid group to create a server UNIX socket\n"
|
||||||
"Define a valid CLICON_SOCK_GROUP in %s or via the -g option\n"
|
"Define a valid CLICON_SOCK_GROUP in %s or via the -g option\n"
|
||||||
"or create the group and add the user to it. Check documentation for how to do this on your platform",
|
"or create the group and add the user to it. Check documentation for how to do this on your platform",
|
||||||
backend_group,
|
backend_group,
|
||||||
|
|
@ -984,7 +984,7 @@ main(int argc,
|
||||||
goto ok;
|
goto ok;
|
||||||
|
|
||||||
/* Daemonize and initiate logging. Note error is initiated here to make
|
/* Daemonize and initiate logging. Note error is initiated here to make
|
||||||
demonized errors OK. Before this stage, errors are logged on stderr
|
daemonized errors OK. Before this stage, errors are logged on stderr
|
||||||
also */
|
also */
|
||||||
if (foreground==0){
|
if (foreground==0){
|
||||||
/* Call plugin callbacks just before fork/daemonization */
|
/* Call plugin callbacks just before fork/daemonization */
|
||||||
|
|
|
||||||
|
|
@ -593,7 +593,7 @@ restconf_drop_privileges(clicon_handle h)
|
||||||
}
|
}
|
||||||
if (group_name2gid(group, &gid) < 0){
|
if (group_name2gid(group, &gid) < 0){
|
||||||
clicon_log(LOG_ERR, "'%s' does not seem to be a valid user group." /* \n required here due to multi-line log */
|
clicon_log(LOG_ERR, "'%s' does not seem to be a valid user group." /* \n required here due to multi-line log */
|
||||||
"The config demon requires a valid group to create a server UNIX socket\n"
|
"The config daemon requires a valid group to create a server UNIX socket\n"
|
||||||
"Define a valid CLICON_SOCK_GROUP in %s or via the -g option\n"
|
"Define a valid CLICON_SOCK_GROUP in %s or via the -g option\n"
|
||||||
"or create the group and add the user to it. Check documentation for how to do this on your platform",
|
"or create the group and add the user to it. Check documentation for how to do this on your platform",
|
||||||
group,
|
group,
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ static struct errvec EV[] = {
|
||||||
{"Regexp error", OE_REGEX},
|
{"Regexp error", OE_REGEX},
|
||||||
{"UNIX error", OE_UNIX},
|
{"UNIX error", OE_UNIX},
|
||||||
{"Syslog error", OE_SYSLOG},
|
{"Syslog error", OE_SYSLOG},
|
||||||
{"Routing demon error", OE_ROUTING},
|
{"Routing daemon error", OE_ROUTING},
|
||||||
{"XML error", OE_XML},
|
{"XML error", OE_XML},
|
||||||
{"JSON error", OE_JSON},
|
{"JSON error", OE_JSON},
|
||||||
{"RESTCONF error", OE_RESTCONF},
|
{"RESTCONF error", OE_RESTCONF},
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ clixon_event_reg_fd(int fd,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
memset(e, 0, sizeof(struct event_data));
|
memset(e, 0, sizeof(struct event_data));
|
||||||
strncpy(e->e_string, str, EVENT_STRLEN);
|
strncpy(e->e_string, str, EVENT_STRLEN-1);
|
||||||
e->e_fd = fd;
|
e->e_fd = fd;
|
||||||
e->e_fn = fn;
|
e->e_fn = fn;
|
||||||
e->e_arg = arg;
|
e->e_arg = arg;
|
||||||
|
|
@ -261,7 +261,7 @@ clixon_event_reg_timeout(struct timeval t,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
memset(e, 0, sizeof(struct event_data));
|
memset(e, 0, sizeof(struct event_data));
|
||||||
strncpy(e->e_string, str, EVENT_STRLEN);
|
strncpy(e->e_string, str, EVENT_STRLEN-1);
|
||||||
e->e_fn = fn;
|
e->e_fn = fn;
|
||||||
e->e_arg = arg;
|
e->e_arg = arg;
|
||||||
e->e_type = EVENT_TIME;
|
e->e_type = EVENT_TIME;
|
||||||
|
|
|
||||||
|
|
@ -862,10 +862,8 @@ clicon_rpc_get(clicon_handle h,
|
||||||
". Internal error, backend returned invalid XML.",
|
". Internal error, backend returned invalid XML.",
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
if ((xd = xpath_first(xerr, NULL, "rpc-error")) == NULL){
|
xd = xerr;
|
||||||
clicon_err(OE_XML, ENOENT, "Expected rpc-error tag but none found(internal)");
|
xerr = NULL;
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (xt && xd){
|
if (xt && xd){
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,7 @@ pidfile_zapold(pid_t pid)
|
||||||
}
|
}
|
||||||
if ((kill(pid, 0)) < 0){
|
if ((kill(pid, 0)) < 0){
|
||||||
if (errno != ESRCH){
|
if (errno != ESRCH){
|
||||||
clicon_err(OE_DAEMON, errno, "Killing old demon");
|
clicon_err(OE_DAEMON, errno, "Killing old daemon");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -117,8 +117,8 @@ regex_posix(char *regexp,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/* note following two lines trigger [-Wstringop-truncation] warnings, but see no actual error */
|
/* note following two lines trigger [-Wstringop-truncation] warnings, but see no actual error */
|
||||||
strncpy(pattern, "^(", 2);
|
strncpy(pattern, "^(", 3);
|
||||||
strncpy(pattern+2, posix, sizeof(pattern)-2);
|
strncpy(pattern+2, posix, sizeof(pattern)-3);
|
||||||
strncat(pattern, ")$", sizeof(pattern)-len0-1);
|
strncat(pattern, ")$", sizeof(pattern)-len0-1);
|
||||||
if (regcomp(&re, pattern, REG_NOSUB|REG_EXTENDED) != 0)
|
if (regcomp(&re, pattern, REG_NOSUB|REG_EXTENDED) != 0)
|
||||||
return(0); /* report error */
|
return(0); /* report error */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue