1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

s3-smbd Avoid races creating 'ncaclrpc dir' with epmd in a child process

This commit is contained in:
Andrew Bartlett 2011-08-13 13:30:16 +10:00
parent b51f97325b
commit daa78ead19

View File

@ -1197,6 +1197,15 @@ extern void build_options(bool screen);
return -1;
}
/* This MUST be done before start_epmd() because otherwise
* start_epmd() forks and races against dcesrv_ep_setup() to
* call directory_create_or_exist() */
if (!directory_create_or_exist(lp_ncalrpc_dir(), geteuid(), 0755)) {
DEBUG(0, ("Failed to create pipe directory %s - %s\n",
lp_ncalrpc_dir(), strerror(errno)));
return -1;
}
if (is_daemon && !interactive) {
enum rpc_service_mode_e epm_mode = rpc_epmapper_mode();