diff options
author | Christian Ambach <ambi@samba.org> | 2012-03-30 15:31:19 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-04-11 11:11:39 -0700 |
commit | 2a36408d4020b67d94f8750951bfead069ca1206 (patch) | |
tree | ddcd813e5b39b93cf161f2e37b1a18234837e44b /source3 | |
parent | 30203bda66259d78f07233854118f0f4a3ee673c (diff) | |
download | samba-2a36408d4020b67d94f8750951bfead069ca1206.tar.gz samba-2a36408d4020b67d94f8750951bfead069ca1206.tar.bz2 samba-2a36408d4020b67d94f8750951bfead069ca1206.zip |
s3:param convert kernel oplocks to share parameter
Signed-off-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 2 | ||||
-rw-r--r-- | source3/param/loadparm.c | 11 | ||||
-rw-r--r-- | source3/smbd/oplock.c | 2 |
3 files changed, 6 insertions, 9 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 34c9fe8e53..d32d2e8823 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1226,7 +1226,6 @@ bool lp_client_plaintext_auth(void); bool lp_client_lanman_auth(void); bool lp_client_ntlmv2_auth(void); bool lp_host_msdfs(void); -bool lp_kernel_oplocks(void); bool lp_enhanced_browsing(void); bool lp_use_mmap(void); bool lp_unix_extensions(void); @@ -1355,6 +1354,7 @@ int lp_strict_locking(const struct share_params *p ); bool lp_posix_locking(const struct share_params *p ); bool lp_share_modes(int ); bool lp_oplocks(int ); +bool lp_kernel_oplocks(int ); bool lp_level2_oplocks(int ); bool lp_onlyuser(int ); bool lp_manglednames(const struct share_params *p ); diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 5d8c3a7680..41c29cb0b8 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -230,6 +230,7 @@ static struct loadparm_service sDefault = .bPosixLocking = true, .bShareModes = true, .bOpLocks = true, + .bKernelOplocks = true, .bLevel2OpLocks = true, .bOnlyUser = false, .bMangledNames = true, @@ -3109,11 +3110,11 @@ static struct parm_struct parm_table[] = { { .label = "kernel oplocks", .type = P_BOOL, - .p_class = P_GLOBAL, - .offset = GLOBAL_VAR(bKernelOplocks), + .p_class = P_LOCAL, + .offset = LOCAL_VAR(bKernelOplocks), .special = NULL, .enum_list = NULL, - .flags = FLAG_ADVANCED | FLAG_GLOBAL, + .flags = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL, }, { .label = "locking", @@ -4892,9 +4893,6 @@ static void init_globals(bool reinit_globals) Globals.bDNSproxy = true; - /* this just means to use them if they exist */ - Globals.bKernelOplocks = true; - Globals.bAllowTrustedDomains = true; string_set(&Globals.szIdmapBackend, "tdb"); @@ -5260,7 +5258,6 @@ FN_GLOBAL_BOOL(lp_client_plaintext_auth, bClientPlaintextAuth) FN_GLOBAL_BOOL(lp_client_lanman_auth, bClientLanManAuth) FN_GLOBAL_BOOL(lp_client_ntlmv2_auth, bClientNTLMv2Auth) FN_GLOBAL_BOOL(lp_host_msdfs, bHostMSDfs) -FN_GLOBAL_BOOL(lp_kernel_oplocks, bKernelOplocks) FN_GLOBAL_BOOL(lp_enhanced_browsing, enhanced_browsing) FN_GLOBAL_BOOL(lp_use_mmap, bUseMmap) FN_GLOBAL_BOOL(lp_unix_extensions, bUnixExtensions) diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index f760171c3a..d523da644d 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -978,7 +978,7 @@ bool init_oplocks(struct smbd_server_connection *sconn) messaging_register(sconn->msg_ctx, sconn, MSG_SMB_OPEN_RETRY, process_open_retry_message); - if (lp_kernel_oplocks()) { + if (lp_kernel_oplocks(-1)) { #if HAVE_KERNEL_OPLOCKS_IRIX koplocks = irix_init_kernel_oplocks(sconn); #elif HAVE_KERNEL_OPLOCKS_LINUX |