mirror of
https://github.com/bol-van/zapret.git
synced 2024-12-28 04:10:34 +05:00
nfqws: chown files after options parse
This commit is contained in:
parent
01af779f2a
commit
6a20fa27b3
@ -1777,10 +1777,6 @@ int main(int argc, char **argv)
|
|||||||
exit_clean(1);
|
exit_clean(1);
|
||||||
}
|
}
|
||||||
fclose(F);
|
fclose(F);
|
||||||
#ifndef __CYGWIN__
|
|
||||||
if (params.droproot && chown(optarg, params.uid, -1))
|
|
||||||
DLOG_ERR("could not chown %s. auto hostlist debug log may not be writable after privilege drop\n", optarg);
|
|
||||||
#endif
|
|
||||||
strncpy(params.hostlist_auto_debuglog, optarg, sizeof(params.hostlist_auto_debuglog));
|
strncpy(params.hostlist_auto_debuglog, optarg, sizeof(params.hostlist_auto_debuglog));
|
||||||
params.hostlist_auto_debuglog[sizeof(params.hostlist_auto_debuglog) - 1] = '\0';
|
params.hostlist_auto_debuglog[sizeof(params.hostlist_auto_debuglog) - 1] = '\0';
|
||||||
}
|
}
|
||||||
@ -2027,6 +2023,8 @@ int main(int argc, char **argv)
|
|||||||
#ifndef __CYGWIN__
|
#ifndef __CYGWIN__
|
||||||
if (params.debug_target == LOG_TARGET_FILE && params.droproot && chown(params.debug_logfile, params.uid, -1))
|
if (params.debug_target == LOG_TARGET_FILE && params.droproot && chown(params.debug_logfile, params.uid, -1))
|
||||||
fprintf(stderr, "could not chown %s. log file may not be writable after privilege drop\n", params.debug_logfile);
|
fprintf(stderr, "could not chown %s. log file may not be writable after privilege drop\n", params.debug_logfile);
|
||||||
|
if (params.droproot && chown(params.hostlist_auto_debuglog, params.uid, -1))
|
||||||
|
DLOG_ERR("could not chown %s. auto hostlist debug log may not be writable after privilege drop\n", params.hostlist_auto_debuglog);
|
||||||
#endif
|
#endif
|
||||||
LIST_FOREACH(dpl, ¶ms.desync_profiles, next)
|
LIST_FOREACH(dpl, ¶ms.desync_profiles, next)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user