Skip leading whitespace on prepends and commands
This commit is contained in:
parent
e9901e30a2
commit
207da7ffcf
5
daemon.c
5
daemon.c
@ -70,7 +70,8 @@ static int parseConfig(const char *path) {
|
||||
if (!ptr[0] || ptr[0] == '#') {
|
||||
continue;
|
||||
} else if (ptr[0] == '%') {
|
||||
int error = prependAdd(&ptr[1]);
|
||||
ptr++;
|
||||
int error = prependAdd(&ptr[strspn(ptr, WS)]);
|
||||
if (error) {
|
||||
syslog(LOG_WARNING, "cannot add prepend command: %m");
|
||||
goto err;
|
||||
@ -84,7 +85,7 @@ static int parseConfig(const char *path) {
|
||||
);
|
||||
goto err;
|
||||
}
|
||||
int error = serviceAdd(name, ptr);
|
||||
int error = serviceAdd(name, &ptr[strspn(ptr, WS)]);
|
||||
if (error) {
|
||||
syslog(LOG_WARNING, "cannot add service: %m");
|
||||
goto err;
|
||||
|
Loading…
Reference in New Issue
Block a user