[SCM] Samba Shared Repository - branch master updated
Michael Adam
obnox at samba.org
Thu Jul 28 05:21:03 MDT 2011
The branch, master has been updated
via 0ad8c12 s3:modules:nfs4_acls: improve fix for bug #8330
via 7b7c6c8 s3:torture: use lp_load_global() in pdbtest - this does not need shares nor IPC$
via a6fe4d2 s3:winbindd: use lp_load_global() - winbindd does not need shares or IPC$
via b793e02 s3:smbstatus: use lp_load_global() - smbstatus does not need to load shares!
via 7c41dda s3:split_tokens: use lp_load_global(), fixing the call to lp_load()
via d696bee s3:split_tokens: fix a nonempty blank line
via d29be7d s3: use lp_load_global() in smbw_sample -- whatever this is ... :-)
via b9fdfba s3:smbtree: use lp_load_global()
via 7e2deb9 s3:smbpasswd: use lp_load_global()
via 039ae12 s3:smbfilter: use lp_load_global()
via e6176d5 s3:smbcquotas: use lp_load_global()
via ce8beb5 s3:smbcontrol: use lp_load_global(): smbcontrol does not need to load the shares
via b608cfc s3:smbcacls: use lp_load_global()
via d4abfcc s3:pdbedit: use lp_load_global()
via 2a98ee0 s3:ntlm_auth: use lp_load_global()
via ac9a61b s3:nmblookup: use lp_load_global()
via 82202f9 s3:net: use lp_load_global()
via 7557ba1 s3:eventlogadm: use lp_load_global()
via 1679fe5 s3:dbwrap_torture: use lp_load_global()
via 59a2f3d s3:dbwrap_tool: use lp_load_global()
via ae752ec s3:smbtorture: use the lp_load_global() wrapper of lp_load()
via c32479f s3:torture: use lp_load_global() in the strstr test
via ecc487e s3:torture: use lp_load_global in the strcmp test
via 426ae35 s3:torture: use lp_load_global() in the push_ucs2 test
via bfde6fa s3:torture: use lp_load_global() in the msgtest
via d6b4c69 s3:torture: use lp_load_global() in the masktest
via ee495ab s3:torture: use lp_load_global() in locktest2
via 407a514 s3:torture: use lp_load_global() in the locktest
via 4a21e50 s3:rpcclient: use the lp_load_global() wrapper of lp_load()
via a7e9219 s3:nmbd: use the lp_load_global() wrapper of lp_load()
via 74b806c s3:libnet_join: use lp_load_global() wrapper of lp_load()
via 88ee697 s3:libsmbconf: use lp_load_global() in the testsuite
via 2c3a1f4 s3:libnetapi: use lp_load_global()
via c2aa8e5 s3:loadparm: make lp_set_in_client() static - only used in wrappers in loadparm now.
via c9efe30 s3:pam_smbpass: use lp_load_client() in pam_smbpass
via f764de6 s3:libsmb: use lp_load_client() and lp_load_client_no_reinit() in libsmb_context
via 4e41d38 s3:loadparm: add wrapper lp_load_client_no_reinit()
via 5676fbb s3:loadparm: add wrapper lp_load_globals_no_reinit()
via fbf254c s3:libsmb: fix a call to lp_load to reinit the globals in any case
via bff217c s3:smbspool: use lp_load_client()
via 0c55a76 s3:smbclient: use lp_load_client()
via 0b21c77 s3:loadparm: make lp_is_in_client() static - only used inside loadparm
via 37f548d s3:loadparm: add lp_load_client() that also sets the client state internally
via 1379ef8 s3:loadparm: add a convenience wrapper lp_load_global()
via 1332911 s3:loadparm: rename parameter "allow_registry_shares" to "load_all_shares"
from 427805b samba-tool: ensure prompting of passwords is in the right order
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 0ad8c12d48d1d7bc57b8def7b638846499104265
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 09:49:34 2011 +0200
s3:modules:nfs4_acls: improve fix for bug #8330
simplify the check insmbacl4_find_equal_special()
Signed-off-by: Michael Adam <obnox at samba.org>
Autobuild-User: Michael Adam <obnox at samba.org>
Autobuild-Date: Thu Jul 28 13:20:38 CEST 2011 on sn-devel-104
commit 7b7c6c85f16a69c346057fcfee830c65aa4b6ed0
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 11:15:51 2011 +0200
s3:torture: use lp_load_global() in pdbtest - this does not need shares nor IPC$
commit a6fe4d20f192bf1bde7e632b03ee3e20776cf37e
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 11:04:53 2011 +0200
s3:winbindd: use lp_load_global() - winbindd does not need shares or IPC$
commit b793e02c6bb1962f44e8732cbf790b7912b7abe6
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:39:45 2011 +0200
s3:smbstatus: use lp_load_global() - smbstatus does not need to load shares!
commit 7c41dda1b3195c9e6cdca3fb1cc04d5cfeb1bdbe
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:34:09 2011 +0200
s3:split_tokens: use lp_load_global(), fixing the call to lp_load()
this does not need share and it dos not need to save defaults
commit d696beefb1efd2e3fa9f6c00f6ba88be01d4ac85
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:33:15 2011 +0200
s3:split_tokens: fix a nonempty blank line
commit d29be7d263a841d4fb7d37360adda588c8a530bc
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:30:20 2011 +0200
s3: use lp_load_global() in smbw_sample -- whatever this is ... :-)
commit b9fdfbad2e1d18dfd3057e64511101cc171945b2
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:28:40 2011 +0200
s3:smbtree: use lp_load_global()
commit 7e2deb94dc13d1e3bad38e332c838ffd9a403480
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:27:43 2011 +0200
s3:smbpasswd: use lp_load_global()
commit 039ae12dbb554677bce8c27be120fdaaedc37cb8
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:27:09 2011 +0200
s3:smbfilter: use lp_load_global()
commit e6176d597a7c23ce40b1b578749753bc0de01e9e
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:26:22 2011 +0200
s3:smbcquotas: use lp_load_global()
commit ce8beb51330aac2d69c78ee02c61cda988161660
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:23:53 2011 +0200
s3:smbcontrol: use lp_load_global(): smbcontrol does not need to load the shares
commit b608cfc8ec9bd62e815d4e9c317c2dabe90cd1cb
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:21:11 2011 +0200
s3:smbcacls: use lp_load_global()
commit d4abfcc04bcc3732d04abb9722e1bf85110131df
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:20:24 2011 +0200
s3:pdbedit: use lp_load_global()
commit 2a98ee0f83d42392eacd1a9d7aaa9644d1ee7fa3
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:19:36 2011 +0200
s3:ntlm_auth: use lp_load_global()
commit ac9a61bda885e68451bb47d2c44e37a7ff724bed
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:18:55 2011 +0200
s3:nmblookup: use lp_load_global()
commit 82202f99b3d392ad8671d3f9484b0f9e53c3f9f7
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:18:18 2011 +0200
s3:net: use lp_load_global()
commit 7557ba1eb25a0c628bada63a49064be06efb89a9
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:17:32 2011 +0200
s3:eventlogadm: use lp_load_global()
commit 1679fe5ca95c338aec57f1f368cc371bd058f6cc
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:16:37 2011 +0200
s3:dbwrap_torture: use lp_load_global()
commit 59a2f3d707b7684bb565ada1ebd2c83dab84d61c
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:15:41 2011 +0200
s3:dbwrap_tool: use lp_load_global()
commit ae752ec3a56738f647d22204d49c07e5a01a9fae
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 28 10:14:27 2011 +0200
s3:smbtorture: use the lp_load_global() wrapper of lp_load()
commit c32479f5843b73fc40a22a2975bbece0ddbcf168
Author: Michael Adam <obnox at samba.org>
Date: Wed Jul 27 17:20:05 2011 +0200
s3:torture: use lp_load_global() in the strstr test
commit ecc487e0262d335759d25963eaa5444d9648c305
Author: Michael Adam <obnox at samba.org>
Date: Wed Jul 27 17:06:26 2011 +0200
s3:torture: use lp_load_global in the strcmp test
commit 426ae350eee340c862e615b916d3cc5723180ab2
Author: Michael Adam <obnox at samba.org>
Date: Wed Jul 27 17:05:38 2011 +0200
s3:torture: use lp_load_global() in the push_ucs2 test
commit bfde6fa535f2356a317dafd984a8f5494c0a9e63
Author: Michael Adam <obnox at samba.org>
Date: Wed Jul 27 17:03:51 2011 +0200
s3:torture: use lp_load_global() in the msgtest
commit d6b4c693beb60b50eb7acbf1805aa3ec950b0539
Author: Michael Adam <obnox at samba.org>
Date: Wed Jul 27 17:02:51 2011 +0200
s3:torture: use lp_load_global() in the masktest
commit ee495ab5c373e503f7a62bc77461c14574c42248
Author: Michael Adam <obnox at samba.org>
Date: Wed Jul 27 16:56:23 2011 +0200
s3:torture: use lp_load_global() in locktest2
commit 407a514f8b2cec87671d8bc962c7ab1b8fbaf88e
Author: Michael Adam <obnox at samba.org>
Date: Wed Jul 27 16:55:25 2011 +0200
s3:torture: use lp_load_global() in the locktest
commit 4a21e50474d1d769e410dcfc834c5c43892b41cf
Author: Michael Adam <obnox at samba.org>
Date: Wed Jul 27 16:36:14 2011 +0200
s3:rpcclient: use the lp_load_global() wrapper of lp_load()
commit a7e921900236886f368e50d3c5ca82317558d63a
Author: Michael Adam <obnox at samba.org>
Date: Wed Jul 27 16:34:53 2011 +0200
s3:nmbd: use the lp_load_global() wrapper of lp_load()
commit 74b806c88819270282a3a3d34d66d3657a1e4f9e
Author: Michael Adam <obnox at samba.org>
Date: Wed Jul 27 16:31:02 2011 +0200
s3:libnet_join: use lp_load_global() wrapper of lp_load()
commit 88ee6973f0bf5d5e5f6f9552ce065e109663828e
Author: Michael Adam <obnox at samba.org>
Date: Wed Jul 27 16:29:04 2011 +0200
s3:libsmbconf: use lp_load_global() in the testsuite
commit 2c3a1f44fafaacde5f966ebd646e3aa1dc20468e
Author: Michael Adam <obnox at samba.org>
Date: Wed Jul 27 00:25:59 2011 +0200
s3:libnetapi: use lp_load_global()
commit c2aa8e5d6377481cec6f36fea8d3165c5d99e098
Author: Michael Adam <obnox at samba.org>
Date: Tue Jul 26 12:53:52 2011 +0200
s3:loadparm: make lp_set_in_client() static - only used in wrappers in loadparm now.
commit c9efe307cb288eb6cabbe0f781326164e9e30414
Author: Michael Adam <obnox at samba.org>
Date: Tue Jul 26 12:51:04 2011 +0200
s3:pam_smbpass: use lp_load_client() in pam_smbpass
commit f764de64e39f62f84389c9df4f4a55f2ee01f857
Author: Michael Adam <obnox at samba.org>
Date: Tue Jul 26 12:46:08 2011 +0200
s3:libsmb: use lp_load_client() and lp_load_client_no_reinit() in libsmb_context
commit 4e41d38df3ad80a379899b611f7e2fac44d42155
Author: Michael Adam <obnox at samba.org>
Date: Tue Jul 26 12:44:44 2011 +0200
s3:loadparm: add wrapper lp_load_client_no_reinit()
commit 5676fbb3991cf20dc9686ea416ca83590f975683
Author: Michael Adam <obnox at samba.org>
Date: Tue Jul 26 12:42:29 2011 +0200
s3:loadparm: add wrapper lp_load_globals_no_reinit()
commit fbf254c19aa01984f02f1b7c95e294ff10178aab
Author: Michael Adam <obnox at samba.org>
Date: Tue Jul 26 12:36:53 2011 +0200
s3:libsmb: fix a call to lp_load to reinit the globals in any case
The potential previous lp_load of $HOME/.smb/smb.conf might have failed
halfway through and might have left globals initialized in an unwanted state.
So we should make sure to clean up before loading the dyn_CONFIGFILE()
commit bff217cf4a3ea52f9509970ea9bf8520a281eb3e
Author: Michael Adam <obnox at samba.org>
Date: Fri Jul 22 17:28:46 2011 +0200
s3:smbspool: use lp_load_client()
commit 0c55a7606fe5ff9a1cf0be13a13a3a657cdd1e53
Author: Michael Adam <obnox at samba.org>
Date: Fri Jul 22 17:17:46 2011 +0200
s3:smbclient: use lp_load_client()
commit 0b21c7750f360da466045587d1d7872a80d2153c
Author: Michael Adam <obnox at samba.org>
Date: Fri Jul 22 17:24:38 2011 +0200
s3:loadparm: make lp_is_in_client() static - only used inside loadparm
commit 37f548d788c69fa45311dd294edcc06a38599712
Author: Michael Adam <obnox at samba.org>
Date: Fri Jul 22 17:23:31 2011 +0200
s3:loadparm: add lp_load_client() that also sets the client state internally
commit 1379ef8b7bbc09a0863705933bd57e5b6275d6a9
Author: Michael Adam <obnox at samba.org>
Date: Fri Jul 22 17:16:02 2011 +0200
s3:loadparm: add a convenience wrapper lp_load_global()
This is the use case for most callers, especially the client tools.
commit 13329112e9fc259a55dc43b6406fb86540784bca
Author: Michael Adam <obnox at samba.org>
Date: Thu Jul 21 14:05:24 2011 +0200
s3:loadparm: rename parameter "allow_registry_shares" to "load_all_shares"
-----------------------------------------------------------------------
Summary of changes:
source3/client/client.c | 4 +--
source3/client/smbspool.c | 4 +--
source3/include/proto.h | 6 ++-
source3/lib/netapi/netapi.c | 2 +-
source3/lib/smbconf/testsuite.c | 7 +---
source3/libnet/libnet_join.c | 4 +-
source3/libsmb/libsmb_context.c | 8 ++---
source3/modules/nfs4_acls.c | 6 +--
source3/nmbd/nmbd.c | 2 +-
source3/pam_smbpass/pam_smb_acct.c | 1 -
source3/pam_smbpass/pam_smb_auth.c | 1 -
source3/pam_smbpass/pam_smb_passwd.c | 1 -
source3/pam_smbpass/support.c | 2 +-
source3/param/loadparm.c | 66 +++++++++++++++++++++++++++++----
source3/rpcclient/rpcclient.c | 2 +-
source3/torture/locktest.c | 2 +-
source3/torture/locktest2.c | 2 +-
source3/torture/masktest.c | 2 +-
source3/torture/msgtest.c | 2 +-
source3/torture/pdbtest.c | 2 +-
source3/torture/t_push_ucs2.c | 2 +-
source3/torture/t_strcmp.c | 2 +-
source3/torture/t_strstr.c | 2 +-
source3/torture/torture.c | 2 +-
source3/utils/dbwrap_tool.c | 2 +-
source3/utils/dbwrap_torture.c | 2 +-
source3/utils/eventlogadm.c | 4 +-
source3/utils/net.c | 2 +-
source3/utils/nmblookup.c | 2 +-
source3/utils/ntlm_auth.c | 2 +-
source3/utils/pdbedit.c | 2 +-
source3/utils/smbcacls.c | 2 +-
source3/utils/smbcontrol.c | 2 +-
source3/utils/smbcquotas.c | 2 +-
source3/utils/smbfilter.c | 2 +-
source3/utils/smbpasswd.c | 2 +-
source3/utils/smbtree.c | 2 +-
source3/utils/smbw_sample.c | 2 +-
source3/utils/split_tokens.c | 4 +-
source3/utils/status.c | 2 +-
source3/winbindd/winbindd.c | 2 +-
41 files changed, 104 insertions(+), 68 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/client/client.c b/source3/client/client.c
index e6fffcb..44a151e 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -5301,8 +5301,6 @@ static int do_message_op(struct user_auth_info *a_info)
pc = poptGetContext("smbclient", argc, (const char **) argv, long_options, 0);
poptSetOtherOptionHelp(pc, "service <password>");
- lp_set_in_client(true); /* Make sure that we tell lp_load we are */
-
while ((opt = poptGetNextOpt(pc)) != -1) {
/* if the tar option has been called previouslt, now we need to eat out the leftovers */
@@ -5433,7 +5431,7 @@ static int do_message_op(struct user_auth_info *a_info)
if ( override_logfile )
setup_logging( lp_logfile(), DEBUG_FILE );
- if (!lp_load(get_dyn_CONFIGFILE(),true,false,false,true)) {
+ if (!lp_load_client(get_dyn_CONFIGFILE())) {
fprintf(stderr, "%s: Can't load %s - run testparm to debug it\n",
argv[0], get_dyn_CONFIGFILE());
}
diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c
index e16086d..0be8d51 100644
--- a/source3/client/smbspool.c
+++ b/source3/client/smbspool.c
@@ -245,11 +245,9 @@ main(int argc, /* I - Number of command-line arguments */
setup_logging("smbspool", DEBUG_STDOUT);
- lp_set_in_client(True); /* Make sure that we tell lp_load we are */
-
load_case_tables();
- if (!lp_load(get_dyn_CONFIGFILE(), True, False, False, True)) {
+ if (!lp_load_client(get_dyn_CONFIGFILE())) {
fprintf(stderr, "ERROR: Can't load %s - run testparm to debug it\n", get_dyn_CONFIGFILE());
goto done;
}
diff --git a/source3/include/proto.h b/source3/include/proto.h
index ec0571c..35c26c2 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1610,14 +1610,16 @@ enum usershare_err parse_usershare_file(TALLOC_CTX *ctx,
int load_usershare_service(const char *servicename);
int load_usershare_shares(struct smbd_server_connection *sconn);
void gfree_loadparm(void);
-void lp_set_in_client(bool b);
-bool lp_is_in_client(void);
bool lp_load(const char *pszFname,
bool global_only,
bool save_defaults,
bool add_ipc,
bool initialize_globals);
bool lp_load_initial_only(const char *pszFname);
+bool lp_load_global(const char *file_name);
+bool lp_load_client(const char *file_name);
+bool lp_load_global_no_reinit(const char *file_name);
+bool lp_load_client_no_reinit(const char *file_name);
bool lp_load_with_registry_shares(const char *pszFname,
bool global_only,
bool save_defaults,
diff --git a/source3/lib/netapi/netapi.c b/source3/lib/netapi/netapi.c
index 1425986..a4a8e44 100644
--- a/source3/lib/netapi/netapi.c
+++ b/source3/lib/netapi/netapi.c
@@ -77,7 +77,7 @@ NET_API_STATUS libnetapi_init(struct libnetapi_ctx **context)
lp_set_cmdline("log level", "0");
setup_logging("libnetapi", DEBUG_STDERR);
- if (!lp_load(get_dyn_CONFIGFILE(), true, false, false, true)) {
+ if (!lp_load_global(get_dyn_CONFIGFILE())) {
TALLOC_FREE(frame);
fprintf(stderr, "error loading %s\n", get_dyn_CONFIGFILE() );
return W_ERROR_V(WERR_GENERAL_FAILURE);
diff --git a/source3/lib/smbconf/testsuite.c b/source3/lib/smbconf/testsuite.c
index c2a9a59..9e67936 100644
--- a/source3/lib/smbconf/testsuite.c
+++ b/source3/lib/smbconf/testsuite.c
@@ -304,12 +304,7 @@ int main(int argc, const char **argv)
poptFreeContext(pc);
- ret = lp_load(get_dyn_CONFIGFILE(),
- true, /* globals_only */
- false, /* save_defaults */
- false, /* add_ipc */
- true /* initialize globals */);
-
+ ret = lp_load_global(get_dyn_CONFIGFILE());
if (!ret) {
printf("failure: error loading the configuration\n");
goto done;
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 1532299..5998995 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -1576,7 +1576,7 @@ static WERROR do_JoinConfig(struct libnet_JoinCtx *r)
return werr;
}
- lp_load(get_dyn_CONFIGFILE(),true,false,false,true);
+ lp_load_global(get_dyn_CONFIGFILE());
r->out.modified_config = true;
r->out.result = werr;
@@ -1604,7 +1604,7 @@ static WERROR libnet_unjoin_config(struct libnet_UnjoinCtx *r)
return werr;
}
- lp_load(get_dyn_CONFIGFILE(),true,false,false,true);
+ lp_load_global(get_dyn_CONFIGFILE());
r->out.modified_config = true;
r->out.result = werr;
diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c
index 789a555..978fac9 100644
--- a/source3/libsmb/libsmb_context.c
+++ b/source3/libsmb/libsmb_context.c
@@ -52,13 +52,11 @@ SMBC_module_init(void * punused)
/* Here we would open the smb.conf file if needed ... */
- lp_set_in_client(True);
-
home = getenv("HOME");
if (home) {
char *conf = NULL;
if (asprintf(&conf, "%s/.smb/smb.conf", home) > 0) {
- if (lp_load(conf, True, False, False, True)) {
+ if (lp_load_client(conf)) {
conf_loaded = True;
} else {
DEBUG(5, ("Could not load config file: %s\n",
@@ -76,7 +74,7 @@ SMBC_module_init(void * punused)
* defaults ...
*/
- if (!lp_load(get_dyn_CONFIGFILE(), True, False, False, False)) {
+ if (!lp_load_client(get_dyn_CONFIGFILE())) {
DEBUG(5, ("Could not load config file: %s\n",
get_dyn_CONFIGFILE()));
} else if (home) {
@@ -89,7 +87,7 @@ SMBC_module_init(void * punused)
if (asprintf(&conf,
"%s/.smb/smb.conf.append",
home) > 0) {
- if (!lp_load(conf, True, False, False, False)) {
+ if (!lp_load_client_no_reinit(conf)) {
DEBUG(10,
("Could not append config file: "
"%s\n",
diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c
index f1c2904..2e5ffbc 100644
--- a/source3/modules/nfs4_acls.c
+++ b/source3/modules/nfs4_acls.c
@@ -519,10 +519,8 @@ static SMB_ACE4PROP_T *smbacl4_find_equal_special(
if (ace->flags == aceNew->flags &&
ace->aceType==aceNew->aceType &&
- ace->aceFlags==aceNew->aceFlags &&
- (ace->aceFlags&SMB_ACE4_IDENTIFIER_GROUP)==
- (aceNew->aceFlags&SMB_ACE4_IDENTIFIER_GROUP)
- ) {
+ ace->aceFlags==aceNew->aceFlags)
+ {
/* keep type safety; e.g. gid is an u.short */
if (ace->flags & SMB_ACE4_ID_SPECIAL)
{
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index e8a8b0e..ceec2fd 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -366,7 +366,7 @@ static bool reload_nmbd_services(bool test)
if ( test && !lp_file_list_changed() )
return(True);
- ret = lp_load(get_dyn_CONFIGFILE(), True , False, False, True);
+ ret = lp_load_global(get_dyn_CONFIGFILE());
/* perhaps the config filename is now set */
if ( !test ) {
diff --git a/source3/pam_smbpass/pam_smb_acct.c b/source3/pam_smbpass/pam_smb_acct.c
index 63323d8..60acd3c 100644
--- a/source3/pam_smbpass/pam_smb_acct.c
+++ b/source3/pam_smbpass/pam_smb_acct.c
@@ -58,7 +58,6 @@ int pam_sm_acct_mgmt( pam_handle_t *pamh, int flags,
/* Samba initialization. */
load_case_tables_library();
- lp_set_in_client(True);
ctrl = set_ctrl(pamh, flags, argc, argv );
diff --git a/source3/pam_smbpass/pam_smb_auth.c b/source3/pam_smbpass/pam_smb_auth.c
index d63f080..4270bcc 100644
--- a/source3/pam_smbpass/pam_smb_auth.c
+++ b/source3/pam_smbpass/pam_smb_auth.c
@@ -81,7 +81,6 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
/* Samba initialization. */
load_case_tables_library();
- lp_set_in_client(True);
ctrl = set_ctrl(pamh, flags, argc, argv);
diff --git a/source3/pam_smbpass/pam_smb_passwd.c b/source3/pam_smbpass/pam_smb_passwd.c
index 54d9db7..ce0b118 100644
--- a/source3/pam_smbpass/pam_smb_passwd.c
+++ b/source3/pam_smbpass/pam_smb_passwd.c
@@ -106,7 +106,6 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
/* Samba initialization. */
load_case_tables_library();
- lp_set_in_client(True);
ctrl = set_ctrl(pamh, flags, argc, argv);
diff --git a/source3/pam_smbpass/support.c b/source3/pam_smbpass/support.c
index 3dfdff3..e79d787 100644
--- a/source3/pam_smbpass/support.c
+++ b/source3/pam_smbpass/support.c
@@ -203,7 +203,7 @@ int set_ctrl( pam_handle_t *pamh, int flags, int argc, const char **argv )
/* Read some options from the Samba config. Can be overridden by
the PAM config. */
- if(lp_load(service_file,True,False,False,True) == False) {
+ if(lp_load_client(service_file) == false) {
_log_err(pamh, LOG_ERR, "Error loading service file %s", service_file);
}
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 6cab934..5459365 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -8940,7 +8940,7 @@ void gfree_loadparm(void)
/***************************************************************************
Allow client apps to specify that they are a client
***************************************************************************/
-void lp_set_in_client(bool b)
+static void lp_set_in_client(bool b)
{
in_client = b;
}
@@ -8949,7 +8949,7 @@ void lp_set_in_client(bool b)
/***************************************************************************
Determine if we're running in a client app
***************************************************************************/
-bool lp_is_in_client(void)
+static bool lp_is_in_client(void)
{
return in_client;
}
@@ -8965,7 +8965,7 @@ static bool lp_load_ex(const char *pszFname,
bool add_ipc,
bool initialize_globals,
bool allow_include_registry,
- bool allow_registry_shares)
+ bool load_all_shares)
{
char *n2 = NULL;
bool bRetval;
@@ -9032,7 +9032,7 @@ static bool lp_load_ex(const char *pszFname,
return lp_load_ex(pszFname, global_only, save_defaults,
add_ipc, initialize_globals,
allow_include_registry,
- allow_registry_shares);
+ load_all_shares);
}
} else if (lp_config_backend_is_registry()) {
bRetval = process_registry_globals();
@@ -9043,7 +9043,7 @@ static bool lp_load_ex(const char *pszFname,
}
if (bRetval && lp_registry_shares()) {
- if (allow_registry_shares) {
+ if (load_all_shares) {
bRetval = process_registry_shares();
} else {
bRetval = reload_registry_shares();
@@ -9104,7 +9104,7 @@ bool lp_load(const char *pszFname,
add_ipc,
initialize_globals,
true, /* allow_include_registry */
- false); /* allow_registry_shares*/
+ false); /* load_all_shares*/
}
bool lp_load_initial_only(const char *pszFname)
@@ -9115,7 +9115,57 @@ bool lp_load_initial_only(const char *pszFname)
false, /* add_ipc */
true, /* initialize_globals */
false, /* allow_include_registry */
- false); /* allow_registry_shares*/
+ false); /* load_all_shares*/
+}
+
+/**
+ * most common lp_load wrapper, loading only the globals
+ */
+bool lp_load_global(const char *file_name)
+{
+ return lp_load_ex(file_name,
+ true, /* global_only */
+ false, /* save_defaults */
+ false, /* add_ipc */
+ true, /* initialize_globals */
+ true, /* allow_include_registry */
+ false); /* load_all_shares*/
+}
+
+/**
+ * lp_load wrapper, especially for clients
+ */
+bool lp_load_client(const char *file_name)
+{
+ lp_set_in_client(true);
+
+ return lp_load_global(file_name);
+}
+
+/**
+ * lp_load wrapper, loading only globals, but intended
+ * for subsequent calls, not reinitializing the globals
+ * to default values
+ */
+bool lp_load_global_no_reinit(const char *file_name)
+{
+ return lp_load_ex(file_name,
+ true, /* global_only */
+ false, /* save_defaults */
+ false, /* add_ipc */
+ false, /* initialize_globals */
+ true, /* allow_include_registry */
+ false); /* load_all_shares*/
+}
+
+/**
+ * lp_load wrapper, especially for clients, no reinitialization
+ */
+bool lp_load_client_no_reinit(const char *file_name)
+{
+ lp_set_in_client(true);
+
+ return lp_load_global_no_reinit(file_name);
}
bool lp_load_with_registry_shares(const char *pszFname,
@@ -9130,7 +9180,7 @@ bool lp_load_with_registry_shares(const char *pszFname,
add_ipc,
initialize_globals,
true, /* allow_include_registry */
- true); /* allow_registry_shares*/
+ true); /* load_all_shares*/
}
/***************************************************************************
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 1c0c21f..c195d28 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -976,7 +976,7 @@ out_free:
/* Load smb.conf file */
- if (!lp_load(get_dyn_CONFIGFILE(),True,False,False,True))
+ if (!lp_load_global(get_dyn_CONFIGFILE()))
fprintf(stderr, "Can't load %s\n", get_dyn_CONFIGFILE());
/*
diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c
index a5ccf24..d6c544d 100644
--- a/source3/torture/locktest.c
+++ b/source3/torture/locktest.c
@@ -596,7 +596,7 @@ static void usage(void)
argc -= NSERVERS;
argv += NSERVERS;
- lp_load(get_dyn_CONFIGFILE(),True,False,False,True);
+ lp_load_global(get_dyn_CONFIGFILE());
load_interfaces();
if (getenv("USER")) {
diff --git a/source3/torture/locktest2.c b/source3/torture/locktest2.c
index 5115d13..d06acbc 100644
--- a/source3/torture/locktest2.c
+++ b/source3/torture/locktest2.c
@@ -513,7 +513,7 @@ static void usage(void)
argc -= 4;
argv += 4;
- lp_load(get_dyn_CONFIGFILE(),True,False,False,True);
+ lp_load_global(get_dyn_CONFIGFILE());
load_interfaces();
if (getenv("USER")) {
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c
index 6b9c302..26acd05 100644
--- a/source3/torture/masktest.c
+++ b/source3/torture/masktest.c
@@ -480,7 +480,7 @@ static void usage(void)
argv += 1;
load_case_tables();
- lp_load(get_dyn_CONFIGFILE(),True,False,False,True);
+ lp_load_global(get_dyn_CONFIGFILE());
load_interfaces();
if (getenv("USER")) {
diff --git a/source3/torture/msgtest.c b/source3/torture/msgtest.c
index c7fa315..1dd010b 100644
--- a/source3/torture/msgtest.c
+++ b/source3/torture/msgtest.c
@@ -51,7 +51,7 @@ static void pong_message(struct messaging_context *msg_ctx,
setup_logging(argv[0], DEBUG_STDOUT);
- lp_load(get_dyn_CONFIGFILE(),False,False,False,True);
+ lp_load_global(get_dyn_CONFIGFILE());
if (!(evt_ctx = tevent_context_init(NULL)) ||
!(msg_ctx = messaging_init(NULL, procid_self(), evt_ctx))) {
diff --git a/source3/torture/pdbtest.c b/source3/torture/pdbtest.c
index 33419db..1bea02b 100644
--- a/source3/torture/pdbtest.c
+++ b/source3/torture/pdbtest.c
@@ -267,7 +267,7 @@ int main(int argc, char **argv)
poptFreeContext(pc);
/* Load configuration */
- lp_load(get_dyn_CONFIGFILE(), False, False, True, True);
+ lp_load_global(get_dyn_CONFIGFILE());
setup_logging("pdbtest", DEBUG_STDOUT);
if (backend == NULL) {
diff --git a/source3/torture/t_push_ucs2.c b/source3/torture/t_push_ucs2.c
index 2bd91da..4e22eea 100644
--- a/source3/torture/t_push_ucs2.c
+++ b/source3/torture/t_push_ucs2.c
@@ -34,7 +34,7 @@ int main(int argc, char *argv[])
int count = 1;
/* Needed to initialize character set */
- lp_load("/dev/null", True, False, False, True);
+ lp_load_global("/dev/null");
if (argc < 2) {
fprintf(stderr, "usage: %s STRING1 [COUNT]\n"
diff --git a/source3/torture/t_strcmp.c b/source3/torture/t_strcmp.c
index 5be26cd..e6828e4 100644
--- a/source3/torture/t_strcmp.c
+++ b/source3/torture/t_strcmp.c
@@ -12,7 +12,7 @@ int main(int argc, char *argv[])
int iters = 1;
/* Needed to initialize character set */
- lp_load("/dev/null", True, False, False, True);
+ lp_load_global("/dev/null");
if (argc < 3) {
fprintf(stderr, "usage: %s STRING1 STRING2 [ITERS]\n"
diff --git a/source3/torture/t_strstr.c b/source3/torture/t_strstr.c
index 49180b2..69b8818 100644
--- a/source3/torture/t_strstr.c
+++ b/source3/torture/t_strstr.c
@@ -14,7 +14,7 @@ int main(int argc, char *argv[])
const char *ret = NULL;
/* Needed to initialize character set */
- lp_load("/dev/null", True, False, False, True);
+ lp_load_global("/dev/null");
if (argc < 3) {
fprintf(stderr, "usage: %s STRING1 STRING2 [ITERS]\n"
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 90a9068..2c30928 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -8969,7 +8969,7 @@ static void usage(void)
set_dyn_CONFIGFILE(getenv("SMB_CONF_PATH"));
}
}
- lp_load(get_dyn_CONFIGFILE(),True,False,False,True);
+ lp_load_global(get_dyn_CONFIGFILE());
load_interfaces();
if (argc < 2) {
diff --git a/source3/utils/dbwrap_tool.c b/source3/utils/dbwrap_tool.c
index 6809a0b..9061efd 100644
--- a/source3/utils/dbwrap_tool.c
+++ b/source3/utils/dbwrap_tool.c
@@ -216,7 +216,7 @@ int main(int argc, const char **argv)
load_case_tables();
lp_set_cmdline("log level", "0");
setup_logging(argv[0], DEBUG_STDERR);
- lp_load(get_dyn_CONFIGFILE(), true, false, false, true);
+ lp_load_global(get_dyn_CONFIGFILE());
if ((argc < 3) || (argc > 6)) {
d_fprintf(stderr,
--
Samba Shared Repository
More information about the samba-cvs
mailing list