s3-param Remove special case for lp_workgroup()
[kai/samba.git] / source3 / rpcclient / rpcclient.c
index e80bee748f8c154a7d3684bfea14d165dce40354..5808f371f0dd01be1ab0da5ad1c91fb1c458741c 100644 (file)
@@ -22,7 +22,6 @@
 #include "includes.h"
 #include "popt_common.h"
 #include "rpcclient.h"
-#include "rpc_client/cli_pipe.h"
 #include "../libcli/auth/libcli_auth.h"
 #include "../librpc/gen_ndr/ndr_lsa_c.h"
 #include "rpc_client/cli_lsarpc.h"
@@ -31,6 +30,7 @@
 #include "../libcli/smbreadline/smbreadline.h"
 #include "../libcli/security/security.h"
 #include "passdb.h"
+#include "libsmb/libsmb.h"
 
 enum pipe_auth_type_spnego {
        PIPE_AUTH_TYPE_SPNEGO_NONE = 0,
@@ -240,7 +240,7 @@ static NTSTATUS cmd_listcommands(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct
        {
                tmp_set = tmp->cmd_set;
 
-               if (!StrCaseCmp(argv[1], tmp_set->name))
+               if (!strcasecmp_m(argv[1], tmp_set->name))
                {
                        printf("Available commands on the %s pipe:\n\n", tmp_set->name);
 
@@ -975,21 +975,13 @@ out_free:
                goto done;
        }
 
-       /* 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(get_dyn_CONFIGFILE(),True,False,False,True))
                fprintf(stderr, "Can't load %s\n", get_dyn_CONFIGFILE());
 
        if ( strlen(new_workgroup) != 0 )
-               set_global_myworkgroup( new_workgroup );
+               lp_set_cmdline("workgroup", new_workgroup );
 
        /*
         * Get password