* Rename demon -> daemon

This commit is contained in:
Olof hagsand 2022-03-07 11:17:34 +01:00
parent dd2ac56af8
commit ff37ce808c
7 changed files with 11 additions and 13 deletions

View file

@ -745,7 +745,7 @@ main(int argc,
}
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 */
"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"
"or create the group and add the user to it. Check documentation for how to do this on your platform",
backend_group,
@ -984,7 +984,7 @@ main(int argc,
goto ok;
/* 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 */
if (foreground==0){
/* Call plugin callbacks just before fork/daemonization */

View file

@ -593,7 +593,7 @@ restconf_drop_privileges(clicon_handle h)
}
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 */
"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"
"or create the group and add the user to it. Check documentation for how to do this on your platform",
group,

View file

@ -114,7 +114,7 @@ static struct errvec EV[] = {
{"Regexp error", OE_REGEX},
{"UNIX error", OE_UNIX},
{"Syslog error", OE_SYSLOG},
{"Routing demon error", OE_ROUTING},
{"Routing daemon error", OE_ROUTING},
{"XML error", OE_XML},
{"JSON error", OE_JSON},
{"RESTCONF error", OE_RESTCONF},

View file

@ -186,7 +186,7 @@ clixon_event_reg_fd(int fd,
return -1;
}
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_fn = fn;
e->e_arg = arg;
@ -261,7 +261,7 @@ clixon_event_reg_timeout(struct timeval t,
return -1;
}
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_arg = arg;
e->e_type = EVENT_TIME;

View file

@ -862,10 +862,8 @@ clicon_rpc_get(clicon_handle h,
". Internal error, backend returned invalid XML.",
NULL) < 0)
goto done;
if ((xd = xpath_first(xerr, NULL, "rpc-error")) == NULL){
clicon_err(OE_XML, ENOENT, "Expected rpc-error tag but none found(internal)");
goto done;
}
xd = xerr;
xerr = NULL;
}
}
if (xt && xd){

View file

@ -243,7 +243,7 @@ pidfile_zapold(pid_t pid)
}
if ((kill(pid, 0)) < 0){
if (errno != ESRCH){
clicon_err(OE_DAEMON, errno, "Killing old demon");
clicon_err(OE_DAEMON, errno, "Killing old daemon");
goto done;
}
}

View file

@ -117,8 +117,8 @@ regex_posix(char *regexp,
return -1;
}
/* note following two lines trigger [-Wstringop-truncation] warnings, but see no actual error */
strncpy(pattern, "^(", 2);
strncpy(pattern+2, posix, sizeof(pattern)-2);
strncpy(pattern, "^(", 3);
strncpy(pattern+2, posix, sizeof(pattern)-3);
strncat(pattern, ")$", sizeof(pattern)-len0-1);
if (regcomp(&re, pattern, REG_NOSUB|REG_EXTENDED) != 0)
return(0); /* report error */