{
const char *path;
struct stat st;
+ int saved_errno = errno;
if (input->never_exec)
return;
/* it's a file, not a socket/pipe */
master_service_exec_config(service, input);
}
+ errno = saved_errno;
}
static int
for (;;) {
fd = master_service_open_config(service, input,
&path, error_r);
- if (fd == -1)
+ if (fd == -1) {
+ if (errno == EACCES)
+ output_r->permission_denied = TRUE;
return -1;
+ }
if (config_send_request(service, input, fd,
path, error_r) == 0)
local/remote ip/host */
unsigned int used_local:1;
unsigned int used_remote:1;
+ /* Config couldn't be read because we don't have enough permissions.
+ The process probably should be restarted and the settings read
+ before dropping privileges. */
+ unsigned int permission_denied:1;
};
extern const struct setting_parser_info master_service_setting_parser_info;