Collect all init_lsa_string varients in one place.
authorGünther Deschner <gd@samba.org>
Tue, 12 Feb 2008 21:05:39 +0000 (22:05 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 12 Feb 2008 21:05:39 +0000 (22:05 +0100)
Guenther

13 files changed:
source/Makefile.in
source/libnet/libnet_join.c
source/rpc_client/cli_samr.c
source/rpc_client/init_lsa.c [new file with mode: 0644]
source/rpc_client/init_samr.c
source/rpc_server/srv_lsa_nt.c
source/rpc_server/srv_samr_nt.c
source/rpcclient/cmd_lsarpc.c
source/rpcclient/cmd_samr.c
source/utils/net_domain.c
source/utils/net_rpc.c
source/utils/net_rpc_join.c
source/utils/net_rpc_rights.c

index da5a6ca4896da9160ed86633d495c847535ed6fb..4c1fef4be384b340787ac03a1a3678ed8c55de23 100644 (file)
@@ -396,7 +396,9 @@ RPC_CLIENT_OBJ1 = rpc_client/cli_netlogon.o rpc_client/cli_srvsvc.o
 LIBMSRPC_OBJ = rpc_client/cli_lsarpc.o rpc_client/cli_samr.o \
               $(RPC_CLIENT_OBJ1) rpc_client/cli_reg.o $(RPC_CLIENT_OBJ) \
               rpc_client/cli_spoolss.o rpc_client/cli_spoolss_notify.o  \
-              rpc_client/cli_svcctl.o rpc_client/init_samr.o
+              rpc_client/cli_svcctl.o \
+              rpc_client/init_samr.o \
+              rpc_client/init_lsa.o
 
 LIBMSRPC_GEN_OBJ = librpc/gen_ndr/cli_lsa.o \
                   librpc/gen_ndr/cli_dfs.o \
index 4b8826ac971f857839ad39548cb2a464898b07b3..0543ca847445496be313610385031db43192a9f4 100644 (file)
 #define LIBNET_UNJOIN_OUT_DUMP_CTX(ctx, r) \
        LIBNET_UNJOIN_DUMP_CTX(ctx, r, NDR_OUT)
 
-static void init_lsa_String(struct lsa_String *name, const char *s)
-{
-       name->string = s;
-}
-
 /****************************************************************
 ****************************************************************/
 
index 2bf6e3698a3ea5e42ccf75593b24b7762e19e7fa..2bb837bac8c676b4e0e505028556110efaf0870f 100644 (file)
 
 #include "includes.h"
 
-static void init_lsa_String(struct lsa_String *name, const char *s)
-{
-       name->string = s;
-}
-
 /* Enumerate domain groups */
 
 NTSTATUS rpccli_samr_enum_dom_groups(struct rpc_pipe_client *cli,
diff --git a/source/rpc_client/init_lsa.c b/source/rpc_client/init_lsa.c
new file mode 100644 (file)
index 0000000..0af85c0
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ *  Unix SMB/CIFS implementation.
+ *  RPC Pipe client / server routines
+ *  Copyright (C) Guenther Deschner                  2008.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "includes.h"
+
+/*******************************************************************
+ inits a structure.
+********************************************************************/
+
+void init_lsa_String(struct lsa_String *name, const char *s)
+{
+       name->string = s;
+}
+
+/*******************************************************************
+ inits a structure.
+********************************************************************/
+
+void init_lsa_StringLarge(struct lsa_StringLarge *name, const char *s)
+{
+       name->string = s;
+}
+
+/*******************************************************************
+ inits a structure.
+********************************************************************/
+
+void init_lsa_AsciiString(struct lsa_AsciiString *name, const char *s)
+{
+       name->string = s;
+}
+
index 0e22e77b65e8fbddfed5f4d2724de393c68c42e3..1275fc834b3d7a88620c0563b8d8bdb3924644fc 100644 (file)
  inits a structure.
 ********************************************************************/
 
-static void init_lsa_String(struct lsa_String *name, const char *s)
-{
-       name->string = s;
-}
-
-/*******************************************************************
- inits a structure.
-********************************************************************/
-
 void init_samr_DomInfo1(struct samr_DomInfo1 *r,
                        uint16_t min_password_length,
                        uint16_t password_history_length,
index 769dd8ad57b9fdeb0864ca054644a502ada90e62..804142462745cab20ca215547ff17d57de245cc3 100644 (file)
@@ -46,20 +46,6 @@ const struct generic_mapping lsa_generic_mapping = {
        POLICY_ALL_ACCESS
 };
 
-/*******************************************************************
- inits a structure.
-********************************************************************/
-
-static void init_lsa_StringLarge(struct lsa_StringLarge *name, const char *s)
-{
-       name->string = s;
-}
-
-static void init_lsa_String(struct lsa_String *name, const char *s)
-{
-       name->string = s;
-}
-
 /*******************************************************************
  Function to free the per handle data.
  ********************************************************************/
index 3e88f24ea2aa7c697a04c8bf2c7baebbe9ce5802..3637560a7fd3375022aac0a1d089f6adcb40cefa 100644 (file)
@@ -103,15 +103,6 @@ static const struct generic_mapping ali_generic_mapping = {
        GENERIC_RIGHTS_ALIAS_EXECUTE,
        GENERIC_RIGHTS_ALIAS_ALL_ACCESS};
 
-/*******************************************************************
- inits a structure.
-********************************************************************/
-
-static void init_lsa_String(struct lsa_String *name, const char *s)
-{
-       name->string = s;
-}
-
 /*******************************************************************
 *******************************************************************/
 
@@ -1171,15 +1162,6 @@ NTSTATUS _samr_EnumDomainAliases(pipes_struct *p,
        return status;
 }
 
-/*******************************************************************
- inits a structure.
-********************************************************************/
-
-static void init_lsa_AsciiString(struct lsa_AsciiString *name, const char *s)
-{
-       name->string = s;
-}
-
 /*******************************************************************
  inits a samr_DispInfoGeneral structure.
 ********************************************************************/
index 2fe06831f375090cdecb18cbed5bf763fa1e73cf..4751adfa527d34b5dc0cba716d5149d2533486bb 100644 (file)
 #include "includes.h"
 #include "rpcclient.h"
 
-static void init_lsa_String(struct lsa_String *name, const char *s)
-{
-       name->string = s;
-}
-
 /* useful function to allow entering a name instead of a SID and
  * looking it up automatically */
 static NTSTATUS name_to_sid(struct rpc_pipe_client *cli, 
index 4fa5387d61bbf6ce381a5d349501a84b13658818..f8b8ba893ca20530759730333e875e36bf2fb3ce 100644 (file)
 
 extern DOM_SID domain_sid;
 
-static void init_lsa_String(struct lsa_String *name, const char *s)
-{
-       name->string = s;
-}
-
 /****************************************************************************
  display samr_user_info_7 structure
  ****************************************************************************/
index 69994b53df9d2bf8b658e6fd3e0457f72809c9f9..90d28b5e6efd8251c1c1e2c2e9a430fd3b4940e0 100644 (file)
                 goto done; \
         }
 
-static void init_lsa_String(struct lsa_String *name, const char *s)
-{
-       name->string = s;
-}
-
 /*******************************************************************
  Leave an AD domain.  Windows XP disables the machine account.
  We'll try the same.  The old code would do an LDAP delete.
index 968ae9d9b5216a8e2e5c19d784a05bae8cab5781..4967eb4cff76c94eb3bb42371cf032c8a2b7b684 100644 (file)
 #include "includes.h"
 #include "utils/net.h"
 
-static void init_lsa_String(struct lsa_String *name, const char *s)
-{
-       name->string = s;
-}
-
 static int net_mode_share;
 static bool sync_files(struct copy_clistate *cp_clistate, const char *mask);
 
index a20dc9a0c47826e704369539e9ece191b79af4de..f08dc66d3c05cc4109ca4e4f99a53a79c233c186 100644 (file)
                 goto done; \
         }
 
-static void init_lsa_String(struct lsa_String *name, const char *s)
-{
-       name->string = s;
-}
-
-
 /**
  * confirm that a domain join is still valid
  *
index e110c412e0424a52686c380f285a1057446496bd..de6e14ebadacf54993c27e129955ede96d3ec8af 100644 (file)
 #include "includes.h"
 #include "utils/net.h"
 
-static void init_lsa_String(struct lsa_String *name, const char *s)
-{
-       name->string = s;
-}
-
 /********************************************************************
 ********************************************************************/