diff options
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r-- | source3/smbd/server.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c index e1b5e42764..fb97cf8380 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -240,6 +240,14 @@ max can be %d\n", that client substitutions will be done correctly in the process. */ reset_globals_after_fork(); + + /* + * Ensure this child has kernel oplock + * capabilities, but not it's children. + */ + set_process_capability(KERNEL_OPLOCK_CAPABILITY, True); + set_inherited_process_capability(KERNEL_OPLOCK_CAPABILITY, False); + return True; } /* The parent doesn't need this socket */ @@ -661,8 +669,6 @@ static void usage(char *pname) DEBUG(3,( "loaded services\n")); - check_kernel_oplocks(); - if (!is_daemon && !is_a_socket(0)) { DEBUG(0,("standard input is not a socket, assuming -D option\n")); is_daemon = True; @@ -673,6 +679,8 @@ static void usage(char *pname) become_daemon(); } + check_kernel_oplocks(); + if (!directory_exist(lp_lockdir(), NULL)) { mkdir(lp_lockdir(), 0755); } |