summaryrefslogtreecommitdiff
path: root/source3/client/client.c
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2001-11-19 02:49:53 +0000
committerMartin Pool <mbp@samba.org>2001-11-19 02:49:53 +0000
commitf741f656737f4ec46cd318e986b6bf412ed309d2 (patch)
treefb2b1999441e25ae5db177631dd42abb051a9bce /source3/client/client.c
parenta1b9de0b9872b91574e75bb360d49b887a072389 (diff)
downloadsamba-f741f656737f4ec46cd318e986b6bf412ed309d2.tar.gz
samba-f741f656737f4ec46cd318e986b6bf412ed309d2.tar.bz2
samba-f741f656737f4ec46cd318e986b6bf412ed309d2.zip
Store some path names in global variables initialized to configure
default, rather than in preprocessor macros. (This used to be commit 79ec88f0da40faebe1e587f1b3e87b5f2b184f58)
Diffstat (limited to 'source3/client/client.c')
-rw-r--r--source3/client/client.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 3047a9a61b..b4b48da285 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -28,6 +28,8 @@
#define REGISTER 0
#endif
+const char prog_name[] = "smbclient";
+
struct cli_state *cli;
extern BOOL in_client;
static int port = 0;
@@ -2404,7 +2406,6 @@ static int do_message_op(void)
pstring query_host;
BOOL message = False;
extern char tar_type;
- static pstring servicesf = CONFIGFILE;
pstring term_code;
pstring new_name_resolve_order;
char *p;
@@ -2436,12 +2437,12 @@ static int do_message_op(void)
dbf = x_stderr;
else if(strncmp(argv[opt], "-s", 2) == 0) {
if(argv[opt][2] != '\0')
- pstrcpy(servicesf, &argv[opt][2]);
+ pstrcpy(dyn_CONFIGFILE, &argv[opt][2]);
else if(argv[opt+1] != NULL) {
/*
* At least one more arg left.
*/
- pstrcpy(servicesf, argv[opt+1]);
+ pstrcpy(dyn_CONFIGFILE, argv[opt+1]);
} else {
usage(pname);
exit(1);
@@ -2454,8 +2455,9 @@ static int do_message_op(void)
in_client = True; /* Make sure that we tell lp_load we are */
old_debug = DEBUGLEVEL;
- if (!lp_load(servicesf,True,False,False)) {
- fprintf(stderr, "Can't load %s - run testparm to debug it\n", servicesf);
+ if (!lp_load(dyn_CONFIGFILE,True,False,False)) {
+ fprintf(stderr, "%s: Can't load %s - run testparm to debug it\n",
+ prog_name, dyn_CONFIGFILE);
}
DEBUGLEVEL = old_debug;
@@ -2536,7 +2538,7 @@ static int do_message_op(void)
getopt(argc, argv,"s:O:R:M:i:Nn:d:Pp:l:hI:EU:L:t:m:W:T:D:c:b:A:k")) != EOF) {
switch (opt) {
case 's':
- pstrcpy(servicesf, optarg);
+ pstrcpy(dyn_CONFIGFILE, optarg);
break;
case 'O':
pstrcpy(user_socket_options,optarg);