Makefile.in: Fixed bug with continuation line causing proto to fail.
[jra/samba/.git] / source / smbd / server.c
index e1b5e427642baa37f7f1ca02c4dfaaa75a7b243d..fb97cf838003872ae976e4615921ecb35a0b0086 100644 (file)
@@ -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);
        }