summaryrefslogtreecommitdiff
path: root/source4/client
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-04 00:12:13 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:48:01 +0100
commitb038240ac72fa34a132eb52bda28bbb80f82c29e (patch)
tree8870bbb7b50ce698806bc0f2210204b98e38c19a /source4/client
parentfc2f06d31b6b52c5cbd83f34a34e5107649a5134 (diff)
downloadsamba-b038240ac72fa34a132eb52bda28bbb80f82c29e.tar.gz
samba-b038240ac72fa34a132eb52bda28bbb80f82c29e.tar.bz2
samba-b038240ac72fa34a132eb52bda28bbb80f82c29e.zip
r26275: return loadparm context in lp_load.
(This used to be commit d01f0f4c2037b531b3fd088060717f90e60471e9)
Diffstat (limited to 'source4/client')
-rw-r--r--source4/client/smbmount.c12
-rw-r--r--source4/client/smbspool.c5
2 files changed, 10 insertions, 7 deletions
diff --git a/source4/client/smbmount.c b/source4/client/smbmount.c
index db16c6cf1f..907405535e 100644
--- a/source4/client/smbmount.c
+++ b/source4/client/smbmount.c
@@ -323,7 +323,8 @@ static void smb_umount(const char *mount_point)
* not exit after open_sockets() or send_login() errors,
* as the smbfs mount would then have no way to recover.
*/
-static void send_fs_socket(const char *the_service, const char *mount_point, struct smbcli_state *c)
+static void send_fs_socket(struct loadparm_context *lp_ctx,
+ const char *the_service, const char *mount_point, struct smbcli_state *c)
{
int fd, closed = 0, res = 1;
pid_t parentpid = getppid();
@@ -407,7 +408,7 @@ static void send_fs_socket(const char *the_service, const char *mount_point, str
pause();
DEBUG(2,("mount.smbfs[%d]: got signal, getting new socket\n", sys_getpid()));
c = do_connection(the_service,
- lp_unicode(global_loadparm),
+ lp_unicode(lp_ctx),
lp_cli_maxprotocol(global_loadparm));
}
}
@@ -529,7 +530,7 @@ static void init_mount(void)
for any reason, we will have to unmount the mount point. There
is no exit from the next call...
*/
- send_fs_socket(service, mount_point, c);
+ send_fs_socket(global_loadparm, service, mount_point, c);
}
@@ -852,6 +853,7 @@ static void parse_mount_smb(int argc, char **argv)
extern char *optarg;
extern int optind;
char *p;
+ struct loadparm_context *lp_ctx;
DEBUGLEVEL = 1;
@@ -882,7 +884,7 @@ static void parse_mount_smb(int argc, char **argv)
}
if (getenv("PASSWD")) {
- pstrcpy(password,getenv("PASSWD"));
+ pstrcpy(password, getenv("PASSWD"));
got_pass = true;
}
@@ -895,7 +897,7 @@ static void parse_mount_smb(int argc, char **argv)
pstrcpy(username,getenv("LOGNAME"));
}
- if (!lp_load(dyn_CONFIGFILE)) {
+ if (!lp_load(dyn_CONFIGFILE, &lp_ctx)) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n",
lp_config_file());
}
diff --git a/source4/client/smbspool.c b/source4/client/smbspool.c
index 7270942037..6a7454b6b2 100644
--- a/source4/client/smbspool.c
+++ b/source4/client/smbspool.c
@@ -50,6 +50,7 @@ static int smb_print(struct smbcli_state *, char *, FILE *);
FILE *fp; /* File to print */
int status=0; /* Status of LPD job */
struct smbcli_state *cli; /* SMB interface */
+ struct loadparm_context *lp_ctx;
/* we expect the URI in argv[0]. Detect the case where it is in argv[1] and cope */
if (argc > 2 && strncmp(argv[0],"smb://", 6) && !strncmp(argv[1],"smb://", 6)) {
@@ -176,13 +177,13 @@ static int smb_print(struct smbcli_state *, char *, FILE *);
setup_logging(argv[0], DEBUG_STDOUT);
- if (!lp_load(dyn_CONFIGFILE)) {
+ if (!lp_load(dyn_CONFIGFILE, &lp_ctx)) {
fprintf(stderr, "ERROR: Can't load %s - run testparm to debug it\n", lp_config_file());
return (1);
}
if (workgroup == NULL)
- workgroup = lp_workgroup();
+ workgroup = lp_workgroup(lp_ctx);
do
{