From adbbc8dcc65997d4c2a555f188a980e6622a309d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 22 Jan 2008 12:21:55 +0100 Subject: libreplace: getpwent_r/getgrent_r on IRIX are similar to solaris but use size_t metze (cherry picked from commit 2f460915111066d79f5dc9b4ae4d003918d06852) (This used to be commit d2ac8be28d3aff59eddbdc6189a255a34c10d502) --- source4/lib/replace/system/config.m4 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/source4/lib/replace/system/config.m4 b/source4/lib/replace/system/config.m4 index 799187af7d..1c05733126 100644 --- a/source4/lib/replace/system/config.m4 +++ b/source4/lib/replace/system/config.m4 @@ -73,6 +73,18 @@ AC_VERIFY_C_PROTOTYPE([struct passwd *getpwent_r(struct passwd *src, char *buf, #include #include ]) +AC_VERIFY_C_PROTOTYPE([struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)], + [ + #ifndef HAVE_GETPWENT_R_DECL + #error missing getpwent_r prototype + #endif + return NULL; + ],[ + AC_DEFINE(SOLARIS_GETPWENT_R, 1, [getpwent_r irix (similar to solaris) function prototype]) + ],[],[ + #include + #include + ]) AC_CHECK_FUNCS(getgrnam_r getgrgid_r getgrent_r) AC_HAVE_DECL(getgrent_r, [ #include @@ -91,6 +103,19 @@ AC_VERIFY_C_PROTOTYPE([struct group *getgrent_r(struct group *src, char *buf, in #include ]) +AC_VERIFY_C_PROTOTYPE([struct group *getgrent_r(struct group *src, char *buf, size_t buflen)], + [ + #ifndef HAVE_GETGRENT_R_DECL + #error missing getgrent_r prototype + #endif + return NULL; + ],[ + AC_DEFINE(SOLARIS_GETGRENT_R, 1, [getgrent_r irix (similar to solaris) function prototype]) + ],[],[ + #include + #include + ]) + # locale AC_CHECK_HEADERS(ctype.h locale.h) -- cgit From 35c68316442808a135aafa864d19592108a4d879 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 22 Jan 2008 16:21:54 +0100 Subject: python: Avoid duplicate copies of some objects in different packages. (This used to be commit bd293cde1b1deadcfb0f74c82aae6ba4de39925b) --- source4/libnet/net_wrap.c | 2 +- source4/librpc/rpc/dcerpc.i | 5 +- source4/librpc/rpc/dcerpc.py | 28 +- source4/librpc/rpc/dcerpc_wrap.c | 953 +-------------------------------------- 4 files changed, 20 insertions(+), 968 deletions(-) diff --git a/source4/libnet/net_wrap.c b/source4/libnet/net_wrap.c index b1d2a8f306..a4e27c151c 100644 --- a/source4/libnet/net_wrap.c +++ b/source4/libnet/net_wrap.c @@ -3996,7 +3996,7 @@ static PyMethodDef SwigMethods[] = { static swig_type_info _swigt__p_TALLOC_CTX = {"_p_TALLOC_CTX", "TALLOC_CTX *", 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_cli_credentials = {"_p_cli_credentials", "struct cli_credentials *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_event_context = {"_p_event_context", "struct event_context *|event_context *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_event_context = {"_p_event_context", "struct event_context *|event *", 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 *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ldb_context = {"_p_ldb_context", "struct ldb_context *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_libnet_AddShare = {"_p_libnet_AddShare", "struct libnet_AddShare *", 0, 0, (void*)0, 0}; diff --git a/source4/librpc/rpc/dcerpc.i b/source4/librpc/rpc/dcerpc.i index 4128092a41..f958d82e2e 100644 --- a/source4/librpc/rpc/dcerpc.i +++ b/source4/librpc/rpc/dcerpc.i @@ -36,13 +36,14 @@ #include "includes.h" #include "dynconfig.h" #include "librpc/rpc/dcerpc.h" +#include "param/param.h" #undef strcpy %} -%include "../../lib/talloc/talloc.i" -%include "../../auth/credentials/credentials.i" +%import "../../lib/talloc/talloc.i" +%import "../../auth/credentials/credentials.i" %typemap(in,noblock=1, numinputs=0) struct dcerpc_pipe **OUT (struct dcerpc_pipe *temp_dcerpc_pipe) { $1 = &temp_dcerpc_pipe; diff --git a/source4/librpc/rpc/dcerpc.py b/source4/librpc/rpc/dcerpc.py index 71661ef7fa..7e4d82d7c4 100644 --- a/source4/librpc/rpc/dcerpc.py +++ b/source4/librpc/rpc/dcerpc.py @@ -57,34 +57,8 @@ def _swig_setattr_nondynamic_method(set): return set_attr +import credentials import param -class Credentials(object): - thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') - __repr__ = _swig_repr - def __init__(self, *args, **kwargs): - _dcerpc.Credentials_swiginit(self,_dcerpc.new_Credentials(*args, **kwargs)) - __swig_destroy__ = _dcerpc.delete_Credentials -Credentials.get_username = new_instancemethod(_dcerpc.Credentials_get_username,None,Credentials) -Credentials.set_username = new_instancemethod(_dcerpc.Credentials_set_username,None,Credentials) -Credentials.get_password = new_instancemethod(_dcerpc.Credentials_get_password,None,Credentials) -Credentials.set_password = new_instancemethod(_dcerpc.Credentials_set_password,None,Credentials) -Credentials.get_domain = new_instancemethod(_dcerpc.Credentials_get_domain,None,Credentials) -Credentials.set_domain = new_instancemethod(_dcerpc.Credentials_set_domain,None,Credentials) -Credentials.get_realm = new_instancemethod(_dcerpc.Credentials_get_realm,None,Credentials) -Credentials.set_realm = new_instancemethod(_dcerpc.Credentials_set_realm,None,Credentials) -Credentials.parse_string = new_instancemethod(_dcerpc.Credentials_parse_string,None,Credentials) -Credentials.get_bind_dn = new_instancemethod(_dcerpc.Credentials_get_bind_dn,None,Credentials) -Credentials.set_bind_dn = new_instancemethod(_dcerpc.Credentials_set_bind_dn,None,Credentials) -Credentials.get_workstation = new_instancemethod(_dcerpc.Credentials_get_workstation,None,Credentials) -Credentials.set_workstation = new_instancemethod(_dcerpc.Credentials_set_workstation,None,Credentials) -Credentials.guess = new_instancemethod(_dcerpc.Credentials_guess,None,Credentials) -Credentials.is_anonymous = new_instancemethod(_dcerpc.Credentials_is_anonymous,None,Credentials) -Credentials.get_nt_hash = new_instancemethod(_dcerpc.Credentials_get_nt_hash,None,Credentials) -Credentials.authentication_requested = new_instancemethod(_dcerpc.Credentials_authentication_requested,None,Credentials) -Credentials.wrong_password = new_instancemethod(_dcerpc.Credentials_wrong_password,None,Credentials) -Credentials_swigregister = _dcerpc.Credentials_swigregister -Credentials_swigregister(Credentials) - pipe_connect = _dcerpc.pipe_connect dcerpc_server_name = _dcerpc.dcerpc_server_name diff --git a/source4/librpc/rpc/dcerpc_wrap.c b/source4/librpc/rpc/dcerpc_wrap.c index 5be702b1bb..bae41c2c22 100644 --- a/source4/librpc/rpc/dcerpc_wrap.c +++ b/source4/librpc/rpc/dcerpc_wrap.c @@ -2529,27 +2529,11 @@ static swig_module_info swig_module = {swig_types, 21, 0, 0, 0, 0}; #include "includes.h" #include "dynconfig.h" #include "librpc/rpc/dcerpc.h" - -#undef strcpy - - - - -/* Include headers */ -#include -#include - -#include "includes.h" -#include "auth/credentials/credentials.h" #include "param/param.h" -typedef struct cli_credentials cli_credentials; +#undef strcpy -#include "librpc/gen_ndr/samr.h" /* for struct samr_Password */ -SWIGINTERN cli_credentials *new_cli_credentials(){ - return cli_credentials_init(NULL); - } SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) @@ -2564,30 +2548,6 @@ SWIG_pchar_descriptor(void) } -SWIGINTERNINLINE PyObject * -SWIG_FromCharPtrAndSize(const char* carray, size_t size) -{ - if (carray) { - if (size > INT_MAX) { - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - return pchar_descriptor ? - SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); - } else { - return PyString_FromStringAndSize(carray, (int)(size)); - } - } else { - return SWIG_Py_Void(); - } -} - - -SWIGINTERNINLINE PyObject * -SWIG_FromCharPtr(const char *cptr) -{ - return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); -} - - SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { @@ -2643,893 +2603,32 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) -#include -#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 - - -SWIGINTERN int -SWIG_AsVal_double (PyObject *obj, double *val) -{ - int res = SWIG_TypeError; - if (PyFloat_Check(obj)) { - if (val) *val = PyFloat_AsDouble(obj); - return SWIG_OK; - } else if (PyInt_Check(obj)) { - if (val) *val = PyInt_AsLong(obj); - return SWIG_OK; - } else if (PyLong_Check(obj)) { - double v = PyLong_AsDouble(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - double d = PyFloat_AsDouble(obj); - if (!PyErr_Occurred()) { - if (val) *val = d; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); - } else { - PyErr_Clear(); - } - } - } -#endif - return res; -} - - -#include - - -#include - - -SWIGINTERNINLINE int -SWIG_CanCastAsInteger(double *d, double min, double max) { - double x = *d; - if ((min <= x && x <= max)) { - double fx = floor(x); - double cx = ceil(x); - double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ - if ((errno == EDOM) || (errno == ERANGE)) { - errno = 0; - } else { - double summ, reps, diff; - if (rd < x) { - diff = x - rd; - } else if (rd > x) { - diff = rd - x; - } else { - return 1; - } - summ = rd + x; - reps = diff/summ; - if (reps < 8*DBL_EPSILON) { - *d = rd; - return 1; - } - } - } - return 0; -} - - -SWIGINTERN int -SWIG_AsVal_long (PyObject *obj, long* val) +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtrAndSize(const char* carray, size_t size) { - if (PyInt_Check(obj)) { - if (val) *val = PyInt_AsLong(obj); - return SWIG_OK; - } else if (PyLong_Check(obj)) { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - long v = PyInt_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_OK); + if (carray) { + if (size > INT_MAX) { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + return pchar_descriptor ? + SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); } else { - PyErr_Clear(); - } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { - if (val) *val = (long)(d); - return res; - } + return PyString_FromStringAndSize(carray, (int)(size)); } + } else { + return SWIG_Py_Void(); } -#endif - return SWIG_TypeError; } -SWIGINTERN int -SWIG_AsVal_int (PyObject * obj, int *val) -{ - long v; - int res = SWIG_AsVal_long (obj, &v); - if (SWIG_IsOK(res)) { - if ((v < INT_MIN || v > INT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) *val = (int)(v); - } - } - return res; -} - - -SWIGINTERNINLINE PyObject* - SWIG_From_bool (bool value) -{ - return PyBool_FromLong(value ? 1 : 0); +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtr(const char *cptr) +{ + return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); } -SWIGINTERN void delete_cli_credentials(cli_credentials *self){ talloc_free(self); } #ifdef __cplusplus extern "C" { #endif -SWIGINTERN PyObject *_wrap_new_Credentials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cli_credentials *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args,"new_Credentials",0,0,0)) SWIG_fail; - result = (cli_credentials *)new_cli_credentials(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cli_credentials, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_get_username(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - char *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "self", NULL - }; - - arg1 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Credentials_get_username",kwnames,&obj0)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_get_username" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - result = (char *)cli_credentials_get_username(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_set_username(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - char *arg2 = (char *) 0 ; - enum credentials_obtained arg3 = (enum credentials_obtained) CRED_SPECIFIED ; - bool result; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "value",(char *)"arg3", NULL - }; - - arg1 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOO:Credentials_set_username",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_set_username" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - if (obj1) { - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Credentials_set_username" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - } - if (obj2) { - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Credentials_set_username" "', argument " "3"" of type '" "enum credentials_obtained""'"); - } - arg3 = (enum credentials_obtained)(val3); - } - result = (bool)cli_credentials_set_username(arg1,(char const *)arg2,arg3); - resultobj = SWIG_From_bool((bool)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_get_password(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - char *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "self", NULL - }; - - arg1 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Credentials_get_password",kwnames,&obj0)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_get_password" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - result = (char *)cli_credentials_get_password(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_set_password(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - char *arg2 = (char *) 0 ; - enum credentials_obtained arg3 = (enum credentials_obtained) CRED_SPECIFIED ; - bool result; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "val",(char *)"arg3", NULL - }; - - arg1 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOO:Credentials_set_password",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_set_password" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - if (obj1) { - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Credentials_set_password" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - } - if (obj2) { - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Credentials_set_password" "', argument " "3"" of type '" "enum credentials_obtained""'"); - } - arg3 = (enum credentials_obtained)(val3); - } - result = (bool)cli_credentials_set_password(arg1,(char const *)arg2,arg3); - resultobj = SWIG_From_bool((bool)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_get_domain(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - char *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "self", NULL - }; - - arg1 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Credentials_get_domain",kwnames,&obj0)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_get_domain" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - result = (char *)cli_credentials_get_domain(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_set_domain(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - char *arg2 = (char *) 0 ; - enum credentials_obtained arg3 = (enum credentials_obtained) CRED_SPECIFIED ; - bool result; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "val",(char *)"arg3", NULL - }; - - arg1 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOO:Credentials_set_domain",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_set_domain" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - if (obj1) { - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Credentials_set_domain" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - } - if (obj2) { - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Credentials_set_domain" "', argument " "3"" of type '" "enum credentials_obtained""'"); - } - arg3 = (enum credentials_obtained)(val3); - } - result = (bool)cli_credentials_set_domain(arg1,(char const *)arg2,arg3); - resultobj = SWIG_From_bool((bool)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_get_realm(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - char *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "self", NULL - }; - - arg1 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Credentials_get_realm",kwnames,&obj0)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_get_realm" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - result = (char *)cli_credentials_get_realm(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_set_realm(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - char *arg2 = (char *) 0 ; - enum credentials_obtained arg3 = (enum credentials_obtained) CRED_SPECIFIED ; - bool result; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "val",(char *)"arg3", NULL - }; - - arg1 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOO:Credentials_set_realm",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_set_realm" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - if (obj1) { - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Credentials_set_realm" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - } - if (obj2) { - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Credentials_set_realm" "', argument " "3"" of type '" "enum credentials_obtained""'"); - } - arg3 = (enum credentials_obtained)(val3); - } - result = (bool)cli_credentials_set_realm(arg1,(char const *)arg2,arg3); - resultobj = SWIG_From_bool((bool)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_parse_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - char *arg2 = (char *) 0 ; - enum credentials_obtained arg3 = (enum credentials_obtained) CRED_SPECIFIED ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "text",(char *)"arg3", NULL - }; - - arg1 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOO:Credentials_parse_string",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_parse_string" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - if (obj1) { - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Credentials_parse_string" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - } - if (obj2) { - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Credentials_parse_string" "', argument " "3"" of type '" "enum credentials_obtained""'"); - } - arg3 = (enum credentials_obtained)(val3); - } - cli_credentials_parse_string(arg1,(char const *)arg2,arg3); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_get_bind_dn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - char *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "self", NULL - }; - - arg1 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Credentials_get_bind_dn",kwnames,&obj0)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_get_bind_dn" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - result = (char *)cli_credentials_get_bind_dn(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_set_bind_dn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - char *arg2 = (char *) 0 ; - bool result; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "bind_dn", NULL - }; - - arg1 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:Credentials_set_bind_dn",kwnames,&obj0,&obj1)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_set_bind_dn" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - if (obj1) { - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Credentials_set_bind_dn" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - } - result = (bool)cli_credentials_set_bind_dn(arg1,(char const *)arg2); - resultobj = SWIG_From_bool((bool)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_get_workstation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - char *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "self", NULL - }; - - arg1 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Credentials_get_workstation",kwnames,&obj0)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_get_workstation" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - result = (char *)cli_credentials_get_workstation(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_set_workstation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - char *arg2 = (char *) 0 ; - enum credentials_obtained arg3 = (enum credentials_obtained) CRED_SPECIFIED ; - bool result; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "workstation",(char *) "obtained", NULL - }; - - arg1 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOO:Credentials_set_workstation",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_set_workstation" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - if (obj1) { - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Credentials_set_workstation" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - } - if (obj2) { - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Credentials_set_workstation" "', argument " "3"" of type '" "enum credentials_obtained""'"); - } - arg3 = (enum credentials_obtained)(val3); - } - result = (bool)cli_credentials_set_workstation(arg1,(char const *)arg2,arg3); - resultobj = SWIG_From_bool((bool)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_guess(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - struct loadparm_context *arg2 = (struct loadparm_context *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "lp_ctx", NULL - }; - - arg1 = NULL; - arg2 = loadparm_init(NULL); - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:Credentials_guess",kwnames,&obj0,&obj1)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_guess" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - if (obj1) { - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_loadparm_context, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Credentials_guess" "', argument " "2"" of type '" "struct loadparm_context *""'"); - } - arg2 = (struct loadparm_context *)(argp2); - } - cli_credentials_guess(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_is_anonymous(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - bool result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "self", NULL - }; - - arg1 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Credentials_is_anonymous",kwnames,&obj0)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_is_anonymous" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - result = (bool)cli_credentials_is_anonymous(arg1); - resultobj = SWIG_From_bool((bool)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_get_nt_hash(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - TALLOC_CTX *arg2 = (TALLOC_CTX *) 0 ; - struct samr_Password *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "self", NULL - }; - - arg1 = NULL; - arg2 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Credentials_get_nt_hash",kwnames,&obj0)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_get_nt_hash" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - result = (struct samr_Password *)cli_credentials_get_nt_hash(arg1,arg2); - resultobj = PyString_FromStringAndSize((char *)result->hash, 16); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_authentication_requested(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - bool result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "self", NULL - }; - - arg1 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Credentials_authentication_requested",kwnames,&obj0)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_authentication_requested" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - result = (bool)cli_credentials_authentication_requested(arg1); - resultobj = SWIG_From_bool((bool)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Credentials_wrong_password(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - bool result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "self", NULL - }; - - arg1 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Credentials_wrong_password",kwnames,&obj0)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_wrong_password" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - result = (bool)cli_credentials_wrong_password(arg1); - resultobj = SWIG_From_bool((bool)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Credentials(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - cli_credentials *arg1 = (cli_credentials *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char * kwnames[] = { - (char *) "self", NULL - }; - - arg1 = NULL; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:delete_Credentials",kwnames,&obj0)) SWIG_fail; - if (obj0) { - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Credentials" "', argument " "1"" of type '" "cli_credentials *""'"); - } - arg1 = (cli_credentials *)(argp1); - } - delete_cli_credentials(arg1); - - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Credentials_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cli_credentials, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *Credentials_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - return SWIG_Python_InitShadowInstance(args); -} - SWIGINTERN PyObject *_wrap_pipe_connect(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; TALLOC_CTX *arg1 = (TALLOC_CTX *) 0 ; @@ -3647,28 +2746,6 @@ fail: static PyMethodDef SwigMethods[] = { - { (char *)"new_Credentials", (PyCFunction)_wrap_new_Credentials, METH_NOARGS, NULL}, - { (char *)"Credentials_get_username", (PyCFunction) _wrap_Credentials_get_username, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_set_username", (PyCFunction) _wrap_Credentials_set_username, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_get_password", (PyCFunction) _wrap_Credentials_get_password, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_set_password", (PyCFunction) _wrap_Credentials_set_password, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_get_domain", (PyCFunction) _wrap_Credentials_get_domain, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_set_domain", (PyCFunction) _wrap_Credentials_set_domain, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_get_realm", (PyCFunction) _wrap_Credentials_get_realm, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_set_realm", (PyCFunction) _wrap_Credentials_set_realm, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_parse_string", (PyCFunction) _wrap_Credentials_parse_string, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_get_bind_dn", (PyCFunction) _wrap_Credentials_get_bind_dn, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_set_bind_dn", (PyCFunction) _wrap_Credentials_set_bind_dn, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_get_workstation", (PyCFunction) _wrap_Credentials_get_workstation, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_set_workstation", (PyCFunction) _wrap_Credentials_set_workstation, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_guess", (PyCFunction) _wrap_Credentials_guess, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_is_anonymous", (PyCFunction) _wrap_Credentials_is_anonymous, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_get_nt_hash", (PyCFunction) _wrap_Credentials_get_nt_hash, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_authentication_requested", (PyCFunction) _wrap_Credentials_authentication_requested, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_wrong_password", (PyCFunction) _wrap_Credentials_wrong_password, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"delete_Credentials", (PyCFunction) _wrap_delete_Credentials, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Credentials_swigregister", Credentials_swigregister, METH_VARARGS, NULL}, - { (char *)"Credentials_swiginit", Credentials_swiginit, METH_VARARGS, NULL}, { (char *)"pipe_connect", (PyCFunction) _wrap_pipe_connect, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"dcerpc_server_name", (PyCFunction) _wrap_dcerpc_server_name, METH_VARARGS | METH_KEYWORDS, NULL}, { NULL, NULL, 0, NULL } -- cgit From 1697f553f1e1991763c8daf7c8a6c878677bf10b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 22 Jan 2008 17:13:39 +0100 Subject: ldb: Increase version number to make it easier to create new Debian snapshots. (This used to be commit 9a5cc88b090125b45e61da1ea1c9ac52f5ff6ab2) --- source4/lib/ldb/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/lib/ldb/configure.ac b/source4/lib/ldb/configure.ac index 62a840e561..176cef0f3e 100644 --- a/source4/lib/ldb/configure.ac +++ b/source4/lib/ldb/configure.ac @@ -11,7 +11,7 @@ AC_DEFUN([SMB_MODULE_DEFAULT], [echo -n ""]) AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ""]) AC_DEFUN([SMB_EXT_LIB], [echo -n ""]) AC_DEFUN([SMB_ENABLE], [echo -n ""]) -AC_INIT(ldb, 0.9.1) +AC_INIT(ldb, 0.9.2) AC_CONFIG_SRCDIR([common/ldb.c]) AC_LIBREPLACE_ALL_CHECKS -- cgit From 45eb6c5b8f95a7af497ebf011b71825a1956f77b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 22 Jan 2008 17:34:44 +0100 Subject: ldb: Fix typo. (This used to be commit da0952bdd6196b23200063cadd866b1d5551a65c) --- source4/lib/ldb/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/lib/ldb/Makefile.in b/source4/lib/ldb/Makefile.in index 8be5d11958..7bd719cdd9 100644 --- a/source4/lib/ldb/Makefile.in +++ b/source4/lib/ldb/Makefile.in @@ -213,7 +213,7 @@ valgrindtest: all installcheck: install test -install:: all installdirs installheaders installlibs installbin installdoc \ +install:: all installdirs installheaders installlibs installbin installdocs \ @PYTHON_INSTALL_TARGET@ installdirs: -- cgit From a6a87200250ff9c76138da71a65f025da92d070e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 22 Jan 2008 18:14:12 +0100 Subject: tdb: Add URL in pc file. (This used to be commit 2fc26c09026a0f2f74e5c7c86002e662b559d265) --- source4/lib/tdb/tdb.pc.in | 1 + 1 file changed, 1 insertion(+) diff --git a/source4/lib/tdb/tdb.pc.in b/source4/lib/tdb/tdb.pc.in index bb440f9cf5..6f8f553736 100644 --- a/source4/lib/tdb/tdb.pc.in +++ b/source4/lib/tdb/tdb.pc.in @@ -8,3 +8,4 @@ Description: A trivial database Version: @PACKAGE_VERSION@ Libs: -L${libdir} -ltdb Cflags: -I${includedir} +URL: http://tdb.samba.org/ -- cgit From b49e2f1f35e6b5a8ab7e992d5609070ddf0875b2 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 22 Jan 2008 18:21:48 +0100 Subject: build: Allow manually written pkg-config files. (This used to be commit 8104907c5222ee72d78272ab81583d25c3132d0d) --- source4/build/smb_build/config_mk.pm | 1 + source4/build/smb_build/main.pl | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm index d07660ba1d..fa3949db2e 100644 --- a/source4/build/smb_build/config_mk.pm +++ b/source4/build/smb_build/config_mk.pm @@ -91,6 +91,7 @@ my $section_types = { "LIBRARY_REALNAME" => "string", "PC_NAME" => "string", + "PC_FILE" => "string", "INIT_FUNCTION_TYPE" => "string", "INIT_FUNCTION_SENTINEL" => "string", diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl index e084d48a77..cdeaeeb1c8 100644 --- a/source4/build/smb_build/main.pl +++ b/source4/build/smb_build/main.pl @@ -60,8 +60,12 @@ foreach my $key (values %$OUTPUT) { next unless defined $key->{OUTPUT_TYPE}; $mkenv->StaticLibrary($key) if grep(/STATIC_LIBRARY/, @{$key->{OUTPUT_TYPE}}); - $mkenv->PkgConfig($key, $OUTPUT) if $key->{TYPE} eq "LIBRARY" - and defined($key->{VERSION}); + if (defined($key->{PC_FILE})) { + push(@{$mkenv->{pc_files}}, $key->{PC_FILE}); + } else { + $mkenv->PkgConfig($key, $OUTPUT) if $key->{TYPE} eq "LIBRARY" + and defined($key->{VERSION}); + } $mkenv->SharedLibrary($key) if ($key->{TYPE} eq "LIBRARY") and grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}}); if ($key->{TYPE} eq "LIBRARY" and -- cgit From cc984e4046726696a0e71a0fda488e947ccd05eb Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 22 Jan 2008 18:24:00 +0100 Subject: ldb/talloc/tdb: Use manually written pc file. (This used to be commit c8947fda23eb874a7694bdee1b4de605744c2769) --- source4/configure.ac | 3 +++ source4/lib/ldb/config.mk | 1 + source4/lib/talloc/config.mk | 1 + source4/lib/tdb/config.mk | 1 + 4 files changed, 6 insertions(+) diff --git a/source4/configure.ac b/source4/configure.ac index 164a21e823..882bd28d00 100644 --- a/source4/configure.ac +++ b/source4/configure.ac @@ -32,6 +32,7 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.1.0, [ m4_include(lib/talloc/libtalloc.m4) SMB_INCLUDE_MK(lib/talloc/config.mk) + AC_OUTPUT(lib/talloc/talloc.pc) ] ) @@ -40,6 +41,7 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= 1.1.0, [ m4_include(lib/tdb/libtdb.m4) SMB_INCLUDE_MK(lib/tdb/config.mk) + AC_OUTPUT(lib/tdb/tdb.pc) ] ) @@ -50,6 +52,7 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb >= 0.9.1, SMB_INCLUDE_MK(lib/ldb/ldb_ildap/config.mk) SMB_INCLUDE_MK(lib/ldb/tools/config.mk) SMB_SUBSYSTEM(ldb_map, [], [LIBLDB]) + AC_OUTPUT(lib/ldb/ldb.pc) define_ldb_modulesdir=no ], [ diff --git a/source4/lib/ldb/config.mk b/source4/lib/ldb/config.mk index a3b10a22d5..c52703658a 100644 --- a/source4/lib/ldb/config.mk +++ b/source4/lib/ldb/config.mk @@ -130,6 +130,7 @@ VERSION = 0.0.1 SO_VERSION = 0 OUTPUT_TYPE = SHARED_LIBRARY CFLAGS = -Ilib/ldb/include +PC_FILE = ldb.pc DESCRIPTION = LDAP-like embedded database library INIT_FUNCTION_TYPE = int (*) (void) OBJ_FILES = \ diff --git a/source4/lib/talloc/config.mk b/source4/lib/talloc/config.mk index 942ced6b86..c31f9a7515 100644 --- a/source4/lib/talloc/config.mk +++ b/source4/lib/talloc/config.mk @@ -2,6 +2,7 @@ VERSION = 1.0.0 SO_VERSION = 1 OBJ_FILES = talloc.o +PC_FILE = talloc.pc MANPAGE = talloc.3 CFLAGS = -Ilib/talloc PUBLIC_HEADERS = talloc.h diff --git a/source4/lib/tdb/config.mk b/source4/lib/tdb/config.mk index c9e5a67d7b..8413611fa9 100644 --- a/source4/lib/tdb/config.mk +++ b/source4/lib/tdb/config.mk @@ -3,6 +3,7 @@ [LIBRARY::LIBTDB] VERSION = 0.0.1 SO_VERSION = 0 +PC_FILE = tdb.pc DESCRIPTION = Trivial Database Library OBJ_FILES = \ common/tdb.o common/dump.o common/io.o common/lock.o \ -- cgit From 127e8743193dbb4b0632172ac5a562a3b807f07d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 22 Jan 2008 18:28:51 +0100 Subject: registry: Use manually written .pc file. (This used to be commit 5c64d4adaf50215ec2645f76e6c0335572147614) --- source4/configure.ac | 2 ++ source4/lib/registry/config.mk | 1 + source4/lib/registry/registry.pc.in | 12 ++++++++++++ 3 files changed, 15 insertions(+) create mode 100644 source4/lib/registry/registry.pc.in diff --git a/source4/configure.ac b/source4/configure.ac index 882bd28d00..59a21375f6 100644 --- a/source4/configure.ac +++ b/source4/configure.ac @@ -27,6 +27,8 @@ m4_include(lib/charset/config.m4) m4_include(lib/socket/config.m4) m4_include(nsswitch/nsstest.m4) +AC_OUTPUT(lib/registry/registry.pc) + SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.1.0, [], [ diff --git a/source4/lib/registry/config.mk b/source4/lib/registry/config.mk index f1f50479cb..a7365a49ae 100644 --- a/source4/lib/registry/config.mk +++ b/source4/lib/registry/config.mk @@ -18,6 +18,7 @@ clean:: # Start SUBSYSTEM registry [LIBRARY::registry] VERSION = 0.0.1 +PC_FILE = registry.pc SO_VERSION = 0 DESCRIPTION = Windows-style registry library OBJ_FILES = \ diff --git a/source4/lib/registry/registry.pc.in b/source4/lib/registry/registry.pc.in new file mode 100644 index 0000000000..21184c483c --- /dev/null +++ b/source4/lib/registry/registry.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: registry +Description: Windows-style registry library +Requires: ldb +Requires.private: +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -lregistry +Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 -- cgit From 9209470b920eaa904129ae43d454db2526f97ca8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 22 Jan 2008 18:36:14 +0100 Subject: dcerpc: Use manually written .pc files for dcerpc and ndr. (This used to be commit 676fd18fa2914b7b5530014a944a11ea1d6f631d) --- source4/configure.ac | 2 ++ source4/lib/registry/registry.pc.in | 2 +- source4/librpc/config.mk | 2 ++ source4/librpc/dcerpc.pc.in | 11 +++++++++++ source4/librpc/ndr.pc.in | 11 +++++++++++ 5 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 source4/librpc/dcerpc.pc.in create mode 100644 source4/librpc/ndr.pc.in diff --git a/source4/configure.ac b/source4/configure.ac index 59a21375f6..f35251ec8e 100644 --- a/source4/configure.ac +++ b/source4/configure.ac @@ -28,6 +28,8 @@ m4_include(lib/socket/config.m4) m4_include(nsswitch/nsstest.m4) AC_OUTPUT(lib/registry/registry.pc) +AC_OUTPUT(librpc/dcerpc.pc) +AC_OUTPUT(librpc/ndr.pc) SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.1.0, [], diff --git a/source4/lib/registry/registry.pc.in b/source4/lib/registry/registry.pc.in index 21184c483c..98943a0736 100644 --- a/source4/lib/registry/registry.pc.in +++ b/source4/lib/registry/registry.pc.in @@ -7,6 +7,6 @@ Name: registry Description: Windows-style registry library Requires: ldb Requires.private: -Version: @PACKAGE_VERSION@ +Version: 0.0.1 Libs: -L${libdir} -lregistry Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk index 4d4167ba04..f55813a8ca 100644 --- a/source4/librpc/config.mk +++ b/source4/librpc/config.mk @@ -4,6 +4,7 @@ VERSION = 0.0.1 SO_VERSION = 0 DESCRIPTION = Network Data Representation Core Library +PC_FILE = ndr.pc PUBLIC_HEADERS = ndr/libndr.h PUBLIC_PROTO_HEADER = ndr/libndr_proto.h OBJ_FILES = \ @@ -458,6 +459,7 @@ PUBLIC_HEADERS = gen_ndr/dcerpc.h gen_ndr/ndr_dcerpc.h [LIBRARY::dcerpc] VERSION = 0.0.1 SO_VERSION = 0 +PC_FILE = dcerpc.pc DESCRIPTION = DCE/RPC client library PUBLIC_HEADERS = rpc/dcerpc.h \ gen_ndr/mgmt.h gen_ndr/ndr_mgmt.h gen_ndr/ndr_mgmt_c.h \ diff --git a/source4/librpc/dcerpc.pc.in b/source4/librpc/dcerpc.pc.in new file mode 100644 index 0000000000..3960f2a583 --- /dev/null +++ b/source4/librpc/dcerpc.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: dcerpc +Description: DCE/RPC client library +Requires: ndr +Version: 0.0.1 +Libs: -L${libdir} -ldcerpc +Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 diff --git a/source4/librpc/ndr.pc.in b/source4/librpc/ndr.pc.in new file mode 100644 index 0000000000..4317397dc7 --- /dev/null +++ b/source4/librpc/ndr.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: ndr +Description: Network Data Representation Core Library +Requires: talloc +Version: 0.0.1 +Libs: -L${libdir} -lndr +Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 -- cgit From 0ae14b6cb4f6a0e8b8df18e6c0d64ee98345e558 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 22 Jan 2008 18:38:14 +0100 Subject: torture: Use manually written .pc file. (This used to be commit d43b18cc5e8b58ca965205cccfe25f8a120d2ca7) --- source4/configure.ac | 1 + source4/torture/config.mk | 1 + source4/torture/torture.pc.in | 12 ++++++++++++ 3 files changed, 14 insertions(+) create mode 100644 source4/torture/torture.pc.in diff --git a/source4/configure.ac b/source4/configure.ac index f35251ec8e..cca2d702ba 100644 --- a/source4/configure.ac +++ b/source4/configure.ac @@ -30,6 +30,7 @@ m4_include(nsswitch/nsstest.m4) AC_OUTPUT(lib/registry/registry.pc) AC_OUTPUT(librpc/dcerpc.pc) AC_OUTPUT(librpc/ndr.pc) +AC_OUTPUT(torture/torture.pc) SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.1.0, [], diff --git a/source4/torture/config.mk b/source4/torture/config.mk index dd0ca83f7d..28a4c4b023 100644 --- a/source4/torture/config.mk +++ b/source4/torture/config.mk @@ -3,6 +3,7 @@ DESCRIPTION = Samba torture (test) suite SO_VERSION = 0 VERSION = 0.0.1 +PC_FILE = torture.pc PUBLIC_HEADERS = torture.h ui.h PUBLIC_PROTO_HEADER = proto.h OBJ_FILES = \ diff --git a/source4/torture/torture.pc.in b/source4/torture/torture.pc.in new file mode 100644 index 0000000000..6582816cb5 --- /dev/null +++ b/source4/torture/torture.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ +modulesdir=${prefix}/modules/torture + +Name: torture +Description: Samba torture (test) suite +Requires: talloc +Version: 0.0.1 +Libs: -L${libdir} -ltorture +Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 -- cgit From 2f98f4b24e2c5b73423d079e5a66955eb4a343e9 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 22 Jan 2008 18:39:54 +0100 Subject: gensec: Use manually written .pc file. (This used to be commit 96a5ac9db2399019518e134a00c564ec1066f536) --- source4/auth/gensec/config.mk | 1 + source4/auth/gensec/gensec.pc.in | 11 +++++++++++ source4/configure.ac | 1 + 3 files changed, 13 insertions(+) create mode 100644 source4/auth/gensec/gensec.pc.in diff --git a/source4/auth/gensec/config.mk b/source4/auth/gensec/config.mk index fea157c40b..8347afa186 100644 --- a/source4/auth/gensec/config.mk +++ b/source4/auth/gensec/config.mk @@ -1,6 +1,7 @@ ################################# # Start SUBSYSTEM gensec [LIBRARY::gensec] +PC_FILE = gensec.pc VERSION = 0.0.1 SO_VERSION = 0 DESCRIPTION = Generic Security Library diff --git a/source4/auth/gensec/gensec.pc.in b/source4/auth/gensec/gensec.pc.in new file mode 100644 index 0000000000..faf772ae73 --- /dev/null +++ b/source4/auth/gensec/gensec.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ +modulesdir=${prefix}/modules/gensec + +Name: gensec +Description: Generic Security Library +Version: 0.0.1 +Libs: -L${libdir} -lgensec +Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 diff --git a/source4/configure.ac b/source4/configure.ac index cca2d702ba..4171767c08 100644 --- a/source4/configure.ac +++ b/source4/configure.ac @@ -31,6 +31,7 @@ AC_OUTPUT(lib/registry/registry.pc) AC_OUTPUT(librpc/dcerpc.pc) AC_OUTPUT(librpc/ndr.pc) AC_OUTPUT(torture/torture.pc) +AC_OUTPUT(auth/gensec/gensec.pc) SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.1.0, [], -- cgit From f254d532025cd50314a808be72ce59cdd8f1eb87 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 22 Jan 2008 18:41:30 +0100 Subject: param: Use manually written .pc file. (This used to be commit c0165aab47b4948b8767517b7795c6ec28fb6b6b) --- source4/configure.ac | 1 + source4/param/config.mk | 1 + source4/param/samba-config.pc.in | 10 ++++++++++ 3 files changed, 12 insertions(+) create mode 100644 source4/param/samba-config.pc.in diff --git a/source4/configure.ac b/source4/configure.ac index 4171767c08..8c0f176e5f 100644 --- a/source4/configure.ac +++ b/source4/configure.ac @@ -32,6 +32,7 @@ AC_OUTPUT(librpc/dcerpc.pc) AC_OUTPUT(librpc/ndr.pc) AC_OUTPUT(torture/torture.pc) AC_OUTPUT(auth/gensec/gensec.pc) +AC_OUTPUT(param/samba-config.pc) SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.1.0, [], diff --git a/source4/param/config.mk b/source4/param/config.mk index f7d5d03d43..dd524cf31e 100644 --- a/source4/param/config.mk +++ b/source4/param/config.mk @@ -2,6 +2,7 @@ DESCRIPTION = Reading Samba configuration files VERSION = 0.0.1 SO_VERSION = 0 +PC_FILE = samba-config.pc OBJ_FILES = loadparm.o \ params.o \ generic.o \ diff --git a/source4/param/samba-config.pc.in b/source4/param/samba-config.pc.in new file mode 100644 index 0000000000..801f6aeda4 --- /dev/null +++ b/source4/param/samba-config.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: samba-config +Description: Reading Samba configuration files +Version: 0.0.1 +Libs: -L${libdir} -lsamba-config +Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 -- cgit From 1c61efc07ed59a7c5fb5bb2ed51cdc92bd37ea57 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 22 Jan 2008 18:43:07 +0100 Subject: dcerpc_samr: Use manually written .pc file. (This used to be commit 4b83dc06471818089790c42157b972964d8d02e2) --- source4/configure.ac | 1 + source4/librpc/config.mk | 1 + source4/librpc/dcerpc_samr.pc.in | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 source4/librpc/dcerpc_samr.pc.in diff --git a/source4/configure.ac b/source4/configure.ac index 8c0f176e5f..23fc1023ad 100644 --- a/source4/configure.ac +++ b/source4/configure.ac @@ -33,6 +33,7 @@ AC_OUTPUT(librpc/ndr.pc) AC_OUTPUT(torture/torture.pc) AC_OUTPUT(auth/gensec/gensec.pc) AC_OUTPUT(param/samba-config.pc) +AC_OUTPUT(librpc/dcerpc_samr.pc) SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.1.0, [], diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk index f55813a8ca..dc58870469 100644 --- a/source4/librpc/config.mk +++ b/source4/librpc/config.mk @@ -346,6 +346,7 @@ PUBLIC_DEPENDENCIES = dcerpc NDR_UNIXINFO [LIBRARY::dcerpc_samr] OBJ_FILES = gen_ndr/ndr_samr_c.o +PC_FILE = dcerpc_samr.pc PUBLIC_DEPENDENCIES = dcerpc NDR_SAMR VERSION = 0.0.1 SO_VERSION = 0 diff --git a/source4/librpc/dcerpc_samr.pc.in b/source4/librpc/dcerpc_samr.pc.in new file mode 100644 index 0000000000..c4102237d3 --- /dev/null +++ b/source4/librpc/dcerpc_samr.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: dcerpc_samr +Description: DCE/RPC client library - SAMR +Requires.private: dcerpc ndr +Version: 0.0.1 +Libs: -L${libdir} -ldcerpc_samr +Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 -- cgit From 907ec5ba7bac2b5431a14f02f0dc1f5e126366e2 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 22 Jan 2008 18:47:18 +0100 Subject: build: remove support for automatically building .pc files. (This used to be commit e9f99732677f46d599c270cfcb5042c11d34d338) --- source4/build/smb_build/env.pm | 36 ------------ source4/build/smb_build/main.pl | 5 +- source4/build/smb_build/makefile.pm | 109 ------------------------------------ 3 files changed, 1 insertion(+), 149 deletions(-) diff --git a/source4/build/smb_build/env.pm b/source4/build/smb_build/env.pm index 8fbbe9cfd5..bbb72b520f 100644 --- a/source4/build/smb_build/env.pm +++ b/source4/build/smb_build/env.pm @@ -54,42 +54,6 @@ sub _set_config($$) $self->{automatic_deps} = ($self->{config}->{automatic_dependencies} eq "yes"); } -sub PkgConfig($$$$$$$$$$$$) -{ - my ($self,$path,$name,$libs,$privlibs,$cflags,$version,$desc,$hasmodules,$pubdep,$privdep,$dirs) = @_; - - print __FILE__.": creating $path\n"; - - if ($self->{config}->{libreplace_cv_immediate_structures} eq "yes") { - $cflags .= " -DHAVE_IMMEDIATE_STRUCTURES=1"; - } - - mkpath(dirname($path),0,0755); - open(OUT, ">$path") or die("Can't open $path: $!"); - - foreach (@$dirs) { - print OUT "$_\n"; - } - if ($hasmodules) { - print OUT "modulesdir=$self->{config}->{modulesdir}/$name\n" ; - } - - print OUT "\n"; - - print OUT "Name: $name\n"; - if (defined($desc)) { - print OUT "Description: $desc\n"; - } - print OUT "Requires: $pubdep\n" if defined($pubdep); - print OUT "Requires.private: $privdep\n" if defined($privdep); - print OUT "Version: $version\n"; - print OUT "Libs: $libs\n"; - print OUT "Libs.private: $privlibs\n" if (defined($privlibs)); - print OUT "Cflags: -I\${includedir} $cflags\n"; - - close(OUT); -} - sub Import($$) { my ($self,$items) = @_; diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl index cdeaeeb1c8..fb769103d0 100644 --- a/source4/build/smb_build/main.pl +++ b/source4/build/smb_build/main.pl @@ -61,10 +61,7 @@ foreach my $key (values %$OUTPUT) { $mkenv->StaticLibrary($key) if grep(/STATIC_LIBRARY/, @{$key->{OUTPUT_TYPE}}); if (defined($key->{PC_FILE})) { - push(@{$mkenv->{pc_files}}, $key->{PC_FILE}); - } else { - $mkenv->PkgConfig($key, $OUTPUT) if $key->{TYPE} eq "LIBRARY" - and defined($key->{VERSION}); + push(@{$mkenv->{pc_files}}, "$key->{BASEDIR}/$key->{PC_FILE}"); } $mkenv->SharedLibrary($key) if ($key->{TYPE} eq "LIBRARY") and grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}}); diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 7e715b47eb..452e4254a3 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -552,115 +552,6 @@ sub Manpage($$) push (@{$self->{manpages}}, $path); } -sub PkgConfig($$$) -{ - my ($self,$ctx,$other) = @_; - - my $link_name = $ctx->{NAME}; - - $link_name =~ s/^LIB//g; - $link_name = lc($link_name); - - return if (not defined($ctx->{DESCRIPTION})); - - my $path = output::add_dir_str($ctx->{BASEDIR}, "$link_name.pc"); - - push (@{$self->{pc_files}}, $path); - - my $pubs; - my $privs; - my $privlibs; - my $publibs = ""; - - if (defined($ctx->{PUBLIC_DEPENDENCIES})) { - foreach (@{$ctx->{PUBLIC_DEPENDENCIES}}) { - next if ($other->{$_}->{ENABLE} eq "NO"); - if (defined($other->{$_}->{PC_NAME})) { - $pubs .= "$other->{$_}->{PC_NAME} "; - } elsif ($other->{$_}->{TYPE} eq "EXT_LIB") { - my $e = $other->{$_}; - my $ldflags = join(" ", @{$e->{LDFLAGS}}); - $ldflags .= " " unless $ldflags eq ""; - my $libs = join(" ", @{$e->{LIBS}}); - $libs .= " " unless $libs eq ""; - - $publibs .= $ldflags.$libs; - } else { - s/^LIB//g; - $_ = lc($_); - - $privlibs .= "-l$_ "; - } - } - } - - if (defined($ctx->{PRIVATE_DEPENDENCIES})) { - foreach (@{$ctx->{PRIVATE_DEPENDENCIES}}) { - next if ($other->{$_}->{ENABLE} eq "NO"); - if ($other->{$_}->{TYPE} eq "EXT_LIB") { - my $e = $other->{$_}; - - my $ldflags = join(" ", @{$e->{LDFLAGS}}); - $ldflags .= " " unless $ldflags eq ""; - my $libs = join(" ", @{$e->{LIBS}}); - $libs .= " " unless $libs eq ""; - - $privlibs .= $ldflags.$libs; - } elsif ($other->{$_}->{TYPE} eq "LIBRARY") { - s/^LIB//g; - $_ = lc($_); - - $privs .= "$_ "; - } else { - s/^LIB//g; - $_ = lc($_); - - $privlibs .= "-l$_ "; - } - } - } - - smb_build::env::PkgConfig($self, - $path, - $link_name, - "-L\${libdir} -l$link_name $publibs", - $privlibs, - "", - "$ctx->{VERSION}", - $ctx->{DESCRIPTION}, - defined($ctx->{INIT_FUNCTIONS}), - $pubs, - "", - [ - "prefix=$self->{config}->{prefix}", - "exec_prefix=$self->{config}->{exec_prefix}", - "libdir=$self->{config}->{libdir}", - "includedir=$self->{config}->{includedir}" - ] - ); - my $abs_srcdir = abs_path($self->{config}->{srcdir}); - smb_build::env::PkgConfig($self, - "bin/pkgconfig/$link_name-uninstalled.pc", - $link_name, - "-Lbin/shared -Lbin/static -l$link_name", - $privlibs, - join(' ', - "-I$abs_srcdir", - "-I$abs_srcdir/include", - "-I$abs_srcdir/lib", - "-I$abs_srcdir/lib/replace"), - "$ctx->{VERSION}", - $ctx->{DESCRIPTION}, - defined($ctx->{INIT_FUNCTIONS}), - $pubs, - $privs, - [ - "prefix=bin/", - "includedir=$ctx->{BASEDIR}" - ] - ); -} - sub ProtoHeader($$) { my ($self,$ctx) = @_; -- cgit From a2595477869d5fee2f916bc857ca028e3b2fc677 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 22 Jan 2008 18:49:51 +0100 Subject: build: Remove support for DESCRIPTION setting that is now unused. (This used to be commit 91d7ba5202e6c375456a42c2c6861f63c7fcfc20) --- source4/auth/gensec/config.mk | 1 - source4/build/m4/public.m4 | 17 ++++++++--------- source4/build/smb_build/config_mk.pm | 2 -- source4/lib/ldb/config.mk | 1 - source4/lib/registry/config.mk | 1 - source4/lib/talloc/config.mk | 1 - source4/lib/tdb/config.mk | 1 - source4/lib/util/config.mk | 1 - source4/libcli/config.mk | 1 - source4/librpc/config.mk | 3 --- source4/nsswitch/config.m4 | 1 - source4/param/config.mk | 1 - source4/torture/config.mk | 1 - 13 files changed, 8 insertions(+), 24 deletions(-) diff --git a/source4/auth/gensec/config.mk b/source4/auth/gensec/config.mk index 8347afa186..a53dff8bfe 100644 --- a/source4/auth/gensec/config.mk +++ b/source4/auth/gensec/config.mk @@ -4,7 +4,6 @@ PC_FILE = gensec.pc VERSION = 0.0.1 SO_VERSION = 0 -DESCRIPTION = Generic Security Library PUBLIC_HEADERS = gensec.h spnego.h PUBLIC_PROTO_HEADER = gensec_proto.h OBJ_FILES = gensec.o socket.o diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4 index 6d693eaeee..81da34db86 100644 --- a/source4/build/m4/public.m4 +++ b/source4/build/m4/public.m4 @@ -34,21 +34,20 @@ ENABLE = YES " ]) -dnl SMB_LIBRARY(name,description,obj_files,required_subsystems,version,so_version,cflags,ldflags,pcname) +dnl SMB_LIBRARY(name,obj_files,required_subsystems,version,so_version,cflags,ldflags,pcname) AC_DEFUN([SMB_LIBRARY], [ SMB_INFO_LIBRARIES="$SMB_INFO_LIBRARIES ################################### # Start Library $1 @<:@LIBRARY::$1@:>@ -DESCRIPTION = $2 -OBJ_FILES = $3 -PRIVATE_DEPENDENCIES = $4 -VERSION = $5 -SO_VERSION = $6 -CFLAGS = $7 -LDFLAGS = $8 -PC_NAME = $9 +OBJ_FILES = $2 +PRIVATE_DEPENDENCIES = $3 +VERSION = $4 +SO_VERSION = $5 +CFLAGS = $6 +LDFLAGS = $7 +PC_NAME = $8 ENABLE = YES # End Library $1 ################################### diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm index fa3949db2e..aa075490bc 100644 --- a/source4/build/smb_build/config_mk.pm +++ b/source4/build/smb_build/config_mk.pm @@ -99,8 +99,6 @@ my $section_types = { "OBJ_FILES" => "list", - "DESCRIPTION" => "string", - "PRIVATE_DEPENDENCIES" => "list", "PUBLIC_DEPENDENCIES" => "list", diff --git a/source4/lib/ldb/config.mk b/source4/lib/ldb/config.mk index c52703658a..75ce89d6cf 100644 --- a/source4/lib/ldb/config.mk +++ b/source4/lib/ldb/config.mk @@ -131,7 +131,6 @@ SO_VERSION = 0 OUTPUT_TYPE = SHARED_LIBRARY CFLAGS = -Ilib/ldb/include PC_FILE = ldb.pc -DESCRIPTION = LDAP-like embedded database library INIT_FUNCTION_TYPE = int (*) (void) OBJ_FILES = \ common/ldb.o \ diff --git a/source4/lib/registry/config.mk b/source4/lib/registry/config.mk index a7365a49ae..7a9c8fcff1 100644 --- a/source4/lib/registry/config.mk +++ b/source4/lib/registry/config.mk @@ -20,7 +20,6 @@ clean:: VERSION = 0.0.1 PC_FILE = registry.pc SO_VERSION = 0 -DESCRIPTION = Windows-style registry library OBJ_FILES = \ interface.o \ util.o \ diff --git a/source4/lib/talloc/config.mk b/source4/lib/talloc/config.mk index c31f9a7515..16b5063f87 100644 --- a/source4/lib/talloc/config.mk +++ b/source4/lib/talloc/config.mk @@ -6,4 +6,3 @@ PC_FILE = talloc.pc MANPAGE = talloc.3 CFLAGS = -Ilib/talloc PUBLIC_HEADERS = talloc.h -DESCRIPTION = A hierarchical pool based memory system with destructors diff --git a/source4/lib/tdb/config.mk b/source4/lib/tdb/config.mk index 8413611fa9..820c55e363 100644 --- a/source4/lib/tdb/config.mk +++ b/source4/lib/tdb/config.mk @@ -4,7 +4,6 @@ VERSION = 0.0.1 SO_VERSION = 0 PC_FILE = tdb.pc -DESCRIPTION = Trivial Database Library OBJ_FILES = \ common/tdb.o common/dump.o common/io.o common/lock.o \ common/open.o common/traverse.o common/freelist.o \ diff --git a/source4/lib/util/config.mk b/source4/lib/util/config.mk index 53a55bf7af..f3e6cd7acf 100644 --- a/source4/lib/util/config.mk +++ b/source4/lib/util/config.mk @@ -1,7 +1,6 @@ [SUBSYSTEM::LIBSAMBA-UTIL] #VERSION = 0.0.1 #SO_VERSION = 0 -#DESCRIPTION = Generic utility functions PUBLIC_HEADERS = util.h \ attr.h \ byteorder.h \ diff --git a/source4/libcli/config.mk b/source4/libcli/config.mk index a538d607bb..cf87e6c045 100644 --- a/source4/libcli/config.mk +++ b/source4/libcli/config.mk @@ -39,7 +39,6 @@ OBJ_FILES = nbt/nbtname.o [SUBSYSTEM::LIBCLI_NBT] #VERSION = 0.0.1 #SO_VERSION = 0 -#DESCRIPTION = NetBios over TCP/IP client library PRIVATE_PROTO_HEADER = nbt/nbt_proto.h OBJ_FILES = \ nbt/nbtsocket.o \ diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk index dc58870469..0f5a65121c 100644 --- a/source4/librpc/config.mk +++ b/source4/librpc/config.mk @@ -3,7 +3,6 @@ [LIBRARY::LIBNDR] VERSION = 0.0.1 SO_VERSION = 0 -DESCRIPTION = Network Data Representation Core Library PC_FILE = ndr.pc PUBLIC_HEADERS = ndr/libndr.h PUBLIC_PROTO_HEADER = ndr/libndr_proto.h @@ -350,7 +349,6 @@ PC_FILE = dcerpc_samr.pc PUBLIC_DEPENDENCIES = dcerpc NDR_SAMR VERSION = 0.0.1 SO_VERSION = 0 -DESCRIPTION = DCE/RPC client library - SAMR [SUBSYSTEM::RPC_NDR_SPOOLSS] OBJ_FILES = gen_ndr/ndr_spoolss_c.o @@ -461,7 +459,6 @@ PUBLIC_HEADERS = gen_ndr/dcerpc.h gen_ndr/ndr_dcerpc.h VERSION = 0.0.1 SO_VERSION = 0 PC_FILE = dcerpc.pc -DESCRIPTION = DCE/RPC client library PUBLIC_HEADERS = rpc/dcerpc.h \ gen_ndr/mgmt.h gen_ndr/ndr_mgmt.h gen_ndr/ndr_mgmt_c.h \ gen_ndr/epmapper.h gen_ndr/ndr_epmapper.h gen_ndr/ndr_epmapper_c.h diff --git a/source4/nsswitch/config.m4 b/source4/nsswitch/config.m4 index bb10c28866..a3b7412841 100644 --- a/source4/nsswitch/config.m4 +++ b/source4/nsswitch/config.m4 @@ -3,7 +3,6 @@ AC_CHECK_HEADERS(nss.h nss_common.h ns_api.h ) case "$host_os" in *linux*) SMB_LIBRARY(nss_winbind, - [Linux Name service switch library using winbind], [nsswitch/winbind_nss_linux.o], [LIBWINBIND-CLIENT], [2],[2]) diff --git a/source4/param/config.mk b/source4/param/config.mk index dd524cf31e..8ded5f1a13 100644 --- a/source4/param/config.mk +++ b/source4/param/config.mk @@ -1,5 +1,4 @@ [LIBRARY::LIBSAMBA-CONFIG] -DESCRIPTION = Reading Samba configuration files VERSION = 0.0.1 SO_VERSION = 0 PC_FILE = samba-config.pc diff --git a/source4/torture/config.mk b/source4/torture/config.mk index 28a4c4b023..c3097e8136 100644 --- a/source4/torture/config.mk +++ b/source4/torture/config.mk @@ -1,6 +1,5 @@ # TORTURE subsystem [LIBRARY::torture] -DESCRIPTION = Samba torture (test) suite SO_VERSION = 0 VERSION = 0.0.1 PC_FILE = torture.pc -- cgit From 37325c4c1324d6b768bc8f4449a954550333e34d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 23 Jan 2008 13:09:37 +1100 Subject: Added PFIF notice to Samba 4.0 tree (This used to be commit df2664ac94efbc2eee4d8a24a793e5f1e77b2d88) --- PFIF.txt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 PFIF.txt diff --git a/PFIF.txt b/PFIF.txt new file mode 100644 index 0000000000..09f1458e44 --- /dev/null +++ b/PFIF.txt @@ -0,0 +1,7 @@ +This code was developed in participation with the Protocol Freedom +Information Foundation. + +Please see + http://protocolfreedom.org/ and + http://samba.org/samba/PFIF/ +for more details. -- cgit