diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-02-08 19:28:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:09:58 -0500 |
commit | 1e68cce96dce53557a5f2edbf1539a144db377b5 (patch) | |
tree | 794f5c59d3f46c7523fb0e4373052699a7b9ea25 | |
parent | ef3f2c9675194efa17cfd4b4b5393a6e0a335bdf (diff) | |
download | samba-1e68cce96dce53557a5f2edbf1539a144db377b5.tar.gz samba-1e68cce96dce53557a5f2edbf1539a144db377b5.tar.xz samba-1e68cce96dce53557a5f2edbf1539a144db377b5.zip |
r13394: Fix rpcclient to obey the -W parameter. Not that I *like* the smbclient
solution, but it does this particular job... :-)
Volker
(This used to be commit df6d67cd10c0045f3c6f73381716300221cecf18)
-rw-r--r-- | source3/rpcclient/rpcclient.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 5e66b182630..3f493ce2c50 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -689,6 +689,7 @@ out_free: struct in_addr server_ip; NTSTATUS nt_status; static int opt_port = 0; + fstring new_workgroup; /* make sure the vars that get altered (4th field) are in a fixed location or certain compilers complain */ @@ -755,11 +756,22 @@ out_free: if (!init_names()) return 1; + /* save the workgroup... + + FIXME!! do we need to do this for other options as well + (or maybe a generic way to keep lp_load() from overwriting + everything)? */ + + fstrcpy( new_workgroup, lp_workgroup() ); + /* Load smb.conf file */ if (!lp_load(dyn_CONFIGFILE,True,False,False,True)) fprintf(stderr, "Can't load %s\n", dyn_CONFIGFILE); + if ( strlen(new_workgroup) != 0 ) + set_global_myworkgroup( new_workgroup ); + /* * Get password * from stdin if necessary |