Skip to content
Snippets Groups Projects
Commit e684134a authored by Jan Hák's avatar Jan Hák
Browse files

knotd: print error when unable to change owner of logging file

relates #728
parent f536dcf0
No related branches found
No related tags found
No related merge requests found
Pipeline #80008 passed
/* Copyright (C) 2019 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
/* Copyright (C) 2021 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -382,6 +382,7 @@ int log_update_privileges(int uid, int gid)
for (int i = 0; i < s_log->file_count; ++i) {
if (fchown(fileno(s_log->file[i]), uid, gid) < 0) {
fprintf(stderr, "Failed to change owner of logging file\n");
return knot_map_errno();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment