diff options
Diffstat (limited to 'source4/param')
-rw-r--r-- | source4/param/generic.c | 4 | ||||
-rw-r--r-- | source4/param/loadparm.c | 21 | ||||
-rw-r--r-- | source4/param/param.h | 3 | ||||
-rw-r--r-- | source4/param/param.py | 2 | ||||
-rw-r--r-- | source4/param/param_wrap.c | 100 | ||||
-rw-r--r-- | source4/param/secrets.c | 6 | ||||
-rw-r--r-- | source4/param/share_ldb.c | 12 |
7 files changed, 78 insertions, 70 deletions
diff --git a/source4/param/generic.c b/source4/param/generic.c index b86e3ad234..ed3045605d 100644 --- a/source4/param/generic.c +++ b/source4/param/generic.c @@ -17,7 +17,7 @@ */ #include "includes.h" -#include "lib/util/dlinklist.h" +#include "../lib/util/dlinklist.h" #include "param/param.h" #include "system/filesys.h" @@ -130,7 +130,7 @@ const char **param_get_string_list(struct param_context *ctx, const char *param, if (separator == NULL) separator = LIST_SEP; - return str_list_make(ctx, p->value, separator); + return (const char **)str_list_make(ctx, p->value, separator); } int param_set_string_list(struct param_context *ctx, const char *param, const char **list, const char *section) diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index e63a7aa8a1..e626cdf5dd 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -60,7 +60,7 @@ #include "system/network.h" /* needed for TCP_NODELAY */ #include "smb_server/smb_server.h" #include "libcli/raw/signing.h" -#include "lib/util/dlinklist.h" +#include "../lib/util/dlinklist.h" #include "param/param.h" #include "param/loadparm.h" #include "libcli/raw/libcliraw.h" @@ -97,8 +97,6 @@ struct loadparm_global char *szWINS_CONFIG_URL; char *szWINS_URL; char *szPrivateDir; - const char **jsInclude; - char *jsonrpcServicesDir; const char **szPasswordServers; char *szSocketOptions; char *szRealm; @@ -469,7 +467,6 @@ static struct parm_struct parm_table[] = { {"lock directory", P_STRING, P_GLOBAL, GLOBAL_VAR(szLockDir), NULL, NULL}, {"modules dir", P_STRING, P_GLOBAL, GLOBAL_VAR(szModulesDir), NULL, NULL}, {"pid directory", P_STRING, P_GLOBAL, GLOBAL_VAR(szPidDir), NULL, NULL}, - {"js include", P_LIST, P_GLOBAL, GLOBAL_VAR(jsInclude), NULL, NULL}, {"setup directory", P_STRING, P_GLOBAL, GLOBAL_VAR(szSetupDir), NULL, NULL}, {"socket address", P_STRING, P_GLOBAL, GLOBAL_VAR(szSocketAddress), NULL, NULL}, @@ -702,7 +699,6 @@ _PUBLIC_ FN_GLOBAL_INTEGER(lp_cli_minprotocol, cli_minprotocol) _PUBLIC_ FN_GLOBAL_INTEGER(lp_security, security) _PUBLIC_ FN_GLOBAL_BOOL(lp_paranoid_server_security, paranoid_server_security) _PUBLIC_ FN_GLOBAL_INTEGER(lp_announce_as, announce_as) -_PUBLIC_ FN_GLOBAL_LIST(lp_js_include, jsInclude) const char *lp_servicename(const struct loadparm_service *service) { return lp_string((const char *)service->szService); @@ -889,7 +885,7 @@ const char **lp_parm_string_list(TALLOC_CTX *mem_ctx, const char *value = lp_get_parametric(lp_ctx, service, type, option); if (value != NULL) - return str_list_make(mem_ctx, value, separator); + return (const char **)str_list_make(mem_ctx, value, separator); return NULL; } @@ -1303,7 +1299,7 @@ static void copy_service(struct loadparm_service *pserviceDest, strupper(*(char **)dest_ptr); break; case P_LIST: - *(const char ***)dest_ptr = str_list_copy(pserviceDest, + *(const char ***)dest_ptr = (const char **)str_list_copy(pserviceDest, *(const char ***)src_ptr); break; default: @@ -1657,7 +1653,7 @@ static bool set_variable(TALLOC_CTX *mem_ctx, int parmnum, void *parm_ptr, } case P_LIST: - *(const char ***)parm_ptr = str_list_make(mem_ctx, + *(const char ***)parm_ptr = (const char **)str_list_make(mem_ctx, pszParmValue, NULL); break; @@ -2413,7 +2409,6 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx) lp_do_global_parameter(lp_ctx, "tls keyfile", "tls/key.pem"); lp_do_global_parameter(lp_ctx, "tls certfile", "tls/cert.pem"); lp_do_global_parameter(lp_ctx, "tls cafile", "tls/ca.pem"); - lp_do_global_parameter_var(lp_ctx, "js include", "%s", dyn_JSDIR); lp_do_global_parameter_var(lp_ctx, "setup directory", "%s", dyn_SETUPDIR); @@ -2634,3 +2629,11 @@ void lp_smbcli_options(struct loadparm_context *lp_ctx, options->use_oplocks = true; options->use_level2_oplocks = true; } + +void lp_smbcli_session_options(struct loadparm_context *lp_ctx, + struct smbcli_session_options *options) +{ + options->lanman_auth = lp_client_lanman_auth(lp_ctx); + options->ntlmv2_auth = lp_client_ntlmv2_auth(lp_ctx); + options->plaintext_auth = lp_client_plaintext_auth(lp_ctx); +} diff --git a/source4/param/param.h b/source4/param/param.h index 4ed2654692..4c6e8b79a2 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -60,6 +60,7 @@ enum announce_as {/* Types of machine we can announce as. */ struct loadparm_context; struct loadparm_service; struct smbcli_options; +struct smbcli_session_options; void reload_charcnv(struct loadparm_context *lp_ctx); @@ -318,6 +319,8 @@ int lp_maxprintjobs(struct loadparm_service *service, struct loadparm_service *s struct smb_iconv_convenience *lp_iconv_convenience(struct loadparm_context *lp_ctx); void lp_smbcli_options(struct loadparm_context *lp_ctx, struct smbcli_options *options); +void lp_smbcli_session_options(struct loadparm_context *lp_ctx, + struct smbcli_session_options *options); /* The following definitions come from param/generic.c */ diff --git a/source4/param/param.py b/source4/param/param.py index 46c75cef97..4117db6f28 100644 --- a/source4/param/param.py +++ b/source4/param/param.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.35 +# Version 1.3.36 # # Don't modify this file, modify the SWIG interface instead. diff --git a/source4/param/param_wrap.c b/source4/param/param_wrap.c index 48fd752f0e..eef7a06605 100644 --- a/source4/param/param_wrap.c +++ b/source4/param/param_wrap.c @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 + * Version 1.3.36 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -52,6 +52,12 @@ # endif #endif +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) @@ -2479,7 +2485,7 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) #define SWIGTYPE_p_int swig_types[2] #define SWIGTYPE_p_loadparm_context swig_types[3] #define SWIGTYPE_p_loadparm_service swig_types[4] -#define SWIGTYPE_p_long swig_types[5] +#define SWIGTYPE_p_long_long swig_types[5] #define SWIGTYPE_p_param_context swig_types[6] #define SWIGTYPE_p_param_opt swig_types[7] #define SWIGTYPE_p_param_section swig_types[8] @@ -2487,7 +2493,7 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) #define SWIGTYPE_p_signed_char swig_types[10] #define SWIGTYPE_p_unsigned_char swig_types[11] #define SWIGTYPE_p_unsigned_int swig_types[12] -#define SWIGTYPE_p_unsigned_long swig_types[13] +#define SWIGTYPE_p_unsigned_long_long swig_types[13] #define SWIGTYPE_p_unsigned_short swig_types[14] static swig_type_info *swig_types[16]; static swig_module_info swig_module = {swig_types, 15, 0, 0, 0, 0}; @@ -2522,7 +2528,7 @@ static swig_module_info swig_module = {swig_types, 15, 0, 0, 0, 0}; #define SWIG_name "_param" -#define SWIGVERSION 0x010335 +#define SWIGVERSION 0x010336 #define SWIG_VERSION SWIGVERSION @@ -2830,13 +2836,13 @@ fail: SWIGINTERN PyObject *_wrap_LoadParm_default_service(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; loadparm_context *arg1 = (loadparm_context *) 0 ; - struct loadparm_service *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char * kwnames[] = { (char *) "self", NULL }; + struct loadparm_service *result = 0 ; arg1 = loadparm_init(NULL); if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:LoadParm_default_service",kwnames,&obj0)) SWIG_fail; @@ -2859,7 +2865,6 @@ SWIGINTERN PyObject *_wrap_LoadParm_load(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject *resultobj = 0; loadparm_context *arg1 = (loadparm_context *) 0 ; char *arg2 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -2870,6 +2875,7 @@ SWIGINTERN PyObject *_wrap_LoadParm_load(PyObject *SWIGUNUSEDPARM(self), PyObjec char * kwnames[] = { (char *) "self",(char *) "filename", NULL }; + bool result; arg1 = loadparm_init(NULL); if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:LoadParm_load",kwnames,&obj0,&obj1)) SWIG_fail; @@ -2900,13 +2906,13 @@ fail: SWIGINTERN PyObject *_wrap_LoadParm_load_default(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; loadparm_context *arg1 = (loadparm_context *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char * kwnames[] = { (char *) "self", NULL }; + bool result; arg1 = loadparm_init(NULL); if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:LoadParm_load_default",kwnames,&obj0)) SWIG_fail; @@ -2928,13 +2934,13 @@ fail: SWIGINTERN PyObject *_wrap_LoadParm___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; loadparm_context *arg1 = (loadparm_context *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char * kwnames[] = { (char *) "self", NULL }; + int result; arg1 = loadparm_init(NULL); if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:LoadParm___len__",kwnames,&obj0)) SWIG_fail; @@ -2957,7 +2963,6 @@ SWIGINTERN PyObject *_wrap_LoadParm___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *resultobj = 0; loadparm_context *arg1 = (loadparm_context *) 0 ; char *arg2 = (char *) 0 ; - struct loadparm_service *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -2968,6 +2973,7 @@ SWIGINTERN PyObject *_wrap_LoadParm___getitem__(PyObject *SWIGUNUSEDPARM(self), char * kwnames[] = { (char *) "self",(char *) "name", NULL }; + struct loadparm_service *result = 0 ; arg1 = loadparm_init(NULL); if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:LoadParm___getitem__",kwnames,&obj0,&obj1)) SWIG_fail; @@ -2998,13 +3004,13 @@ fail: SWIGINTERN PyObject *_wrap_LoadParm_configfile(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; loadparm_context *arg1 = (loadparm_context *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char * kwnames[] = { (char *) "self", NULL }; + char *result = 0 ; arg1 = loadparm_init(NULL); if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:LoadParm_configfile",kwnames,&obj0)) SWIG_fail; @@ -3027,7 +3033,6 @@ SWIGINTERN PyObject *_wrap_LoadParm_is_mydomain(PyObject *SWIGUNUSEDPARM(self), PyObject *resultobj = 0; loadparm_context *arg1 = (loadparm_context *) 0 ; char *arg2 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3038,6 +3043,7 @@ SWIGINTERN PyObject *_wrap_LoadParm_is_mydomain(PyObject *SWIGUNUSEDPARM(self), char * kwnames[] = { (char *) "self",(char *) "domain", NULL }; + bool result; arg1 = loadparm_init(NULL); if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:LoadParm_is_mydomain",kwnames,&obj0,&obj1)) SWIG_fail; @@ -3069,7 +3075,6 @@ SWIGINTERN PyObject *_wrap_LoadParm_is_myname(PyObject *SWIGUNUSEDPARM(self), Py PyObject *resultobj = 0; loadparm_context *arg1 = (loadparm_context *) 0 ; char *arg2 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3080,6 +3085,7 @@ SWIGINTERN PyObject *_wrap_LoadParm_is_myname(PyObject *SWIGUNUSEDPARM(self), Py char * kwnames[] = { (char *) "self",(char *) "name", NULL }; + bool result; arg1 = loadparm_init(NULL); if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:LoadParm_is_myname",kwnames,&obj0,&obj1)) SWIG_fail; @@ -3111,7 +3117,6 @@ SWIGINTERN PyObject *_wrap_LoadParm_use(PyObject *SWIGUNUSEDPARM(self), PyObject PyObject *resultobj = 0; loadparm_context *arg1 = (loadparm_context *) 0 ; struct param_context *arg2 = (struct param_context *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -3121,6 +3126,7 @@ SWIGINTERN PyObject *_wrap_LoadParm_use(PyObject *SWIGUNUSEDPARM(self), PyObject char * kwnames[] = { (char *) "self",(char *) "param_ctx", NULL }; + int result; arg1 = loadparm_init(NULL); if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:LoadParm_use",kwnames,&obj0,&obj1)) SWIG_fail; @@ -3151,7 +3157,6 @@ SWIGINTERN PyObject *_wrap_LoadParm_set(PyObject *SWIGUNUSEDPARM(self), PyObject loadparm_context *arg1 = (loadparm_context *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3166,6 +3171,7 @@ SWIGINTERN PyObject *_wrap_LoadParm_set(PyObject *SWIGUNUSEDPARM(self), PyObject char * kwnames[] = { (char *) "self",(char *) "parm_name",(char *) "parm_value", NULL }; + bool result; arg1 = loadparm_init(NULL); if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOO:LoadParm_set",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; @@ -3207,7 +3213,6 @@ SWIGINTERN PyObject *_wrap_LoadParm_get(PyObject *SWIGUNUSEDPARM(self), PyObject loadparm_context *arg1 = (loadparm_context *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - PyObject *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3222,6 +3227,7 @@ SWIGINTERN PyObject *_wrap_LoadParm_get(PyObject *SWIGUNUSEDPARM(self), PyObject char * kwnames[] = { (char *) "self",(char *) "param_name",(char *) "service_name", NULL }; + PyObject *result = 0 ; arg1 = loadparm_init(NULL); if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOO:LoadParm_get",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; @@ -3278,7 +3284,6 @@ SWIGINTERN PyObject *_wrap_delete_LoadParm(PyObject *SWIGUNUSEDPARM(self), PyObj arg1 = (loadparm_context *)(argp1); } delete_loadparm_context(arg1); - resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -3301,7 +3306,6 @@ SWIGINTERN PyObject *_wrap_loadparm_service_volume_label(PyObject *SWIGUNUSEDPAR PyObject *resultobj = 0; loadparm_service *arg1 = (loadparm_service *) 0 ; struct loadparm_service *arg2 = (struct loadparm_service *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -3311,6 +3315,7 @@ SWIGINTERN PyObject *_wrap_loadparm_service_volume_label(PyObject *SWIGUNUSEDPAR char * kwnames[] = { (char *) "self",(char *) "sDefault", NULL }; + char *result = 0 ; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:loadparm_service_volume_label",kwnames,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_loadparm_service, 0 | 0 ); @@ -3335,7 +3340,6 @@ SWIGINTERN PyObject *_wrap_loadparm_service_printername(PyObject *SWIGUNUSEDPARM PyObject *resultobj = 0; loadparm_service *arg1 = (loadparm_service *) 0 ; struct loadparm_service *arg2 = (struct loadparm_service *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -3345,6 +3349,7 @@ SWIGINTERN PyObject *_wrap_loadparm_service_printername(PyObject *SWIGUNUSEDPARM char * kwnames[] = { (char *) "self",(char *) "sDefault", NULL }; + char *result = 0 ; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:loadparm_service_printername",kwnames,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_loadparm_service, 0 | 0 ); @@ -3369,7 +3374,6 @@ SWIGINTERN PyObject *_wrap_loadparm_service_maxprintjobs(PyObject *SWIGUNUSEDPAR PyObject *resultobj = 0; loadparm_service *arg1 = (loadparm_service *) 0 ; struct loadparm_service *arg2 = (struct loadparm_service *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -3379,6 +3383,7 @@ SWIGINTERN PyObject *_wrap_loadparm_service_maxprintjobs(PyObject *SWIGUNUSEDPAR char * kwnames[] = { (char *) "self",(char *) "sDefault", NULL }; + int result; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:loadparm_service_maxprintjobs",kwnames,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_loadparm_service, 0 | 0 ); @@ -3425,7 +3430,6 @@ SWIGINTERN PyObject *_wrap_ParamFile_get_section(PyObject *SWIGUNUSEDPARM(self), PyObject *resultobj = 0; param *arg1 = (param *) 0 ; char *arg2 = (char *) 0 ; - struct param_section *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3436,6 +3440,7 @@ SWIGINTERN PyObject *_wrap_ParamFile_get_section(PyObject *SWIGUNUSEDPARM(self), char * kwnames[] = { (char *) "self",(char *) "name", NULL }; + struct param_section *result = 0 ; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ParamFile_get_section",kwnames,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_param_context, 0 | 0 ); @@ -3462,7 +3467,6 @@ SWIGINTERN PyObject *_wrap_ParamFile_add_section(PyObject *SWIGUNUSEDPARM(self), PyObject *resultobj = 0; param *arg1 = (param *) 0 ; char *arg2 = (char *) 0 ; - struct param_section *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3473,6 +3477,7 @@ SWIGINTERN PyObject *_wrap_ParamFile_add_section(PyObject *SWIGUNUSEDPARM(self), char * kwnames[] = { (char *) "self",(char *) "name", NULL }; + struct param_section *result = 0 ; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ParamFile_add_section",kwnames,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_param_context, 0 | 0 ); @@ -3500,7 +3505,6 @@ SWIGINTERN PyObject *_wrap_ParamFile_get(PyObject *SWIGUNUSEDPARM(self), PyObjec param *arg1 = (param *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) "global" ; - struct param_opt *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3515,6 +3519,7 @@ SWIGINTERN PyObject *_wrap_ParamFile_get(PyObject *SWIGUNUSEDPARM(self), PyObjec char * kwnames[] = { (char *) "self",(char *) "name",(char *) "section_name", NULL }; + struct param_opt *result = 0 ; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:ParamFile_get",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_param_context, 0 | 0 ); @@ -3551,7 +3556,6 @@ SWIGINTERN PyObject *_wrap_ParamFile_get_string(PyObject *SWIGUNUSEDPARM(self), param *arg1 = (param *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) "global" ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3566,6 +3570,7 @@ SWIGINTERN PyObject *_wrap_ParamFile_get_string(PyObject *SWIGUNUSEDPARM(self), char * kwnames[] = { (char *) "self",(char *) "name",(char *) "section_name", NULL }; + char *result = 0 ; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:ParamFile_get_string",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_param_context, 0 | 0 ); @@ -3603,7 +3608,6 @@ SWIGINTERN PyObject *_wrap_ParamFile_set_string(PyObject *SWIGUNUSEDPARM(self), char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) "global" ; - int result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3622,6 +3626,7 @@ SWIGINTERN PyObject *_wrap_ParamFile_set_string(PyObject *SWIGUNUSEDPARM(self), char * kwnames[] = { (char *) "self",(char *) "param",(char *) "value",(char *) "section", NULL }; + int result; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:ParamFile_set_string",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_param_context, 0 | 0 ); @@ -3666,7 +3671,6 @@ SWIGINTERN PyObject *_wrap_ParamFile_set(PyObject *SWIGUNUSEDPARM(self), PyObjec char *arg2 = (char *) 0 ; PyObject *arg3 = (PyObject *) 0 ; char *arg4 = (char *) "global" ; - int result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3682,6 +3686,7 @@ SWIGINTERN PyObject *_wrap_ParamFile_set(PyObject *SWIGUNUSEDPARM(self), PyObjec char * kwnames[] = { (char *) "self",(char *) "parameter",(char *) "ob",(char *) "section_name", NULL }; + int result; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:ParamFile_set",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_param_context, 0 | 0 ); @@ -3717,10 +3722,10 @@ fail: SWIGINTERN PyObject *_wrap_ParamFile_first_section(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; param *arg1 = (param *) 0 ; - struct param_section *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + struct param_section *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3741,7 +3746,6 @@ SWIGINTERN PyObject *_wrap_ParamFile_next_section(PyObject *SWIGUNUSEDPARM(self) PyObject *resultobj = 0; param *arg1 = (param *) 0 ; struct param_section *arg2 = (struct param_section *) 0 ; - struct param_section *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -3751,6 +3755,7 @@ SWIGINTERN PyObject *_wrap_ParamFile_next_section(PyObject *SWIGUNUSEDPARM(self) char * kwnames[] = { (char *) "self",(char *) "s", NULL }; + struct param_section *result = 0 ; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ParamFile_next_section",kwnames,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_param_context, 0 | 0 ); @@ -3775,7 +3780,6 @@ SWIGINTERN PyObject *_wrap_ParamFile_read(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject *resultobj = 0; param *arg1 = (param *) 0 ; char *arg2 = (char *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3786,6 +3790,7 @@ SWIGINTERN PyObject *_wrap_ParamFile_read(PyObject *SWIGUNUSEDPARM(self), PyObje char * kwnames[] = { (char *) "self",(char *) "fn", NULL }; + int result; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ParamFile_read",kwnames,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_param_context, 0 | 0 ); @@ -3812,7 +3817,6 @@ SWIGINTERN PyObject *_wrap_ParamFile_write(PyObject *SWIGUNUSEDPARM(self), PyObj PyObject *resultobj = 0; param *arg1 = (param *) 0 ; char *arg2 = (char *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3823,6 +3827,7 @@ SWIGINTERN PyObject *_wrap_ParamFile_write(PyObject *SWIGUNUSEDPARM(self), PyObj char * kwnames[] = { (char *) "self",(char *) "fn", NULL }; + int result; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ParamFile_write",kwnames,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_param_context, 0 | 0 ); @@ -3860,7 +3865,6 @@ SWIGINTERN PyObject *_wrap_delete_ParamFile(PyObject *SWIGUNUSEDPARM(self), PyOb } arg1 = (param *)(argp1); delete_param(arg1); - resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -3882,10 +3886,10 @@ SWIGINTERN PyObject *ParamFile_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject SWIGINTERN PyObject *_wrap_param_opt_key_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; param_opt *arg1 = (param_opt *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + char *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3905,10 +3909,10 @@ fail: SWIGINTERN PyObject *_wrap_param_opt_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; param_opt *arg1 = (param_opt *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + char *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3928,10 +3932,10 @@ fail: SWIGINTERN PyObject *_wrap_param_opt___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; param_opt *arg1 = (param_opt *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + char *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3963,7 +3967,6 @@ SWIGINTERN PyObject *_wrap_delete_param_opt(PyObject *SWIGUNUSEDPARM(self), PyOb } arg1 = (param_opt *)(argp1); delete_param_opt(arg1); - resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -3981,10 +3984,10 @@ SWIGINTERN PyObject *param_opt_swigregister(PyObject *SWIGUNUSEDPARM(self), PyOb SWIGINTERN PyObject *_wrap_param_section_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; param_section *arg1 = (param_section *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + char *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; @@ -4005,7 +4008,6 @@ SWIGINTERN PyObject *_wrap_param_section_get(PyObject *SWIGUNUSEDPARM(self), PyO PyObject *resultobj = 0; param_section *arg1 = (param_section *) 0 ; char *arg2 = (char *) 0 ; - struct param_opt *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -4016,6 +4018,7 @@ SWIGINTERN PyObject *_wrap_param_section_get(PyObject *SWIGUNUSEDPARM(self), PyO char * kwnames[] = { (char *) "self",(char *) "name", NULL }; + struct param_opt *result = 0 ; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:param_section_get",kwnames,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_param_section, 0 | 0 ); @@ -4041,10 +4044,10 @@ fail: SWIGINTERN PyObject *_wrap_param_section_first_parameter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; param_section *arg1 = (param_section *) 0 ; - struct param_opt *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + struct param_opt *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; @@ -4065,7 +4068,6 @@ SWIGINTERN PyObject *_wrap_param_section_next_parameter(PyObject *SWIGUNUSEDPARM PyObject *resultobj = 0; param_section *arg1 = (param_section *) 0 ; struct param_opt *arg2 = (struct param_opt *) 0 ; - struct param_opt *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -4075,6 +4077,7 @@ SWIGINTERN PyObject *_wrap_param_section_next_parameter(PyObject *SWIGUNUSEDPARM char * kwnames[] = { (char *) "self",(char *) "s", NULL }; + struct param_opt *result = 0 ; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:param_section_next_parameter",kwnames,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_param_section, 0 | 0 ); @@ -4123,7 +4126,6 @@ SWIGINTERN PyObject *_wrap_delete_param_section(PyObject *SWIGUNUSEDPARM(self), } arg1 = (param_section *)(argp1); free((char *) arg1); - resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -4250,18 +4252,18 @@ 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_int = {"_p_int", "int *|int_least32_t *|int32_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 *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_loadparm_context = {"_p_loadparm_context", "struct loadparm_context *|loadparm_context *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_loadparm_service = {"_p_loadparm_service", "struct loadparm_service *|loadparm_service *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_long = {"_p_long", "intptr_t *|int_least64_t *|int_fast32_t *|int_fast64_t *|int64_t *|long *|int_fast16_t *|intmax_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_param_context = {"_p_param_context", "struct param_context *|param *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_param_opt = {"_p_param_opt", "struct param_opt *|param_opt *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_param_section = {"_p_param_section", "struct param_section *|param_section *", 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_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", "uint_least32_t *|uint32_t *|unsigned int *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "uintptr_t *|uint_least64_t *|uint_fast32_t *|uint_fast64_t *|uint64_t *|unsigned long *|uint_fast16_t *|uintmax_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[] = { @@ -4270,7 +4272,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_int, &_swigt__p_loadparm_context, &_swigt__p_loadparm_service, - &_swigt__p_long, + &_swigt__p_long_long, &_swigt__p_param_context, &_swigt__p_param_opt, &_swigt__p_param_section, @@ -4278,7 +4280,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_signed_char, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, - &_swigt__p_unsigned_long, + &_swigt__p_unsigned_long_long, &_swigt__p_unsigned_short, }; @@ -4287,7 +4289,7 @@ static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_loadparm_context[] = { {&_swigt__p_loadparm_context, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_loadparm_service[] = { {&_swigt__p_loadparm_service, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_param_context[] = { {&_swigt__p_param_context, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_param_opt[] = { {&_swigt__p_param_opt, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_param_section[] = { {&_swigt__p_param_section, 0, 0, 0},{0, 0, 0, 0}}; @@ -4295,7 +4297,7 @@ static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { @@ -4304,7 +4306,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_int, _swigc__p_loadparm_context, _swigc__p_loadparm_service, - _swigc__p_long, + _swigc__p_long_long, _swigc__p_param_context, _swigc__p_param_opt, _swigc__p_param_section, @@ -4312,7 +4314,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_signed_char, _swigc__p_unsigned_char, _swigc__p_unsigned_int, - _swigc__p_unsigned_long, + _swigc__p_unsigned_long_long, _swigc__p_unsigned_short, }; diff --git a/source4/param/secrets.c b/source4/param/secrets.c index 16fbb3b108..576df0a4fe 100644 --- a/source4/param/secrets.c +++ b/source4/param/secrets.c @@ -27,9 +27,9 @@ #include "system/filesys.h" #include "tdb_wrap.h" #include "lib/ldb/include/ldb.h" -#include "lib/tdb/include/tdb.h" -#include "lib/util/util_tdb.h" -#include "lib/util/util_ldb.h" +#include "../tdb/include/tdb.h" +#include "../lib/util/util_tdb.h" +#include "../lib/util/util_ldb.h" #include "librpc/gen_ndr/ndr_security.h" /** diff --git a/source4/param/share_ldb.c b/source4/param/share_ldb.c index eba1665cc9..29664c7177 100644 --- a/source4/param/share_ldb.c +++ b/source4/param/share_ldb.c @@ -174,8 +174,8 @@ static NTSTATUS sldb_list_all(TALLOC_CTX *mem_ctx, ldb = talloc_get_type(ctx->priv_data, struct ldb_context); - ret = ldb_search(ldb, ldb_dn_new(tmp_ctx, ldb, "CN=SHARES"), LDB_SCOPE_SUBTREE, "(name=*)", NULL, &res); - talloc_steal(tmp_ctx, res); + ret = ldb_search(ldb, tmp_ctx, &res, ldb_dn_new(tmp_ctx, ldb, "CN=SHARES"), + LDB_SCOPE_SUBTREE, NULL, "(name=*)"); if (ret != LDB_SUCCESS) { talloc_free(tmp_ctx); return NT_STATUS_INTERNAL_DB_CORRUPTION; @@ -223,7 +223,7 @@ static NTSTATUS sldb_get_config(TALLOC_CTX *mem_ctx, ldb = talloc_get_type(ctx->priv_data, struct ldb_context); - ret = ldb_search_exp_fmt(ldb, tmp_ctx, &res, + ret = ldb_search(ldb, tmp_ctx, &res, ldb_dn_new(tmp_ctx, ldb, "CN=SHARES"), LDB_SCOPE_SUBTREE, NULL, "(name=%s)", name); if (ret != LDB_SUCCESS || res->count > 1) { @@ -287,7 +287,7 @@ static NTSTATUS sldb_get_config(TALLOC_CTX *mem_ctx, goto done; \ } } while(0) -NTSTATUS sldb_create(struct share_context *ctx, const char *name, struct share_info *info, int count) +static NTSTATUS sldb_create(struct share_context *ctx, const char *name, struct share_info *info, int count) { struct ldb_context *ldb; struct ldb_message *msg; @@ -426,7 +426,7 @@ done: goto done; \ } } while(0) -NTSTATUS sldb_set(struct share_context *ctx, const char *name, struct share_info *info, int count) +static NTSTATUS sldb_set(struct share_context *ctx, const char *name, struct share_info *info, int count) { struct ldb_context *ldb; struct ldb_message *msg; @@ -535,7 +535,7 @@ done: return ret; } -NTSTATUS sldb_remove(struct share_context *ctx, const char *name) +static NTSTATUS sldb_remove(struct share_context *ctx, const char *name) { struct ldb_context *ldb; struct ldb_dn *dn; |