From 0f32132b884fa56fde806ba33d082456b53e0df9 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 8 Jan 2008 17:02:53 -0600 Subject: r26695: Cosmetic fix for pidl generated samba3 client code. Guenther (This used to be commit c52d9e6e60e0765e4f793d64e94571b6f6c3f9c7) --- source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm index e174f77542..d6b6296bd8 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm @@ -23,7 +23,7 @@ $VERSION = '0.01'; sub indent($) { my ($self) = @_; $self->{tabs}.="\t"; } sub deindent($) { my ($self) = @_; $self->{tabs} = substr($self->{tabs}, 1); } -sub pidl($$) { my ($self,$txt) = @_; $self->{res} .= "$self->{tabs}$txt\n"; } +sub pidl($$) { my ($self,$txt) = @_; $self->{res} .= $txt ? "$self->{tabs}$txt\n" : "\n"; } sub pidl_hdr($$) { my ($self, $txt) = @_; $self->{res_hdr} .= "$txt\n"; } sub fn_declare($$) { my ($self,$n) = @_; $self->pidl($n); $self->pidl_hdr("$n;"); } -- cgit From e3f0e64ef083cbad37c0e967e5ab3de6a840b7f9 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 8 Jan 2008 22:56:44 -0600 Subject: r26696: Some more minor pidl samba3 client cosmetics. Guenther (This used to be commit 7ee3fd43f964d3161c075dae8de73c77de146538) --- source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'source4') diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm index d6b6296bd8..01b77c0c9f 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm @@ -66,8 +66,11 @@ sub ParseFunction($$$) } $self->pidl(""); - $self->pidl("if (DEBUGLEVEL >= 10)"); - $self->pidl("\tNDR_PRINT_IN_DEBUG($fn->{NAME}, &r);"); + $self->pidl("if (DEBUGLEVEL >= 10) {"); + $self->indent; + $self->pidl("NDR_PRINT_IN_DEBUG($fn->{NAME}, &r);"); + $self->deindent; + $self->pidl("}"); $self->pidl(""); $self->pidl("status = cli_do_rpc_ndr(cli, mem_ctx, PI_$uif, &ndr_table_$if, $ufn, &r);"); $self->pidl(""); @@ -79,11 +82,16 @@ sub ParseFunction($$$) $self->pidl("}"); $self->pidl(""); - $self->pidl("if (DEBUGLEVEL >= 10)"); - $self->pidl("\tNDR_PRINT_OUT_DEBUG($fn->{NAME}, &r);"); + $self->pidl("if (DEBUGLEVEL >= 10) {"); + $self->indent; + $self->pidl("NDR_PRINT_OUT_DEBUG($fn->{NAME}, &r);"); + $self->deindent; + $self->pidl("}"); $self->pidl(""); $self->pidl("if (NT_STATUS_IS_ERR(status)) {"); - $self->pidl("\treturn status;"); + $self->indent; + $self->pidl("return status;"); + $self->deindent; $self->pidl("}"); $self->pidl(""); $self->pidl("/* Return variables */"); -- cgit From 4d58fc88cbba394faa83b493ec79344935a497f8 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 9 Jan 2008 05:36:02 -0600 Subject: r26697: Leak less memory into the ldb context. (Trying to chase down memory leaks in provision) Andrew Bartlett (This used to be commit a0cf47c3359ca5dfab90c1a5831a73b89ff9f027) --- source4/dsdb/schema/schema_init.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'source4') diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c index 3dd81fb822..6a7463951e 100644 --- a/source4/dsdb/schema/schema_init.c +++ b/source4/dsdb/schema/schema_init.c @@ -85,24 +85,30 @@ WERROR dsdb_load_oid_mappings_ldb(struct dsdb_schema *schema, struct prefixMapBlob pfm; char *schema_info; - ndr_err = ndr_pull_struct_blob(prefixMap, schema, lp_iconv_convenience(global_loadparm), &pfm, + TALLOC_CTX *mem_ctx = talloc_new(schema); + W_ERROR_HAVE_NO_MEMORY(mem_ctx); + + ndr_err = ndr_pull_struct_blob(prefixMap, mem_ctx, lp_iconv_convenience(global_loadparm), &pfm, (ndr_pull_flags_fn_t)ndr_pull_prefixMapBlob); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err); + talloc_free(mem_ctx); return ntstatus_to_werror(nt_status); } if (pfm.version != PREFIX_MAP_VERSION_DSDB) { + talloc_free(mem_ctx); return WERR_FOOBAR; } if (schemaInfo->length != 21 && schemaInfo->data[0] == 0xFF) { + talloc_free(mem_ctx); return WERR_FOOBAR; } /* append the schema info as last element */ pfm.ctr.dsdb.num_mappings++; - pfm.ctr.dsdb.mappings = talloc_realloc(schema, pfm.ctr.dsdb.mappings, + pfm.ctr.dsdb.mappings = talloc_realloc(mem_ctx, pfm.ctr.dsdb.mappings, struct drsuapi_DsReplicaOIDMapping, pfm.ctr.dsdb.num_mappings); W_ERROR_HAVE_NO_MEMORY(pfm.ctr.dsdb.mappings); @@ -116,7 +122,8 @@ WERROR dsdb_load_oid_mappings_ldb(struct dsdb_schema *schema, /* call the drsuapi version */ status = dsdb_load_oid_mappings_drsuapi(schema, &pfm.ctr.dsdb); - talloc_free(pfm.ctr.dsdb.mappings); + talloc_free(mem_ctx); + W_ERROR_NOT_OK_RETURN(status); return WERR_OK; @@ -1164,6 +1171,8 @@ WERROR dsdb_attach_schema_from_ldif_file(struct ldb_context *ldb, const char *pf if (!msg) { goto nomem; } + talloc_steal(mem_ctx, msg); + talloc_free(ldif); prefix_val = ldb_msg_find_ldb_val(msg, "prefixMap"); if (!prefix_val) { @@ -1200,6 +1209,9 @@ WERROR dsdb_attach_schema_from_ldif_file(struct ldb_context *ldb, const char *pf goto nomem; } + talloc_steal(mem_ctx, msg); + talloc_free(ldif); + is_sa = ldb_msg_check_string_attribute(msg, "objectClass", "attributeSchema"); is_sc = ldb_msg_check_string_attribute(msg, "objectClass", "classSchema"); -- cgit From e6968df1e57e1c09bee21019fc1eec15e7a06005 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 9 Jan 2008 10:56:07 -0600 Subject: r26698: Prettify samba3 client code a little more. Guenther (This used to be commit 6ac36d6a4b83b9ef794a2022c4d46ed0b69758e9) --- source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm | 32 +++++++++++++++++++------ 1 file changed, 25 insertions(+), 7 deletions(-) (limited to 'source4') diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm index 01b77c0c9f..b7372a802a 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm @@ -2,6 +2,7 @@ # Samba3 client generator for IDL structures # on top of Samba4 style NDR functions # Copyright jelmer@samba.org 2005-2006 +# Copyright gd@samba.org 2008 # released under the GNU GPL package Parse::Pidl::Samba3::ClientNDR; @@ -27,6 +28,15 @@ sub pidl($$) { my ($self,$txt) = @_; $self->{res} .= $txt ? "$self->{tabs}$txt\n sub pidl_hdr($$) { my ($self, $txt) = @_; $self->{res_hdr} .= "$txt\n"; } sub fn_declare($$) { my ($self,$n) = @_; $self->pidl($n); $self->pidl_hdr("$n;"); } +sub genpad($) +{ + my ($s) = @_; + my $nt = int((length($s)+1)/8); + my $lt = ($nt*8)-1; + my $ns = (length($s)-$lt); + return "\t"x($nt)." "x($ns); +} + sub new($) { my ($class) = shift; @@ -38,20 +48,23 @@ sub ParseFunction($$$) { my ($self, $if, $fn) = @_; - my $inargs = ""; - my $defargs = ""; + my $fn_args = ""; my $uif = uc($if); my $ufn = "NDR_".uc($fn->{NAME}); + my $fn_str = "NTSTATUS rpccli_$fn->{NAME}"; + my $pad = genpad($fn_str); + + $fn_args .= "struct rpc_pipe_client *cli,\n" . $pad . "TALLOC_CTX *mem_ctx"; foreach (@{$fn->{ELEMENTS}}) { - $defargs .= ", " . DeclLong($_); + $fn_args .= ",\n" . $pad . DeclLong($_); } if (defined($fn->{RETURN_TYPE}) && ($fn->{RETURN_TYPE} eq "WERROR")) { - $defargs .= ", WERROR *werror"; + $fn_args .= ",\n" . $pad . "WERROR *werror"; } - $self->fn_declare("NTSTATUS rpccli_$fn->{NAME}(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx$defargs)"); + $self->fn_declare("$fn_str($fn_args)"); $self->pidl("{"); $self->indent; $self->pidl("struct $fn->{NAME} r;"); @@ -62,7 +75,7 @@ sub ParseFunction($$$) foreach (@{$fn->{ELEMENTS}}) { if (grep(/in/, @{$_->{DIRECTION}})) { $self->pidl("r.in.$_->{NAME} = $_->{NAME};"); - } + } } $self->pidl(""); @@ -72,7 +85,12 @@ sub ParseFunction($$$) $self->deindent; $self->pidl("}"); $self->pidl(""); - $self->pidl("status = cli_do_rpc_ndr(cli, mem_ctx, PI_$uif, &ndr_table_$if, $ufn, &r);"); + $self->pidl("status = cli_do_rpc_ndr(cli,"); + $self->pidl("\t\t\tmem_ctx,"); + $self->pidl("\t\t\tPI_$uif,"); + $self->pidl("\t\t\t&ndr_table_$if,"); + $self->pidl("\t\t\t$ufn,"); + $self->pidl("\t\t\t&r);"); $self->pidl(""); $self->pidl("if (!NT_STATUS_IS_OK(status)) {"); -- cgit From c781879e35b5ff29a21ab9ea4f0ca3b7c53280f7 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 9 Jan 2008 11:28:53 -0600 Subject: r26699: Some minor cosmetics for pidl samba3 server code. Guenther (This used to be commit 81fa63dfe6004d916bbe653cbb1b4cbdf5d3d97d) --- source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm | 38 +++++++++++++------------ 1 file changed, 20 insertions(+), 18 deletions(-) (limited to 'source4') diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm index a07d0ddc6c..47312bc83d 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm @@ -22,11 +22,11 @@ my $res_hdr; my $tabs = ""; sub indent() { $tabs.="\t"; } sub deindent() { $tabs = substr($tabs, 1); } -sub pidl($) { $res .= $tabs.(shift)."\n"; } +sub pidl($) { my ($txt) = @_; $res .= $txt?$tabs.(shift)."\n":"\n"; } sub pidl_hdr($) { $res_hdr .= (shift)."\n"; } sub fn_declare($) { my ($n) = @_; pidl $n; pidl_hdr "$n;"; } -sub DeclLevel($$) +sub DeclLevel($$) { my ($e, $l) = @_; my $res = ""; @@ -73,7 +73,7 @@ sub AllocOutVar($$$$) pidl "if ($name == NULL) {"; pidl "\ttalloc_free($mem_ctx);"; - pidl "\treturn False;"; + pidl "\treturn false;"; pidl "}"; pidl ""; } @@ -98,29 +98,30 @@ sub ParseFunction($$) pidl ""; pidl "r = talloc(NULL, struct $fn->{NAME});"; pidl "if (r == NULL) {"; - pidl "\treturn False;"; + pidl "\treturn false;"; pidl "}"; pidl ""; pidl "if (!prs_data_blob(&p->in_data.data, &blob, r)) {"; pidl "\ttalloc_free(r);"; - pidl "\treturn False;"; + pidl "\treturn false;"; pidl "}"; pidl ""; pidl "pull = ndr_pull_init_blob(&blob, r);"; pidl "if (pull == NULL) {"; pidl "\ttalloc_free(r);"; - pidl "\treturn False;"; + pidl "\treturn false;"; pidl "}"; pidl ""; pidl "pull->flags |= LIBNDR_FLAG_REF_ALLOC;"; pidl "ndr_err = call->ndr_pull(pull, NDR_IN, r);"; pidl "if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {"; pidl "\ttalloc_free(r);"; - pidl "\treturn False;"; + pidl "\treturn false;"; pidl "}"; pidl ""; - pidl "if (DEBUGLEVEL >= 10)"; + pidl "if (DEBUGLEVEL >= 10) {"; pidl "\tNDR_PRINT_IN_DEBUG($fn->{NAME}, r);"; + pidl "}"; pidl ""; my $env = GenerateFunctionOutEnv($fn); @@ -137,7 +138,7 @@ sub ParseFunction($$) my @dir = @{$_->{DIRECTION}}; if (grep(/in/, @dir) and grep(/out/, @dir)) { pidl "r->out.$_->{NAME} = r->in.$_->{NAME};"; - } elsif (grep(/out/, @dir) and not + } elsif (grep(/out/, @dir) and not has_property($_, "represent_as")) { AllocOutVar($_, "r", "r->out.$_->{NAME}", $env); } @@ -158,34 +159,35 @@ sub ParseFunction($$) pidl ""; pidl "if (p->rng_fault_state) {"; pidl "\ttalloc_free(r);"; - pidl "\t/* Return True here, srv_pipe_hnd.c will take care */"; - pidl "\treturn True;"; + pidl "\t/* Return true here, srv_pipe_hnd.c will take care */"; + pidl "\treturn true;"; pidl "}"; pidl ""; - pidl "if (DEBUGLEVEL >= 10)"; + pidl "if (DEBUGLEVEL >= 10) {"; pidl "\tNDR_PRINT_OUT_DEBUG($fn->{NAME}, r);"; + pidl "}"; pidl ""; pidl "push = ndr_push_init_ctx(r);"; pidl "if (push == NULL) {"; pidl "\ttalloc_free(r);"; - pidl "\treturn False;"; + pidl "\treturn false;"; pidl "}"; pidl ""; pidl "ndr_err = call->ndr_push(push, NDR_OUT, r);"; pidl "if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {"; pidl "\ttalloc_free(r);"; - pidl "\treturn False;"; + pidl "\treturn false;"; pidl "}"; pidl ""; pidl "blob = ndr_push_blob(push);"; - pidl "if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {"; + pidl "if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {"; pidl "\ttalloc_free(r);"; - pidl "\treturn False;"; + pidl "\treturn false;"; pidl "}"; pidl ""; pidl "talloc_free(r);"; pidl ""; - pidl "return True;"; + pidl "return true;"; deindent; pidl "}"; pidl ""; @@ -251,7 +253,7 @@ sub Parse($$$) pidl "#include \"$header\""; pidl_hdr "#include \"$ndr_header\""; pidl ""; - + foreach (@$ndr) { ParseInterface($_) if ($_->{TYPE} eq "INTERFACE"); } -- cgit From db5b0fcfb8d51bff5f7c62ce9c4b0daa71b919b1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 10 Jan 2008 15:17:26 -0600 Subject: r26700: tdb: Build and install Python bindings when possible. (This used to be commit 8d77ea379fef5ad4b2718bc8e0620304588c9239) --- source4/lib/tdb/Makefile.in | 24 +++++++++----- source4/lib/tdb/configure.ac | 10 ++++++ source4/lib/tdb/tdb.py | 2 +- source4/lib/tdb/tdb_wrap.c | 74 ++++++++++++++++++++++++-------------------- 4 files changed, 68 insertions(+), 42 deletions(-) (limited to 'source4') diff --git a/source4/lib/tdb/Makefile.in b/source4/lib/tdb/Makefile.in index a60b9a67bf..c98d7e0497 100644 --- a/source4/lib/tdb/Makefile.in +++ b/source4/lib/tdb/Makefile.in @@ -36,7 +36,7 @@ DIRS = bin common tools SONAME = libtdb.$(SHLIBEXT).1 SOLIB = libtdb.$(SHLIBEXT).$(PACKAGE_VERSION) -all: showflags dirs $(PROGS) $(SOLIB) libtdb.a +all: showflags dirs $(PROGS) $(SOLIB) libtdb.a @PYTHON_BUILD_TARGET@ showflags: @echo 'tdb will be compiled with flags:' @@ -55,13 +55,21 @@ showflags: dirs: @mkdir -p $(DIRS) -install: all +install: all installdirs installbin installheaders installlibs @PYTHON_INSTALL_TARGET@ + +installdirs: mkdir -p $(DESTDIR)$(bindir) mkdir -p $(DESTDIR)$(includedir) mkdir -p $(DESTDIR)$(libdir) mkdir -p $(DESTDIR)$(libdir)/pkgconfig + +installbin: installdirs cp $(PROGS) $(DESTDIR)$(bindir) + +installheaders: installdirs cp $(srcdir)/include/tdb.h $(DESTDIR)$(includedir) + +installlibs: installdirs cp tdb.pc $(DESTDIR)$(libdir)/pkgconfig cp libtdb.a $(SOLIB) $(DESTDIR)$(libdir) @@ -112,14 +120,16 @@ distclean: clean realdistclean: distclean rm -f configure include/config.h.in -tdb_wrap.c tdb.py: tdb.i - $(SWIG) -O -Wall -python -keyword tdb.i +.SUFFIXES: .i _wrap.c + +.i_wrap.c: + $(SWIG) -O -Wall -python -keyword $< -build-python: libtdb.$(SHLIBEXT) tdb_wrap.c tdb.py +build-python: libtdb.$(SHLIBEXT) tdb_wrap.c ./setup.py build -install-python: - ./setup.py install --prefix=$(prefix) +installpython: build-python + ./setup.py install --prefix=$(DESTDIR)$(prefix) check-python: build-python # FIXME: Should be more portable: diff --git a/source4/lib/tdb/configure.ac b/source4/lib/tdb/configure.ac index 3237d29fb0..5747107f38 100644 --- a/source4/lib/tdb/configure.ac +++ b/source4/lib/tdb/configure.ac @@ -12,4 +12,14 @@ AC_LD_SHLIBEXT AC_LIBREPLACE_SHLD AC_LIBREPLACE_SHLD_FLAGS m4_include(libtdb.m4) +AC_PATH_PROGS([PYTHON_CONFIG], [python2.6-config python2.5-config python2.4-config python-config]) + +PYTHON_BUILD_TARGET="build-python" +PYTHON_INSTALL_TARGET="install-python" +AC_SUBST(PYTHON_BUILD_TARGET) +AC_SUBST(PYTHON_INSTALL_TARGET) +if test -z "$PYTHON_CONFIG"; then + PYTHON_BUILD_TARGET="" + PYTHON_INSTALL_TARGET="" +fi AC_OUTPUT(Makefile tdb.pc) diff --git a/source4/lib/tdb/tdb.py b/source4/lib/tdb/tdb.py index 0a803ac0ba..0effa3ff98 100644 --- a/source4/lib/tdb/tdb.py +++ b/source4/lib/tdb/tdb.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.31 +# Version 1.3.33 # # Don't modify this file, modify the SWIG interface instead. diff --git a/source4/lib/tdb/tdb_wrap.c b/source4/lib/tdb/tdb_wrap.c index 7e38a976ff..6a5b7feffc 100644 --- a/source4/lib/tdb/tdb_wrap.c +++ b/source4/lib/tdb/tdb_wrap.c @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.31 + * Version 1.3.33 * * 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 @@ -17,14 +17,14 @@ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) -# if (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template # else -# define SWIGTEMPLATEDISAMBIGUATOR +# define SWIGTEMPLATEDISAMBIGUATOR # endif #endif @@ -107,6 +107,12 @@ # define _CRT_SECURE_NO_DEPRECATE #endif +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + + /* Python.h has to appear first */ #include @@ -343,7 +349,7 @@ SWIG_TypeNameComp(const char *f1, const char *l1, while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } - return (l1 - f1) - (l2 - f2); + return (int)((l1 - f1) - (l2 - f2)); } /* @@ -1090,14 +1096,14 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { /* Unpack the argument tuple */ SWIGINTERN int -SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs) +SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) { if (!args) { if (!min && !max) { return 1; } else { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", - name, (min == max ? "" : "at least "), min); + name, (min == max ? "" : "at least "), (int)min); return 0; } } @@ -1105,14 +1111,14 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyOb PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); return 0; } else { - register int l = PyTuple_GET_SIZE(args); + register Py_ssize_t l = PyTuple_GET_SIZE(args); if (l < min) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at least "), min, l); + name, (min == max ? "" : "at least "), (int)min, (int)l); return 0; } else if (l > max) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at most "), max, l); + name, (min == max ? "" : "at most "), (int)max, (int)l); return 0; } else { register int i; @@ -1591,9 +1597,11 @@ _PySwigObject_type(void) { (unaryfunc)0, /*nb_float*/ (unaryfunc)PySwigObject_oct, /*nb_oct*/ (unaryfunc)PySwigObject_hex, /*nb_hex*/ -#if PY_VERSION_HEX >= 0x02020000 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ -#elif PY_VERSION_HEX >= 0x02000000 +#if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ +#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ +#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif }; @@ -2492,7 +2500,7 @@ static swig_module_info swig_module = {swig_types, 11, 0, 0, 0, 0}; #define SWIG_name "_tdb" -#define SWIGVERSION 0x010331 +#define SWIGVERSION 0x010333 #define SWIG_VERSION SWIGVERSION @@ -2596,14 +2604,12 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) #include -#ifndef LLONG_MIN -# define LLONG_MIN LONG_LONG_MIN -#endif -#ifndef LLONG_MAX -# define LLONG_MAX LONG_LONG_MAX -#endif -#ifndef ULLONG_MAX -# define ULLONG_MAX ULONG_LONG_MAX +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif #endif @@ -3631,15 +3637,15 @@ static PyMethodDef SwigMethods[] = { static swig_type_info _swigt__p_TDB_DATA = {"_p_TDB_DATA", "TDB_DATA *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_int = {"_p_int", "int *|mode_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_long_long = {"_p_long_long", "long long *|intmax_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_short = {"_p_short", "short *|int_least16_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|int_fast8_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int = {"_p_int", "intptr_t *|int *|int_least32_t *|int_fast32_t *|int32_t *|int_fast16_t *|mode_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_long_long = {"_p_long_long", "int_least64_t *|int_fast64_t *|int64_t *|long long *|intmax_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_short = {"_p_short", "short *|int_least16_t *|int16_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|int_least8_t *|int_fast8_t *|int8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_tdb_context = {"_p_tdb_context", "struct tdb_context *|tdb *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint_fast8_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|uintptr_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "unsigned long long *|uintmax_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint_least16_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint_least8_t *|uint_fast8_t *|uint8_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uintptr_t *|uint_least32_t *|uint_fast32_t *|uint32_t *|unsigned int *|uint_fast16_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint_least64_t *|uint_fast64_t *|uint64_t *|unsigned long long *|uintmax_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint_least16_t *|uint16_t *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_TDB_DATA, -- cgit From fd39d2050c363556ae5277c52f1715f21c2d31fa Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 10 Jan 2008 15:36:35 -0600 Subject: r26701: ldb: Build and install python modules when possible. (This used to be commit 7a66d0eff6e2300cc82b4c7585f9c45afcc851a4) --- source4/lib/ldb/Makefile.in | 28 +++++++++++++++++++++------- source4/lib/ldb/configure.ac | 13 +++++++++++++ 2 files changed, 34 insertions(+), 7 deletions(-) (limited to 'source4') diff --git a/source4/lib/ldb/Makefile.in b/source4/lib/ldb/Makefile.in index 4788c02598..8be5d11958 100644 --- a/source4/lib/ldb/Makefile.in +++ b/source4/lib/ldb/Makefile.in @@ -112,7 +112,8 @@ lib/libldb.$(SHLIBEXT): $(SOLIB) $(SOLIB): $(OBJS) $(SHLD) $(SHLD_FLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LIBS) $(TALLOC_LIBS) $(TDB_LIBS) $(LIBDL) $(LDAP_LIBS) @SONAMEFLAG@$(SONAME) -all: showflags dirs $(OBJS) $(STATICLIB) $(SOLIB) $(BINS) $(EXAMPLES) manpages +all: showflags dirs $(OBJS) $(STATICLIB) $(SOLIB) $(BINS) $(EXAMPLES) manpages \ + @PYTHON_BUILD_TARGET@ showflags: @echo 'ldb will be compiled with flags:' @@ -212,12 +213,23 @@ valgrindtest: all installcheck: install test -install:: all +install:: all installdirs installheaders installlibs installbin installdoc \ + @PYTHON_INSTALL_TARGET@ + +installdirs: mkdir -p $(DESTDIR)$(includedir) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) $(DESTDIR)$(libdir)/pkgconfig + +installheaders: installdirs cp $(headers) $(DESTDIR)$(includedir) + +installlibs: installdirs cp $(STATICLIB) $(SOLIB) $(DESTDIR)$(libdir) - cp $(BINS) $(DESTDIR)$(bindir) cp ldb.pc $(DESTDIR)$(libdir)/pkgconfig + +installbin: installdirs + cp $(BINS) $(DESTDIR)$(bindir) + +installdocs: installdirs $(srcdir)/docs/installdocs.sh $(DESTDIR)$(mandir) gcov: @@ -234,15 +246,17 @@ etags: ctags: ctags `find $(srcdir) -name "*.[ch]"` -%_wrap.c %.py: %.i - $(SWIG) -O -Wall -python -keyword $< +.SUFFIXES: _wrap.c .i + +.i_wrap.c: + [ "$(SWIG)" == "no" ] || $(SWIG) -O -Wall -python -keyword $< # Python bindings -build-python: lib/libldb.$(SHLIBEXT) ldb_wrap.c ldb.py +build-python: lib/libldb.$(SHLIBEXT) ldb_wrap.c ./setup.py build install-python: build-python - ./setup.py install --prefix=$(prefix) + ./setup.py install --prefix=$(DESTDIR)$(prefix) install-swig: cp ldb.i `$(SWIG) -swiglib` diff --git a/source4/lib/ldb/configure.ac b/source4/lib/ldb/configure.ac index 73966e8f93..62a840e561 100644 --- a/source4/lib/ldb/configure.ac +++ b/source4/lib/ldb/configure.ac @@ -75,6 +75,19 @@ AC_LIBREPLACE_SHLD AC_LIBREPLACE_SHLD_FLAGS AC_LIBREPLACE_MDLD AC_LIBREPLACE_MDLD_FLAGS +AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR + +AC_PATH_PROGS([PYTHON_CONFIG], [python2.6-config python2.5-config python2.4-config python-config]) + +PYTHON_BUILD_TARGET="build-python" +PYTHON_INSTALL_TARGET="install-python" +AC_SUBST(PYTHON_BUILD_TARGET) +AC_SUBST(PYTHON_INSTALL_TARGET) + +if test -z "$PYTHON_CONFIG"; then + PYTHON_BUILD_TARGET="" + PYTHON_INSTALL_TARGET="" +fi m4_include(libldb.m4) AC_OUTPUT(Makefile ldb.pc) -- cgit From 5b8ffcca53d40c8067531f75c658f856886ee095 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 10 Jan 2008 17:53:56 +0100 Subject: python: Update STATUS. (This used to be commit bcd82a9ae3cb01b3d8ed0c36999f7a1c0bbab19a) --- source4/scripting/python/STATUS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4') diff --git a/source4/scripting/python/STATUS b/source4/scripting/python/STATUS index c82275fff8..f2f1641658 100644 --- a/source4/scripting/python/STATUS +++ b/source4/scripting/python/STATUS @@ -1,7 +1,6 @@ -dsdb/samdb/ldb_modules/tests/samba3sam.py -lib/ldb/tests/python/ldap.py -provisioning in LDAP mode -SWAT +dsdb/samdb/ldb_modules/tests/samba3sam.py: Fix remaining failing tests +lib/ldb/tests/python/ldap.py: Fix remaining failing tests +provisioning in LDAP mode(TEST_LDAP=yes PROVISION_PYTHON=yes make test) command-line vampire provisioning: combine some of the python dictionaries hierarchy @@ -21,3 +20,4 @@ DCE/RPC bindings not important before making Python the default: - scripting/python/samba/upgrade.py - install python modules into system +- SWAT -- cgit From ef4e5601748b571a40d84608d12e45235987e608 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 11 Oct 2007 12:27:38 +0200 Subject: prepare the mkversion.sh infrastructure for git branches in the build-farm metze (cherry-picked from 1bf4c7fb2012a81e0b4e3d601a4df42d1113f5ef) (This used to be commit 464668b07aded0a299eb49b87b51bb9bf53d2c8d) --- source4/VERSION | 2 +- source4/build/m4/env.m4 | 17 ++++++-- source4/script/mkversion.sh | 94 ++++++++------------------------------------- 3 files changed, 32 insertions(+), 81 deletions(-) (limited to 'source4') diff --git a/source4/VERSION b/source4/VERSION index 2f5f7009de..29ff51638e 100644 --- a/source4/VERSION +++ b/source4/VERSION @@ -89,7 +89,7 @@ SAMBA_VERSION_RC_RELEASE= # e.g. SAMBA_VERSION_IS_SVN_SNAPSHOT=yes # # -> "3.0.0-SVN-build-199" # ######################################################## -SAMBA_VERSION_IS_SVN_SNAPSHOT=yes +SAMBA_VERSION_IS_GIT_SNAPSHOT=yes ######################################################## # This is for specifying a release nickname # diff --git a/source4/build/m4/env.m4 b/source4/build/m4/env.m4 index 7556f16ce2..9510a8ee0d 100644 --- a/source4/build/m4/env.m4 +++ b/source4/build/m4/env.m4 @@ -19,9 +19,20 @@ AC_SUBST(datarootdir) SMB_VERSION_STRING=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_OFFICIAL_STRING' | cut -d '"' -f2` echo "SAMBA VERSION: ${SMB_VERSION_STRING}" -SAMBA_VERSION_SVN_REVISION=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_SVN_REVISION' | cut -d ' ' -f3-` -if test -n "${SAMBA_VERSION_SVN_REVISION}";then - echo "BUILD REVISION: ${SAMBA_VERSION_SVN_REVISION}" +SAMBA_VERSION_GIT_COMMIT_FULLREV=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_FULLREV' | cut -d ' ' -f3- | cut -d '"' -f2` +if test -n "${SAMBA_VERSION_GIT_COMMIT_FULLREV}";then + echo "BUILD COMMIT REVISION: ${SAMBA_VERSION_GIT_COMMIT_FULLREV}" +fi +SAMBA_VERSION_GIT_COMMIT_DATE=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_DATE' | cut -d ' ' -f3-` +if test -n "${SAMBA_VERSION_GIT_COMMIT_DATE}";then + echo "BUILD COMMIT DATE: ${SAMBA_VERSION_GIT_COMMIT_DATE}" +fi +SAMBA_VERSION_GIT_COMMIT_TIME=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_TIME' | cut -d ' ' -f3-` +if test -n "${SAMBA_VERSION_GIT_COMMIT_TIME}";then + echo "BUILD COMMIT TIME: ${SAMBA_VERSION_GIT_COMMIT_TIME}" + + # just to keep the build-farm gui happy for now... + echo "BUILD REVISION: ${SAMBA_VERSION_GIT_COMMIT_TIME}" fi m4_include(build/m4/check_path.m4) diff --git a/source4/script/mkversion.sh b/source4/script/mkversion.sh index 828f67d71b..b6d82f8797 100755 --- a/source4/script/mkversion.sh +++ b/source4/script/mkversion.sh @@ -24,7 +24,7 @@ SAMBA_VERSION_ALPHA_RELEASE=`sed -n 's/^SAMBA_VERSION_ALPHA_RELEASE=//p' $SOURCE SAMBA_VERSION_PRE_RELEASE=`sed -n 's/^SAMBA_VERSION_PRE_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` SAMBA_VERSION_RC_RELEASE=`sed -n 's/^SAMBA_VERSION_RC_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` -SAMBA_VERSION_IS_SVN_SNAPSHOT=`sed -n 's/^SAMBA_VERSION_IS_SVN_SNAPSHOT=//p' $SOURCE_DIR$VERSION_FILE` +SAMBA_VERSION_IS_GIT_SNAPSHOT=`sed -n 's/^SAMBA_VERSION_IS_GIT_SNAPSHOT=//p' $SOURCE_DIR$VERSION_FILE` SAMBA_VERSION_RELEASE_NICKNAME=`sed -n 's/^SAMBA_VERSION_RELEASE_NICKNAME=//p' $SOURCE_DIR$VERSION_FILE` @@ -67,95 +67,35 @@ elif test -n "${SAMBA_VERSION_RC_RELEASE}";then fi ## -## SVN revision number? +## GIT commit details ## -if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then +if test x"${SAMBA_VERSION_IS_GIT_SNAPSHOT}" = x"yes";then _SAVE_LANG=${LANG} - LANG="" + LANG="C" HAVEVER="no" - if test x"${HAVEVER}" != x"yes";then - HAVESVN=no - SVN_INFO=`svn info ${SOURCE_DIR} 2>/dev/null` - TMP_REVISION=`echo -e "${SVN_INFO}" | grep 'Last Changed Rev.*:' |sed -e 's/Last Changed Rev.*: \([0-9]*\).*/\1/'` - if test -n "$TMP_REVISION"; then - HAVESVN=yes - HAVEVER=yes - fi - fi - - if test x"${HAVEVER}" != x"yes";then - HAVESVK=no - SVK_INFO=`svk info ${SOURCE_DIR} 2>/dev/null` - TMP_REVISION=`echo -e "${SVK_INFO}" | grep 'Last Changed Rev.*:' |sed -e 's/Last Changed Rev.*: \([0-9]*\).*/\1/'` - if test -n "$TMP_REVISION"; then - HAVESVK=yes - HAVEVER=yes - fi - TMP_MIRRORED_REVISION=`echo -e "${SVK_INFO}" | grep 'Mirrored From:.*samba\.org.*' |sed -e 's/Mirrored From: .* Rev\..* \([0-9]*\).*/\1/'` - fi - - if test x"${HAVEVER}" != x"yes" -a -d "${SOURCE_DIR}../.bzr";then - HAVEBZR=no - BZR_INFO=`bzr version-info --check-clean ${SOURCE_DIR} 2>/dev/null` - TMP_REVISION=`echo -e "${BZR_INFO}" | grep 'revno:' |sed -e 's/revno: \([0-9]*\).*/\1/'` - if test -n "$TMP_REVISION"; then - HAVEBZR=yes - HAVEVER=yes - fi - TMP_MIRRORED_REVISION=`echo -e "${BZR_INFO}" | grep 'revision-id: svn-v1:.*@0c0555d6-39d7-0310-84fc-f1cc0bd64818' |sed -e 's/revision-id: svn-v1:\([0-9]*\)@0c0555d6-39d7-0310-84fc-f1cc0bd64818.*/\1/'` - TMP_BRANCH_NICK=`echo -e "${BZR_INFO}" | grep 'branch-nick:' |sed -e 's/branch-nick: \(.*\)$/\1/'` - TMP_CLEAN_TREE=`echo -e "${BZR_INFO}" | grep 'clean:' |sed -e 's/clean: \([a-zA-Z]*\).*/\1/'` - fi - if test x"${HAVEVER}" != x"yes" -a -d "${SOURCE_DIR}../.git";then HAVEGIT=no - GIT_INFO=`git show --abbrev-commit HEAD 2>/dev/null` - TMP_REVISION=`echo -e "${GIT_INFO}" | sed 1q | grep 'commit ' | sed -e 's/commit \([0-9a-f]*\).*/\1/'` - if test -n "$TMP_REVISION";then + GIT_INFO=`git show --pretty=format:"%h%n%ct%n%H%n%cd" --stat HEAD 2>/dev/null` + GIT_COMMIT_ABBREV=`echo -e "${GIT_INFO}" | sed -n 1p` + GIT_COMMIT_TIME=`echo -e "${GIT_INFO}" | sed -n 2p` + GIT_COMMIT_FULLREV=`echo -e "${GIT_INFO}" | sed -n 3p` + GIT_COMMIT_DATE=`echo -e "${GIT_INFO}" | sed -n 4p` + if test -n "${GIT_COMMIT_ABBREV}";then HAVEGIT=yes HAVEVER=yes fi - TMP_MIRRORED_REVISION=`echo -e "${GIT_INFO}" | grep 'git-svn-id' |sed -e 's#^[ ^t]*git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/\(SAMBA_[34]_[0-9]\(_[0-9]\+\)\?@[0-9]*\).*#\1#'` fi - - - if test x"${HAVESVN}" = x"yes";then - SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-SVN-build-${TMP_REVISION}" - echo "#define SAMBA_VERSION_SVN_REVISION ${TMP_REVISION}" >> $OUTPUT_FILE - elif test x"${HAVESVK}" = x"yes";then - if test -n "$TMP_MIRRORED_REVISION"; then - TMP_SVK_REVISION_STR="${TMP_REVISION}-${USER}@${HOSTNAME}-[SVN-${TMP_MIRRORED_REVISION}]" - else - TMP_SVK_REVISION_STR="${TMP_REVISION}-${USER}@${HOSTNAME}" - fi - SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-SVK-build-${TMP_SVK_REVISION_STR}" - elif test x"${HAVEBZR}" = x"yes";then - TMP_BZR_REVISION_STR="${TMP_REVISION}" - if test -n "$TMP_BRANCH_NICK"; then - TMP_BZR_REVISION_STR="${TMP_BZR_REVISION_STR}${TMP_MOD_STR}@${TMP_BRANCH_NICK}" - fi - - if test -n "$TMP_MIRRORED_REVISION"; then - TMP_BZR_REVISION_STR="${TMP_BZR_REVISION_STR}-[SVN-${TMP_MIRRORED_REVISION}]" - fi - - if test x"$TMP_CLEAN_TREE" != x"True"; then - TMP_BZR_REVISION_STR="${TMP_BZR_REVISION_STR}-[modified]" - fi - - SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-BZR-${TMP_BZR_REVISION_STR}" - elif test x"${HAVEGIT}" = x"yes";then - TMP_GIT_REVISION_STR="${TMP_REVISION}" - - if test -n "$TMP_MIRRORED_REVISION"; then - TMP_GIT_REVISION_STR="${TMP_GIT_REVISION_STR}-[SVN-${TMP_MIRRORED_REVISION}]" - fi + if test x"${HAVEGIT}" = x"yes";then + SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-GIT-${GIT_COMMIT_ABBREV}" - SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-GIT-${TMP_GIT_REVISION_STR}" + echo "#define SAMBA_VERSION_GIT_COMMIT_ABBREV \"${GIT_COMMIT_ABBREV}\"" >> $OUTPUT_FILE + echo "#define SAMBA_VERSION_GIT_COMMIT_TIME ${GIT_COMMIT_TIME}" >> $OUTPUT_FILE + echo "#define SAMBA_VERSION_GIT_COMMIT_FULLREV \"${GIT_COMMIT_FULLREV}\"" >> $OUTPUT_FILE + echo "#define SAMBA_VERSION_GIT_COMMIT_DATE \"${GIT_COMMIT_DATE}\"" >> $OUTPUT_FILE else - SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-SVN-build-UNKNOWN" + SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-GIT-UNKNOWN" fi LANG=${_SAVE_LANG} fi -- cgit From 1f493dccd6d4df150749095a69db92a0c1b86c40 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 10 Jan 2008 19:36:12 +0100 Subject: Set -test in the vendor version metze (This used to be commit 817582a46aed1a3a470477c95671fa25fd9f2f67) --- source4/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/VERSION b/source4/VERSION index 29ff51638e..34ccb95b9f 100644 --- a/source4/VERSION +++ b/source4/VERSION @@ -113,5 +113,5 @@ SAMBA_VERSION_RELEASE_NICKNAME= # -> "3.0.0rc2-VendorVersion" # # # ######################################################## -SAMBA_VERSION_VENDOR_SUFFIX= +SAMBA_VERSION_VENDOR_SUFFIX="test" SAMBA_VERSION_VENDOR_PATCH= -- cgit From 256659039affd7ce6a028be661fcc77147c0461e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 10 Jan 2008 20:06:00 +0100 Subject: Revert "Set -test in the vendor version" This needs a bit more work as it's different to samba3... metze This reverts commit 817582a46aed1a3a470477c95671fa25fd9f2f67. (This used to be commit dec016822ce9439b40f3d9403d42ebc76ba2e0e1) --- source4/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/VERSION b/source4/VERSION index 34ccb95b9f..29ff51638e 100644 --- a/source4/VERSION +++ b/source4/VERSION @@ -113,5 +113,5 @@ SAMBA_VERSION_RELEASE_NICKNAME= # -> "3.0.0rc2-VendorVersion" # # # ######################################################## -SAMBA_VERSION_VENDOR_SUFFIX="test" +SAMBA_VERSION_VENDOR_SUFFIX= SAMBA_VERSION_VENDOR_PATCH= -- cgit From 70ca53749862a9cf0c511ca3f89ac132d53ab1ac Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 10 Jan 2008 20:38:14 +0100 Subject: pidl: Fix samba3-cli test after Günthers formatting fixes. (This used to be commit bd4ce069b4b6d3fdc182b16060c20e6fe8e8a87d) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source4/pidl/tests/samba3-cli.pl | 69 +++++++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 25 deletions(-) (limited to 'source4') diff --git a/source4/pidl/tests/samba3-cli.pl b/source4/pidl/tests/samba3-cli.pl index 5086300e46..1b2a3c9785 100755 --- a/source4/pidl/tests/samba3-cli.pl +++ b/source4/pidl/tests/samba3-cli.pl @@ -29,31 +29,40 @@ my $x = new Parse::Pidl::Samba3::ClientNDR(); $fn = { NAME => "bar", ELEMENTS => [ ] }; $x->ParseFunction("foo", $fn); -is($x->{res}, "NTSTATUS rpccli_bar(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +is($x->{res}, +"NTSTATUS rpccli_bar(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) { \tstruct bar r; \tNTSTATUS status; -\t + \t/* In parameters */ -\t -\tif (DEBUGLEVEL >= 10) + +\tif (DEBUGLEVEL >= 10) { \t\tNDR_PRINT_IN_DEBUG(bar, &r); -\t -\tstatus = cli_do_rpc_ndr(cli, mem_ctx, PI_FOO, &ndr_table_foo, NDR_BAR, &r); -\t +\t} + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_FOO, + &ndr_table_foo, + NDR_BAR, + &r); + \tif (!NT_STATUS_IS_OK(status)) { \t\treturn status; \t} -\t -\tif (DEBUGLEVEL >= 10) + +\tif (DEBUGLEVEL >= 10) { \t\tNDR_PRINT_OUT_DEBUG(bar, &r); -\t +\t} + \tif (NT_STATUS_IS_ERR(status)) { \t\treturn status; \t} -\t + \t/* Return variables */ -\t + \t/* Return result */ \treturn NT_STATUS_OK; } @@ -64,36 +73,46 @@ $x = new Parse::Pidl::Samba3::ClientNDR(); $fn = { NAME => "bar", ELEMENTS => [ ], RETURN_TYPE => "WERROR" }; $x->ParseFunction("foo", $fn); -is($x->{res}, "NTSTATUS rpccli_bar(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) +is($x->{res}, +"NTSTATUS rpccli_bar(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror) { \tstruct bar r; \tNTSTATUS status; -\t + \t/* In parameters */ -\t -\tif (DEBUGLEVEL >= 10) + +\tif (DEBUGLEVEL >= 10) { \t\tNDR_PRINT_IN_DEBUG(bar, &r); -\t -\tstatus = cli_do_rpc_ndr(cli, mem_ctx, PI_FOO, &ndr_table_foo, NDR_BAR, &r); -\t +\t} + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_FOO, + &ndr_table_foo, + NDR_BAR, + &r); + \tif (!NT_STATUS_IS_OK(status)) { \t\treturn status; \t} -\t -\tif (DEBUGLEVEL >= 10) + +\tif (DEBUGLEVEL >= 10) { \t\tNDR_PRINT_OUT_DEBUG(bar, &r); -\t +\t} + \tif (NT_STATUS_IS_ERR(status)) { \t\treturn status; \t} -\t + \t/* Return variables */ -\t + \t/* Return result */ \tif (werror) { \t\t*werror = r.out.result; \t} -\t + \treturn werror_to_ntstatus(r.out.result); } -- cgit