Merge commit 'origin/v4-0-test' into trusted-domains
authorAndrew Bartlett <abartlet@samba.org>
Thu, 4 Sep 2008 01:32:32 +0000 (11:32 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 4 Sep 2008 01:32:32 +0000 (11:32 +1000)
(This used to be commit b599b83a13db90b50a5422ff73daa63648b1e8cd)

source4/Makefile
source4/build/m4/public.m4
source4/build/smb_build/main.pl
source4/dynconfig/config.mk
source4/dynconfig/version.c [deleted file]
source4/lib/zlib.mk
source4/scripting/python/misc.i
source4/scripting/python/misc.py
source4/scripting/python/misc_wrap.c

index b0aa009edd2bede4671859f58987c925354e1003..d91d08a252b04eb40e4d2ad91827a8ec326d4bd6 100644 (file)
@@ -49,6 +49,7 @@ endif
 
 include $(srcdir)/build/make/rules.mk
 include $(srcdir)/build/make/python.mk
+zlibsrcdir := lib/zlib
 dynconfigsrcdir := dynconfig
 heimdalsrcdir := heimdal
 dsdbsrcdir := dsdb
index d932f09a694e71a404b4dcfbf0f824837da24edf..d61e00b22ef926587374466e41a8b5aa7f3fadf7 100644 (file)
@@ -155,16 +155,22 @@ SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{$1} = \"$2\";"
 ])
 
-dnl SMB_WRITE_MAKEVARS(path)
+dnl SMB_WRITE_MAKEVARS(path, skip_vars)
 AC_DEFUN([SMB_WRITE_MAKEVARS],
 [
 echo "configure: creating $1"
 cat >$1<<CEOF
 # $1 - Autogenerated by configure, DO NOT EDIT!
-AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_VARS]), [
-AC_Var = $AC_Var])
 $MAKE_SETTINGS
 CEOF
+skip_vars=" $2 "
+for ac_var in $ac_subst_vars
+do
+    eval ac_val=\$$ac_var
+       if echo "$skip_vars" | grep -v " $ac_var " >/dev/null 2>/dev/null; then
+               echo "$ac_var = $ac_val" >> $1
+       fi
+done
 ])
 
 dnl SMB_WRITE_PERLVARS(path)
index f8a0cb004fea1b79f20a24b375f0638b15443be2..3c84a91a59e9f8641dafc765d987dc9eb0d61d7f 100644 (file)
@@ -31,7 +31,9 @@ my $mkfile = smb_build::config_mk::run_config_mk($INPUT, $config::config{srcdir}
 my $subsys_output_type = ["MERGED_OBJ"];
 
 my $library_output_type;
-if ($config::config{USESHARED} eq "true") {
+my $useshared = (defined($ENV{USESHARED})?$ENV{USESHARED}:$config::config{USESHARED});
+
+if ($useshared eq "true") {
        $library_output_type = ["SHARED_LIBRARY", "MERGED_OBJ"];
 } else {
        $library_output_type = ["MERGED_OBJ"];
@@ -40,7 +42,7 @@ if ($config::config{USESHARED} eq "true") {
 }
 
 my $module_output_type;
-if ($config::config{USESHARED} eq "true") {
+if ($useshared eq "true") {
        $module_output_type = ["SHARED_LIBRARY"];
 } else {
        $module_output_type = ["MERGED_OBJ"];
index 4956fda5196fcba291234073694395c987b261b4..b10018384ff1b8d595c74d7df796d70afd33027a 100644 (file)
@@ -1,7 +1,6 @@
 [SUBSYSTEM::DYNCONFIG]
 
-DYNCONFIG_OBJ_FILES = $(dynconfigsrcdir)/dynconfig.o \
-                                         $(dynconfigsrcdir)/version.o
+DYNCONFIG_OBJ_FILES = $(dynconfigsrcdir)/dynconfig.o
 
 # set these to where to find various files
 # These can be overridden by command line switches (see smbd(8))
diff --git a/source4/dynconfig/version.c b/source4/dynconfig/version.c
deleted file mode 100644 (file)
index e81f463..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   Samba Version functions
-   
-   Copyright (C) Stefan Metzmacher     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"
-#include "version.h"
-
-const char *samba_version_string(void)
-{
-       return SAMBA_VERSION_STRING;
-}
index 095f129feb24cc66dbbe2402256dae6e70711a14..5c5e6e69ba6e3211d3e6185d7f96b8f7c7aabe3a 100644 (file)
@@ -1,17 +1,16 @@
 [SUBSYSTEM::ZLIB]
-CFLAGS = -Ilib/zlib
+CFLAGS = -I$(zlibsrcdir)
 
-libzlibsrcdir := lib/zlib
 ZLIB_OBJ_FILES = \
-               $(libzlibsrcdir)/adler32.o \
-               $(libzlibsrcdir)/compress.o \
-               $(libzlibsrcdir)/crc32.o \
-               $(libzlibsrcdir)/gzio.o \
-               $(libzlibsrcdir)/uncompr.o \
-               $(libzlibsrcdir)/deflate.o \
-               $(libzlibsrcdir)/trees.o \
-               $(libzlibsrcdir)/zutil.o \
-               $(libzlibsrcdir)/inflate.o \
-               $(libzlibsrcdir)/infback.o \
-               $(libzlibsrcdir)/inftrees.o \
-               $(libzlibsrcdir)/inffast.o
+               $(zlibsrcdir)/adler32.o \
+               $(zlibsrcdir)/compress.o \
+               $(zlibsrcdir)/crc32.o \
+               $(zlibsrcdir)/gzio.o \
+               $(zlibsrcdir)/uncompr.o \
+               $(zlibsrcdir)/deflate.o \
+               $(zlibsrcdir)/trees.o \
+               $(zlibsrcdir)/zutil.o \
+               $(zlibsrcdir)/inflate.o \
+               $(zlibsrcdir)/infback.o \
+               $(zlibsrcdir)/inftrees.o \
+               $(zlibsrcdir)/inffast.o
index 1d331215b5f0fb7fc4116ede263a3f4ff06af917..19318cdb17b7a56a7bf705db4e1a6397a7297f76 100644 (file)
@@ -26,6 +26,7 @@
 #include "dsdb/samdb/samdb.h"
 #include "lib/ldb-samba/ldif_handlers.h"
 #include "librpc/ndr/libndr.h"
+#include "version.h"
 %}
 
 %import "stdint.i"
@@ -77,10 +78,15 @@ bool samdb_set_domain_sid(struct ldb_context *ldb,
 
 WERROR dsdb_attach_schema_from_ldif_file(struct ldb_context *ldb, const char *pf, const char *df);
 
-%feature("docstring") samba_version_string "version()\n"
-                                          "Obtain the Samba version.";
-%rename(version) samba_version_string;
-const char *samba_version_string(void);
+%feature("docstring") version "version()\n"
+                              "Obtain the Samba version.";
+
+%inline {
+const char *version(void) 
+{ 
+    return SAMBA_VERSION_STRING; 
+}
+}
 int dsdb_set_global_schema(struct ldb_context *ldb);
 %feature("docstring") ldb_register_samba_handlers "register_samba_handlers()\n"
                                           "Register Samba-specific LDB modules and schemas.";
index 0c14944001a00fd237c5d77483ebdc1cba23a7e2..933ceef35f5b6877dbccf6062fc5240790e7f477 100644 (file)
@@ -1,5 +1,5 @@
 # This file was automatically generated by SWIG (http://www.swig.org).
-# Version 1.3.35
+# Version 1.3.36
 #
 # Don't modify this file, modify the SWIG interface instead.
 
index 888918ef533a9d9ca50378e7e7039a9d414b16c9..c7cdb86c354e40e69b8ab5f75f786492aced3800 100644 (file)
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.35
+ * Version 1.3.36
  * 
  * This file is not intended to be easily readable and contains a number of 
  * coding conventions designed to improve portability and efficiency. Do not make
 # endif
 #endif
 
+#ifndef SWIG_MSC_UNSUPPRESS_4505
+# if defined(_MSC_VER)
+#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
+# endif 
+#endif
+
 #ifndef SWIGUNUSEDPARM
 # ifdef __cplusplus
 #   define SWIGUNUSEDPARM(p)
@@ -2537,7 +2543,7 @@ static swig_module_info swig_module = {swig_types, 27, 0, 0, 0, 0};
 
 #define SWIG_name    "_misc"
 
-#define SWIGVERSION 0x010335 
+#define SWIGVERSION 0x010336 
 #define SWIG_VERSION SWIGVERSION
 
 
@@ -2552,6 +2558,7 @@ static swig_module_info swig_module = {swig_types, 27, 0, 0, 0, 0};
 #include "dsdb/samdb/samdb.h"
 #include "lib/ldb-samba/ldif_handlers.h"
 #include "librpc/ndr/libndr.h"
+#include "version.h"
 
 
 #include "libcli/util/pyerrors.h"
@@ -2807,6 +2814,12 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
 
 
 
+const char *version(void) 
+{ 
+    return SAMBA_VERSION_STRING; 
+}
+
+
   #define SWIG_From_long   PyInt_FromLong 
 
 
@@ -2833,13 +2846,13 @@ SWIGINTERN PyObject *_wrap_random_password(PyObject *SWIGUNUSEDPARM(self), PyObj
   PyObject *resultobj = 0;
   TALLOC_CTX *arg1 = (TALLOC_CTX *) 0 ;
   size_t arg2 ;
-  char *result = 0 ;
   size_t val2 ;
   int ecode2 = 0 ;
   PyObject * obj0 = 0 ;
   char *  kwnames[] = {
     (char *) "len", NULL 
   };
+  char *result = 0 ;
   
   arg1 = NULL;
   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:random_password",kwnames,&obj0)) SWIG_fail;
@@ -2974,7 +2987,6 @@ SWIGINTERN PyObject *_wrap_samdb_set_domain_sid(PyObject *SWIGUNUSEDPARM(self),
   PyObject *resultobj = 0;
   struct ldb_context *arg1 = (struct ldb_context *) 0 ;
   struct dom_sid *arg2 = (struct dom_sid *) 0 ;
-  bool result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 = 0 ;
@@ -2984,6 +2996,7 @@ SWIGINTERN PyObject *_wrap_samdb_set_domain_sid(PyObject *SWIGUNUSEDPARM(self),
   char *  kwnames[] = {
     (char *) "ldb",(char *) "dom_sid_in", NULL 
   };
+  bool result;
   
   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:samdb_set_domain_sid",kwnames,&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, 0 |  0 );
@@ -3012,7 +3025,6 @@ SWIGINTERN PyObject *_wrap_dsdb_attach_schema_from_ldif_file(PyObject *SWIGUNUSE
   struct ldb_context *arg1 = (struct ldb_context *) 0 ;
   char *arg2 = (char *) 0 ;
   char *arg3 = (char *) 0 ;
-  WERROR result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   int res2 ;
@@ -3027,6 +3039,7 @@ SWIGINTERN PyObject *_wrap_dsdb_attach_schema_from_ldif_file(PyObject *SWIGUNUSE
   char *  kwnames[] = {
     (char *) "ldb",(char *) "pf",(char *) "df", NULL 
   };
+  WERROR result;
   
   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:dsdb_attach_schema_from_ldif_file",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, 0 |  0 );
@@ -3069,7 +3082,7 @@ SWIGINTERN PyObject *_wrap_version(PyObject *SWIGUNUSEDPARM(self), PyObject *arg
   char *result = 0 ;
   
   if (!SWIG_Python_UnpackTuple(args,"version",0,0,0)) SWIG_fail;
-  result = (char *)samba_version_string();
+  result = (char *)version();
   resultobj = SWIG_FromCharPtr((const char *)result);
   return resultobj;
 fail:
@@ -3080,13 +3093,13 @@ fail:
 SWIGINTERN PyObject *_wrap_dsdb_set_global_schema(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   PyObject *resultobj = 0;
   struct ldb_context *arg1 = (struct ldb_context *) 0 ;
-  int result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
   char *  kwnames[] = {
     (char *) "ldb", NULL 
   };
+  int result;
   
   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:dsdb_set_global_schema",kwnames,&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, 0 |  0 );
@@ -3108,13 +3121,13 @@ fail:
 SWIGINTERN PyObject *_wrap_ldb_register_samba_handlers(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   PyObject *resultobj = 0;
   struct ldb_context *arg1 = (struct ldb_context *) 0 ;
-  int result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
   char *  kwnames[] = {
     (char *) "ldb", NULL 
   };
+  int result;
   
   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:ldb_register_samba_handlers",kwnames,&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, 0 |  0 );
@@ -3137,7 +3150,6 @@ SWIGINTERN PyObject *_wrap_dsdb_set_ntds_invocation_id(PyObject *SWIGUNUSEDPARM(
   PyObject *resultobj = 0;
   struct ldb_context *arg1 = (struct ldb_context *) 0 ;
   char *arg2 = (char *) 0 ;
-  bool result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   int res2 ;
@@ -3148,6 +3160,7 @@ SWIGINTERN PyObject *_wrap_dsdb_set_ntds_invocation_id(PyObject *SWIGUNUSEDPARM(
   char *  kwnames[] = {
     (char *) "ldb",(char *) "guid", NULL 
   };
+  bool result;
   
   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:dsdb_set_ntds_invocation_id",kwnames,&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, 0 |  0 );
@@ -3178,7 +3191,6 @@ SWIGINTERN PyObject *_wrap_private_path(PyObject *SWIGUNUSEDPARM(self), PyObject
   TALLOC_CTX *arg1 = (TALLOC_CTX *) 0 ;
   struct loadparm_context *arg2 = (struct loadparm_context *) 0 ;
   char *arg3 = (char *) 0 ;
-  char *result = 0 ;
   void *argp2 = 0 ;
   int res2 = 0 ;
   int res3 ;
@@ -3189,6 +3201,7 @@ SWIGINTERN PyObject *_wrap_private_path(PyObject *SWIGUNUSEDPARM(self), PyObject
   char *  kwnames[] = {
     (char *) "lp_ctx",(char *) "name", NULL 
   };
+  char *result = 0 ;
   
   arg2 = loadparm_init(NULL);
   arg1 = NULL;