summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source3/Makefile.in2
-rw-r--r--source3/param/util.c50
-rw-r--r--source3/utils/net_ads.c14
-rw-r--r--source3/utils/net_groupmap.c31
4 files changed, 51 insertions, 46 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 4cec671891..307eabe201 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -318,7 +318,7 @@ READLINE_OBJ = lib/readline.o
# Be sure to include them into your application
POPT_LIB_OBJ = lib/popt_common.o
-PARAM_WITHOUT_REG_OBJ = dynconfig.o param/loadparm.o param/params.o lib/sharesec.o
+PARAM_WITHOUT_REG_OBJ = dynconfig.o param/loadparm.o param/params.o param/util.o lib/sharesec.o
PARAM_REG_ADD_OBJ = $(UTIL_REG_API_OBJ)
PARAM_OBJ = $(PARAM_WITHOUT_REG_OBJ) $(PARAM_REG_ADD_OBJ)
diff --git a/source3/param/util.c b/source3/param/util.c
new file mode 100644
index 0000000000..f953484256
--- /dev/null
+++ b/source3/param/util.c
@@ -0,0 +1,50 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * param helper routines
+ * Copyright (C) Gerald Carter 2003
+ *
+ * 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"
+
+/*********************************************************
+ utility function to parse an integer parameter from
+ "parameter = value"
+**********************************************************/
+uint32 get_int_param( const char* param )
+{
+ char *p;
+
+ p = strchr( param, '=' );
+ if ( !p )
+ return 0;
+
+ return atoi(p+1);
+}
+
+/*********************************************************
+ utility function to parse an integer parameter from
+ "parameter = value"
+**********************************************************/
+char* get_string_param( const char* param )
+{
+ char *p;
+
+ p = strchr( param, '=' );
+ if ( !p )
+ return NULL;
+
+ return (p+1);
+}
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index ac8f794354..d54b817d15 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1430,20 +1430,6 @@ static NTSTATUS net_update_dns(TALLOC_CTX *mem_ctx, ADS_STRUCT *ads)
/*******************************************************************
- utility function to parse an integer parameter from
- "parameter = value"
-**********************************************************/
-static char* get_string_param( const char* param )
-{
- char *p;
-
- if ( (p = strchr( param, '=' )) == NULL )
- return NULL;
-
- return (p+1);
-}
-
-/*******************************************************************
********************************************************************/
static int net_ads_join_usage(int argc, const char **argv)
diff --git a/source3/utils/net_groupmap.c b/source3/utils/net_groupmap.c
index d2ed696eb1..8aead50b9f 100644
--- a/source3/utils/net_groupmap.c
+++ b/source3/utils/net_groupmap.c
@@ -24,37 +24,6 @@
#include "includes.h"
#include "utils/net.h"
-
-/*********************************************************
- utility function to parse an integer parameter from
- "parameter = value"
-**********************************************************/
-static uint32 get_int_param( const char* param )
-{
- char *p;
-
- p = strchr( param, '=' );
- if ( !p )
- return 0;
-
- return atoi(p+1);
-}
-
-/*********************************************************
- utility function to parse an integer parameter from
- "parameter = value"
-**********************************************************/
-static char* get_string_param( const char* param )
-{
- char *p;
-
- p = strchr( param, '=' );
- if ( !p )
- return NULL;
-
- return (p+1);
-}
-
/*********************************************************
Figure out if the input was an NT group or a SID string.
Return the SID.