1
0
Fork 0
mirror of https://github.com/pygos/usyslog.git synced 2024-11-17 02:07:11 +01:00

Fix path for creating the log directory

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-11-05 21:50:58 +01:00
parent 39fc7d53f4
commit 06cbfcc1cb

View file

@ -180,7 +180,10 @@ static int chroot_setup(void)
memcpy(buffer, SYSLOG_PATH, len + 1); memcpy(buffer, SYSLOG_PATH, len + 1);
for (i = 0; i < len; ++i) { for (i = 0; i <= len && buffer[i] == '/'; ++i)
;
for (; i <= len; ++i) {
if (buffer[i] == '\0' || buffer[i] == '/') { if (buffer[i] == '\0' || buffer[i] == '/') {
buffer[i] = '\0'; buffer[i] = '\0';