summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/credentials/credentials.i13
-rw-r--r--source4/auth/credentials/credentials.py5
-rw-r--r--source4/auth/credentials/credentials_wrap.c106
-rw-r--r--source4/auth/credentials/tests/bindings.py2
-rw-r--r--source4/build/pasn1/asn1.yp2
-rw-r--r--source4/cldap_server/cldap_server.h2
-rw-r--r--source4/dsdb/samdb/ldb_modules/linked_attributes.c30
-rw-r--r--source4/dsdb/samdb/ldb_modules/partition.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/schema.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/schema_syntax.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/schema_syntax.h2
-rw-r--r--source4/dsdb/samdb/ldb_modules/subtree_delete.c6
-rw-r--r--source4/dsdb/samdb/ldb_modules/subtree_rename.c16
-rw-r--r--source4/ldap_server/ldap_backend.c11
-rw-r--r--source4/ldap_server/ldap_server.c4
-rwxr-xr-xsource4/lib/ldb/tests/python/ldap.py2
-rw-r--r--source4/lib/policy/adm.h2
-rw-r--r--source4/lib/policy/dumpadm.c2
-rw-r--r--source4/lib/policy/lex.c2
-rw-r--r--source4/lib/policy/lex.l2
-rw-r--r--source4/lib/policy/parse_adm.y2
-rw-r--r--source4/lib/registry/hive.c2
-rw-r--r--source4/lib/registry/hive.h2
-rw-r--r--source4/lib/registry/local.c2
-rw-r--r--source4/lib/registry/patchfile.h2
-rw-r--r--source4/lib/registry/patchfile_dotreg.c2
-rw-r--r--source4/lib/registry/patchfile_preg.c2
-rw-r--r--source4/lib/registry/tests/hive.c2
-rw-r--r--source4/lib/registry/tests/registry.c2
-rw-r--r--source4/lib/replace/samba.m42
-rw-r--r--source4/libcli/security/security.h2
-rw-r--r--source4/libnet/libnet_group.h2
-rw-r--r--source4/pidl/idl.yp2
-rw-r--r--source4/samba4-skip1
-rwxr-xr-xsource4/scripting/bin/smbstatus2
-rwxr-xr-xsource4/scripting/bin/winreg2
-rw-r--r--source4/scripting/libjs/auth.js2
-rw-r--r--source4/scripting/libjs/base.js2
-rw-r--r--source4/scripting/libjs/encoder.js2
-rw-r--r--source4/scripting/libjs/management.js2
-rw-r--r--source4/scripting/libjs/provision.js2
-rw-r--r--source4/scripting/libjs/samr.js2
-rw-r--r--source4/scripting/libjs/server_call.js2
-rw-r--r--source4/scripting/libjs/winreg.js2
-rw-r--r--source4/scripting/python/samba/getopt.py15
-rw-r--r--source4/scripting/python/samba/tests/samdb.py1
-rw-r--r--source4/scripting/python/subunit/__init__.py2
-rwxr-xr-xsource4/selftest/samba4_tests.sh2
-rwxr-xr-xsource4/selftest/test_win.sh2
-rw-r--r--source4/selftest/win/VMHost.pm2
-rw-r--r--source4/selftest/win/common.exp2
-rw-r--r--source4/selftest/win/vm_get_ip.pl2
-rw-r--r--source4/selftest/win/vm_load_snapshot.pl2
-rw-r--r--source4/selftest/win/wintest_client.exp2
-rw-r--r--source4/selftest/win/wintest_remove.exp2
-rw-r--r--source4/selftest/win/wintest_setup.exp2
-rw-r--r--source4/setup/enableaccount7
-rwxr-xr-xsource4/setup/newuser2
-rwxr-xr-xsource4/setup/provision5
-rw-r--r--source4/setup/provision-backend.js2
-rw-r--r--source4/setup/setpassword2
-rwxr-xr-xsource4/setup/upgrade.py6
-rw-r--r--source4/torture/rpc/dfs.c2
-rw-r--r--source4/torture/rpc/frsapi.c2
-rw-r--r--source4/torture/rpc/spoolss_notify.c2
-rw-r--r--source4/torture/util_provision.c7
67 files changed, 250 insertions, 87 deletions
diff --git a/source4/auth/credentials/credentials.i b/source4/auth/credentials/credentials.i
index 41ec67580e..0a604cf002 100644
--- a/source4/auth/credentials/credentials.i
+++ b/source4/auth/credentials/credentials.i
@@ -39,6 +39,10 @@ typedef struct cli_credentials cli_credentials;
$1 = NULL;
}
+%constant int AUTO_USE_KERBEROS = CRED_AUTO_USE_KERBEROS;
+%constant int DONT_USE_KERBEROS = CRED_DONT_USE_KERBEROS;
+%constant int MUST_USE_KERBEROS = CRED_MUST_USE_KERBEROS;
+
%{
#include "librpc/gen_ndr/samr.h" /* for struct samr_Password */
%}
@@ -52,7 +56,7 @@ typedef struct cli_credentials cli_credentials;
typedef struct cli_credentials {
%extend {
cli_credentials(void) {
- return cli_credentials_init_anon(NULL);
+ return cli_credentials_init(NULL);
}
/* username */
const char *get_username(void);
@@ -74,13 +78,18 @@ typedef struct cli_credentials {
bool set_realm(const char *val,
enum credentials_obtained=CRED_SPECIFIED);
+ /* Kerberos */
+ void set_kerberos_state(enum credentials_use_kerberos use_kerberos);
+
void parse_string(const char *text,
- enum credentials_obtained=CRED_SPECIFIED);
+ enum credentials_obtained=CRED_SPECIFIED);
/* bind dn */
const char *get_bind_dn(void);
bool set_bind_dn(const char *bind_dn);
+ void set_anonymous();
+
/* workstation name */
const char *get_workstation(void);
bool set_workstation(const char *workstation,
diff --git a/source4/auth/credentials/credentials.py b/source4/auth/credentials/credentials.py
index 14526af910..2b40fbeead 100644
--- a/source4/auth/credentials/credentials.py
+++ b/source4/auth/credentials/credentials.py
@@ -58,6 +58,9 @@ def _swig_setattr_nondynamic_method(set):
import param
+AUTO_USE_KERBEROS = _credentials.AUTO_USE_KERBEROS
+DONT_USE_KERBEROS = _credentials.DONT_USE_KERBEROS
+MUST_USE_KERBEROS = _credentials.MUST_USE_KERBEROS
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
@@ -72,9 +75,11 @@ Credentials.get_domain = new_instancemethod(_credentials.Credentials_get_domain,
Credentials.set_domain = new_instancemethod(_credentials.Credentials_set_domain,None,Credentials)
Credentials.get_realm = new_instancemethod(_credentials.Credentials_get_realm,None,Credentials)
Credentials.set_realm = new_instancemethod(_credentials.Credentials_set_realm,None,Credentials)
+Credentials.set_kerberos_state = new_instancemethod(_credentials.Credentials_set_kerberos_state,None,Credentials)
Credentials.parse_string = new_instancemethod(_credentials.Credentials_parse_string,None,Credentials)
Credentials.get_bind_dn = new_instancemethod(_credentials.Credentials_get_bind_dn,None,Credentials)
Credentials.set_bind_dn = new_instancemethod(_credentials.Credentials_set_bind_dn,None,Credentials)
+Credentials.set_anonymous = new_instancemethod(_credentials.Credentials_set_anonymous,None,Credentials)
Credentials.get_workstation = new_instancemethod(_credentials.Credentials_get_workstation,None,Credentials)
Credentials.set_workstation = new_instancemethod(_credentials.Credentials_set_workstation,None,Credentials)
Credentials.guess = new_instancemethod(_credentials.Credentials_guess,None,Credentials)
diff --git a/source4/auth/credentials/credentials_wrap.c b/source4/auth/credentials/credentials_wrap.c
index b1b904c8a3..909233aaff 100644
--- a/source4/auth/credentials/credentials_wrap.c
+++ b/source4/auth/credentials/credentials_wrap.c
@@ -2462,7 +2462,7 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags)
#define SWIGTYPE_p_int swig_types[3]
#define SWIGTYPE_p_loadparm_context swig_types[4]
#define SWIGTYPE_p_loadparm_service swig_types[5]
-#define SWIGTYPE_p_long_long swig_types[6]
+#define SWIGTYPE_p_long swig_types[6]
#define SWIGTYPE_p_param_context swig_types[7]
#define SWIGTYPE_p_param_opt swig_types[8]
#define SWIGTYPE_p_param_section swig_types[9]
@@ -2470,7 +2470,7 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags)
#define SWIGTYPE_p_signed_char swig_types[11]
#define SWIGTYPE_p_unsigned_char swig_types[12]
#define SWIGTYPE_p_unsigned_int swig_types[13]
-#define SWIGTYPE_p_unsigned_long_long swig_types[14]
+#define SWIGTYPE_p_unsigned_long swig_types[14]
#define SWIGTYPE_p_unsigned_short swig_types[15]
static swig_type_info *swig_types[17];
static swig_module_info swig_module = {swig_types, 16, 0, 0, 0, 0};
@@ -2525,10 +2525,20 @@ static swig_module_info swig_module = {swig_types, 16, 0, 0, 0, 0};
typedef struct cli_credentials cli_credentials;
+ #define SWIG_From_long PyInt_FromLong
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_int (int value)
+{
+ return SWIG_From_long (value);
+}
+
+
#include "librpc/gen_ndr/samr.h" /* for struct samr_Password */
SWIGINTERN cli_credentials *new_cli_credentials(){
- return cli_credentials_init_anon(NULL);
+ return cli_credentials_init(NULL);
}
SWIGINTERN swig_type_info*
@@ -3131,6 +3141,44 @@ fail:
}
+SWIGINTERN PyObject *_wrap_Credentials_set_kerberos_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
+ PyObject *resultobj = 0;
+ cli_credentials *arg1 = (cli_credentials *) 0 ;
+ enum credentials_use_kerberos arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ char * kwnames[] = {
+ (char *) "self",(char *) "use_kerberos", NULL
+ };
+
+ arg1 = NULL;
+ if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:Credentials_set_kerberos_state",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_kerberos_state" "', argument " "1"" of type '" "cli_credentials *""'");
+ }
+ arg1 = (cli_credentials *)(argp1);
+ }
+ if (obj1) {
+ ecode2 = SWIG_AsVal_int(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Credentials_set_kerberos_state" "', argument " "2"" of type '" "enum credentials_use_kerberos""'");
+ }
+ arg2 = (enum credentials_use_kerberos)(val2);
+ }
+ cli_credentials_set_kerberos_state(arg1,arg2);
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_Credentials_parse_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
cli_credentials *arg1 = (cli_credentials *) 0 ;
@@ -3253,6 +3301,33 @@ fail:
}
+SWIGINTERN PyObject *_wrap_Credentials_set_anonymous(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:Credentials_set_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_set_anonymous" "', argument " "1"" of type '" "cli_credentials *""'");
+ }
+ arg1 = (cli_credentials *)(argp1);
+ }
+ cli_credentials_set_anonymous(arg1);
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_Credentials_get_workstation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
cli_credentials *arg1 = (cli_credentials *) 0 ;
@@ -3564,9 +3639,11 @@ static PyMethodDef SwigMethods[] = {
{ (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_set_kerberos_state", (PyCFunction) _wrap_Credentials_set_kerberos_state, 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_set_anonymous", (PyCFunction) _wrap_Credentials_set_anonymous, 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},
@@ -3587,18 +3664,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_cli_credentials = {"_p_cli_credentials", "struct cli_credentials *|cli_credentials *", 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_int = {"_p_int", "int *|int_least32_t *|int32_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_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_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_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", "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_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_short = {"_p_unsigned_short", "unsigned short *|uint_least16_t *|uint16_t *", 0, 0, (void*)0, 0};
static swig_type_info *swig_type_initial[] = {
@@ -3608,7 +3685,7 @@ static swig_type_info *swig_type_initial[] = {
&_swigt__p_int,
&_swigt__p_loadparm_context,
&_swigt__p_loadparm_service,
- &_swigt__p_long_long,
+ &_swigt__p_long,
&_swigt__p_param_context,
&_swigt__p_param_opt,
&_swigt__p_param_section,
@@ -3616,7 +3693,7 @@ static swig_type_info *swig_type_initial[] = {
&_swigt__p_signed_char,
&_swigt__p_unsigned_char,
&_swigt__p_unsigned_int,
- &_swigt__p_unsigned_long_long,
+ &_swigt__p_unsigned_long,
&_swigt__p_unsigned_short,
};
@@ -3626,7 +3703,7 @@ static swig_cast_info _swigc__p_cli_credentials[] = { {&_swigt__p_cli_credentia
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_long[] = { {&_swigt__p_long_long, 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_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}};
@@ -3634,7 +3711,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_long[] = { {&_swigt__p_unsigned_long_long, 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_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info *swig_cast_initial[] = {
@@ -3644,7 +3721,7 @@ static swig_cast_info *swig_cast_initial[] = {
_swigc__p_int,
_swigc__p_loadparm_context,
_swigc__p_loadparm_service,
- _swigc__p_long_long,
+ _swigc__p_long,
_swigc__p_param_context,
_swigc__p_param_opt,
_swigc__p_param_section,
@@ -3652,7 +3729,7 @@ static swig_cast_info *swig_cast_initial[] = {
_swigc__p_signed_char,
_swigc__p_unsigned_char,
_swigc__p_unsigned_int,
- _swigc__p_unsigned_long_long,
+ _swigc__p_unsigned_long,
_swigc__p_unsigned_short,
};
@@ -4174,5 +4251,8 @@ SWIGEXPORT void SWIG_init(void) {
SWIG_InstallConstants(d,swig_const_table);
+ SWIG_Python_SetConstant(d, "AUTO_USE_KERBEROS",SWIG_From_int((int)(CRED_AUTO_USE_KERBEROS)));
+ SWIG_Python_SetConstant(d, "DONT_USE_KERBEROS",SWIG_From_int((int)(CRED_DONT_USE_KERBEROS)));
+ SWIG_Python_SetConstant(d, "MUST_USE_KERBEROS",SWIG_From_int((int)(CRED_MUST_USE_KERBEROS)));
}
diff --git a/source4/auth/credentials/tests/bindings.py b/source4/auth/credentials/tests/bindings.py
index d2ca68d115..d0a99502c1 100644
--- a/source4/auth/credentials/tests/bindings.py
+++ b/source4/auth/credentials/tests/bindings.py
@@ -67,6 +67,8 @@ class CredentialsTests(unittest.TestCase):
self.assertTrue(self.creds.is_anonymous())
self.creds.set_username("somebody")
self.assertFalse(self.creds.is_anonymous())
+ self.creds.set_anonymous()
+ self.assertTrue(self.creds.is_anonymous())
def test_workstation(self):
# FIXME: This is uninitialised, it should be None
diff --git a/source4/build/pasn1/asn1.yp b/source4/build/pasn1/asn1.yp
index 9a77bbc31a..7fc834ff2b 100644
--- a/source4/build/pasn1/asn1.yp
+++ b/source4/build/pasn1/asn1.yp
@@ -1,7 +1,7 @@
########################
# ASN.1 Parse::Yapp parser
# Copyright (C) Stefan (metze) Metzmacher <metze@samba.org>
-# released under the GNU GPL version 2 or later
+# released under the GNU GPL version 3 or later
diff --git a/source4/cldap_server/cldap_server.h b/source4/cldap_server/cldap_server.h
index e683d2b83f..da2bd20050 100644
--- a/source4/cldap_server/cldap_server.h
+++ b/source4/cldap_server/cldap_server.h
@@ -29,4 +29,6 @@ struct cldapd_server {
struct ldb_context *samctx;
};
+struct ldap_SearchRequest;
+
#include "cldap_server/proto.h"
diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
index 8685c722aa..04b9987071 100644
--- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c
+++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
@@ -520,6 +520,12 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
talloc_steal(new_req, attrs);
+ ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
+
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+
/* Create a spot in the list for the requests */
ac->down_req = talloc_realloc(ac, ac->down_req,
struct ldb_request *, ac->num_requests + 1);
@@ -568,6 +574,12 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
talloc_steal(new_req, attrs);
+ ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
+
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+
/* Create a spot in the list for the requests */
ac->down_req = talloc_realloc(ac, ac->down_req,
struct ldb_request *, ac->num_requests + 1);
@@ -629,7 +641,11 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
talloc_steal(new_req, new_msg);
- ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
+ ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
+
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
/* Now add it to the list */
ac->down_req = talloc_realloc(ac, ac->down_req,
@@ -752,6 +768,12 @@ static int linked_attributes_rename(struct ldb_module *module, struct ldb_reques
talloc_steal(new_req, attrs);
+ ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
+
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+
ac->search_req = new_req;
ac->step = LA_SEARCH;
return ldb_next_request(module, new_req);
@@ -805,6 +827,12 @@ static int linked_attributes_delete(struct ldb_module *module, struct ldb_reques
talloc_steal(new_req, attrs);
+ ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
+
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+
ac->search_req = new_req;
ac->step = LA_SEARCH;
return ldb_next_request(module, new_req);
diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c
index 78b5a09f78..56b05691bb 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -6,7 +6,7 @@
Copyright (C) Stefan Metzmacher <metze@samba.org> 2007
* NOTICE: this module is NOT released under the GNU LGPL license as
- * other ldb code. This module is release under the GNU GPL v2 or
+ * other ldb code. This module is release under the GNU GPL v3 or
* later license.
This program is free software; you can redistribute it and/or modify
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 5407db9956..3b67ca19d3 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -5,7 +5,7 @@
Copyright (C) Andrew Bartlett <abartlet@samba.org> 2005
* NOTICE: this module is NOT released under the GNU LGPL license as
- * other ldb code. This module is release under the GNU GPL v2 or
+ * other ldb code. This module is release under the GNU GPL v3 or
* later license.
This program is free software; you can redistribute it and/or modify
diff --git a/source4/dsdb/samdb/ldb_modules/schema.c b/source4/dsdb/samdb/ldb_modules/schema.c
index ff9530ca92..f2c4d38305 100644
--- a/source4/dsdb/samdb/ldb_modules/schema.c
+++ b/source4/dsdb/samdb/ldb_modules/schema.c
@@ -25,8 +25,6 @@
* Description: add schema check functionality
*
* Author: Simo Sorce
- *
- * License: GNU GPL v2 or Later
*/
#include "includes.h"
diff --git a/source4/dsdb/samdb/ldb_modules/schema_syntax.c b/source4/dsdb/samdb/ldb_modules/schema_syntax.c
index f737cc6fdc..d800e4b6d2 100644
--- a/source4/dsdb/samdb/ldb_modules/schema_syntax.c
+++ b/source4/dsdb/samdb/ldb_modules/schema_syntax.c
@@ -25,8 +25,6 @@
* Description: add schema syntax functionality
*
* Author: Simo Sorce
- *
- * License: GNU GPL v2 or Later
*/
#include "includes.h"
diff --git a/source4/dsdb/samdb/ldb_modules/schema_syntax.h b/source4/dsdb/samdb/ldb_modules/schema_syntax.h
index fa3fdbe5a2..37f7584d41 100644
--- a/source4/dsdb/samdb/ldb_modules/schema_syntax.h
+++ b/source4/dsdb/samdb/ldb_modules/schema_syntax.h
@@ -25,8 +25,6 @@
* Description: add schema syntax functionality
*
* Author: Simo Sorce
- *
- * License: GNU GPL v2 or Later
*/
diff --git a/source4/dsdb/samdb/ldb_modules/subtree_delete.c b/source4/dsdb/samdb/ldb_modules/subtree_delete.c
index 56ae7b239a..9c332d2969 100644
--- a/source4/dsdb/samdb/ldb_modules/subtree_delete.c
+++ b/source4/dsdb/samdb/ldb_modules/subtree_delete.c
@@ -160,6 +160,12 @@ static int subtree_delete(struct ldb_module *module, struct ldb_request *req)
return ret;
}
+ ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
+
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+
ac->search_req = new_req;
if (req == NULL) {
ldb_oom(ac->module->ldb);
diff --git a/source4/dsdb/samdb/ldb_modules/subtree_rename.c b/source4/dsdb/samdb/ldb_modules/subtree_rename.c
index bf8124e253..fd1388d416 100644
--- a/source4/dsdb/samdb/ldb_modules/subtree_rename.c
+++ b/source4/dsdb/samdb/ldb_modules/subtree_rename.c
@@ -117,7 +117,15 @@ static int subtree_rename_search_callback(struct ldb_context *ldb, void *context
NULL,
NULL);
- if (ret != LDB_SUCCESS) return ret;
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+
+ ret = ldb_set_timeout_from_prev_req(ldb, ac->orig_req, req);
+
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
talloc_steal(req, newdn);
@@ -186,6 +194,12 @@ static int subtree_rename(struct ldb_module *module, struct ldb_request *req)
return ret;
}
+ ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
+
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+
ac->down_req = talloc_realloc(ac, ac->down_req,
struct ldb_request *, ac->num_requests + 1);
if (!ac->down_req) {
diff --git a/source4/ldap_server/ldap_backend.c b/source4/ldap_server/ldap_backend.c
index 346aacaa99..9b43d7bd74 100644
--- a/source4/ldap_server/ldap_backend.c
+++ b/source4/ldap_server/ldap_backend.c
@@ -216,9 +216,6 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
lreq = talloc(local_ctx, struct ldb_request);
NT_STATUS_HAVE_NO_MEMORY(lreq);
- res = talloc_zero(local_ctx, struct ldb_result);
- NT_STATUS_HAVE_NO_MEMORY(res);
-
lreq->operation = LDB_SEARCH;
lreq->op.search.base = basedn;
lreq->op.search.scope = scope;
@@ -242,6 +239,9 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
}
}
+ res = talloc_zero(lreq, struct ldb_result);
+ NT_STATUS_HAVE_NO_MEMORY(res);
+
lreq->context = res;
lreq->callback = ldb_search_default_callback;
@@ -261,6 +261,11 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
ent_r = ldapsrv_init_reply(call, LDAP_TAG_SearchResultEntry);
NT_STATUS_HAVE_NO_MEMORY(ent_r);
+ /* Better to have the whole message kept here,
+ * than to find someone further up didn't put
+ * a value in the right spot in the talloc tree */
+ talloc_steal(ent_r, res->msgs[i]);
+
ent = &ent_r->msg->r.SearchResultEntry;
ent->dn = ldb_dn_alloc_linearized(ent_r, res->msgs[i]->dn);
ent->num_attributes = 0;
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index 5b2519c035..ce80941e03 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -155,8 +155,10 @@ static NTSTATUS ldapsrv_decode(void *private, DATA_BLOB blob)
}
data_blob_free(&blob);
- ldapsrv_process_message(conn, msg);
+ talloc_steal(conn, msg);
asn1_free(asn1);
+
+ ldapsrv_process_message(conn, msg);
return NT_STATUS_OK;
}
diff --git a/source4/lib/ldb/tests/python/ldap.py b/source4/lib/ldb/tests/python/ldap.py
index f75bb8124d..ead5796b7b 100755
--- a/source4/lib/ldb/tests/python/ldap.py
+++ b/source4/lib/ldb/tests/python/ldap.py
@@ -25,7 +25,6 @@ parser.add_option_group(options.VersionOptions(parser))
# use command line creds if available
credopts = options.CredentialsOptions(parser)
parser.add_option_group(credopts)
-creds = credopts.get_credentials()
opts, args = parser.parse_args()
if len(args) < 1:
@@ -35,6 +34,7 @@ if len(args) < 1:
host = args[0]
lp = sambaopts.get_loadparm()
+creds = credopts.get_credentials(lp)
class BasicTests(unittest.TestCase):
def delete_force(self, ldb, dn):
diff --git a/source4/lib/policy/adm.h b/source4/lib/policy/adm.h
index 90889fe5fa..c541ced6ff 100644
--- a/source4/lib/policy/adm.h
+++ b/source4/lib/policy/adm.h
@@ -5,7 +5,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/source4/lib/policy/dumpadm.c b/source4/lib/policy/dumpadm.c
index 1553ce62f6..2ed5abf111 100644
--- a/source4/lib/policy/dumpadm.c
+++ b/source4/lib/policy/dumpadm.c
@@ -5,7 +5,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/source4/lib/policy/lex.c b/source4/lib/policy/lex.c
index c2899aa808..6d524445c9 100644
--- a/source4/lib/policy/lex.c
+++ b/source4/lib/policy/lex.c
@@ -572,7 +572,7 @@ char *yytext;
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/source4/lib/policy/lex.l b/source4/lib/policy/lex.l
index 199cd228c0..dc1f0aa34e 100644
--- a/source4/lib/policy/lex.l
+++ b/source4/lib/policy/lex.l
@@ -5,7 +5,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/source4/lib/policy/parse_adm.y b/source4/lib/policy/parse_adm.y
index 1dc21cf1d3..23c5e7730e 100644
--- a/source4/lib/policy/parse_adm.y
+++ b/source4/lib/policy/parse_adm.y
@@ -5,7 +5,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/source4/lib/registry/hive.c b/source4/lib/registry/hive.c
index ad6a6421ab..fc2d0fe869 100644
--- a/source4/lib/registry/hive.c
+++ b/source4/lib/registry/hive.c
@@ -6,7 +6,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/source4/lib/registry/hive.h b/source4/lib/registry/hive.h
index 87f335663d..2410885718 100644
--- a/source4/lib/registry/hive.h
+++ b/source4/lib/registry/hive.h
@@ -5,7 +5,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/source4/lib/registry/local.c b/source4/lib/registry/local.c
index 3e463100c9..5bf2d86588 100644
--- a/source4/lib/registry/local.c
+++ b/source4/lib/registry/local.c
@@ -5,7 +5,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/source4/lib/registry/patchfile.h b/source4/lib/registry/patchfile.h
index 9289390685..d586aa4c31 100644
--- a/source4/lib/registry/patchfile.h
+++ b/source4/lib/registry/patchfile.h
@@ -6,7 +6,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/source4/lib/registry/patchfile_dotreg.c b/source4/lib/registry/patchfile_dotreg.c
index 6de642ecb8..5150c90291 100644
--- a/source4/lib/registry/patchfile_dotreg.c
+++ b/source4/lib/registry/patchfile_dotreg.c
@@ -7,7 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/source4/lib/registry/patchfile_preg.c b/source4/lib/registry/patchfile_preg.c
index 0d39e67450..8f02a0b5e3 100644
--- a/source4/lib/registry/patchfile_preg.c
+++ b/source4/lib/registry/patchfile_preg.c
@@ -6,7 +6,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/source4/lib/registry/tests/hive.c b/source4/lib/registry/tests/hive.c
index 1e56f125c5..70b0241b04 100644
--- a/source4/lib/registry/tests/hive.c
+++ b/source4/lib/registry/tests/hive.c
@@ -7,7 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/source4/lib/registry/tests/registry.c b/source4/lib/registry/tests/registry.c
index 7d14b3a412..e5e34c11e0 100644
--- a/source4/lib/registry/tests/registry.c
+++ b/source4/lib/registry/tests/registry.c
@@ -7,7 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/source4/lib/replace/samba.m4 b/source4/lib/replace/samba.m4
index e62c3d3cd1..7984ef31db 100644
--- a/source4/lib/replace/samba.m4
+++ b/source4/lib/replace/samba.m4
@@ -23,7 +23,7 @@ done
SMB_SUBSYSTEM(LIBREPLACE,
[${LIBREPLACE_OBJS}],
- [LIBREPLACE_EXT],
+ [LIBREPLACE_EXT LIBREPLACE_NETWORK],
[-Ilib/replace])
LIBREPLACE_HOSTCC_OBJS=`echo ${LIBREPLACE_OBJS} |sed -e 's/\.o/\.ho/g'`
diff --git a/source4/libcli/security/security.h b/source4/libcli/security/security.h
index c7f2a09311..46ef6186b8 100644
--- a/source4/libcli/security/security.h
+++ b/source4/libcli/security/security.h
@@ -26,4 +26,6 @@ enum security_user_level {
SECURITY_SYSTEM
};
+struct auth_session_info;
+
#include "libcli/security/proto.h"
diff --git a/source4/libnet/libnet_group.h b/source4/libnet/libnet_group.h
index 5da194c36e..3156b1f32f 100644
--- a/source4/libnet/libnet_group.h
+++ b/source4/libnet/libnet_group.h
@@ -5,7 +5,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/source4/pidl/idl.yp b/source4/pidl/idl.yp
index c7ca0c7604..a0323af8ee 100644
--- a/source4/pidl/idl.yp
+++ b/source4/pidl/idl.yp
@@ -1,7 +1,7 @@
########################
# IDL Parse::Yapp parser
# Copyright (C) Andrew Tridgell <tridge@samba.org>
-# released under the GNU GPL version 2 or later
+# released under the GNU GPL version 3 or later
diff --git a/source4/samba4-skip b/source4/samba4-skip
index 4d2da6ed64..19ff924794 100644
--- a/source4/samba4-skip
+++ b/source4/samba4-skip
@@ -46,3 +46,4 @@ nss.test # Fails
samba4.samba3sam.python # Conversion from EJS not yet finished
samba4.samdb.python # Not finished yet
raw.offline # Samba 4 doesn't have much offline support yet
+winreg* #Does not authenticate against the target server
diff --git a/source4/scripting/bin/smbstatus b/source4/scripting/bin/smbstatus
index ea41289dce..4dfc3365a1 100755
--- a/source4/scripting/bin/smbstatus
+++ b/source4/scripting/bin/smbstatus
@@ -3,7 +3,7 @@ exec smbscript "$0" ${1+"$@"}
/*
provide information on connected users and open files
Copyright Andrew Tridgell 2005
- Released under the GNU GPL v2 or later
+ Released under the GNU GPL version 3 or later
*/
libinclude("base.js");
diff --git a/source4/scripting/bin/winreg b/source4/scripting/bin/winreg
index 2114394f45..883c6d7ee3 100755
--- a/source4/scripting/bin/winreg
+++ b/source4/scripting/bin/winreg
@@ -3,7 +3,7 @@ exec smbscript "$0" ${1+"$@"}
/*
tool to manipulate a remote registry
Copyright Andrew Tridgell 2005
- Released under the GNU GPL v2 or later
+ Released under the GNU GPL version 3 or later
*/
var options = GetOptions(ARGV,
diff --git a/source4/scripting/libjs/auth.js b/source4/scripting/libjs/auth.js
index 73d8645218..3fe81d0ea7 100644
--- a/source4/scripting/libjs/auth.js
+++ b/source4/scripting/libjs/auth.js
@@ -1,7 +1,7 @@
/*
auth js library functions
Copyright Andrew Tridgell 2005
- released under the GNU GPL v2 or later
+ released under the GNU GPL version 3 or later
*/
diff --git a/source4/scripting/libjs/base.js b/source4/scripting/libjs/base.js
index df0bfe0ce9..d861073a07 100644
--- a/source4/scripting/libjs/base.js
+++ b/source4/scripting/libjs/base.js
@@ -1,7 +1,7 @@
/*
base js library functions
Copyright Andrew Tridgell 2005
- released under the GNU GPL v2 or later
+ released under the GNU GPL version 3 or later
*/
if (global["HAVE_BASE_JS"] != undefined) {
diff --git a/source4/scripting/libjs/encoder.js b/source4/scripting/libjs/encoder.js
index d96b859547..6cb780c00d 100644
--- a/source4/scripting/libjs/encoder.js
+++ b/source4/scripting/libjs/encoder.js
@@ -2,7 +2,7 @@
server side js functions for encoding/decoding objects into linear strings
Copyright Andrew Tridgell 2005
- released under the GNU GPL Version 2 or later
+ released under the GNU GPL Version 3 or later
*/
/*
usage:
diff --git a/source4/scripting/libjs/management.js b/source4/scripting/libjs/management.js
index e54b5e283b..4a43275156 100644
--- a/source4/scripting/libjs/management.js
+++ b/source4/scripting/libjs/management.js
@@ -1,7 +1,7 @@
/*
backend code for Samba4 management
Copyright Andrew Tridgell 2005
- Released under the GNU GPL v2 or later
+ Released under the GNU GPL version 3 or later
*/
diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js
index 86baa0c003..51e2785762 100644
--- a/source4/scripting/libjs/provision.js
+++ b/source4/scripting/libjs/provision.js
@@ -1,7 +1,7 @@
/*
backend code for provisioning a Samba4 server
Copyright Andrew Tridgell 2005
- Released under the GNU GPL v2 or later
+ Released under the GNU GPL version 3 or later
*/
sys = sys_init();
diff --git a/source4/scripting/libjs/samr.js b/source4/scripting/libjs/samr.js
index a7d7d964fb..6e8c70af3c 100644
--- a/source4/scripting/libjs/samr.js
+++ b/source4/scripting/libjs/samr.js
@@ -1,7 +1,7 @@
/*
samr rpc utility functions
Copyright Andrew Tridgell 2005
- released under the GNU GPL v2 or later
+ released under the GNU GPL version 3 or later
*/
if (global["HAVE_SAMR_JS"] != undefined) {
diff --git a/source4/scripting/libjs/server_call.js b/source4/scripting/libjs/server_call.js
index a8c08780f9..46414a90dd 100644
--- a/source4/scripting/libjs/server_call.js
+++ b/source4/scripting/libjs/server_call.js
@@ -2,7 +2,7 @@
server side js functions for handling async calls from js clients
Copyright Andrew Tridgell 2005
- released under the GNU GPL Version 2 or later
+ released under the GNU GPL Version 3 or later
*/
libinclude("encoder.js");
diff --git a/source4/scripting/libjs/winreg.js b/source4/scripting/libjs/winreg.js
index 29338abc5a..9db415694d 100644
--- a/source4/scripting/libjs/winreg.js
+++ b/source4/scripting/libjs/winreg.js
@@ -1,7 +1,7 @@
/*
winreg rpc utility functions
Copyright Andrew Tridgell 2005
- released under the GNU GPL v2 or later
+ released under the GNU GPL version 3 or later
*/
libinclude("base.js");
diff --git a/source4/scripting/python/samba/getopt.py b/source4/scripting/python/samba/getopt.py
index 088a5acf6f..82cb004b62 100644
--- a/source4/scripting/python/samba/getopt.py
+++ b/source4/scripting/python/samba/getopt.py
@@ -18,7 +18,7 @@
#
import optparse
-from credentials import Credentials
+from credentials import Credentials, AUTO_USE_KERBEROS, DONT_USE_KERBEROS, MUST_USE_KERBEROS
class SambaOptions(optparse.OptionGroup):
def __init__(self, parser):
@@ -65,6 +65,9 @@ class CredentialsOptions(optparse.OptionGroup):
help="Workgroup", callback=self._parse_workgroup)
self.add_option("-N", "--no-pass", action="store_true",
help="Don't ask for a password")
+ self.add_option("-k", "--kerberos", metavar="KERBEROS",
+ action="callback", type=str,
+ help="Use Kerberos", callback=self._set_kerberos)
self.creds = Credentials()
def _parse_username(self, option, opt_str, arg, parser):
@@ -76,11 +79,17 @@ class CredentialsOptions(optparse.OptionGroup):
def _set_password(self, option, opt_str, arg, parser):
self.creds.set_password(arg)
+ def _set_kerberos(self, option, opt_str, arg, parser):
+ if bool(arg) or arg.lower() == "yes":
+ self.creds.set_kerberos_state(MUST_USE_KERBEROS)
+ else:
+ self.creds.set_kerberos_state(DONT_USE_KERBEROS)
+
def _set_simple_bind_dn(self, option, opt_str, arg, parser):
self.creds.set_bind_dn(arg)
- def get_credentials(self):
- self.creds.guess()
+ def get_credentials(self, lp):
+ self.creds.guess(lp)
if not self.no_pass:
self.creds.set_cmdline_callbacks()
return self.creds
diff --git a/source4/scripting/python/samba/tests/samdb.py b/source4/scripting/python/samba/tests/samdb.py
index 40e56bebb5..3745dba6fc 100644
--- a/source4/scripting/python/samba/tests/samdb.py
+++ b/source4/scripting/python/samba/tests/samdb.py
@@ -38,6 +38,7 @@ class SamDBTestCase(TestCaseInTempDir):
policyguid = uuid.random()
setup_path = lambda x: os.path.join("setup", x)
creds = Credentials()
+ creds.set_anonymous()
domainsid = security.random_sid()
hostguid = uuid.random()
path = os.path.join(self.tempdir, "samdb.ldb")
diff --git a/source4/scripting/python/subunit/__init__.py b/source4/scripting/python/subunit/__init__.py
index 3abfbf522e..ac3d0c3a40 100644
--- a/source4/scripting/python/subunit/__init__.py
+++ b/source4/scripting/python/subunit/__init__.py
@@ -5,7 +5,7 @@
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
diff --git a/source4/selftest/samba4_tests.sh b/source4/selftest/samba4_tests.sh
index 8102095958..64b2c7b564 100755
--- a/source4/selftest/samba4_tests.sh
+++ b/source4/selftest/samba4_tests.sh
@@ -266,7 +266,7 @@ fi
bbdir=$incdir/../../testprogs/blackbox
plantest "blackbox.smbclient" dc $bbdir/test_smbclient.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX"
-plantest "blackbox.kinit" dc $bbdir/test_kinit.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX"
+plantest "blackbox.kinit" dc $bbdir/test_kinit.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX" $CONFIGURATION
plantest "blackbox.cifsdd" dc $bbdir/test_cifsdd.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN"
plantest "blackbox.nmblookup" dc $samba4srcdir/utils/tests/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP"
plantest "blackbox.nmblookup" member $samba4srcdir/utils/tests/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP"
diff --git a/source4/selftest/test_win.sh b/source4/selftest/test_win.sh
index 960bd20ded..bc40620af5 100755
--- a/source4/selftest/test_win.sh
+++ b/source4/selftest/test_win.sh
@@ -5,7 +5,7 @@
# run the test,
# and remove the previously configured directory and share.
# Copyright Brad Henry <brad@samba.org> 2006
-# Released under the GNU GPL v2 or later.
+# Released under the GNU GPL version 3 or later.
. selftest/test_functions.sh
diff --git a/source4/selftest/win/VMHost.pm b/source4/selftest/win/VMHost.pm
index 359d8df315..1f02f21c28 100644
--- a/source4/selftest/win/VMHost.pm
+++ b/source4/selftest/win/VMHost.pm
@@ -3,7 +3,7 @@
# A perl object to provide a simple, unified method of handling some
# VMware Server VM management functions using the perl and VIX API's.
# Copyright Brad Henry <brad@samba.org> 2006
-# Released under the GNU GPL v2 or later.
+# Released under the GNU GPL version 3 or later.
# VMware Perl API
use VMware::VmPerl;
diff --git a/source4/selftest/win/common.exp b/source4/selftest/win/common.exp
index a7ba95d722..28a3d7a6a1 100644
--- a/source4/selftest/win/common.exp
+++ b/source4/selftest/win/common.exp
@@ -1,6 +1,6 @@
# A library of commonly used functions written in expect.
# Copyright Brad Henry <brad@samba.org> 2006
-# Released under the GNU GPL v2 or later.
+# Released under the GNU GPL version 3 or later.
# This function maps a drive letter to a share point.
proc map_share { remote_prompt share_drive sharepoint username domain password } {
diff --git a/source4/selftest/win/vm_get_ip.pl b/source4/selftest/win/vm_get_ip.pl
index 9286786155..9657a34790 100644
--- a/source4/selftest/win/vm_get_ip.pl
+++ b/source4/selftest/win/vm_get_ip.pl
@@ -2,7 +2,7 @@
# A perl script to connect to a VMware server and get the IP address of a VM.
# Copyright Brad Henry <brad@samba.org> 2006
-# Released under the GNU GPL v2 or later.
+# Released under the GNU GPL version 3 or later.
use VMHost;
diff --git a/source4/selftest/win/vm_load_snapshot.pl b/source4/selftest/win/vm_load_snapshot.pl
index e8ba9b39cf..35e80badce 100644
--- a/source4/selftest/win/vm_load_snapshot.pl
+++ b/source4/selftest/win/vm_load_snapshot.pl
@@ -2,7 +2,7 @@
# A perl script to connect to a VMware server and revert a VM snapshot.
# Copyright Brad Henry <brad@samba.org> 2006
-# Released under the GNU GPL v2 or later.
+# Released under the GNU GPL version 3 or later.
use VMHost;
diff --git a/source4/selftest/win/wintest_client.exp b/source4/selftest/win/wintest_client.exp
index 5b45eb2bb0..ccf5d06ea9 100644
--- a/source4/selftest/win/wintest_client.exp
+++ b/source4/selftest/win/wintest_client.exp
@@ -1,7 +1,7 @@
# An expect script to create a temporary file, map a share, copy the file to the share,
# and compare the contents of the two files.
# Copyright Brad Henry <brad@samba.org> 2006
-# Released under the GNU GPL v2 or later.
+# Released under the GNU GPL version 3 or later.
proc run_test { remote_prompt tmp_filename share_drive host_drive buildhost_ip buildhost_share username domain password } {
diff --git a/source4/selftest/win/wintest_remove.exp b/source4/selftest/win/wintest_remove.exp
index a361db2958..36dc4a7d24 100644
--- a/source4/selftest/win/wintest_remove.exp
+++ b/source4/selftest/win/wintest_remove.exp
@@ -1,7 +1,7 @@
# An expect script to remove a directory and share which was
# previously setup for an smbtorture test.
# Copyright Brad Henry <brad@samba.org> 2006
-# Released under the GNU GPL v2 or later.
+# Released under the GNU GPL version 3 or later.
proc remove_test { remote_prompt sharepath sharename hosts_file_path \
backup_hosts_filename } {
diff --git a/source4/selftest/win/wintest_setup.exp b/source4/selftest/win/wintest_setup.exp
index 1dcbabb488..f55732ac00 100644
--- a/source4/selftest/win/wintest_setup.exp
+++ b/source4/selftest/win/wintest_setup.exp
@@ -1,6 +1,6 @@
# An expect script to setup a directory and share for an smbtorture test.
# Copyright Brad Henry <brad@samba.org> 2006
-# Released under the GNU GPL v2 or later.
+# Released under the GNU GPL version 3 or later.
proc setup_test { remote_prompt sharepath sharename username local_hostname \
local_ip hosts_file_path backup_hosts_filename } {
diff --git a/source4/setup/enableaccount b/source4/setup/enableaccount
index 0c9937fc44..849b515675 100644
--- a/source4/setup/enableaccount
+++ b/source4/setup/enableaccount
@@ -3,7 +3,7 @@
# add a new user to a Samba4 server
# Copyright Andrew Tridgell 2005
# Copyright Jelmer Vernooij 2008
-# Released under the GNU GPL v2 or later
+# Released under the GNU GPL version 3 or later
#
import samba.getopt as options
@@ -42,9 +42,10 @@ username = args[0]
if username is None:
print "username must be specified"
-creds = credopts.get_credentials()
-
lp = sambaopts.get_loadparm()
+
+creds = credopts.get_credentials(lp)
+
if opts.H is not None:
url = opts.H
else:
diff --git a/source4/setup/newuser b/source4/setup/newuser
index 5f53aad9c6..f622058a5d 100755
--- a/source4/setup/newuser
+++ b/source4/setup/newuser
@@ -3,7 +3,7 @@
# add a new user to a Samba4 server
# Copyright Andrew Tridgell 2005
# Copyright Jelmer Vernooij 2008
-# Released under the GNU GPL v2 or later
+# Released under the GNU GPL version 3 or later
#
import samba.getopt as options
diff --git a/source4/setup/provision b/source4/setup/provision
index b0363d8a8f..cf08036f90 100755
--- a/source4/setup/provision
+++ b/source4/setup/provision
@@ -111,7 +111,8 @@ if opts.realm is None or opts.domain is None:
parser.print_usage()
sys.exit(1)
-smbconf = sambaopts.get_loadparm().configfile()
+lp = sambaopts.get_loadparm()
+smbconf = lp.configfile()
if opts.aci is not None:
print "set ACI: %s" % opts.aci
@@ -123,7 +124,7 @@ elif opts.server_role == "member":
else:
server_role = opts.server_role
-creds = credopts.get_credentials()
+creds = credopts.get_credentials(lp)
setup_dir = opts.setupdir
if setup_dir is None:
diff --git a/source4/setup/provision-backend.js b/source4/setup/provision-backend.js
index edc09907a8..9482d8c435 100644
--- a/source4/setup/provision-backend.js
+++ b/source4/setup/provision-backend.js
@@ -3,7 +3,7 @@ exec smbscript "$0" ${1+"$@"}
/*
provision a Samba4 server
Copyright Andrew Tridgell 2005
- Released under the GNU GPL v2 or later
+ Released under the GNU GPL version 3 or later
*/
options = GetOptions(ARGV,
diff --git a/source4/setup/setpassword b/source4/setup/setpassword
index 1c87f4b1c8..31b2f73a25 100644
--- a/source4/setup/setpassword
+++ b/source4/setup/setpassword
@@ -3,7 +3,7 @@
# add a new user to a Samba4 server
# Copyright Andrew Tridgell 2005
# Copyright Jelmer Vernooij 2008
-# Released under the GNU GPL v2 or later
+# Released under the GNU GPL version 3 or later
#
import samba.getopt as options
diff --git a/source4/setup/upgrade.py b/source4/setup/upgrade.py
index 569b179544..3bcc57ab64 100755
--- a/source4/setup/upgrade.py
+++ b/source4/setup/upgrade.py
@@ -57,7 +57,9 @@ setup_dir = opts.setupdir
if setup_dir is None:
setup_dir = "setup"
-creds = credopts.get_credentials()
+lp = sambaopts.get_loadparm()
+smbconf = lp.configfile()
+creds = credopts.get_credentials(lp)
upgrade_provision(samba3, setup_dir, message, credentials=creds, session_info=system_session(),
- smbconf=sambaopts.get_loadparm_path(), targetdir=opts.targetdir)
+ smbconf=smbconf, targetdir=opts.targetdir)
diff --git a/source4/torture/rpc/dfs.c b/source4/torture/rpc/dfs.c
index dc2601d86e..9cfdd80578 100644
--- a/source4/torture/rpc/dfs.c
+++ b/source4/torture/rpc/dfs.c
@@ -6,7 +6,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/source4/torture/rpc/frsapi.c b/source4/torture/rpc/frsapi.c
index a39c91f853..c8e421a674 100644
--- a/source4/torture/rpc/frsapi.c
+++ b/source4/torture/rpc/frsapi.c
@@ -6,7 +6,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/source4/torture/rpc/spoolss_notify.c b/source4/torture/rpc/spoolss_notify.c
index 96db7d1ec5..32e7b523a4 100644
--- a/source4/torture/rpc/spoolss_notify.c
+++ b/source4/torture/rpc/spoolss_notify.c
@@ -6,7 +6,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/source4/torture/util_provision.c b/source4/torture/util_provision.c
index d7c8f479e6..d214fc120f 100644
--- a/source4/torture/util_provision.c
+++ b/source4/torture/util_provision.c
@@ -20,6 +20,8 @@
#include "includes.h"
#include "auth/auth.h"
#include "lib/ldb_wrap.h"
+#include "torture/torture.h"
+#include "libcli/raw/libcliraw.h"
#include "torture/util.h"
#include "param/param.h"
@@ -27,12 +29,9 @@
#include "scripting/python/modules.h"
NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
- struct provision_settings *settings)
+ struct provision_settings *settings)
{
- bool ok;
PyObject *provision_mod, *provision_dict, *provision_fn, *result, *parameters;
- struct ldb_context *ldb;
- char *sam_ldb_path;
DEBUG(0,("Provision for Become-DC test using python\n"));