[SCM] Samba Shared Repository - branch v4-0-test updated -
release-4-0-0alpha3-1673-gf29e900
Jelmer Vernooij
jelmer at samba.org
Wed May 21 13:45:35 GMT 2008
The branch, v4-0-test has been updated
via f29e9009310e4a6d575651dd9ba41ffc90bfb386 (commit)
via f0914d0187130adcd4f239d4ea0fc9f729fdedc9 (commit)
via 58f956dc4591137489cba16f360f2d24d91dadc1 (commit)
via 034c68bea934db87bce13a750c17fb1bd2bbe3b6 (commit)
via ce440887316d3ae379551c136f6b640c573fd702 (commit)
from c52fe1fe1c77636d87355d3c4baa66e052fe9008 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test
- Log -----------------------------------------------------------------
commit f29e9009310e4a6d575651dd9ba41ffc90bfb386
Merge: f0914d0187130adcd4f239d4ea0fc9f729fdedc9 c52fe1fe1c77636d87355d3c4baa66e052fe9008
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Wed May 21 15:45:04 2008 +0200
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into nosmbpython
commit f0914d0187130adcd4f239d4ea0fc9f729fdedc9
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Wed May 21 15:40:55 2008 +0200
Fix typo.
commit 58f956dc4591137489cba16f360f2d24d91dadc1
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Wed May 21 15:39:00 2008 +0200
Fix reference to removed smbpython.
commit 034c68bea934db87bce13a750c17fb1bd2bbe3b6
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Wed May 21 14:29:05 2008 +0200
Regenerate with newer version of swig.
commit ce440887316d3ae379551c136f6b640c573fd702
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Wed May 21 14:28:10 2008 +0200
Use gnu make syntax for SWIG implicit rule since it allows multiple output files.
-----------------------------------------------------------------------
Summary of changes:
source/build/make/python.mk | 4 +-
source/configure.ac | 2 +-
source/lib/events/events.py | 2 +-
source/lib/events/events_wrap.c | 65 +++++++++++++++++++++---------
source/libcli/swig/libcli_nbt.py | 2 +-
source/libcli/swig/libcli_nbt_wrap.c | 73 +++++++++++++++++++++++-----------
source/setup/enableaccount | 4 +-
testprogs/blackbox/test_kinit.sh | 2 +-
8 files changed, 105 insertions(+), 49 deletions(-)
mode change 100644 => 100755 source/setup/enableaccount
Changeset truncated at 500 lines:
diff --git a/source/build/make/python.mk b/source/build/make/python.mk
index 7d957fb..66e5def 100644
--- a/source/build/make/python.mk
+++ b/source/build/make/python.mk
@@ -43,9 +43,9 @@ endef
# Swig extensions
swig:: pythonmods
-.SUFFIXES: _wrap.c .i
+.SUFFIXES: _wrap.c .i .py
-.i_wrap.c:
+%_wrap.c %.py: %.i
[ "$(SWIG)" == "no" ] || $(SWIG) -O -Wall -I$(srcdir)/scripting/swig -python -keyword $<
realdistclean::
diff --git a/source/configure.ac b/source/configure.ac
index 34657cf..73d3ffd 100644
--- a/source/configure.ac
+++ b/source/configure.ac
@@ -162,7 +162,7 @@ CPPFLAGS="$builddir_headers-I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -I
SMB_WRITE_PERLVARS(build/smb_build/config.pm)
-../../source/echo "configure: creating config.mk"
+echo "configure: creating config.mk"
cat >config.mk<<CEOF
# config.mk - Autogenerated by configure, DO NOT EDIT!
$SMB_INFO_EXT_LIBS
diff --git a/source/lib/events/events.py b/source/lib/events/events.py
index d8f70f6..2377268 100644
--- a/source/lib/events/events.py
+++ b/source/lib/events/events.py
@@ -1,5 +1,5 @@
# This file was automatically generated by SWIG (http://www.swig.org).
-# Version 1.3.33
+# Version 1.3.35
#
# Don't modify this file, modify the SWIG interface instead.
diff --git a/source/lib/events/events_wrap.c b/source/lib/events/events_wrap.c
index 9dbbb08..727485d 100644
--- a/source/lib/events/events_wrap.c
+++ b/source/lib/events/events_wrap.c
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.33
+ * Version 1.3.35
*
* 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
@@ -126,7 +126,7 @@
/* This should only be incremented when either the layout of swig_type_info changes,
or for whatever reason, the runtime changes incompatibly */
-#define SWIG_RUNTIME_VERSION "3"
+#define SWIG_RUNTIME_VERSION "4"
/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
@@ -161,6 +161,7 @@
/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN 0x1
+#define SWIG_CAST_NEW_MEMORY 0x2
/* Flags for new pointer objects */
#define SWIG_POINTER_OWN 0x1
@@ -301,10 +302,10 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
extern "C" {
#endif
-typedef void *(*swig_converter_func)(void *);
+typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);
-/* Structure to store inforomation on one type */
+/* Structure to store information on one type */
typedef struct swig_type_info {
const char *name; /* mangled name of this type */
const char *str; /* human readable name of this type */
@@ -431,8 +432,8 @@ SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
-SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
- return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
+SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
+ return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}
/*
@@ -856,7 +857,7 @@ SWIG_Python_AddErrorMsg(const char* mesg)
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_SetString(PyExc_RuntimeError, mesg);
}
}
@@ -1416,7 +1417,7 @@ PySwigObject_dealloc(PyObject *v)
{
PySwigObject *sobj = (PySwigObject *) v;
PyObject *next = sobj->next;
- if (sobj->own) {
+ if (sobj->own == SWIG_POINTER_OWN) {
swig_type_info *ty = sobj->ty;
PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
PyObject *destroy = data ? data->destroy : 0;
@@ -1434,12 +1435,13 @@ PySwigObject_dealloc(PyObject *v)
res = ((*meth)(mself, v));
}
Py_XDECREF(res);
- } else {
- const char *name = SWIG_TypePrettyName(ty);
+ }
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
- printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
-#endif
+ else {
+ const char *name = SWIG_TypePrettyName(ty);
+ printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
}
+#endif
}
Py_XDECREF(next);
PyObject_DEL(v);
@@ -1944,7 +1946,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj)
SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject *obj, int own) {
- if (own) {
+ if (own == SWIG_POINTER_OWN) {
PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
if (sobj) {
int oldown = sobj->own;
@@ -1965,6 +1967,8 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
return SWIG_OK;
} else {
PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
+ if (own)
+ *own = 0;
while (sobj) {
void *vptr = sobj->ptr;
if (ty) {
@@ -1978,7 +1982,15 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
if (!tc) {
sobj = (PySwigObject *)sobj->next;
} else {
- if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
+ if (ptr) {
+ int newmemory = 0;
+ *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+ if (newmemory == SWIG_CAST_NEW_MEMORY) {
+ assert(own);
+ if (own)
+ *own = *own | SWIG_CAST_NEW_MEMORY;
+ }
+ }
break;
}
}
@@ -1988,7 +2000,8 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
}
}
if (sobj) {
- if (own) *own = sobj->own;
+ if (own)
+ *own = *own | sobj->own;
if (flags & SWIG_POINTER_DISOWN) {
sobj->own = 0;
}
@@ -2053,8 +2066,13 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
}
if (ty) {
swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
- if (!tc) return SWIG_ERROR;
- *ptr = SWIG_TypeCast(tc,vptr);
+ if (tc) {
+ int newmemory = 0;
+ *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+ assert(!newmemory); /* newmemory handling not yet implemented */
+ } else {
+ return SWIG_ERROR;
+ }
} else {
*ptr = vptr;
}
@@ -2493,7 +2511,7 @@ static swig_module_info swig_module = {swig_types, 4, 0, 0, 0, 0};
#define SWIG_name "_events"
-#define SWIGVERSION 0x010333
+#define SWIGVERSION 0x010335
#define SWIG_VERSION SWIGVERSION
@@ -2860,7 +2878,7 @@ SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
size_t i;
swig_module_info *module_head, *iter;
- int found;
+ int found, init;
clientdata = clientdata;
@@ -2870,6 +2888,9 @@ SWIG_InitializeModule(void *clientdata) {
swig_module.type_initial = swig_type_initial;
swig_module.cast_initial = swig_cast_initial;
swig_module.next = &swig_module;
+ init = 1;
+ } else {
+ init = 0;
}
/* Try and load any already created modules */
@@ -2898,6 +2919,12 @@ SWIG_InitializeModule(void *clientdata) {
module_head->next = &swig_module;
}
+ /* When multiple interpeters are used, a module could have already been initialized in
+ a different interpreter, but not yet have a pointer in this interpreter.
+ In this case, we do not want to continue adding types... everything should be
+ set up already */
+ if (init == 0) return;
+
/* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
printf("SWIG_InitializeModule: size %d\n", swig_module.size);
diff --git a/source/libcli/swig/libcli_nbt.py b/source/libcli/swig/libcli_nbt.py
index b49e240..a26aa60 100644
--- a/source/libcli/swig/libcli_nbt.py
+++ b/source/libcli/swig/libcli_nbt.py
@@ -1,5 +1,5 @@
# This file was automatically generated by SWIG (http://www.swig.org).
-# Version 1.3.33
+# Version 1.3.35
#
# Don't modify this file, modify the SWIG interface instead.
diff --git a/source/libcli/swig/libcli_nbt_wrap.c b/source/libcli/swig/libcli_nbt_wrap.c
index e0bdb27..2deec98 100644
--- a/source/libcli/swig/libcli_nbt_wrap.c
+++ b/source/libcli/swig/libcli_nbt_wrap.c
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.33
+ * Version 1.3.35
*
* 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
@@ -126,7 +126,7 @@
/* This should only be incremented when either the layout of swig_type_info changes,
or for whatever reason, the runtime changes incompatibly */
-#define SWIG_RUNTIME_VERSION "3"
+#define SWIG_RUNTIME_VERSION "4"
/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
@@ -161,6 +161,7 @@
/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN 0x1
+#define SWIG_CAST_NEW_MEMORY 0x2
/* Flags for new pointer objects */
#define SWIG_POINTER_OWN 0x1
@@ -301,10 +302,10 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
extern "C" {
#endif
-typedef void *(*swig_converter_func)(void *);
+typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);
-/* Structure to store inforomation on one type */
+/* Structure to store information on one type */
typedef struct swig_type_info {
const char *name; /* mangled name of this type */
const char *str; /* human readable name of this type */
@@ -431,8 +432,8 @@ SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
-SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
- return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
+SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
+ return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}
/*
@@ -856,7 +857,7 @@ SWIG_Python_AddErrorMsg(const char* mesg)
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_SetString(PyExc_RuntimeError, mesg);
}
}
@@ -1416,7 +1417,7 @@ PySwigObject_dealloc(PyObject *v)
{
PySwigObject *sobj = (PySwigObject *) v;
PyObject *next = sobj->next;
- if (sobj->own) {
+ if (sobj->own == SWIG_POINTER_OWN) {
swig_type_info *ty = sobj->ty;
PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
PyObject *destroy = data ? data->destroy : 0;
@@ -1434,12 +1435,13 @@ PySwigObject_dealloc(PyObject *v)
res = ((*meth)(mself, v));
}
Py_XDECREF(res);
- } else {
- const char *name = SWIG_TypePrettyName(ty);
+ }
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
- printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
-#endif
+ else {
+ const char *name = SWIG_TypePrettyName(ty);
+ printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
}
+#endif
}
Py_XDECREF(next);
PyObject_DEL(v);
@@ -1944,7 +1946,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj)
SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject *obj, int own) {
- if (own) {
+ if (own == SWIG_POINTER_OWN) {
PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
if (sobj) {
int oldown = sobj->own;
@@ -1965,6 +1967,8 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
return SWIG_OK;
} else {
PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
+ if (own)
+ *own = 0;
while (sobj) {
void *vptr = sobj->ptr;
if (ty) {
@@ -1978,7 +1982,15 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
if (!tc) {
sobj = (PySwigObject *)sobj->next;
} else {
- if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
+ if (ptr) {
+ int newmemory = 0;
+ *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+ if (newmemory == SWIG_CAST_NEW_MEMORY) {
+ assert(own);
+ if (own)
+ *own = *own | SWIG_CAST_NEW_MEMORY;
+ }
+ }
break;
}
}
@@ -1988,7 +2000,8 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
}
}
if (sobj) {
- if (own) *own = sobj->own;
+ if (own)
+ *own = *own | sobj->own;
if (flags & SWIG_POINTER_DISOWN) {
sobj->own = 0;
}
@@ -2053,8 +2066,13 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
}
if (ty) {
swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
- if (!tc) return SWIG_ERROR;
- *ptr = SWIG_TypeCast(tc,vptr);
+ if (tc) {
+ int newmemory = 0;
+ *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+ assert(!newmemory); /* newmemory handling not yet implemented */
+ } else {
+ return SWIG_ERROR;
+ }
} else {
*ptr = vptr;
}
@@ -2507,7 +2525,7 @@ static swig_module_info swig_module = {swig_types, 18, 0, 0, 0, 0};
#define SWIG_name "_libcli_nbt"
-#define SWIGVERSION 0x010333
+#define SWIGVERSION 0x010335
#define SWIG_VERSION SWIGVERSION
@@ -3134,7 +3152,7 @@ SWIGINTERN PyObject *_wrap_new_nbt_name(PyObject *SWIGUNUSEDPARM(self), PyObject
struct nbt_name *result = 0 ;
if (!SWIG_Python_UnpackTuple(args,"new_nbt_name",0,0,0)) SWIG_fail;
- result = (struct nbt_name *)(struct nbt_name *) calloc(1, sizeof(struct nbt_name));
+ result = (struct nbt_name *)calloc(1, sizeof(struct nbt_name));
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_nbt_name, SWIG_POINTER_NEW | 0 );
return resultobj;
fail:
@@ -3227,7 +3245,7 @@ SWIGINTERN PyObject *_wrap_new_nbt_name_query(PyObject *SWIGUNUSEDPARM(self), Py
struct nbt_name_query *result = 0 ;
if (!SWIG_Python_UnpackTuple(args,"new_nbt_name_query",0,0,0)) SWIG_fail;
- result = (struct nbt_name_query *)(struct nbt_name_query *) calloc(1, sizeof(struct nbt_name_query));
+ result = (struct nbt_name_query *)calloc(1, sizeof(struct nbt_name_query));
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_nbt_name_query, SWIG_POINTER_NEW | 0 );
return resultobj;
fail:
@@ -3493,7 +3511,7 @@ SWIGINTERN PyObject *_wrap_new_nbt_name_query_out(PyObject *SWIGUNUSEDPARM(self)
nbt_name_query_out *result = 0 ;
if (!SWIG_Python_UnpackTuple(args,"new_nbt_name_query_out",0,0,0)) SWIG_fail;
- result = (nbt_name_query_out *)(nbt_name_query_out *) calloc(1, sizeof(nbt_name_query_out));
+ result = (nbt_name_query_out *)calloc(1, sizeof(nbt_name_query_out));
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_nbt_name_query_out, SWIG_POINTER_NEW | 0 );
return resultobj;
fail:
@@ -3865,7 +3883,7 @@ SWIGINTERN PyObject *_wrap_new_nbt_name_query_in(PyObject *SWIGUNUSEDPARM(self),
nbt_name_query_in *result = 0 ;
if (!SWIG_Python_UnpackTuple(args,"new_nbt_name_query_in",0,0,0)) SWIG_fail;
- result = (nbt_name_query_in *)(nbt_name_query_in *) calloc(1, sizeof(nbt_name_query_in));
+ result = (nbt_name_query_in *)calloc(1, sizeof(nbt_name_query_in));
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_nbt_name_query_in, SWIG_POINTER_NEW | 0 );
return resultobj;
fail:
@@ -4280,7 +4298,7 @@ SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
size_t i;
swig_module_info *module_head, *iter;
- int found;
+ int found, init;
clientdata = clientdata;
@@ -4290,6 +4308,9 @@ SWIG_InitializeModule(void *clientdata) {
swig_module.type_initial = swig_type_initial;
swig_module.cast_initial = swig_cast_initial;
swig_module.next = &swig_module;
+ init = 1;
+ } else {
+ init = 0;
}
/* Try and load any already created modules */
@@ -4318,6 +4339,12 @@ SWIG_InitializeModule(void *clientdata) {
module_head->next = &swig_module;
}
+ /* When multiple interpeters are used, a module could have already been initialized in
+ a different interpreter, but not yet have a pointer in this interpreter.
+ In this case, we do not want to continue adding types... everything should be
+ set up already */
+ if (init == 0) return;
+
/* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
printf("SWIG_InitializeModule: size %d\n", swig_module.size);
diff --git a/source/setup/enableaccount b/source/setup/enableaccount
old mode 100644
new mode 100755
index 849b515..ad81042
--- a/source/setup/enableaccount
+++ b/source/setup/enableaccount
@@ -5,11 +5,13 @@
# Copyright Jelmer Vernooij 2008
# Released under the GNU GPL version 3 or later
#
+import os, sys
+
+sys.path.insert(0, os.path.join(os.path.dirname(sys.argv[0]), "../bin/python"))
import samba.getopt as options
import optparse
import pwd
-import sys
import ldb
from auth import system_session
diff --git a/testprogs/blackbox/test_kinit.sh b/testprogs/blackbox/test_kinit.sh
index db4b65f..d3cece0 100755
--- a/testprogs/blackbox/test_kinit.sh
+++ b/testprogs/blackbox/test_kinit.sh
@@ -23,7 +23,7 @@ samba4bindir=`dirname $0`/../../source/bin
smbclient=$samba4bindir/smbclient
samba4kinit=$samba4bindir/samba4kinit
net=$samba4bindir/net
-enableaccount="$samba4bindir/smbpython `dirname $0`/../../source/setup/enableaccount"
+enableaccount="$PYTHON `dirname $0`/../../source/setup/enableaccount"
--
Samba Shared Repository
More information about the samba-cvs
mailing list