[SCM] Samba Shared Repository - branch master updated

2017-12-18 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  e72a879 LDB:test-generic.sh - fix smaller/greater comparison tests
  from  4003736 vfs: Use static_decl_vfs in all VFS modules

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit e72a8793ae22d089b9e300d7f1da735391e39f3d
Author: Matthias Dieter Wallnöfer <m...@samba.org>
Date:   Tue Sep 4 18:27:48 2012 +0200

LDB:test-generic.sh - fix smaller/greater comparison tests

The comparison result has been ignored, which is not good. Also remove
the "ldbsearch" command in the error branch which has not much sense.

The scripts needs to be run through test-tdb.sh, test-ldap.sh or
test-sqlite3.sh which I didn't realise before. Hence less changes are needed
and this is a reduced version of the patch published on the mailing list.

    Signed-off-by: Matthias Dieter Wallnöfer <m...@samba.org>
Reviewed-by: Andrew Bartlett <abart...@samba.org>

Autobuild-User(master): Matthias Dieter Wallnöfer <m...@samba.org>
Autobuild-Date(master): Tue Dec 19 03:09:12 CET 2017 on sn-devel-144

---

Summary of changes:
 lib/ldb/tests/test-generic.sh | 17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/ldb/tests/test-generic.sh b/lib/ldb/tests/test-generic.sh
index e1f8e79..8177da5 100755
--- a/lib/ldb/tests/test-generic.sh
+++ b/lib/ldb/tests/test-generic.sh
@@ -119,16 +119,20 @@ echo "*TODO* Testing UTF8 upper lower case searches !!"
 
 echo "Testing compare"
 count=`$VALGRIND ldbsearch '(cn>=t)' cn | grep '^dn' | wc -l`
-if [ $count != 2 ]; then
-echo returned $count records - expected 2
-echo "this fails on openLdap ..."
+if [ $count != 1 ]; then
+# only "cn: test_multi_test_multi_test_multi" (comes after "t")
+# upper-cased words come before "t" - hence excluded
+echo returned $count records - expected 1
+exit 1
 fi
 $VALGRIND ldbsearch '(cn>t)' cn && exit 1 # strictly greater should not work
 
 count=`$VALGRIND ldbsearch '(cn<=t)' cn | grep '^dn' | wc -l`
-if [ $count != 13 ]; then
-echo returned $count records - expected 13
-echo "this fails on openLdap ..."
+if [ $count != 18 ]; then
+# everything except "cn: test_multi_test_multi_test_multi" (comes after 
"t")
+# upper-cased letters come before "t" - hence included
+echo returned $count records - expected 18
+exit 1
 fi
 $VALGRIND ldbsearch '(cn<t)' cn && exit 1 # strictly less should not work
 
@@ -140,7 +144,6 @@ checkcount() {
 n=`$VALGRIND ldbsearch -s "$scope" -b "$basedn" "$expression" | grep '^dn' 
| wc -l`
 if [ $n != $count ]; then
echo "Got $n but expected $count for $expression"
-   bin/ldbsearch "$expression"
exit 1
 fi
 echo "OK: $count $expression"


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2015-12-23 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  8091f84 s4:samba-tool domain raise tool - make it aware of newer 
domain function levels
   via  33ed975 s4:samba-tool domain raise tool - handle Windows 2000 mode 
AD domains correctly
  from  ada59ec s3:smbd: fix a corner case of the symlink verification

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 8091f84fa472dd46c48d20b0487b275162790be9
Author: Matthias Dieter Wallnöfer <m...@samba.org>
Date:   Fri Mar 14 17:54:48 2014 +0100

s4:samba-tool domain raise tool - make it aware of newer domain function 
levels

http://msdn.microsoft.com/en-us/library/Cc223742.aspx

Signed-off-by: Matthias Dieter Wallnöfer <m...@samba.org>
Reviewed-by: Andrew Bartlett <abart...@samba.org>

Autobuild-User(master): Matthias Dieter Wallnöfer <m...@samba.org>
Autobuild-Date(master): Thu Dec 24 04:08:04 CET 2015 on sn-devel-144

commit 33ed975398e2904bb3f9b94f1119662a40508009
Author: Matthias Dieter Wallnöfer <m...@samba.org>
Date:   Fri Mar 14 17:36:17 2014 +0100

s4:samba-tool domain raise tool - handle Windows 2000 mode AD domains 
correctly

Considering http://msdn.microsoft.com/en-us/library/cc220262.aspx they do 
not
provide any "msDS-Behavior-Version" attributes.

gulikoza <gulik...@users.sourceforge.net> noticed this correctly.
    
Signed-off-by: Matthias Dieter Wallnöfer <m...@samba.org>
Reviewed-by: Andrew Bartlett <abart...@samba.org>

---

Summary of changes:
 python/samba/netcmd/domain.py | 78 ++-
 1 file changed, 54 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py
index 62f8bfa..8802803 100644
--- a/python/samba/netcmd/domain.py
+++ b/python/samba/netcmd/domain.py
@@ -68,6 +68,8 @@ from samba.dsdb import (
 DS_DOMAIN_FUNCTION_2003_MIXED,
 DS_DOMAIN_FUNCTION_2008,
 DS_DOMAIN_FUNCTION_2008_R2,
+DS_DOMAIN_FUNCTION_2012,
+DS_DOMAIN_FUNCTION_2012_R2,
 DS_NTDSDSA_OPT_DISABLE_OUTBOUND_REPL,
 DS_NTDSDSA_OPT_DISABLE_INBOUND_REPL,
 UF_WORKSTATION_TRUST_ACCOUNT,
@@ -969,10 +971,10 @@ class cmd_domain_level(Command):
 Option("-H", "--URL", help="LDB URL for database or target server", 
type=str,
metavar="URL", dest="H"),
 Option("--quiet", help="Be quiet", action="store_true"),
-Option("--forest-level", type="choice", choices=["2003", "2008", 
"2008_R2"],
-help="The forest function level (2003 | 2008 | 2008_R2)"),
-Option("--domain-level", type="choice", choices=["2003", "2008", 
"2008_R2"],
-help="The domain function level (2003 | 2008 | 2008_R2)")
+Option("--forest-level", type="choice", choices=["2003", "2008", 
"2008_R2", "2012", "2012_R2"],
+help="The forest function level (2003 | 2008 | 2008_R2 | 2012 | 
2012_R2)"),
+Option("--domain-level", type="choice", choices=["2003", "2008", 
"2008_R2", "2012", "2012_R2"],
+help="The domain function level (2003 | 2008 | 2008_R2 | 2012 | 
2012_R2)")
 ]
 
 takes_args = ["subcommand"]
@@ -1000,27 +1002,34 @@ class cmd_domain_level(Command):
   attrs=["msDS-Behavior-Version"])
 assert len(res_dc_s) >= 1
 
-try:
+# default values, since "msDS-Behavior-Version" does not exist on 
Windows 2000 AD
+level_forest = DS_DOMAIN_FUNCTION_2000
+level_domain = DS_DOMAIN_FUNCTION_2000
+
+if "msDS-Behavior-Version" in res_forest[0]:
 level_forest = int(res_forest[0]["msDS-Behavior-Version"][0])
+if "msDS-Behavior-Version" in res_domain[0]:
 level_domain = int(res_domain[0]["msDS-Behavior-Version"][0])
-level_domain_mixed = int(res_domain[0]["nTMixedDomain"][0])
+level_domain_mixed = int(res_domain[0]["nTMixedDomain"][0])
 
-min_level_dc = int(res_dc_s[0]["msDS-Behavior-Version"][0]) # Init 
value
-for msg in res_dc_s:
-if int(msg["msDS-Behavior-Version"][0]) < min_level_dc:
+min_level_dc = None
+for msg in res_dc_s:
+if "msDS-Behavior-Version" in msg:
+if min_level_dc is None or 
int(msg["msDS-Behav

[SCM] Samba Shared Repository - branch master updated

2014-01-09 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  0c2fbe5 samba:python - Py_RETURN_NONE remove compatibility code for 
releases  2.4
  from  d1dacd6 s3: Avoid oplock break by storing timestamps with 
gpfs_set_times

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 0c2fbe5a0c1a12751510840e285b7e45cc02ea22
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jan 8 15:42:50 2014 +0100

samba:python - Py_RETURN_NONE remove compatibility code for releases  2.4

http://www.python.org/doc//current/c-api/none.html

Reviewed-By: Jelmer Vernooij jel...@samba.org

Autobuild-User(master): Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date(master): Thu Jan  9 16:27:47 CET 2014 on sn-devel-104

---

Summary of changes:
 ctdb/lib/tdb/pytdb.c   |4 
 lib/ldb/pyldb.c|4 
 lib/ldb/pyldb_util.c   |5 -
 lib/ntdb/pyntdb.c  |4 
 lib/socket_wrapper/py_socket_wrapper.c |4 
 lib/tdb/pytdb.c|4 
 libcli/nbt/pynbt.c |4 
 python/pyglue.c|4 
 source3/passdb/py_passdb.c |4 
 source4/auth/pyauth.c  |4 
 source4/libcli/pysmb.c |4 
 source4/librpc/ndr/py_auth.c   |4 
 source4/librpc/ndr/py_misc.c   |4 
 source4/librpc/ndr/py_security.c   |4 
 source4/librpc/ndr/py_xattr.c  |4 
 15 files changed, 0 insertions(+), 61 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/lib/tdb/pytdb.c b/ctdb/lib/tdb/pytdb.c
index ae0e6f8..98a6246 100644
--- a/ctdb/lib/tdb/pytdb.c
+++ b/ctdb/lib/tdb/pytdb.c
@@ -28,10 +28,6 @@
 #include replace.h
 #include system/filesys.h
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 /* Include tdb headers */
 #include tdb.h
 
diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c
index 4583132..4360b31 100644
--- a/lib/ldb/pyldb.c
+++ b/lib/ldb/pyldb.c
@@ -64,10 +64,6 @@ typedef inquiry lenfunc;
 typedef intargfunc ssizeargfunc;
 #endif
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 #define SIGN(a) (((a) == 0)?0:((a)  0?-1:1))
 
 
diff --git a/lib/ldb/pyldb_util.c b/lib/ldb/pyldb_util.c
index e2442e2..4be9126 100644
--- a/lib/ldb/pyldb_util.c
+++ b/lib/ldb/pyldb_util.c
@@ -36,11 +36,6 @@ typedef inquiry lenfunc;
 typedef intargfunc ssizeargfunc;
 #endif
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
-
 /**
  * Find out PyTypeObject in ldb module for a given typename
  */
diff --git a/lib/ntdb/pyntdb.c b/lib/ntdb/pyntdb.c
index cbe7ae8..b2a1f0c 100644
--- a/lib/ntdb/pyntdb.c
+++ b/lib/ntdb/pyntdb.c
@@ -29,10 +29,6 @@
 #include replace.h
 #include system/filesys.h
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 /* Include ntdb headers */
 #include ntdb.h
 
diff --git a/lib/socket_wrapper/py_socket_wrapper.c 
b/lib/socket_wrapper/py_socket_wrapper.c
index f5742d3..411be59 100644
--- a/lib/socket_wrapper/py_socket_wrapper.c
+++ b/lib/socket_wrapper/py_socket_wrapper.c
@@ -52,10 +52,6 @@ typedef inquiry lenfunc;
 typedef intargfunc ssizeargfunc;
 #endif
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 #ifndef Py_TYPE /* Py_TYPE is only available on Python  2.6 */
 #define Py_TYPE(ob)(((PyObject*)(ob))-ob_type)
 #endif
diff --git a/lib/tdb/pytdb.c b/lib/tdb/pytdb.c
index cf77a25..bf0fed6 100644
--- a/lib/tdb/pytdb.c
+++ b/lib/tdb/pytdb.c
@@ -28,10 +28,6 @@
 #include replace.h
 #include system/filesys.h
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 /* Include tdb headers */
 #include tdb.h
 
diff --git a/libcli/nbt/pynbt.c b/libcli/nbt/pynbt.c
index 8074fb6..7162880 100644
--- a/libcli/nbt/pynbt.c
+++ b/libcli/nbt/pynbt.c
@@ -26,10 +26,6 @@
 
 void initnetbios(void);
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 extern PyTypeObject nbt_node_Type;
 
 typedef struct {
diff --git a/python/pyglue.c b/python/pyglue.c
index 02fb005..3fc6e38 100644
--- a/python/pyglue.c
+++ b/python/pyglue.c
@@ -25,10 +25,6 @@
 
 void init_glue(void);
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 static PyObject *py_generate_random_str(PyObject *self, PyObject *args)
 {
int len;
diff --git a/source3/passdb/py_passdb.c b/source3/passdb/py_passdb.c
index 3fd14cd..87dbb5d 100644
--- a/source3/passdb/py_passdb.c
+++ b/source3/passdb/py_passdb.c
@@ -33,10 +33,6 @@ typedef inquiry lenfunc;
 typedef intargfunc ssizeargfunc

Re: [Samba] userAccountControl can't be set to 0x800002 (8388610, UF_ACCOUNTDISABLED | UF_PASSWORDEXPIRED):samldb: Unrecognized account type

2013-06-09 Thread Matthias Dieter Wallnöfer

Hi Andrew,

please have a look at the two top-most patches in my master branch.

Matthias

Andrew Bartlett schrieb:

On Wed, 2013-06-05 at 13:16 +0800, Tide wrote:

Yes, it fixed it, user can be disabled from mail system now ( although it does not 
save the same value as AD saved (0x82 - 0x202 in AD, 0x82 - 0x800202 
in current patch) ).

Thank you guys!

Thanks, that's in master now.

Matthias,

Can you look into the 0x80 bit?

Thanks,

Andrew Bartlett



--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] userAccountControl can't be set to 0x800002 (8388610, UF_ACCOUNTDISABLED | UF_PASSWORDEXPIRED):samldb: Unrecognized account type

2013-06-02 Thread Matthias Dieter Wallnöfer

Hi Andrew,

please have a look at my uac branch - in particular to commit 
b357e9377c698a20989c339d1459ed00a342cf2b.


Thanks,
Matthias

Andrew Bartlett schrieb:

Matthias,

Any chance you can look into this for me?

Thanks,

On Tue, 2013-05-28 at 15:56 +0800, Tide wrote:

the userAccountControl value becomes 0x202 (514) after 0x82 was written to 
active directory of windows server 2003, so it looks like UF_NORMAL_ACCOUNT 
(0x200) is really implied.

 Original --
From:  Andrew Bartlettabart...@samba.org;
Date:  Tue, May 28, 2013 10:50 AM
To:  Tidelovet...@qq.com;
Cc:  sambasamba@lists.samba.org;
Subject:  Re: [Samba] userAccountControl can't be set to 0x82 
(8388610,UF_ACCOUNTDISABLED | UF_PASSWORDEXPIRED):samldb: Unrecognized account 
type


On Tue, 2013-05-28 at 10:32 +0800, Tide wrote:

We have a third party mail system which can write/read accounts to/from AD 
using ldaps protocol, it works fine with active directory of windows server 
2003.

When I test the mail system with samba4 DC, I can't disable user from the mail system, 
because the mail system write 0x82 (8388610,UF_ACCOUNTDISABLED | UF_PASSWORDEXPIRED) 
to userAccountControl field of AD/samba4, and samldb returns Unrecognized account 
type error.

Is this expected behaviour or a possible bug?

# test from command line
ldbedit --show-binary -H /usr/local/samba/private/sam.ldb 
sAMAccountName=YOUR_ACCOUNT userAccountControl
# then change userAccountControl to 8388610, save, quit editor

If it works against Windows and doesn't work against Samba, it's a bug.
We need to know what the value becomes after you do this against
windows, then then we need the tests updated to cover this case.

Presumably the UF_NORMAL_ACCOUNT flag is implied.

Once that's done, it shouldn't be too hard to also imply it.

Any chance you can look into this for us?

Thanks,

Andrew Bartlett

--
Andrew Bartletthttp://samba.org/~abartlet/
Authentication Developer, Samba Team   http://samba.org


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[SCM] Samba Shared Repository - branch master updated

2012-05-29 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  40e47d0 s4:dbchecker - handle the none case correctly
  from  cee146f s3:smb2_ioctl: verify credit charge

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 40e47d08af8d287d1e8b66ffb96e3ed051516403
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu May 24 20:43:17 2012 +0200

s4:dbchecker - handle the none case correctly

This means that *no* fixing will be done, also the first possible one
will be omitted as well.

Reviewed-by: abartlet

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue May 29 21:36:25 CEST 2012 on sn-devel-104

---

Summary of changes:
 source4/scripting/python/samba/dbchecker.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/dbchecker.py 
b/source4/scripting/python/samba/dbchecker.py
index 587d63c..95be1ce 100644
--- a/source4/scripting/python/samba/dbchecker.py
+++ b/source4/scripting/python/samba/dbchecker.py
@@ -110,7 +110,7 @@ class dbcheck(object):
 return True
 if c == 'NONE':
 setattr(self, all_attr, 'NONE')
-return True
+return False
 return c
 
 def do_modify(self, m, controls, msg, validate=True):


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-04-30 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  9126f33 s4:samldb LDB module - homogenize LDB search attributes 
arrays
  from  8874878 s4-libnet: Add mem_ctx to libnet_rpc_groupdel calls (bug 
#8889)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 9126f33a57479afdf23e5c4d2f4de4854d53b636
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Apr 21 17:32:48 2012 +0200

s4:samldb LDB module - homogenize LDB search attributes arrays

First they do not need to be static any longer since we have abandoned
asynchronous result handling (where global variables have been important).
In addition add some const in order to protect us from unwanted writes.

Reviewed-by: Andrew Bartlett

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Mon Apr 30 16:46:20 CEST 2012 on sn-devel-104

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/samldb.c |   26 +-
 1 files changed, 13 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c 
b/source4/dsdb/samdb/ldb_modules/samldb.c
index 3aa0c23..168e55b 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -175,7 +175,7 @@ static int samldb_check_sAMAccountName(struct samldb_ctx 
*ac)
const char *name;
int ret;
struct ldb_result *res;
-   const char *noattrs[] = { NULL };
+   const char * const noattrs[] = { NULL };
 
if (ldb_msg_find_element(ac-msg, sAMAccountName) == NULL) {
ret = samldb_generate_sAMAccountName(ldb, ac-msg);
@@ -263,7 +263,7 @@ static bool samldb_krbtgtnumber_available(struct samldb_ctx 
*ac,
 {
TALLOC_CTX *tmp_ctx = talloc_new(ac);
struct ldb_result *res;
-   const char *no_attrs[] = { NULL };
+   const char * const no_attrs[] = { NULL };
int ret;
 
ret = dsdb_module_search(ac-module, tmp_ctx, res,
@@ -360,7 +360,7 @@ static int samldb_find_for_defaultObjectCategory(struct 
samldb_ctx *ac)
 {
struct ldb_context *ldb = ldb_module_get_ctx(ac-module);
struct ldb_result *res;
-   const char *no_attrs[] = { NULL };
+   const char * const no_attrs[] = { NULL };
int ret;
 
ac-res_dn = NULL;
@@ -1145,7 +1145,7 @@ static int samldb_prim_group_tester(struct samldb_ctx 
*ac, uint32_t rid)
struct dom_sid *sid;
struct ldb_result *res;
int ret;
-   const char *noattrs[] = { NULL };
+   const char * const noattrs[] = { NULL };
 
sid = dom_sid_add_rid(ac, samdb_domain_sid(ldb), rid);
if (sid == NULL) {
@@ -1196,7 +1196,7 @@ static int samldb_prim_group_set(struct samldb_ctx *ac)
 static int samldb_prim_group_change(struct samldb_ctx *ac)
 {
struct ldb_context *ldb = ldb_module_get_ctx(ac-module);
-   const char * attrs[] = { primaryGroupID, memberOf, NULL };
+   const char * const attrs[] = { primaryGroupID, memberOf, NULL };
struct ldb_result *res, *group_res;
struct ldb_message_element *el;
struct ldb_message *msg;
@@ -1204,7 +1204,7 @@ static int samldb_prim_group_change(struct samldb_ctx *ac)
struct dom_sid *prev_sid, *new_sid;
struct ldb_dn *prev_prim_group_dn, *new_prim_group_dn;
int ret;
-   const char *noattrs[] = { NULL };
+   const char * const noattrs[] = { NULL };
 
el = dsdb_get_single_valued_attr(ac-msg, primaryGroupID,
 ac-req-operation);
@@ -1372,7 +1372,7 @@ static int samldb_user_account_control_change(struct 
samldb_ctx *ac)
struct ldb_message *tmp_msg;
int ret;
struct ldb_result *res;
-   const char *attrs[] = { userAccountControl, objectClass, NULL };
+   const char * const attrs[] = { userAccountControl, objectClass, 
NULL };
unsigned int i;
bool is_computer = false;
 
@@ -1512,7 +1512,7 @@ static int samldb_group_type_change(struct samldb_ctx *ac)
struct ldb_message *tmp_msg;
int ret;
struct ldb_result *res;
-   const char *attrs[] = { groupType, NULL };
+   const char * const attrs[] = { groupType, NULL };
 
el = dsdb_get_single_valued_attr(ac-msg, groupType,
 ac-req-operation);
@@ -1604,7 +1604,7 @@ static int samldb_group_type_change(struct samldb_ctx *ac)
 static int samldb_sam_accountname_check(struct samldb_ctx *ac)
 {
struct ldb_context *ldb = ldb_module_get_ctx(ac-module);
-   const char *no_attrs[] = { NULL };
+   const char * const no_attrs[] = { NULL };
struct ldb_result *res;
const char *sam_accountname, *enc_str;
struct ldb_message_element *el;
@@ -1670,7 +1670,7 @@ static int samldb_sam_accountname_check

Re: [Samba] samba4(git) user log on to workstation not work

2012-03-21 Thread Matthias Dieter Wallnöfer

This setting seems only to work with computer names, not sites.

Mohammad Ebrahim Abravi schrieb:

*This Error:

Your account is configured to prevent you from using this computer.*

On Wed, Mar 7, 2012 at 11:36 AM, Mohammad Ebrahim Abravilamp@gmail.com

wrote:
admin pak -
select an OU -  right click on a user name  -  properties -  account -
Log On to -  checked (the following computer) -  add  (site9 )


On Wed, Mar 7, 2012 at 10:58 AM, Mohammad Ebrahim Abravi
lamp@gmail.com  wrote:


Hi

set the following setting on samba 4 but user can not  login to site9 !,
what?

user -  properties -  account -  Log On to -  checked (the following
computer) -  add  (site9 )

Note : On samba 4.0.11 this setting work





--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[SCM] Samba Shared Repository - branch master updated

2012-03-11 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  a57d7ad s4:upgradeprovision - fix some output messages
  from  f0bba96 s3: Improve statvfs support

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit a57d7ad772e04634253b3e84d72bc5dbefd1825c
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Mar 11 10:29:10 2012 +0100

s4:upgradeprovision - fix some output messages

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sun Mar 11 21:54:54 CET 2012 on sn-devel-104

---

Summary of changes:
 source4/scripting/bin/upgradeprovision |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/bin/upgradeprovision 
b/source4/scripting/bin/upgradeprovision
index 4986f8a..41edd07 100755
--- a/source4/scripting/bin/upgradeprovision
+++ b/source4/scripting/bin/upgradeprovision
@@ -1873,8 +1873,8 @@ if __name__ == '__main__':
 # 18) We rebuild SD if a we have a list of DN to recalculate or if 
the
 # defSDmodified is set.
 if defSDmodified or len(dnToRecalculate) 0:
-message(SIMPLE, Some defaultSecurityDescriptors and/or
-securityDescriptor have changed, 
recalculating SD )
+message(SIMPLE, Some (default) security descriptors (SDs) 
have 
+changed, recalculating them)
 ldbs.sam.set_session_info(adm_session)
 rebuild_sd(ldbs.sam, names)
 
@@ -1922,7 +1922,7 @@ if __name__ == '__main__':
 # But the second part of the update (when we update existing 
objects
 # can also have an influence on indexing as some attribute might 
have their
 # searchflag modificated
-message(SIMPLE, Reopenning samdb to trigger reindexing if needed 
+message(SIMPLE, Reopening samdb to trigger reindexing if needed 
 after modification)
 samdb = Ldb(paths.samdb, session_info=session, credentials=creds, 
lp=lp)
 message(SIMPLE, Reindexing finished)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-03-03 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  a66d0f3 s4:samba-tool domain level raise command - reference SAMDB 
object correctly
  from  dc24e22 smb2_constants: fix a typo

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit a66d0f33eefde8a28247991aa46ac533a63b7793
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 2 20:00:04 2012 +0100

s4:samba-tool domain level raise command - reference SAMDB object correctly

https://bugzilla.samba.org/show_bug.cgi?id=8787

Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sat Mar  3 12:54:21 CET 2012 on sn-devel-104

---

Summary of changes:
 source4/scripting/python/samba/netcmd/domain.py |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/netcmd/domain.py 
b/source4/scripting/python/samba/netcmd/domain.py
index 992698d..4364fe8 100644
--- a/source4/scripting/python/samba/netcmd/domain.py
+++ b/source4/scripting/python/samba/netcmd/domain.py
@@ -578,7 +578,7 @@ class cmd_domain_level(Command):
 samdb.modify(m)
 # Under partitions
 m = ldb.Message()
-m.dn = ldb.Dn(samdb, CN= + lp.get(workgroup) + 
,CN=Partitions,%s % ldb.get_config_basedn())
+m.dn = ldb.Dn(samdb, CN= + lp.get(workgroup) + 
,CN=Partitions,%s % samdb.get_config_basedn())
 m[nTMixedDomain] = ldb.MessageElement(0,
   ldb.FLAG_MOD_REPLACE, nTMixedDomain)
 try:
@@ -597,7 +597,7 @@ class cmd_domain_level(Command):
 # Under partitions
 m = ldb.Message()
 m.dn = ldb.Dn(samdb, CN= + lp.get(workgroup)
-  + ,CN=Partitions,%s % ldb.get_config_basedn())
+  + ,CN=Partitions,%s % samdb.get_config_basedn())
 m[msDS-Behavior-Version]= ldb.MessageElement(
   str(new_level_domain), ldb.FLAG_MOD_REPLACE,
   msDS-Behavior-Version)
@@ -622,7 +622,7 @@ class cmd_domain_level(Command):
 if new_level_forest  level_domain:
 raise CommandError(Forest function level can't be higher 
than the domain function level(s). Please raise it/them first!)
 m = ldb.Message()
-m.dn = ldb.Dn(samdb, CN=Partitions,%s % 
ldb.get_config_basedn())
+m.dn = ldb.Dn(samdb, CN=Partitions,%s % 
samdb.get_config_basedn())
 m[msDS-Behavior-Version]= ldb.MessageElement(
   str(new_level_forest), ldb.FLAG_MOD_REPLACE,
   msDS-Behavior-Version)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-02-23 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  101bd18 s3:smbd/utmp.c - fix the build on FreeBSD 9 without utmp.h
  from  f25d1f5 dcerpc_server: Add 'modulesdir' variable to pkg-config file.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 101bd184d1a007b36e4fb889434e3013bdd3d1ea
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Feb 23 11:41:11 2012 +0100

s3:smbd/utmp.c - fix the build on FreeBSD 9 without utmp.h

https://bugzilla.samba.org/show_bug.cgi?id=8709

Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Thu Feb 23 19:17:25 CET 2012 on sn-devel-104

---

Summary of changes:
 source3/smbd/utmp.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/utmp.c b/source3/smbd/utmp.c
index 47462f6..6837c07 100644
--- a/source3/smbd/utmp.c
+++ b/source3/smbd/utmp.c
@@ -126,7 +126,9 @@ void sys_utmp_yield(const char *username, const char 
*hostname,
 
 #else /* WITH_UTMP */
 
+#ifdef HAVE_UTMP_H
 #include utmp.h
+#endif
 
 #ifdef HAVE_UTMPX_H
 #include utmpx.h


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-02-19 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  61314db waf: make update-waf script work on Darwin too
  from  f217fae s3: get_share_mode_lock_fresh-get_share_mode_lock

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 61314dbe0f64d0fdf230e5588afe73165db151fd
Author: Dave Abrahams d...@boostpro.com
Date:   Sun Feb 19 19:47:59 2012 +0100

waf: make update-waf script work on Darwin too

This fixes bug #8766

Reviewed by: Jelmer
Signed-off-by: Matthias Dieter Wallnöfer m...@samba.org

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sun Feb 19 21:35:06 CET 2012 on sn-devel-104

---

Summary of changes:
 buildtools/update-waf.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/update-waf.sh b/buildtools/update-waf.sh
index cdb56c6..c368f5a 100755
--- a/buildtools/update-waf.sh
+++ b/buildtools/update-waf.sh
@@ -2,7 +2,7 @@
 # Update our copy of waf
 
 TARGETDIR=`dirname $0`
-WORKDIR=`mktemp -d`
+WORKDIR=`mktemp -d -t update-waf`
 
 mkdir -p $WORKDIR
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-02-17 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  32c82fe s4:lib/tls - include GNUTLS headers consistently using ...
   via  fa89f27 s4:samba-tool fsmo * - fix missing takes_optiongroups
  from  476d503 lib/util: Remove unused sys_sendto()

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 32c82fe69b588fe18674c0bda49cd7fc0f73f50a
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Feb 17 22:58:07 2012 +0100

s4:lib/tls - include GNUTLS headers consistently using ...

These are system-specific.

Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sat Feb 18 00:43:58 CET 2012 on sn-devel-104

commit fa89f2756f2d56ff83a5a6646ccff759b03f900d
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Feb 17 21:24:48 2012 +0100

s4:samba-tool fsmo * - fix missing takes_optiongroups

This has been reported in bug #8755.

Reviewed-by: Jelmer

---

Summary of changes:
 source4/lib/tls/tls.c |2 +-
 source4/lib/tls/tls_tstream.c |2 +-
 source4/lib/tls/tlscert.c |4 ++--
 source4/scripting/python/samba/netcmd/fsmo.py |   12 
 source4/utils/tests/test_samba_tool.sh|2 ++
 5 files changed, 18 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/tls/tls.c b/source4/lib/tls/tls.c
index 82cf260..7bf2ff8 100644
--- a/source4/lib/tls/tls.c
+++ b/source4/lib/tls/tls.c
@@ -28,7 +28,7 @@
 #include param/param.h
 
 #if ENABLE_GNUTLS
-#include gnutls/gnutls.h
+#include gnutls/gnutls.h
 
 #define DH_BITS 1024
 
diff --git a/source4/lib/tls/tls_tstream.c b/source4/lib/tls/tls_tstream.c
index eb4a6d9..6bb68fb 100644
--- a/source4/lib/tls/tls_tstream.c
+++ b/source4/lib/tls/tls_tstream.c
@@ -25,7 +25,7 @@
 #include lib/tls/tls.h
 
 #if ENABLE_GNUTLS
-#include gnutls/gnutls.h
+#include gnutls/gnutls.h
 
 #define DH_BITS 1024
 
diff --git a/source4/lib/tls/tlscert.c b/source4/lib/tls/tlscert.c
index bef6348..0c780ea 100644
--- a/source4/lib/tls/tlscert.c
+++ b/source4/lib/tls/tlscert.c
@@ -22,8 +22,8 @@
 #include includes.h
 
 #if ENABLE_GNUTLS
-#include gnutls/gnutls.h
-#include gnutls/x509.h
+#include gnutls/gnutls.h
+#include gnutls/x509.h
 #if HAVE_GCRYPT_H
 #include gcrypt.h
 #endif
diff --git a/source4/scripting/python/samba/netcmd/fsmo.py 
b/source4/scripting/python/samba/netcmd/fsmo.py
index 958e5b8..f4e03b2 100644
--- a/source4/scripting/python/samba/netcmd/fsmo.py
+++ b/source4/scripting/python/samba/netcmd/fsmo.py
@@ -125,6 +125,12 @@ class cmd_fsmo_show(Command):
 
 synopsis = %prog [options]
 
+takes_optiongroups = {
+sambaopts: options.SambaOptions,
+credopts: options.CredentialsOptions,
+versionopts: options.VersionOptions,
+}
+
 takes_options = [
 Option(-H, --URL, help=LDB URL for database or target server, 
type=str,
metavar=URL, dest=H),
@@ -182,6 +188,12 @@ class cmd_fsmo_transfer(Command):
 
 synopsis = %prog [options]
 
+takes_optiongroups = {
+sambaopts: options.SambaOptions,
+credopts: options.CredentialsOptions,
+versionopts: options.VersionOptions,
+}
+
 takes_options = [
 Option(-H, --URL, help=LDB URL for database or target server, 
type=str,
metavar=URL, dest=H),
diff --git a/source4/utils/tests/test_samba_tool.sh 
b/source4/utils/tests/test_samba_tool.sh
index 0e03ee4..7057312 100755
--- a/source4/utils/tests/test_samba_tool.sh
+++ b/source4/utils/tests/test_samba_tool.sh
@@ -40,4 +40,6 @@ testit domain level.show $VALGRIND $samba_tool domain level 
show
 
 testit domain info $VALGRIND $samba_tool domain info $SERVER_IP
 
+testit fsmo show $VALGRIND $samba_tool fsmo show
+
 exit $failed


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-01-05 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  6857a58 s4:repl_meta_data LDB module - set isRecycled time 
correctly
  from  3a18a42 Add S3 vfs_aio_pthread module to replace broken glibc aio 
code.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 6857a588f36cf556177de3950a890a24443138b8
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jan 4 16:17:24 2012 +0100

s4:repl_meta_data LDB module - set isRecycled time correctly

unix_to_nt_time() which is based on time_t behaves differently for
literals  32 bit on 32 and 64 bit platforms.

Reviewed-by: ekacnet

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Thu Jan  5 11:59:20 CET 2012 on sn-devel-104

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c |   17 -
 1 files changed, 8 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c 
b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index daca5da..cda9b99 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -50,7 +50,12 @@
 #include lib/util/binsearch.h
 #include lib/util/tsort.h
 
-static const uint64_t DELETED_OBJECT_CONTAINER_CHANGE_TIME = 253402127999L;
+/*
+ * It's 29/12/ at 23:59:59 UTC as specified in MS-ADTS 7.1.1.4.2
+ * Deleted Objects Container
+ */
+static const NTTIME DELETED_OBJECT_CONTAINER_CHANGE_TIME = 
265046601599000ULL;
+
 struct replmd_private {
TALLOC_CTX *la_ctx;
struct la_entry *la_list;
@@ -934,10 +939,7 @@ static int replmd_add(struct ldb_module *module, struct 
ldb_request *req)
 * Set the originating_change_time to 
29/12/ at 23:59:59
 * as specified in MS-ADTS 7.1.1.4.2 Deleted 
Objects Container
 */
-   NTTIME deleted_obj_ts;
-
-   unix_to_nt_time(deleted_obj_ts, 
DELETED_OBJECT_CONTAINER_CHANGE_TIME);
-   m-originating_change_time  = 
deleted_obj_ts;
+   m-originating_change_time  = 
DELETED_OBJECT_CONTAINER_CHANGE_TIME;
} else {
m-originating_change_time  = now;
}
@@ -1165,10 +1167,7 @@ static int replmd_update_rpmd_element(struct ldb_context 
*ldb,
 * Set the originating_change_time to 29/12/ at 
23:59:59
 * as specified in MS-ADTS 7.1.1.4.2 Deleted Objects 
Container
 */
-   NTTIME deleted_obj_ts;
-
-   unix_to_nt_time(deleted_obj_ts, 
DELETED_OBJECT_CONTAINER_CHANGE_TIME);
-   md1-originating_change_time= deleted_obj_ts;
+   md1-originating_change_time= 
DELETED_OBJECT_CONTAINER_CHANGE_TIME;
} else {
md1-originating_change_time= now;
}


-- 
Samba Shared Repository


Re: [Samba] Samba 4 make fails(openSUSE 12.1)

2011-12-10 Thread Matthias Dieter Wallnöfer
The issue is known in bugzilla: [Bug 8537] compile error @ tls.c when 
using gcc Version 4.6.1 (https://bugzilla.samba.org/show_bug.cgi?id=8537).


Adam Tauno Williams wrote:

On Mon, 2011-11-28 at 17:16 +0200, Michael Wood wrote:
   

2011/11/28 Samba-JP ootarib...@samba.gr.jp:
 

On Mon, Nov 28, 2011 at 05:52:55AM -0500, Adam Tauno Williams wrote
   

Yep.  I updated my test VM to openSUSE 12.1 [Bind 9.8!!!].  And I get
the same failure when building.
 

make fails:
[ 976/3909] Compiling source4/lib/tls/tls.c
../source4/lib/tls/tls.c: In function ‘tls_init_server’:
../source4/lib/tls/tls.c:508:2: error: implicit declaration of function
‘gnutls_transport_set_lowat’ [-Werror=implicit-function-declaration]
../source4/lib/tls/tls.c: In function ‘tls_init_client’:
../source4/lib/tls/tls.c:569:2: warning:
‘gnutls_certificate_type_set_priority’ is deprecated (declared at
/usr/include/gnutls/compat.h:288) [-Wdeprecated-declarations]
cc1: some warnings being treated as errors
Waf: Leaving directory `/home/steve/samba-master/bin'
Build failed:  -  task failed (err #1):
  {task: cc tls.c -  tls_1.o}
make: *** [all] Error 1
   

My test server (openSUSE 12.1 x86-64) has no probrem
[ 985/3936] Compiling source4/lib/tls/tls.c
[ 986/3936] Compiling source4/lib/tls/tlscert.c
../source4/lib/tls/tlscert.c:174:6: warning: no previous prototype for 
‘tls_cert_dummy’ [-Wmissing-prototypes]
[ 987/3936] Compiling source4/lib/tls/tls_tstream.
.
   

Could it have something to do with what packages are installed?  e.g.
if you don't have the GnuTLS devel package installed it breaks?
I don't have an OpenSUSE box to test this theory.
 

I have libgnutls-devel-3.0.3-5.2.1.x86_64 installed.

GCC is gcc (SUSE Linux) 4.6.2.

   


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] Samba 4 make fails(openSUSE 12.1)

2011-12-10 Thread Matthias Dieter Wallnöfer


Use an older gcc?  I pulled down gcc-3.3 using zypper.
   
No, this was a wrong assumption. When you reopen the bug report you see 
that I have appended a message which describes the real issue: in GNUTLS 
= 3.x the


‘gnutls_transport_set_lowat’

call has been removed.

This patch should fix the issue: 
http://gitweb.samba.org/samba.git/?p=mdw/samba.git;a=commitdiff;h=0d33383b0dcef2bfc805432798e1f46097ee1f15


Adam Tauno Williams wrote:

On Mon, 2011-11-28 at 20:16 +0100, steve wrote:
   

On 28/11/11 16:23, Adam Tauno Williams wrote:
 

On Mon, 2011-11-28 at 17:16 +0200, Michael Wood wrote:
   

2011/11/28 Samba-JP ootarib...@samba.gr.jp:
 

On Mon, Nov 28, 2011 at 05:52:55AM -0500, Adam Tauno Williams wrote
   

Yep.  I updated my test VM to openSUSE 12.1 [Bind 9.8!!!].  And I get
the same failure when building.
 

make fails:
[ 976/3909] Compiling source4/lib/tls/tls.c
../source4/lib/tls/tls.c: In function ‘tls_init_server’:
../source4/lib/tls/tls.c:508:2: error: implicit declaration of function
‘gnutls_transport_set_lowat’ [-Werror=implicit-function-declaration]
../source4/lib/tls/tls.c: In function ‘tls_init_client’:
../source4/lib/tls/tls.c:569:2: warning:
‘gnutls_certificate_type_set_priority’ is deprecated (declared at
/usr/include/gnutls/compat.h:288) [-Wdeprecated-declarations]
cc1: some warnings being treated as errors
Waf: Leaving directory `/home/steve/samba-master/bin'
Build failed:  -   task failed (err #1):
   {task: cc tls.c -   tls_1.o}
make: *** [all] Error 1
   

My test server (openSUSE 12.1 x86-64) has no probrem
[ 985/3936] Compiling source4/lib/tls/tls.c
[ 986/3936] Compiling source4/lib/tls/tlscert.c
../source4/lib/tls/tlscert.c:174:6: warning: no previous prototype for 
‘tls_cert_dummy’ [-Wmissing-prototypes]
[ 987/3936] Compiling source4/lib/tls/tls_tstream.
.
   

Could it have something to do with what packages are installed?  e.g.
if you don't have the GnuTLS devel package installed it breaks?
I don't have an OpenSUSE box to test this theory.
 

I have libgnutls-devel-3.0.3-5.2.1.x86_64 installed.
GCC is gcc (SUSE Linux) 4.6.2.
   

I have
rpm -q gcc
gcc-4.6-15.1.3.i586
rpm -q libgnutls-devel
libgnutls-devel-3.0.3-5.1.2.i586
make is ok on ubuntu 11.10 but not with openSUSE 12.1
What are we missing?
Any ideas?
 

Use an older gcc?  I pulled down gcc-3.3 using zypper.

$ CPP=/usr/bin/cpp-3.3 CC=/usr/bin/gcc-3.3 ./configure.developer
--prefix=/opt/s4
Checking for program gcc or cc   : /usr/bin/gcc-3.3
Checking for program ar  : /usr/bin/ar
Checking for program ranlib  : /usr/bin/ranlib
...

But when it gets down to the TLS stuff it still fails.

Waf: Entering directory `/root/samba-master/bin'
[ 126/3908] Generating VERSION
[ 162/3908] Generating smbd/build_options.c
[ 977/3908] Compiling source4/lib/tls/tls.c
../source4/lib/tls/tls.c: In function `tls_init_server':
../source4/lib/tls/tls.c:508: error: implicit declaration of function
`gnutls_transport_set_lowat'
../source4/lib/tls/tls.c: In function `tls_init_client':
../source4/lib/tls/tls.c:569: warning:
`gnutls_certificate_type_set_priority' is deprecated (declared
at /usr/include/gnutls/compat.h:290)
Waf: Leaving directory `/root/samba-master/bin'
Build failed:  -  task failed (err #1):
{task: cc tls.c -  tls_1.o}
make: *** [all] Error 1



   


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

[SCM] Samba Shared Repository - branch master updated

2011-12-09 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  1b741b2 s4:dsdb/common/util.c - test LDB result against LDB_SUCCESS 
as we are always doing
  from  c01efc1 s4 dns: Update requests with QCLASS != IN or ALL trigger 
NOTIMPLEMENTED errors

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 1b741b2bcc8b085be9f092b6d7e203661b571c43
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Dec 1 09:33:10 2011 +0100

s4:dsdb/common/util.c - test LDB result against LDB_SUCCESS as we are 
always doing

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Dec  9 12:00:03 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/dsdb/common/util.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 826a1e4..38391a9 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -1306,7 +1306,7 @@ struct ldb_dn *samdb_ntds_settings_dn(struct ldb_context 
*ldb)
}
 
ret = ldb_search(ldb, tmp_ctx, root_res, ldb_dn_new(tmp_ctx, ldb, ), 
LDB_SCOPE_BASE, root_attrs, NULL);
-   if (ret) {
+   if (ret != LDB_SUCCESS) {
DEBUG(1,(Searching for dsServiceName in rootDSE failed: %s\n, 
 ldb_errstring(ldb)));
goto failed;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-11-30 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  456c69f s4:lib/tls - call gnutls_transport_set_lowat only on 
GNUTLS  3.0
  from  9c4d498 s3-waf: fix the build with CTDB_CONTROL_CHECK_SRVIDS.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 456c69f95e7a672c4cc9a5e6e52fb37e14012304
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Nov 28 20:55:37 2011 +0100

s4:lib/tls - call gnutls_transport_set_lowat only on GNUTLS  3.0

This function call together with the lowat feature has been removed in 
release
3.0 as described in this mailing list post:
http://old.nabble.com/gnutls_transport_set_lowat-deprecated-td32554230.html.

Since we do not make any use of lowat (esprimed by each function call)
we are free to simply omit it on v3.0 and later.

This addresses bug #8537.

Reviewed by: abartlet + metze

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Wed Nov 30 20:11:14 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/lib/tls/tls.c |4 
 source4/lib/tls/tls_tstream.c |4 
 2 files changed, 8 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/tls/tls.c b/source4/lib/tls/tls.c
index 00c2d13..3a49e2f 100644
--- a/source4/lib/tls/tls.c
+++ b/source4/lib/tls/tls.c
@@ -505,7 +505,9 @@ struct socket_context *tls_init_server(struct tls_params 
*params,
gnutls_transport_set_ptr(tls-session, (gnutls_transport_ptr)tls);
gnutls_transport_set_pull_function(tls-session, 
(gnutls_pull_func)tls_pull);
gnutls_transport_set_push_function(tls-session, 
(gnutls_push_func)tls_push);
+#if GNUTLS_VERSION_MAJOR  3
gnutls_transport_set_lowat(tls-session, 0);
+#endif
 
tls-plain_chars = plain_chars;
if (plain_chars) {
@@ -574,7 +576,9 @@ struct socket_context *tls_init_client(struct 
socket_context *socket_ctx,
gnutls_transport_set_ptr(tls-session, (gnutls_transport_ptr)tls);
gnutls_transport_set_pull_function(tls-session, 
(gnutls_pull_func)tls_pull);
gnutls_transport_set_push_function(tls-session, 
(gnutls_push_func)tls_push);
+#if GNUTLS_VERSION_MAJOR  3
gnutls_transport_set_lowat(tls-session, 0);
+#endif
tls-tls_detect = false;
 
tls-output_pending  = false;
diff --git a/source4/lib/tls/tls_tstream.c b/source4/lib/tls/tls_tstream.c
index c64b2ea..eb4a6d9 100644
--- a/source4/lib/tls/tls_tstream.c
+++ b/source4/lib/tls/tls_tstream.c
@@ -1029,7 +1029,9 @@ struct tevent_req *_tstream_tls_connect_send(TALLOC_CTX 
*mem_ctx,
   
(gnutls_pull_func)tstream_tls_pull_function);
gnutls_transport_set_push_function(tlss-tls_session,
   
(gnutls_push_func)tstream_tls_push_function);
+#if GNUTLS_VERSION_MAJOR  3
gnutls_transport_set_lowat(tlss-tls_session, 0);
+#endif
 
tlss-handshake.req = req;
tstream_tls_retry_handshake(state-tls_stream);
@@ -1278,7 +1280,9 @@ struct tevent_req *_tstream_tls_accept_send(TALLOC_CTX 
*mem_ctx,
   
(gnutls_pull_func)tstream_tls_pull_function);
gnutls_transport_set_push_function(tlss-tls_session,
   
(gnutls_push_func)tstream_tls_push_function);
+#if GNUTLS_VERSION_MAJOR  3
gnutls_transport_set_lowat(tlss-tls_session, 0);
+#endif
 
tlss-handshake.req = req;
tstream_tls_retry_handshake(state-tls_stream);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-11-19 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  dbd930c socket_wrapper/py_socket_wrapper.c - include Python 2.4 
compatiblity code
  from  82b1702 Remove rawmemchr calls - found by Ira Cooper. These are 
glibc-specific calls, makes us completely non-portable.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit dbd930cb243d33c84fce8dfff84fde02d9e792f5
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Nov 19 12:59:01 2011 +0100

socket_wrapper/py_socket_wrapper.c - include Python 2.4 compatiblity code

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sat Nov 19 14:53:43 CET 2011 on sn-devel-104

---

Summary of changes:
 lib/socket_wrapper/py_socket_wrapper.c |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/socket_wrapper/py_socket_wrapper.c 
b/lib/socket_wrapper/py_socket_wrapper.c
index 405a43a..5c8af03 100644
--- a/lib/socket_wrapper/py_socket_wrapper.c
+++ b/lib/socket_wrapper/py_socket_wrapper.c
@@ -45,6 +45,13 @@
 #include system/network.h
 #include socket_wrapper.h
 
+/* There's no Py_ssize_t in 2.4, apparently */
+#if PY_MAJOR_VERSION == 2  PY_MINOR_VERSION  5
+typedef int Py_ssize_t;
+typedef inquiry lenfunc;
+typedef intargfunc ssizeargfunc;
+#endif
+
 #ifndef Py_RETURN_NONE
 #define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
 #endif


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-11-15 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  ec38098 s4:partition LDB module - fix handling regarding special 
DNs on searches
   via  793f1a5 s4:torture/rpc/samr.c - use NULL instead of 0 when 
initialising pointers
   via  0e5f863 s4:join.py - fix typo
  from  383a918 s3: allow to set TCP_NODELAYACK socket option on AIX

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit ec38098c293ae06565dffc4bc58d72eba2b31ed3
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Oct 20 22:00:15 2011 +0200

s4:partition LDB module - fix handling regarding special DNs on searches

Normally they should always be passed to the main backend unless
something different has been specified.

Reviewed-by: abartlet

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Nov 15 22:43:06 CET 2011 on sn-devel-104

commit 793f1a547809172618e5b4071bc9a8160e7c7824
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Nov 13 21:33:09 2011 +0100

s4:torture/rpc/samr.c - use NULL instead of 0 when initialising pointers

commit 0e5f8634fc503112ce69e4b5ac7a53f0b6b9ab75
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Nov 13 21:13:59 2011 +0100

s4:join.py - fix typo

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/partition.c |5 +
 source4/scripting/python/samba/join.py |2 +-
 source4/torture/rpc/samr.c |2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/partition.c 
b/source4/dsdb/samdb/ldb_modules/partition.c
index 92918c7..7bf109c 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -585,6 +585,11 @@ static int partition_search(struct ldb_module *module, 
struct ldb_request *req)
return ldb_next_request(module, req);
}
 
+   /* Special DNs without specified partition should go further */
+   if (ldb_dn_is_special(req-op.search.base)) {
+   return ldb_next_request(module, req);
+   }
+
/* Locate the options */
domain_scope = (search_options
 (search_options-search_options  
LDB_SEARCH_OPTION_DOMAIN_SCOPE))
diff --git a/source4/scripting/python/samba/join.py 
b/source4/scripting/python/samba/join.py
index 96b07a6..4252a2d 100644
--- a/source4/scripting/python/samba/join.py
+++ b/source4/scripting/python/samba/join.py
@@ -742,7 +742,7 @@ class dc_join(object):
 return blob
 
 print Setup domain trusts with server %s % ctx.server
-binding_options =   # why doesn't signing work gere? w2k8r2 claims 
no session key
+binding_options =   # why doesn't signing work here? w2k8r2 claims 
no session key
 lsaconn = lsa.lsarpc(ncacn_np:%s[%s] % (ctx.server, binding_options),
  ctx.lp, ctx.creds)
 
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index cc2cdfc..6b90791 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -7827,7 +7827,7 @@ static bool test_Connect(struct dcerpc_binding_handle *b,
 
torture_comment(tctx, Testing samr_Connect\n);
 
-   r.in.system_name = 0;
+   r.in.system_name = NULL;
r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
r.out.connect_handle = h;
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-11-10 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  4cafcf0 libcli/cldap/cldap.c - remove outdated comment
  from  145f53e s3: server_id.pid has turned 64 (bits, that is)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 4cafcf0e6b2eaeda01fc340cdf1e552bafc4073b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Nov 10 17:13:29 2011 +0100

libcli/cldap/cldap.c - remove outdated comment

Reviewed-by: metze

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Thu Nov 10 20:32:08 CET 2011 on sn-devel-104

---

Summary of changes:
 libcli/cldap/cldap.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/cldap/cldap.c b/libcli/cldap/cldap.c
index 29c3b7b..3322bd8 100644
--- a/libcli/cldap/cldap.c
+++ b/libcli/cldap/cldap.c
@@ -212,8 +212,6 @@ static void cldap_recvfrom_done(struct tevent_req *subreq)
 nomem:
talloc_free(subreq);
talloc_free(in);
-   /*TODO: call a dead socket handler */
-   return;
 }
 
 /*


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-11-09 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  f4a07f0 s4:join.py - fix up DsAddEntry against Windows Server 2000
  from  c49fc52 docs: Make clear to use the workgroup name not the realm.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit f4a07f0b819b1fb669e436f91c34e61d0ec8ff92
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Nov 9 09:32:55 2011 +0100

s4:join.py - fix up DsAddEntry against Windows Server 2000

It is important to consider the result level regarding error
information. Windows 2000 seems to send us back v2, all other
implementations v3. Consider post Joining W2k AD domain

Reviewed-by: abartlet

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Wed Nov  9 23:37:08 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/scripting/python/samba/join.py |   27 ++-
 1 files changed, 18 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/join.py 
b/source4/scripting/python/samba/join.py
index 7ce5344..96b07a6 100644
--- a/source4/scripting/python/samba/join.py
+++ b/source4/scripting/python/samba/join.py
@@ -363,15 +363,24 @@ class dc_join(object):
 prev = o
 
 (level, ctr) = ctx.drsuapi.DsAddEntry(ctx.drsuapi_handle, 2, req2)
-if ctr.err_ver != 1:
-raise RuntimeError(expected err_ver 1, got %u % ctr.err_ver)
-if ctr.err_data.status != (0, 'WERR_OK'):
-print(DsAddEntry failed with status %s info %s % 
(ctr.err_data.status,
-
ctr.err_data.info.extended_err))
-raise RuntimeError(DsAddEntry failed)
-if ctr.err_data.dir_err != drsuapi.DRSUAPI_DIRERR_OK:
-print(DsAddEntry failed with dir_err %u % ctr.err_data.dir_err)
-raise RuntimeError(DsAddEntry failed)
+if level == 2:
+if ctr.dir_err != drsuapi.DRSUAPI_DIRERR_OK:
+print(DsAddEntry failed with dir_err %u % ctr.dir_err)
+raise RuntimeError(DsAddEntry failed)
+if ctr.extended_err != (0, 'WERR_OK'):
+print(DsAddEntry failed with status %s info %s % 
(ctr.extended_err))
+raise RuntimeError(DsAddEntry failed)
+if level == 3:
+if ctr.err_ver != 1:
+raise RuntimeError(expected err_ver 1, got %u % ctr.err_ver)
+if ctr.err_data.status != (0, 'WERR_OK'):
+print(DsAddEntry failed with status %s info %s % 
(ctr.err_data.status,
+
ctr.err_data.info.extended_err))
+raise RuntimeError(DsAddEntry failed)
+if ctr.err_data.dir_err != drsuapi.DRSUAPI_DIRERR_OK:
+print(DsAddEntry failed with dir_err %u % 
ctr.err_data.dir_err)
+raise RuntimeError(DsAddEntry failed)
+
 return ctr.objects
 
 def join_add_ntdsdsa(ctx):


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-11-08 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  099d687 s4:samba-tool user command - always initialise the boolean 
arguments properly
   via  a53bc0a s4:samba-tool - other fix for Gémes Géza patch regarding 
parameter handling
  from  95595dd s3:libsmb: fix cli_write_and_x() against OS/2 print shares 
(bug #5326)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 099d687d1a5df7c88deced386df38e6e716ca053
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Nov 8 20:46:25 2011 +0100

s4:samba-tool user command - always initialise the boolean arguments 
properly

It they haven't been specified.

Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Nov  8 22:28:38 CET 2011 on sn-devel-104

commit a53bc0a91bea89f0f284429c8fe2678891dd239b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Nov 7 17:57:52 2011 +0100

s4:samba-tool - other fix for Gémes Géza patch regarding parameter handling

The condition has not been specified correctly since we are expecting a 
boolean.
Pointed out by Jelmer.

Reviewed-by: Jelmer

---

Summary of changes:
 source4/scripting/python/samba/netcmd/user.py |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/netcmd/user.py 
b/source4/scripting/python/samba/netcmd/user.py
index 0ac4b23..7072521 100644
--- a/source4/scripting/python/samba/netcmd/user.py
+++ b/source4/scripting/python/samba/netcmd/user.py
@@ -100,13 +100,13 @@ Example3 shows how to create a new user in the OrgUnit 
organizational unit.
 takes_args = [username, password?]
 
 def run(self, username, password=None, credopts=None, sambaopts=None,
-versionopts=None, H=None, must_change_at_next_login=None, 
random_password=None,
-use_username_as_cn=None, userou=None, surname=None, 
given_name=None, initials=None,
+versionopts=None, H=None, must_change_at_next_login=False, 
random_password=False,
+use_username_as_cn=False, userou=None, surname=None, 
given_name=None, initials=None,
 profile_path=None, script_path=None, home_drive=None, 
home_directory=None,
 job_title=None, department=None, company=None, description=None,
 mail_address=None, internet_address=None, telephone_number=None, 
physical_delivery_office=None):
 
-if random_password is True:
+if random_password:
 password = generate_random_password(128, 255)
 
 while 1:
@@ -397,11 +397,11 @@ Example3 shows how an administrator would reset TestUser3 
user's password to pas
 
 def run(self, username=None, filter=None, credopts=None, sambaopts=None,
 versionopts=None, H=None, newpassword=None,
-must_change_at_next_login=None, random_password=None):
+must_change_at_next_login=False, random_password=False):
 if filter is None and username is None:
 raise CommandError(Either the username or '--filter' must be 
specified!)
 
-if random_password is True:
+if random_password:
 password = generate_random_password(128, 255)
 else:
 password = newpassword


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-11-07 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  ce8b5d5 s4:samba-tool - fix Gémes Géza patch regarding parameter 
handling
   via  1d9ff23 Add a --random-password option to user create command.
  from  b9e6c48 s3-wafbuild: Fix inotify detection (bug 8580)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit ce8b5d520bafe10fb048f5c61197c840263decb6
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Nov 7 17:57:52 2011 +0100

s4:samba-tool - fix Gémes Géza patch regarding parameter handling

The new random-password parameter has not been evaluated correctly.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Mon Nov  7 19:35:05 CET 2011 on sn-devel-104

commit 1d9ff23f8ea22d0a9b5efc4ed2565bfc0dc6d92e
Author: Gémes Géza g...@kzsdabas.hu
Date:   Wed Nov 2 15:33:35 2011 +0100

Add a --random-password option to user create command.

Signed-Off-By: Jelmer Vernooij jel...@samba.org
Signed-off-by: Matthias Dieter Wallnöfer m...@samba.org

---

Summary of changes:
 source4/scripting/python/samba/netcmd/user.py |   21 +
 1 files changed, 17 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/netcmd/user.py 
b/source4/scripting/python/samba/netcmd/user.py
index cf0a1e7..0ac4b23 100644
--- a/source4/scripting/python/samba/netcmd/user.py
+++ b/source4/scripting/python/samba/netcmd/user.py
@@ -25,7 +25,7 @@ import sys, ldb
 from getpass import getpass
 from samba.auth import system_session
 from samba.samdb import SamDB
-from samba import gensec
+from samba import gensec, generate_random_password
 from samba.net import Net
 
 from samba.netcmd import (
@@ -71,6 +71,9 @@ Example3 shows how to create a new user in the OrgUnit 
organizational unit.
 Option(--must-change-at-next-login,
 help=Force password to be changed on next login,
 action=store_true),
+Option(--random-password,
+help=Generate random password,
+action=store_true),
 Option(--use-username-as-cn,
 help=Force use of username as user's CN,
 action=store_true),
@@ -97,12 +100,15 @@ Example3 shows how to create a new user in the OrgUnit 
organizational unit.
 takes_args = [username, password?]
 
 def run(self, username, password=None, credopts=None, sambaopts=None,
-versionopts=None, H=None, must_change_at_next_login=None,
+versionopts=None, H=None, must_change_at_next_login=None, 
random_password=None,
 use_username_as_cn=None, userou=None, surname=None, 
given_name=None, initials=None,
 profile_path=None, script_path=None, home_drive=None, 
home_directory=None,
 job_title=None, department=None, company=None, description=None,
 mail_address=None, internet_address=None, telephone_number=None, 
physical_delivery_office=None):
 
+if random_password is True:
+password = generate_random_password(128, 255)
+
 while 1:
 if password is not None and password is not '':
 break
@@ -382,17 +388,24 @@ Example3 shows how an administrator would reset TestUser3 
user's password to pas
 Option(--must-change-at-next-login,
help=Force password to be changed on next login,
action=store_true),
+Option(--random-password,
+help=Generate random password,
+action=store_true),
 ]
 
 takes_args = [username?]
 
 def run(self, username=None, filter=None, credopts=None, sambaopts=None,
 versionopts=None, H=None, newpassword=None,
-must_change_at_next_login=None):
+must_change_at_next_login=None, random_password=None):
 if filter is None and username is None:
 raise CommandError(Either the username or '--filter' must be 
specified!)
 
-password = newpassword
+if random_password is True:
+password = generate_random_password(128, 255)
+else:
+password = newpassword
+
 while 1:
 if password is not None and password is not '':
 break


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-11-03 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  1dbffa7 s4:lib/registry - enhance registry tests in respect to 
default values
   via  7e0bef6 s4:lib/registry/ldb.c - quit the deletion of a not-existing 
default value with WERR_BADFILE
   via  6b5a296 s4:lib/registry/ldb.c - don't use search filters for base 
searches
   via  042372b s4:lib/registry/regf.c - always generate debug messages on 
error cases
  from  79ab7ac s4-smbtorture: add some ndr validation tests for 
netlogon_samlogon_response structs.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 1dbffa70ae42dc254abbea0b7a958044a621996d
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Oct 27 09:54:06 2011 +0200

s4:lib/registry - enhance registry tests in respect to default values

Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Thu Nov  3 21:41:17 CET 2011 on sn-devel-104

commit 7e0bef604af0abeedd46f3ae42bd3002f18556f5
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Oct 28 19:52:49 2011 +0200

s4:lib/registry/ldb.c - quit the deletion of a not-existing default value 
with WERR_BADFILE

Reviewed-by: Jelmer

commit 6b5a296b4a5ec55b57d72e07ee1b5b6c0e20f282
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Oct 25 20:08:31 2011 +0200

s4:lib/registry/ldb.c - don't use search filters for base searches

They are not necessary in this case.

Reviewed-by: Jelmer

commit 042372bc20375f30a292b57bebe1c4d7608339ca
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Oct 28 18:20:47 2011 +0200

s4:lib/registry/regf.c - always generate debug messages on error cases

We need to know what is going on.

Reviewed-by: Jelmer

---

Summary of changes:
 source4/lib/registry/ldb.c|   10 --
 source4/lib/registry/regf.c   |3 +-
 source4/lib/registry/tests/registry.c |   55 -
 3 files changed, 63 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c
index 5244a20..0f0ddf9 100644
--- a/source4/lib/registry/ldb.c
+++ b/source4/lib/registry/ldb.c
@@ -408,7 +408,8 @@ static WERROR ldb_get_default_value(TALLOC_CTX *mem_ctx,
struct ldb_result *res;
int ret;
 
-   ret = ldb_search(c, mem_ctx, res, kd-dn, LDB_SCOPE_BASE, attrs, 
(dn=*));
+   ret = ldb_search(c, mem_ctx, res, kd-dn, LDB_SCOPE_BASE, attrs,
+NULL);
 
if (ret != LDB_SUCCESS) {
DEBUG(0, (Error getting default value for '%s': %s\n,
@@ -503,7 +504,8 @@ static WERROR ldb_open_key(TALLOC_CTX *mem_ctx, const 
struct hive_key *h,
ldb_path = reg_path_to_ldb(mem_ctx, h, name, NULL);
W_ERROR_HAVE_NO_MEMORY(ldb_path);
 
-   ret = ldb_search(c, mem_ctx, res, ldb_path, LDB_SCOPE_BASE, NULL, 
(key=*));
+   ret = ldb_search(c, mem_ctx, res, ldb_path, LDB_SCOPE_BASE, NULL,
+NULL);
 
if (ret != LDB_SUCCESS) {
DEBUG(3, (Error opening key '%s': %s\n,
@@ -651,7 +653,9 @@ static WERROR ldb_del_value(TALLOC_CTX *mem_ctx, struct 
hive_key *key,
 
talloc_free(msg);
 
-   if (ret != LDB_SUCCESS) {
+   if (ret == LDB_ERR_NO_SUCH_ATTRIBUTE) {
+   return WERR_BADFILE;
+   } else if (ret != LDB_SUCCESS) {
DEBUG(1, (ldb_del_value: %s\n, 
ldb_errstring(kd-ldb)));
return WERR_FOOBAR;
}
diff --git a/source4/lib/registry/regf.c b/source4/lib/registry/regf.c
index 5ca7b7c..b6a586c 100644
--- a/source4/lib/registry/regf.c
+++ b/source4/lib/registry/regf.c
@@ -2211,7 +2211,7 @@ WERROR reg_open_regf_file(TALLOC_CTX *parent_ctx, const 
char *location,
pull-data.data = (uint8_t*)fd_load(regf-fd, pull-data.length, 0, 
regf);
 
if (pull-data.data == NULL) {
-   DEBUG(0, (Error reading data\n));
+   DEBUG(0, (Error reading data from file: %s\n, location));
talloc_free(regf);
return WERR_GENERAL_FAILURE;
}
@@ -2220,6 +2220,7 @@ WERROR reg_open_regf_file(TALLOC_CTX *parent_ctx, const 
char *location,
W_ERROR_HAVE_NO_MEMORY(regf_hdr);
 
if (NT_STATUS_IS_ERR(tdr_pull_regf_hdr(pull, regf_hdr, regf_hdr))) {
+   DEBUG(0, (Failed to pull regf header from file: %s\n, 
location));
talloc_free(regf);
return WERR_GENERAL_FAILURE;
}
diff --git a/source4/lib/registry/tests/registry.c 
b/source4/lib/registry/tests/registry.c
index 7179c72..4e6dda4 100644
--- a/source4/lib/registry/tests/registry.c
+++ b/source4/lib/registry/tests/registry.c
@@ -255,8 +255,9 @@ static bool

[SCM] Samba Shared Repository - branch master updated

2011-10-27 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  a0f7c99 s4:wscript - install the two missing files dlz_bind9.so 
and named.conf.dlz
   via  673be97 s4:repl_meta_data LDB module - don't intercept the 
partition LDB module referrals
   via  2ee42eb s4:repl_meta_data LDB module - rename operation - do not 
overwrite error messages
   via  57b8bc7 s4:repl_meta_data LDB module - remove pointless debug 
messages
   via  45b4b82 s4:repl_meta_data LDB module - always return the original 
LDB result codes on failure
   via  3fe7475 s4:repl_meta_data LDB module - dsdb_search_module_dn 
already checks if len(res) == 1
   via  d95b4c9 s4:ldap.py - fix up the dSHeuristics test to check for the 
right behaviour
   via  6287d0d s4:objectclass_attrs LDB module - implement the 
dSHeuristics length checks correctly
   via  bb02aa5 s4:ldap.py - we test the creation of secrets already in the 
systemOnly testcase
   via  6fc55cb s4:ldap.py - enhance and fix up the object class test
   via  751bab4 s4:objectclass LDB module - objectclass modify op. - remove 
superflous talloc_strdup
   via  184c175 s4:objectclass LDB module - objectclass modify operations
   via  68b3770 s4:objectclass LDB module - forbid to add unrelated 
objectclasses
   via  730257f s4:objectclass LDB module - objectclass_add - small 
optimisation
   via  82d9c9e s4:objectclass LDB module - check_rodc_ntdsdsa_add
   via  3756508 s4:objectclass LDB module - update copyright
   via  7161bb4 s4:password_hash LDB module - fix compiler warning due to 
unsatisfied switch
   via  c9ac028 s4:ldap.py - fix up the UTF8 tests
   via  5875661 s4:ldap.py - reactivate some assertions in test_all
   via  b753965 s4:torture/ldap/basic.c - fix a typo
   via  8a6daa3 ldb:common/ldb_modules.c - fix a typo in comment
  from  b972bd5 s4-torture: Add a user creation check.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit a0f7c990f40796a71219a2c3f3d1077b90aae3c9
Author: Geza Gemes g...@kzsdabas.hu
Date:   Tue Oct 25 21:47:24 2011 +0200

s4:wscript - install the two missing files dlz_bind9.so and 
named.conf.dlz

Signed-off-by: Matthias Dieter Wallnöfer m...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Thu Oct 27 20:27:32 CEST 2011 on sn-devel-104

commit 673be97f1e512623e9930fb4592e917410cfa303
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Oct 22 15:57:45 2011 +0200

s4:repl_meta_data LDB module - don't intercept the partition LDB module 
referrals

Reviewed-by: abartlet

commit 2ee42ebab3776cea89a5b00464d7cb9db78cd27c
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Oct 14 09:51:04 2011 +0200

s4:repl_meta_data LDB module - rename operation - do not overwrite error 
messages

ldb_error could overwrite possibly useful error messages.

Reviewed-by: abartlet

commit 57b8bc74c480b9957109aa9ba196ba2acfea393e
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Oct 22 16:02:10 2011 +0200

s4:repl_meta_data LDB module - remove pointless debug messages

These are displayed when an object just doesn't exist!

Reviewed-by: abartlet

commit 45b4b8264abd80ed0fe39cbaec202ad8742a17a5
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Oct 14 09:27:56 2011 +0200

s4:repl_meta_data LDB module - always return the original LDB result codes 
on failure

And add ldb_operr() before the return ret to point out the position
where it failed (for add_time_element and add_uint64_element)

Reworked after a suggestion by abartlet.

commit 3fe747538bc79633ed7039c6c001902bacecef04
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Oct 14 09:25:56 2011 +0200

s4:repl_meta_data LDB module - dsdb_search_module_dn already checks if 
len(res) == 1

No need to perform an additional check here. As a return value we should
always give back the original error code and not generate a new one (to
let the caller know what is going on).

Reviewed-by: abartlet

commit d95b4c94978fad40b6cb052522aa191fe77c6663
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Oct 13 09:51:18 2011 +0200

s4:ldap.py - fix up the dSHeuristics test to check for the right behaviour

Reviewed-by: abartlet

commit 6287d0d61c1b63f399edc901133a6f61069224a6
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Oct 13 08:48:08 2011 +0200

s4:objectclass_attrs LDB module - implement the dSHeuristics length checks 
correctly

Consider bug #8489

Reviewed-by: abartlet

commit bb02aa5e0020e9f41d353d59889888caf9867b91
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Oct 13 08:21:31 2011 +0200

s4:ldap.py - we test the creation of secrets already

[SCM] Samba Shared Repository - branch master updated

2011-10-08 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  9c979e8 s4:findprovisionusnranges - the default python path is 
detected over env
   via  7447acd s4:upgrading-samba4.txt - fix mistakes reported by bug #8504
  from  ce5b4b3 examples/VFS: add skel_get_dfs_referrals()

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 9c979e88dcf46f310c54d71914722479892a5449
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Sep 30 16:45:55 2011 +0200

s4:findprovisionusnranges - the default python path is detected over env

Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sat Oct  8 13:06:20 CEST 2011 on sn-devel-104

commit 7447acded17b9b8aa7b8cb586fc7ad9612396a79
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Sep 30 15:47:04 2011 +0200

s4:upgrading-samba4.txt - fix mistakes reported by bug #8504

Reviewed-by: Jelmer

---

Summary of changes:
 source4/scripting/bin/findprovisionusnranges |2 +-
 upgrading-samba4.txt |1 -
 2 files changed, 1 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/bin/findprovisionusnranges 
b/source4/scripting/bin/findprovisionusnranges
index c91e42e..7ad88aa 100755
--- a/source4/scripting/bin/findprovisionusnranges
+++ b/source4/scripting/bin/findprovisionusnranges
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # Helper for determining USN ranges created of modified by provision and
 # upgradeprovision.
diff --git a/upgrading-samba4.txt b/upgrading-samba4.txt
index 3e9ffe0..82f562e 100644
--- a/upgrading-samba4.txt
+++ b/upgrading-samba4.txt
@@ -6,7 +6,6 @@ Upgrading from an older samba4 installation.
 * Backup your samba4 provision:
   go into the directory where your samba4 provision is stored 
(/usr/local/samba by default)
   do tar cf $HOME/backup.tar private etc var sysvol
-* Go into the source4 dir
 * do make install
 * run 'samba-tool dbcheck'
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-09-30 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  caacdb0 s3:wscript_build - add dependency on tdb-wrap3 for libnet 
dssync
   via  deede46 build: Add dep on tdb-wrap3 to get tdb headers
  from  fe1bcdb s3: Re-add (), fix a gcc hint

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit caacdb0cf10c9ec6d5caf6d08331af6ec9a42560
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Sep 29 12:47:17 2011 +0200

s3:wscript_build - add dependency on tdb-wrap3 for libnet dssync

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Sep 30 16:40:12 CEST 2011 on sn-devel-104

commit deede4616e9c8608258f1dd7660d132b89229d61
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Sep 28 10:33:36 2011 -0700

build: Add dep on tdb-wrap3 to get tdb headers

Signed-off-by: Matthias Dieter Wallnöfer m...@samba.org

---

Summary of changes:
 source3/wscript_build |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/wscript_build b/source3/wscript_build
index ff33c99..3b13b0b 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -795,7 +795,7 @@ bld.SAMBA3_SUBSYSTEM('REG_SMBCONF',
 
 bld.SAMBA3_SUBSYSTEM('REG_FULL',
 source=REG_FULL_SRC,
-deps='REG_SMBCONF',
+deps='REG_SMBCONF tdb-wrap3',
 vars=locals())
 
 bld.SAMBA3_LIBRARY('popt_samba3',
@@ -964,7 +964,7 @@ bld.SAMBA3_SUBSYSTEM('LIBNET',
 
 bld.SAMBA3_SUBSYSTEM('LIBNET_DSSYNC',
 source=LIBNET_DSSYNC_SRC,
-deps='LIBNET LIBCLI_DRSUAPI',
+deps='LIBNET LIBCLI_DRSUAPI tdb-wrap3',
 vars=locals())
 
 bld.SAMBA3_SUBSYSTEM('LIBNET_SAMSYNC',


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-09-20 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  02a08d5 s4:ntvfs common - remove two outdated function prototypes
   via  7c44039 s4:ntvfs common - add UTIL_TDB and tdb-wrap as internal 
build dependency
   via  5347074 s4:param/pyparam.c - suppress P_SEP compilation warning
  from  8dda773 s3-docs: document -k switch in net manpage.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 02a08d5cd5f2a57e51fffd2a10b6ee8f797df9e0
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Sep 20 18:38:54 2011 +0200

s4:ntvfs common - remove two outdated function prototypes

The two functions don't exist anymore.

Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Sep 20 20:16:29 CEST 2011 on sn-devel-104

commit 7c44039f483802c04611abaf11e0b421716e632b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Sep 20 15:04:54 2011 +0200

s4:ntvfs common - add UTIL_TDB and tdb-wrap as internal build dependency

These modules are required for both header and source code files (see
bug #8468).

Reviewed-by: Jelmer

commit 5347074c4e458e077e2833170e2b122494037552
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Sep 20 14:32:52 2011 +0200

s4:param/pyparam.c - suppress P_SEP compilation warning

Reviewed-by: Jelmer

---

Summary of changes:
 source4/ntvfs/common/brlock.h  |3 ---
 source4/ntvfs/common/opendb.h  |1 -
 source4/ntvfs/common/wscript_build |1 +
 source4/param/pyparam.c|4 ++--
 4 files changed, 3 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/ntvfs/common/brlock.h b/source4/ntvfs/common/brlock.h
index 703538f..650136b 100644
--- a/source4/ntvfs/common/brlock.h
+++ b/source4/ntvfs/common/brlock.h
@@ -51,8 +51,5 @@ struct brlock_ops {
  int *count);
 };
 
-
 void brlock_set_ops(const struct brlock_ops *new_ops);
 void brl_tdb_init_ops(void);
-void brl_ctdb_init_ops(void);
-
diff --git a/source4/ntvfs/common/opendb.h b/source4/ntvfs/common/opendb.h
index 446df17..1bfc6aa 100644
--- a/source4/ntvfs/common/opendb.h
+++ b/source4/ntvfs/common/opendb.h
@@ -57,4 +57,3 @@ struct opendb_oplock_break {
 
 void odb_set_ops(const struct opendb_ops *new_ops);
 void odb_tdb_init_ops(void);
-void odb_ctdb_init_ops(void);
diff --git a/source4/ntvfs/common/wscript_build 
b/source4/ntvfs/common/wscript_build
index 4977b70..b16f8fa 100644
--- a/source4/ntvfs/common/wscript_build
+++ b/source4/ntvfs/common/wscript_build
@@ -3,6 +3,7 @@
 bld.SAMBA_SUBSYSTEM('ntvfs_common',
source='init.c brlock.c brlock_tdb.c opendb.c opendb_tdb.c notify.c',
autoproto='proto.h',
+   deps='UTIL_TDB tdb-wrap',
public_deps='NDR_OPENDB NDR_NOTIFY sys_notify sys_lease share'
)
 
diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c
index 663ed84..d5049d7 100644
--- a/source4/param/pyparam.c
+++ b/source4/param/pyparam.c
@@ -143,8 +143,8 @@ static PyObject *py_lp_ctx_get_helper(struct 
loadparm_context *lp_ctx, const cha
   PyString_FromString(strlist[j]));
return pylist;
}
-
-   break;
+case P_SEP:
+   return NULL; /* this stands for a separator, can be ignored */
 }
 return NULL;
 


-- 
Samba Shared Repository


Re: [Samba] Samba4 alpha17 GIT raise domain functional level

2011-09-19 Thread Matthias Dieter Wallnöfer
Fix has been checked in, the parameters domain and forest have been 
renamed into domain-level and forest-level for further clarification.


Matthias

Matthias Dieter Wallnöfer wrote:
There has been a porting error from the old to the new implementation 
of this samba-tool command.


Since I am the original author of this code I will try to figure out 
how to re-add the domain option.


Matthias

Matthieu Patou wrote:

On 06/09/2011 13:53, a.key wrote:

Hi.
We are using samba4 as our production AD for a while in a mixed (XP, 
win2k3, win7, win2k8) environment.
This post: 
http://lists.samba.org/archive/samba-technical/2011-February/076525.html 
mentions that to raise the functional level one should use this 
command:


samba-tool domainlevel raise --domain=2008 --forest=2008

but in our current git version this command doesn't work due to the 
fact that there is no --domain switch as shown below:


# samba-tool domain level --help
Usage: samba-tool domain level (show | raise options)

Options:
  -h, --helpshow this help message and exit
  -H URL, --URL=URL LDB URL for database or target server
  --quiet   Be quiet
  --forest=FOREST   The forest function level (2003 | 2008 | 
2008_R2)


  Samba Common Options:
-s FILE, --configfile=FILE
Configuration file
-d DEBUGLEVEL, --debuglevel=DEBUGLEVEL
debug level
--option=OPTION set smb.conf option from command line
--realm=REALM   set the realm name

  Credentials Options:
--simple-bind-dn=DN
DN to use for a simple bind
--password=PASSWORD
Password
-U USERNAME, --username=USERNAME
Username
-W WORKGROUP, --workgroup=WORKGROUP
Workgroup
-N, --no-pass   Don't ask for a password
-k KERBEROS, --kerberos=KERBEROS
Use Kerberos
--ipaddress=IPADDRESS
IP address of server

  Version Options:
--version   Display version number


and when I'm trying to raise the forest level the tools says that 
the domain functional level needs to be raised first.


What's the proper way of raising the functional level in recent git 
is ?
Looks like a regression, you should file a bug in 
https://bugzilla.samba.org.


Matthieu.





--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[SCM] Samba Shared Repository - branch master updated

2011-09-13 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  3a759e0 ldb:pyldb.c - py_ldb_rename remove superflous ldb 
pointer
  from  c6cf070 s4-s3-upgrade Improve samba-tool domain samba3upgrade 
behaviour

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 3a759e0375baf52694d004cab72c34f372528286
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Sep 13 15:01:51 2011 +0200

ldb:pyldb.c - py_ldb_rename remove superflous ldb pointer

Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Sep 13 18:11:18 CEST 2011 on sn-devel-104

---

Summary of changes:
 lib/ldb/pyldb.c |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c
index 7991296..cb13fe9 100644
--- a/lib/ldb/pyldb.c
+++ b/lib/ldb/pyldb.c
@@ -1245,7 +1245,6 @@ static PyObject *py_ldb_rename(PyLdbObject *self, 
PyObject *args, PyObject *kwar
PyObject *py_dn1, *py_dn2;
struct ldb_dn *dn1, *dn2;
int ret;
-   struct ldb_context *ldb;
TALLOC_CTX *mem_ctx;
PyObject *py_controls = Py_None;
struct ldb_control **parsed_controls;
@@ -1266,7 +1265,6 @@ static PyObject *py_ldb_rename(PyLdbObject *self, 
PyObject *args, PyObject *kwar
PyErr_NoMemory();
return NULL;
}
-   ldb = pyldb_Ldb_AsLdbContext(self);
 
if (py_controls == Py_None) {
parsed_controls = NULL;
@@ -1277,12 +1275,12 @@ static PyObject *py_ldb_rename(PyLdbObject *self, 
PyObject *args, PyObject *kwar
}
 
 
-   if (!pyldb_Object_AsDn(mem_ctx, py_dn1, ldb, dn1)) {
+   if (!pyldb_Object_AsDn(mem_ctx, py_dn1, ldb_ctx, dn1)) {
talloc_free(mem_ctx);
return NULL;
}
 
-   if (!pyldb_Object_AsDn(mem_ctx, py_dn2, ldb, dn2)) {
+   if (!pyldb_Object_AsDn(mem_ctx, py_dn2, ldb_ctx, dn2)) {
talloc_free(mem_ctx);
return NULL;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-09-12 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  d0df757 s4:lib/socket/interface.c - ifaces strictly needs to be 
initialised
  from  fad5e3b Move the talloc_move call until *after* the check on 
status. Don't want to move something that might be invalid.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit d0df75701e529e2d872691f8be047c5b55118930
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Sep 12 15:45:11 2011 +0200

s4:lib/socket/interface.c - ifaces strictly needs to be initialised

Please consider a failing get_interfaces call and the talloc_free()
operation on a possible uninitialised ifaces on line 326.

https://bugzilla.samba.org/show_bug.cgi?id=8397

Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Mon Sep 12 23:49:12 CEST 2011 on sn-devel-104

---

Summary of changes:
 source4/lib/socket/interface.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/socket/interface.c b/source4/lib/socket/interface.c
index 42e1946..7994716 100644
--- a/source4/lib/socket/interface.c
+++ b/source4/lib/socket/interface.c
@@ -293,7 +293,7 @@ void load_interface_list(TALLOC_CTX *mem_ctx, struct 
loadparm_context *lp_ctx, s
 {
const char **ptr = lpcfg_interfaces(lp_ctx);
int i;
-   struct iface_struct *ifaces;
+   struct iface_struct *ifaces = NULL;
int total_probed;
bool enable_ipv6 = lpcfg_parm_bool(lp_ctx, NULL, ipv6, enable, 
true);
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-09-11 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  6f4264a s4:samba-tool/domain.py - rename arguments domain - 
domain-level, forest - forest-level
   via  7e460a0 s4:samba-tool/domain.py - restore domain raise functionality
   via  80f6932 ldb:ldb_controls.c - remove duplicate definition of 
LDB_CONTROL_CMP
   via  e3213bb ldb:pyldb.c - point out that PyLdbResult_AsResult does 
not convert everything
  from  86b1f45 lib/util/charset: the comparsion must be against our 
charset modules

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 6f4264a72efe3995d92cff631cf1886f7b5bdaf3
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Sep 11 17:31:38 2011 +0200

s4:samba-tool/domain.py - rename arguments domain - domain-level, 
forest - forest-level

This should clarify the scope of them.

Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sun Sep 11 20:12:52 CEST 2011 on sn-devel-104

commit 7e460a04f79c9056b7b0b6c927caa2db96229633
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Sep 9 15:27:25 2011 +0200

s4:samba-tool/domain.py - restore domain raise functionality

The samba-tool command has accidentally been damaged by commit
2d4988c3d79e501003875cd26b7f9aaa72402b31.

Reviewed-by: Jelmer

commit 80f6932e3ef4cfc25b6ed717ba2f499314ec5226
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jun 22 14:48:33 2011 +0200

ldb:ldb_controls.c - remove duplicate definition of LDB_CONTROL_CMP

And fix the comment

Reviewed-by: Jelmer

commit e3213bb4d0d6b1492e41a3b79f2e211493410d8c
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Jun 21 11:11:04 2011 +0200

ldb:pyldb.c - point out that PyLdbResult_AsResult does not convert 
everything

Reviewed-by: Jelmer

---

Summary of changes:
 lib/ldb/common/ldb_controls.c   |   14 ++--
 lib/ldb/pyldb.c |5 ++-
 source4/scripting/python/samba/netcmd/domain.py |   39 ---
 3 files changed, 34 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/ldb/common/ldb_controls.c b/lib/ldb/common/ldb_controls.c
index 81f3c7a..3856167 100644
--- a/lib/ldb/common/ldb_controls.c
+++ b/lib/ldb/common/ldb_controls.c
@@ -389,9 +389,9 @@ char *ldb_control_to_string(TALLOC_CTX *mem_ctx, const 
struct ldb_control *contr
 
 /*
  * A little trick to allow to use constants defined in headers rather than
- * hardwritten in the file hardwritten in the file
- * sizeof will return the \0 char as well so it will take the place of : in 
the
- * length of the string
+ * hardwritten in the file.
+ * sizeof will return the \0 char as well so it will take the place of :
+ * in the length of the string.
  */
 #define LDB_CONTROL_CMP(control, NAME) strncmp(control, NAME :, sizeof(NAME))
 
@@ -1000,14 +1000,6 @@ struct ldb_control *ldb_parse_control_from_string(struct 
ldb_context *ldb, TALLO
return NULL;
 }
 
-/*
- * A little trick to allow to use constants defined in headers rather than
- * hardwritten in the file hardwritten in the file
- * sizeof will return the \0 char as well so it will take the place of : in 
the
- * length of the string
- */
-#define LDB_CONTROL_CMP(control, NAME) strncmp(control, NAME :, sizeof(NAME))
-
 /* Parse controls from the format used on the command line and in ejs */
 struct ldb_control **ldb_parse_control_strings(struct ldb_context *ldb, 
TALLOC_CTX *mem_ctx, const char **control_strings)
 {
diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c
index 40efbb5..7991296 100644
--- a/lib/ldb/pyldb.c
+++ b/lib/ldb/pyldb.c
@@ -325,9 +325,12 @@ static PyObject *PyLdbResult_FromResult(struct ldb_result 
*result)
 }
 
 /**
- * Create a LDB Result from a Python object. 
+ * Create a LDB Result from a Python object.
  * If conversion fails, NULL will be returned and a Python exception set.
  *
+ * Note: the result object only includes the messages at the moment; extended
+ * result, controls and referrals are ignored.
+ *
  * @param mem_ctx Memory context in which to allocate the LDB Result
  * @param obj Python object to convert
  * @return a ldb_result, or NULL if the conversion failed
diff --git a/source4/scripting/python/samba/netcmd/domain.py 
b/source4/scripting/python/samba/netcmd/domain.py
index 884ea64..d76b092 100644
--- a/source4/scripting/python/samba/netcmd/domain.py
+++ b/source4/scripting/python/samba/netcmd/domain.py
@@ -129,14 +129,16 @@ class cmd_domain_level(Command):
 Option(-H, --URL, help=LDB URL for database or target server, 
type=str,
metavar=URL, dest=H),
 Option(--quiet, help=Be quiet, action=store_true),
-Option(--forest, type=choice, choices=[2003, 2008, 2008_R2],
+Option

Re: [Samba] Samba4 alpha17 GIT raise domain functional level

2011-09-10 Thread Matthias Dieter Wallnöfer
There has been a porting error from the old to the new implementation of 
this samba-tool command.


Since I am the original author of this code I will try to figure out how 
to re-add the domain option.


Matthias

Matthieu Patou wrote:

On 06/09/2011 13:53, a.key wrote:

Hi.
We are using samba4 as our production AD for a while in a mixed (XP, 
win2k3, win7, win2k8) environment.
This post: 
http://lists.samba.org/archive/samba-technical/2011-February/076525.html 
mentions that to raise the functional level one should use this command:


samba-tool domainlevel raise --domain=2008 --forest=2008

but in our current git version this command doesn't work due to the 
fact that there is no --domain switch as shown below:


# samba-tool domain level --help
Usage: samba-tool domain level (show | raise options)

Options:
  -h, --helpshow this help message and exit
  -H URL, --URL=URL LDB URL for database or target server
  --quiet   Be quiet
  --forest=FOREST   The forest function level (2003 | 2008 | 
2008_R2)


  Samba Common Options:
-s FILE, --configfile=FILE
Configuration file
-d DEBUGLEVEL, --debuglevel=DEBUGLEVEL
debug level
--option=OPTION set smb.conf option from command line
--realm=REALM   set the realm name

  Credentials Options:
--simple-bind-dn=DN
DN to use for a simple bind
--password=PASSWORD
Password
-U USERNAME, --username=USERNAME
Username
-W WORKGROUP, --workgroup=WORKGROUP
Workgroup
-N, --no-pass   Don't ask for a password
-k KERBEROS, --kerberos=KERBEROS
Use Kerberos
--ipaddress=IPADDRESS
IP address of server

  Version Options:
--version   Display version number


and when I'm trying to raise the forest level the tools says that the 
domain functional level needs to be raised first.


What's the proper way of raising the functional level in recent git is ?
Looks like a regression, you should file a bug in 
https://bugzilla.samba.org.


Matthieu.



--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[SCM] Samba Shared Repository - branch master updated

2011-08-19 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  c21c254 s3:passdb/py_passdb.c - restore Python = 2.4 compatibility
   via  aefde81 ldb:ldb_controls.c - cosmetic indentation fix
   via  87b482a ldb - two cosmetic fixes
  from  0825a52 Revert s3-messaging: IDMAP_ messages belongs to the 
Winbind range

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit c21c25450819c9bf2d88c52e6ba44df2c28a01a4
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Aug 19 19:27:32 2011 +0200

s3:passdb/py_passdb.c - restore Python = 2.4 compatibility

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Aug 19 21:03:44 CEST 2011 on sn-devel-104

commit aefde815ac44319c734f9459da2d36025c18fc56
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jun 22 14:46:09 2011 +0200

ldb:ldb_controls.c - cosmetic indentation fix

commit 87b482a89e045b8ae253911cb55b4957ee71175e
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Jun 21 11:32:02 2011 +0200

ldb - two cosmetic fixes

@ldb.h: Removes an invalid comment line
@pyldb.c: Fixes indentation

---

Summary of changes:
 lib/ldb/common/ldb_controls.c |9 -
 lib/ldb/include/ldb.h |2 --
 lib/ldb/pyldb.c   |4 ++--
 source3/passdb/py_passdb.c|7 +++
 4 files changed, 13 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/ldb/common/ldb_controls.c b/lib/ldb/common/ldb_controls.c
index b3ef243..81f3c7a 100644
--- a/lib/ldb/common/ldb_controls.c
+++ b/lib/ldb/common/ldb_controls.c
@@ -373,17 +373,16 @@ char *ldb_control_to_string(TALLOC_CTX *mem_ctx, const 
struct ldb_control *contr
 */
if (control-data == NULL) {
/*
-* We don't know the control but there is no real data attached 
to it
-* so we can represent it with local_oid:oid:criticity
+* We don't know the control but there is no real data attached
+* to it so we can represent it with local_oid:oid:criticity.
 */
res = talloc_asprintf(mem_ctx, local_oid:%s:%d,
control-oid,
control-critical);
-   return res;
-   }
-
+   } else {
res = talloc_asprintf(mem_ctx, unknown oid:%s,
control-oid);
+   }
return res;
 }
 
diff --git a/lib/ldb/include/ldb.h b/lib/ldb/include/ldb.h
index 4220ed0..ae34019 100644
--- a/lib/ldb/include/ldb.h
+++ b/lib/ldb/include/ldb.h
@@ -1425,8 +1425,6 @@ int ldb_build_extended_req(struct ldb_request **ret_req,
 /**
   call an extended operation
 
-  This function deletes a record from the database.
-
   \param ldb the context associated with the database (from ldb_init())
   \param oid the OID of the extended operation.
   \param data a void pointer a the extended operation specific parameters,
diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c
index 218505d..72680c1 100644
--- a/lib/ldb/pyldb.c
+++ b/lib/ldb/pyldb.c
@@ -1143,11 +1143,11 @@ static PyObject *py_ldb_add(PyLdbObject *self, PyObject 
*args, PyObject *kwargs)
 
ret = ldb_request(ldb_ctx, req);
if (ret == LDB_SUCCESS) {
-   ret = ldb_wait(req-handle, LDB_WAIT_ALL);
+   ret = ldb_wait(req-handle, LDB_WAIT_ALL);
} 
 
if (ret == LDB_SUCCESS) {
-   ret = ldb_transaction_commit(ldb_ctx);
+   ret = ldb_transaction_commit(ldb_ctx);
} else {
ldb_transaction_cancel(ldb_ctx);
if (ldb_ctx-err_string == NULL) {
diff --git a/source3/passdb/py_passdb.c b/source3/passdb/py_passdb.c
index 9192ab3..e23f475 100644
--- a/source3/passdb/py_passdb.c
+++ b/source3/passdb/py_passdb.c
@@ -25,6 +25,13 @@
 #include passdb.h
 #include secrets.h
 
+/* There's no Py_ssize_t in 2.4, apparently */
+#if PY_MAJOR_VERSION == 2  PY_MINOR_VERSION  5
+typedef int Py_ssize_t;
+typedef inquiry lenfunc;
+typedef intargfunc ssizeargfunc;
+#endif
+
 #ifndef Py_RETURN_NONE
 #define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
 #endif


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-06-16 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  03ea6b5 s4:winbind/wb_samba3_protocol.c - rework it using concrete 
enum values
   via  75e77f9 s4:ntvfs subsystems - rework it using concrete enum values
  from  9ba1087 auth/kerberos/gssapi_pac: fix compiler warnings

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 03ea6b5b9e6baae3596649b9d9cfe79dbd44a9a4
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Jun 16 09:01:04 2011 +0200

s4:winbind/wb_samba3_protocol.c - rework it using concrete enum values

This changes commit 49352cafb4259503e6afb44d38db9bfd525d5e0d to comply
with kblin's plans.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Thu Jun 16 10:14:52 CEST 2011 on sn-devel-104

commit 75e77f9fa023d81a57e7913bcbd712eae7a677b1
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Jun 16 08:39:03 2011 +0200

s4:ntvfs subsystems - rework it using concrete enum values

This changes commit 260bc987b00b3fff6c9b99211627b14e9bd0789a to comply
with metze's plans.

---

Summary of changes:
 source4/ntvfs/ntvfs_generic.c|   14 --
 source4/ntvfs/posix/pvfs_qfileinfo.c |6 +-
 source4/ntvfs/posix/pvfs_search.c|6 +-
 source4/torture/gentest.c|   22 +-
 source4/winbind/wb_samba3_protocol.c |   30 +++---
 5 files changed, 70 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c
index 9aa8e04..bed9c9c 100644
--- a/source4/ntvfs/ntvfs_generic.c
+++ b/source4/ntvfs/ntvfs_generic.c
@@ -664,9 +664,12 @@ static NTSTATUS ntvfs_map_fsinfo_finish(struct 
ntvfs_module_context *ntvfs,
ZERO_STRUCT(fs-objectid_information.out.unknown);
return NT_STATUS_OK;
 
-   default:
+   case RAW_QFS_GENERIC:
+   case RAW_QFS_UNIX_INFO:
return NT_STATUS_INVALID_LEVEL;
}
+
+   return NT_STATUS_INVALID_LEVEL;
 }
 
 /*
@@ -926,9 +929,16 @@ NTSTATUS ntvfs_map_fileinfo(TALLOC_CTX *mem_ctx,
info-unix_link_info.out.link_dest = 
info2-generic.out.link_dest;
return NT_STATUS_OK;
 #endif
-   default:
+   case RAW_FILEINFO_GENERIC:
+   case RAW_FILEINFO_SEC_DESC:
+   case RAW_FILEINFO_EA_LIST:
+   case RAW_FILEINFO_UNIX_INFO2:
+   case RAW_FILEINFO_SMB2_ALL_EAS:
+   case RAW_FILEINFO_SMB2_ALL_INFORMATION:
return NT_STATUS_INVALID_LEVEL;
}
+
+   return NT_STATUS_INVALID_LEVEL;
 }
 
 /* 
diff --git a/source4/ntvfs/posix/pvfs_qfileinfo.c 
b/source4/ntvfs/posix/pvfs_qfileinfo.c
index 515819b..9284306 100644
--- a/source4/ntvfs/posix/pvfs_qfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_qfileinfo.c
@@ -331,10 +331,14 @@ static NTSTATUS pvfs_map_fileinfo(struct pvfs_state *pvfs,
NT_STATUS_HAVE_NO_MEMORY(info-all_info2.out.fname.s);
return NT_STATUS_OK;
 
-   default:
+   case RAW_FILEINFO_GENERIC:
+   case RAW_FILEINFO_UNIX_BASIC:
+   case RAW_FILEINFO_UNIX_INFO2:
+   case RAW_FILEINFO_UNIX_LINK:
return NT_STATUS_INVALID_LEVEL;
}
 
+   return NT_STATUS_INVALID_LEVEL;
 }
 
 /*
diff --git a/source4/ntvfs/posix/pvfs_search.c 
b/source4/ntvfs/posix/pvfs_search.c
index 668f8d7..893f55c 100644
--- a/source4/ntvfs/posix/pvfs_search.c
+++ b/source4/ntvfs/posix/pvfs_search.c
@@ -220,9 +220,13 @@ static NTSTATUS fill_search_info(struct pvfs_state *pvfs,
file-id_both_directory_info.name.s   = fname;
return NT_STATUS_OK;
 
-   default:
+   case RAW_SEARCH_DATA_GENERIC:
+   case RAW_SEARCH_DATA_UNIX_INFO:
+   case RAW_SEARCH_DATA_UNIX_INFO2:
return NT_STATUS_INVALID_LEVEL;
}
+
+   return NT_STATUS_INVALID_LEVEL;
 }
 
 
diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c
index 28e6953..9b6e7fc 100644
--- a/source4/torture/gentest.c
+++ b/source4/torture/gentest.c
@@ -2309,7 +2309,27 @@ static void gen_setfileinfo(int instance, union 
smb_setfileinfo *info)
info-full_ea_information.in.eas = gen_ea_list();
break;
 
-   default:
+   case RAW_SFILEINFO_GENERIC:
+   case RAW_SFILEINFO_SEC_DESC:
+   case RAW_SFILEINFO_1025:
+   case RAW_SFILEINFO_1029:
+   case RAW_SFILEINFO_1032:
+   case RAW_SFILEINFO_UNIX_BASIC:
+   case RAW_SFILEINFO_UNIX_INFO2:
+   case RAW_SFILEINFO_UNIX_LINK:
+   case RAW_SFILEINFO_UNIX_HLINK:
+   case RAW_SFILEINFO_LINK_INFORMATION:
+   case RAW_SFILEINFO_PIPE_INFORMATION:
+   case RAW_SFILEINFO_VALID_DATA_INFORMATION:
+   case RAW_SFILEINFO_SHORT_NAME_INFORMATION:
+   case RAW_SFILEINFO_1027:
+   case

[SCM] Samba Shared Repository - branch master updated

2011-06-11 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  97af358 s4:libcli/raw/raw*.c - add unhandled enum values
   via  bf5e625 s4:torture/ndr/string.c - fix type-punned warning and 
remove unused variables
   via  62a1e13 s4:ntvfs/smb2/vfs_smb2.c - remove unused variable
   via  cda2fa2 s4:auth/ntlm/auth_unix.c - remove unused variables
  from  8963e80 Revert s3:idmap_autorid: add a talloc_stackframe() to 
idmap_autorid_initialize()

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 97af3586567ff7ad4f22e083d32e5cfa2ebbb96e
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Jun 11 16:55:16 2011 +0200

s4:libcli/raw/raw*.c - add unhandled enum values

Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sat Jun 11 18:46:13 CEST 2011 on sn-devel-104

commit bf5e625393776b82c6f0d39852b76647716aab27
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Jun 11 15:25:11 2011 +0200

s4:torture/ndr/string.c - fix type-punned warning and remove unused 
variables

Reviewed-by: Jelmer

commit 62a1e13b294d26f44d764810344ead5b58b8eb53
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Jun 11 15:22:34 2011 +0200

s4:ntvfs/smb2/vfs_smb2.c - remove unused variable

Reviewed-by: Jelmer

commit cda2fa21eb007b57960ab8a7eb9ddd996887e5bf
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Jun 11 15:07:50 2011 +0200

s4:auth/ntlm/auth_unix.c - remove unused variables

Relicts from commit 323c7445713d17989452b99bbb541248bb2388eb

Reviewed-by: Jelmer

---

Summary of changes:
 source4/auth/ntlm/auth_unix.c   |2 --
 source4/libcli/raw/rawfile.c|1 +
 source4/libcli/raw/rawsetfileinfo.c |4 ++--
 source4/ntvfs/smb2/vfs_smb2.c   |1 -
 source4/torture/ndr/string.c|5 ++---
 5 files changed, 5 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/ntlm/auth_unix.c b/source4/auth/ntlm/auth_unix.c
index 9e92a04..d79ebc1 100644
--- a/source4/auth/ntlm/auth_unix.c
+++ b/source4/auth/ntlm/auth_unix.c
@@ -607,12 +607,10 @@ static NTSTATUS check_unix_password(TALLOC_CTX *ctx, 
struct loadparm_context *lp
 {
char *username;
char *password;
-   char *pwcopy;
char *salt;
char *crypted;
struct passwd *pws;
NTSTATUS nt_status;
-   int level = lpcfg_passwordlevel(lp_ctx);
 
*ret_passwd = NULL;
 
diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c
index 626067a..1cacaab 100644
--- a/source4/libcli/raw/rawfile.c
+++ b/source4/libcli/raw/rawfile.c
@@ -904,6 +904,7 @@ struct smbcli_request *smb_raw_lock_send(struct smbcli_tree 
*tree, union smb_loc
break;
}
case RAW_LOCK_SMB2:
+   case RAW_LOCK_SMB2_BREAK:
return NULL;
}
 
diff --git a/source4/libcli/raw/rawsetfileinfo.c 
b/source4/libcli/raw/rawsetfileinfo.c
index 6ad3e9e..ff36d50 100644
--- a/source4/libcli/raw/rawsetfileinfo.c
+++ b/source4/libcli/raw/rawsetfileinfo.c
@@ -262,11 +262,11 @@ static bool smb_raw_setinfo_backend(struct smbcli_tree 
*tree,
return smb_raw_setfileinfo_passthru(mem_ctx, 
parms-generic.level,
parms, blob);
 
-   /* Unhandled levels */
-
+   /* Unhandled levels */
case RAW_SFILEINFO_UNIX_LINK:
case RAW_SFILEINFO_UNIX_HLINK:
case RAW_SFILEINFO_RENAME_INFORMATION_SMB2:
+   case RAW_SFILEINFO_LINK_INFORMATION:
break;
}
 
diff --git a/source4/ntvfs/smb2/vfs_smb2.c b/source4/ntvfs/smb2/vfs_smb2.c
index 24f0c33..889c534 100644
--- a/source4/ntvfs/smb2/vfs_smb2.c
+++ b/source4/ntvfs/smb2/vfs_smb2.c
@@ -162,7 +162,6 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context 
*ntvfs,
NTSTATUS status;
struct cvfs_private *p;
const char *host, *user, *pass, *domain, *remote_share, *sharename;
-   struct composite_context *creq;
struct share_config *scfg = ntvfs-ctx-config;
struct smb2_tree *tree;
struct cli_credentials *credentials;
diff --git a/source4/torture/ndr/string.c b/source4/torture/ndr/string.c
index 9214b59..30ed1e4 100644
--- a/source4/torture/ndr/string.c
+++ b/source4/torture/ndr/string.c
@@ -51,7 +51,8 @@ test_ndr_push_string (struct torture_context *tctx, const 
char *string,
torture_assert(tctx, ndr-data != NULL,
   ndr_push_string: succeeded but NULL data);
 
-   torture_assert(tctx, strcmp_pass == !strcmp(string, ndr-data),
+   torture_assert(tctx,
+  strcmp_pass == !strcmp(string, (char 
*)ndr-data),
   ndr_push_string: post-push

[SCM] Samba Shared Repository - branch master updated

2011-06-09 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  9f02fb5 s4:rpc_server/dcesrv_samr.c - quiet enum warnings
   via  260bc98 s4:ntvfs subsystem - quiet enum warnings
   via  40ea52a s4:libnet/libnet_rpc.c - quiet an enum warning
   via  49352ca s4:winbind/wb_samba3_protocol.c - quiet enum warning
   via  26c7223 s4:schema_convert_to_ol.c - fix memory contexts
   via  87a38d7 s4:dsdb/schema_convert_to_ol.c - quiet enum warning
   via  27f1779 s4:auth/ntlm/auth.c - fix incompatible pointer type warning
   via  530d1e3 s3:auth/auth_samba4.c - remove unused variable
   via  059e735 s3:passdb/pdb_samba4.c - remove unused variable
   via  d6fe38b s4:smbd/server.c - quiet time_t format string warnings by 
casts
   via  4d0c00b s3:passdb/pdb_samba4.c - fix a format specifier warning
   via  7ebafb0 s4:librpc/rpc/dcerpc.c - janitorial: use void for 
functions without arguments
   via  ba5cec5 ldb:ldb_msg.c - move away from errno
  from  516dc40 samba-tool: added --local option to drs replicate command

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 9f02fb51d41c2c2bf285ab6d25138f0b7b0cba81
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jun 8 19:02:37 2011 +0200

s4:rpc_server/dcesrv_samr.c - quiet enum warnings

When we are acting in the role of a PDC then please return it as status 
information.

Reviewed-by: Tridge

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Thu Jun  9 12:06:36 CEST 2011 on sn-devel-104

commit 260bc987b00b3fff6c9b99211627b14e9bd0789a
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jun 8 19:00:18 2011 +0200

s4:ntvfs subsystem - quiet enum warnings

Simply return NT_STATUS_INVALID_LEVEL for unknown types of requests.

Reviewed-by: Tridge

commit 40ea52a267c7362e206ac83ff6d1fc586b05e2f4
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jun 8 18:58:45 2011 +0200

s4:libnet/libnet_rpc.c - quiet an enum warning

Other enum types have been checked before.

Reviewed-by: Tridge

commit 49352cafb4259503e6afb44d38db9bfd525d5e0d
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jun 8 18:57:00 2011 +0200

s4:winbind/wb_samba3_protocol.c - quiet enum warning

Don't enumerate all unimplemented types of call which simply leads to
incompleteness.

Reviewed-by: Tridge

commit 26c7223e7240a5d4a2b39b14b47c0e66b7c089c9
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Jun 9 09:17:16 2011 +0200

s4:schema_convert_to_ol.c - fix memory contexts

- Add more mem_ctx free functions on error cases
- Steal the out string directly onto the LDB context to be able to free
  the local mem_ctx

Reviewed-by: Tridge

commit 87a38d77ac899d8b6e21c7bcaeb8d4b74ed65341
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jun 8 18:55:23 2011 +0200

s4:dsdb/schema_convert_to_ol.c - quiet enum warning

Introduce a error message when choosing wrong targets.

Reviewed-by: Tridge

commit 27f1779814accd82a5ec1330f8856192a69271f8
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jun 8 09:36:59 2011 +0200

s4:auth/ntlm/auth.c - fix incompatible pointer type warning

Reviewed-by: Tridge

commit 530d1e33f7ea565e5668ebe609f049fa6a69871b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jun 8 19:04:48 2011 +0200

s3:auth/auth_samba4.c - remove unused variable

Reviewed-by: Tridge

commit 059e735e4167477f7f183aae3ec517b31ca4700f
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Jun 6 22:41:18 2011 +0200

s3:passdb/pdb_samba4.c - remove unused variable

Reviewed-by: Tridge

commit d6fe38b99dde9abc91a3806ece93930e5530dda7
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Jun 6 22:40:20 2011 +0200

s4:smbd/server.c - quiet time_t format string warnings by casts

Reviewed-by: Tridge

commit 4d0c00bb33ec9fe54b8e87491001047d06525c70
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Jun 6 22:34:00 2011 +0200

s3:passdb/pdb_samba4.c - fix a format specifier warning

Reviewed-by: Tridge

commit 7ebafb000a79e9317b267ae09b9fa9b0685b9209
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Jun 6 12:50:16 2011 +0200

s4:librpc/rpc/dcerpc.c - janitorial: use void for functions without 
arguments

Probably a mistake in commit 907cdb5de7f16a2540299aeba211bf2a5ae6fafe.

Reviewed-by: Tridge

commit ba5cec58049fd9ca8cb9d0d1706ed2e34328335f
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu May 26 09:25:16 2011 +0200

ldb:ldb_msg.c - move away from errno

Reviewed-by: Tridge

---

Summary of changes:
 source3/auth/auth_samba4.c |1 -
 source3

Re: quiet enum warnings

2011-06-09 Thread Matthias Dieter Wallnöfer

Okay, these are different point of views.

Tridge, what do you think?

Cheers,
Matthias

Stefan (metze) Metzmacher wrote:

Hi Matthias,

   

case RAW_FILEINFO_GETATTR:
info-getattr.out.attrib = name-dos.attrib;
info-getattr.out.size   = name-st.st_size;
@@ -333,9 +330,11 @@ static NTSTATUS pvfs_map_fileinfo(struct pvfs_state *pvfs,
  
name-original_name);
NT_STATUS_HAVE_NO_MEMORY(info-all_info2.out.fname.s);
return NT_STATUS_OK;
+
+   default:
+   return NT_STATUS_INVALID_LEVEL;
}

-   return NT_STATUS_INVALID_LEVEL;
  }
 

I think we should better fix this by adding the missing enum values
explicit instead of
using a default, as that will make sure we'll get a warning again if
someone adds a new
value.

metze

   




[SCM] Samba Shared Repository - branch master updated

2011-05-25 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  ff47927 s4:samldb LDB module - check if the RODC group exists if 
creating an RODC
   via  08f5ed8 s4:samldb LDB module - better to call 
samldb_prim_group_trigger
   via  779d882 s4:samldb LDB module - convert a dsdb_module_search into 
dsdb_module_search_dn
   via  11937ce s4:sam.py - uncomment/enhance some account type tests
   via  2ad0100 s4:samldb LDB modules - only objectClass computer is 
allowed to embed all types of account
   via  4740473 s4:sam.py - tests for isCriticalSystemObject attribute
   via  0c753e5 s4:samldb LDB module - fix isCriticalSystemObject 
behaviour
   via  c72d32d s4:sam.py - unchanged primaryGroupID when account type 
remains the same
   via  b712c72 s4:samldb LDB module - fix the behaviour when changing the 
userAccountControl
  from  ee0ee5e s3-testparm Warn about incorrect use of 'password server'

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit ff47927fb960b9a6c9a1ca7236dc4562c5a68461
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue May 24 22:05:46 2011 +0200

s4:samldb LDB module - check if the RODC group exists if creating an RODC

Older AD deployments simply don't have it and hence there is no RODC
support.

Reviewed-by: abartlet

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Wed May 25 10:26:37 CEST 2011 on sn-devel-104

commit 08f5ed8b4f21f1c52ce7a5de8c692df20d21f571
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue May 24 21:21:19 2011 +0200

s4:samldb LDB module - better to call samldb_prim_group_trigger

samldb_prim_group_trigger which as a wrapper calls 
samldb_prim_group_change
for a LDB modify operation.

Reviewed-by: abartlet

commit 779d882aca4fb0486bea0109c3630e1d7abef840
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon May 23 12:59:58 2011 +0200

s4:samldb LDB module - convert a dsdb_module_search into 
dsdb_module_search_dn

It saves us from checking the number of returned entries.

Reviewed-by: abartlet

commit 11937ce5e1b02af2eed2bc4d61c71875838c23a8
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon May 23 12:52:35 2011 +0200

s4:sam.py - uncomment/enhance some account type tests

Reviewed-by: abartlet

commit 2ad0100d5ba3e388ead950b0cc6dbf887f907625
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon May 23 12:51:06 2011 +0200

s4:samldb LDB modules - only objectClass computer is allowed to embed all 
types of account

Reviewed-by: abartlet

commit 4740473591d5bf58570a7105123b92aadb8d056e
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon May 23 12:05:57 2011 +0200

s4:sam.py - tests for isCriticalSystemObject attribute

Reviewed-by: abartlet

commit 0c753e503c977c470aeb4fcce5b74f283ba2012f
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon May 23 11:46:39 2011 +0200

s4:samldb LDB module - fix isCriticalSystemObject behaviour

Tests against Windows Server show that it gets set to FALSE (not
deleted) if we change the account type to a domain member.

Reviewed-by: abartlet

commit c72d32da6ddfe5572b239a95807137d508145e53
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon May 23 10:48:16 2011 +0200

s4:sam.py - unchanged primaryGroupID when account type remains the same

Enhance the testcase with a workstation example.

Reviewed-by: abartlet

commit b712c7273d2362f1f4ee7cd96f6f30c5035244d9
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon May 23 10:29:17 2011 +0200

s4:samldb LDB module - fix the behaviour when changing the 
userAccountControl

Ekacnet was not quite right yet but his patch made me think further.
This primary group changing is only needed if the account type changes.
With this patch we do one more search if the userAccountControl
changes but we save us from doing these unneeded and wrong modify replace
operations most of the time.

Reviewed-by: abartlet

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/samldb.c |  167 -
 source4/dsdb/tests/python/sam.py|  248 +++
 2 files changed, 348 insertions(+), 67 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c 
b/source4/dsdb/samdb/ldb_modules/samldb.c
index 216e14d..07c9cdd 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -3,7 +3,7 @@
 
Copyright (C) Andrew Bartlett abart...@samba.org 2005
Copyright (C) Simo Sorce  2004-2008
-   Copyright (C) Matthias Dieter Wallnöfer 2009-2010
+   Copyright (C) Matthias Dieter Wallnöfer 2009-2011
 
This program is free software; you

[SCM] Samba Shared Repository - branch master updated

2011-05-25 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  0f80186 Fix numerous missing dependencies in WAF build scripts
  from  b58534f s3-winbind: BUG 8166 - Don't lockout users when offline.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 0f8018676a6cb33238d506338d4fbb8b683550d3
Author: Sean Finney sean...@seanius.net
Date:   Fri May 20 08:12:08 2011 +

Fix numerous missing dependencies in WAF build scripts

With the recent consolidation of code between s3 and s4, a number of new
dependencies have been implicitly introduced.  For example, previous s3
code gained an implicit dependency on talloc after the charset related
consolidation (lib/util/charset/charset.h now includes talloc.h).  When
building against the embedded version of talloc this isn't a problem
since the paths are automatically added to the search path, but when
building against the external libraries build failures will occur for
all components that don't directly or indirectly include talloc as
a dependency.

Since charset.h is included from util.h, which in turn is included from
includes.h, this means most of the codebase (s3 and s4) has such an
undeclared dependency.

Therefore, samba-util-common and samba-util have been added as
dependencies to the s3 and s4 code respectively, for all cases where
the source would otherwise fail to build.  Additionally, a few other
dependencies are added in specific wscript_build files to address
similar dependency-related problems.

https://bugzilla.samba.org/show_bug.cgi?id=8128

Signed-off-by: Sean Finney sean...@seanius.net
Signed-off-by: Matthias Dieter Wallnöfer m...@samba.org
Signed-off-by: Andrew Bartlett abart...@samba.org

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Wed May 25 19:22:13 CEST 2011 on sn-devel-104

---

Summary of changes:
 lib/util/charset/wscript_build |4 +-
 lib/util/wscript_build |4 +-
 libgpo/wscript_build   |2 +-
 source3/auth/wscript_build |7 +
 source3/libgpo/gpext/wscript_build |1 +
 source3/modules/wscript_build  |   39 +-
 source3/passdb/wscript_build   |3 ++
 source3/rpc_server/wscript_build   |   22 +
 source3/winbindd/wscript_build |9 +++
 source3/wscript_build  |   45 +--
 10 files changed, 111 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/charset/wscript_build b/lib/util/charset/wscript_build
index 3b29ace..1f2c8df 100644
--- a/lib/util/charset/wscript_build
+++ b/lib/util/charset/wscript_build
@@ -7,8 +7,8 @@ bld.SAMBA_SUBSYSTEM('ICONV_WRAPPER',
 bld.SAMBA_SUBSYSTEM('CHARSET',
 public_headers='charset.h',
 source='codepoints.c convert_string.c util_str.c 
util_unistr_w.c charcnv.c pull_push.c util_unistr.c',
-deps='DYNCONFIG ICONV_WRAPPER'
-)
+deps='DYNCONFIG ICONV_WRAPPER',
+public_deps='talloc')
 
 bld.SAMBA_MODULE('charset_weird',
  subsystem='CHARSET',
diff --git a/lib/util/wscript_build b/lib/util/wscript_build
index 740e68b..3092b6c 100755
--- a/lib/util/wscript_build
+++ b/lib/util/wscript_build
@@ -8,10 +8,10 @@ common_util_sources = '''talloc_stack.c smb_threads.c xfile.c 
data_blob.c
 util_str.c util_str_common.c substitute.c ms_fnmatch.c'''
 
 common_util_headers = 'debug.h'
-common_util_public_deps = 'talloc pthread LIBCRYPTO'
+common_util_public_deps = 'talloc pthread LIBCRYPTO CHARSET'
 s4_util_sources = '''dprintf.c parmlist.c'''
 s4_util_deps = 'DYNCONFIG'
-s4_util_public_deps = 'talloc CHARSET execinfo uid_wrapper'
+s4_util_public_deps = 'talloc execinfo uid_wrapper'
 s4_util_public_headers = 'attr.h byteorder.h data_blob.h memory.h 
safe_string.h time.h talloc_stack.h xfile.h dlinklist.h util.h 
string_wrappers.h'
 s4_util_header_path = [ ('dlinklist.h util.h', '.'), ('*', 'util') ]
 
diff --git a/libgpo/wscript_build b/libgpo/wscript_build
index e2422c5..f182b44 100644
--- a/libgpo/wscript_build
+++ b/libgpo/wscript_build
@@ -2,7 +2,7 @@
 
 bld.SAMBA_SUBSYSTEM('LIBGPO',
source='gpo_util.c gpo_sec.c ../libgpo/gpext/gpext.c gpo_fetch.c 
gpo_ini.c ../source4/libgpo/ads_convenience.c ../source3/libgpo/gpo_filesync.c 
../source4/libgpo/gpo_filesync.c',
-   deps='ldb samba-net',
+   deps='ldb samba-net samba-util',
enabled=False
)
 
diff --git a/source3/auth/wscript_build b/source3/auth/wscript_build
index 58929da..4077b8f 100644
--- a/source3/auth/wscript_build
+++ b/source3/auth/wscript_build
@@ -16,6 +16,7 @@ AUTH_SRC = '''auth.c

[SCM] Samba Shared Repository - branch master updated

2011-05-21 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  1b5c2d8 s4:sam.py - add tests to check that setting 
userAccountValue on usersdon't impact the primaryGroupID attribute
   via  e3aa200 s4:samldb LDB module - don't change the primaryGroupId on 
LDB modifications unless we are a computer/dc/rodc
   via  67bf5cf s4:lsa RPC server - handle LDB flags as unsigned
   via  d34205a s4:ldb-samba/ldb_wrap.*-dsdb/samdb/samdb.c - handle LDB 
connection flags as unsigned
   via  4618a7f ldb:pyldb.c - all flags should be unsigned
   via  74b50b4 ldb:ldb_sqlite3.c - all LDB flags should be handled as 
unsigned
   via  3956e68 ldb:tools/cmdline.c + tools/ldbtest.c - the connection 
flags are typed as unsigned
   via  e6c5e11 ldb:ldbtest.c - make more use of LDB constants
   via  5c4fabb s4:torture - always cast correctly when using the %x 
format string argument
   via  f44808f s4:auth/ntlmssp/ntlmssp_server.c - add const in front of 
dnsdomain
  from  850cca3 add a demo script for dirsync

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 1b5c2d8e924e32b1a4eae36c7b353de8a126a422
Author: Matthieu Patou m...@matws.net
Date:   Sat May 21 14:35:58 2011 +0400

s4:sam.py - add tests to check that setting userAccountValue on 
usersdon't impact the primaryGroupID attribute

Notice: The domain administrators groups isn't referenced as Domain Admins
since this name could differ.

Signed-off-by: Matthias Dieter Wallnöfer m...@samba.org

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sat May 21 19:19:57 CEST 2011 on sn-devel-104

commit e3aa200a14e92f82c8233cad1b8062ffcc5a9a7e
Author: Matthieu Patou m...@matws.net
Date:   Sat May 21 11:56:45 2011 +0400

s4:samldb LDB module - don't change the primaryGroupId on LDB 
modifications unless we are a computer/dc/rodc

Signed-off-by: Matthias Dieter Wallnöfer m...@samba.org

commit 67bf5cfc0853078e4e817dbc1a9f9de78ed2610d
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Apr 13 09:01:42 2011 +0200

s4:lsa RPC server - handle LDB flags as unsigned

Signed-off-by: Metze

commit d34205add33c028dfd8ca1f8c364013b71f5b3a1
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Apr 10 19:54:31 2011 +0200

s4:ldb-samba/ldb_wrap.*-dsdb/samdb/samdb.c - handle LDB connection flags as 
unsigned

The LDB API (ldb_connect) prescribes that they should be unsigned.

Signed-off-by: Metze

commit 4618a7f3a188e938070e1aa70a9209cdc8045f81
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Apr 10 19:48:07 2011 +0200

ldb:pyldb.c - all flags should be unsigned

Adapt it to the previous commits

Reviewed-by: Jelmer + Metze

commit 74b50b47e962ae7a7e90b054f4bab7527397b7de
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Apr 13 09:05:34 2011 +0200

ldb:ldb_sqlite3.c - all LDB flags should be handled as unsigned

Signed-off-by: Metze

commit 3956e6840d1619519bf9848574baf60efa926b42
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Apr 10 19:44:53 2011 +0200

ldb:tools/cmdline.c + tools/ldbtest.c - the connection flags are typed as 
unsigned

Signed-off-by: Metze

commit e6c5e6afb8e6f5c16267c62e90084ac7d4da
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed May 11 14:25:11 2011 +0200

ldb:ldbtest.c - make more use of LDB constants

Signed-off-by: Metze

commit 5c4fabb08edfdc8e4da431927c5337e96988beef
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat May 7 11:06:38 2011 +0200

s4:torture - always cast correctly when using the %x format string 
argument

Signed-off-by: Metze

commit f44808fa1197c28137808f7e8560bbe3ed439cff
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat May 7 10:37:24 2011 +0200

s4:auth/ntlmssp/ntlmssp_server.c - add const in front of dnsdomain

Signed-off-by: Metze

---

Summary of changes:
 source4/auth/ntlmssp/ntlmssp_server.c |2 +-
 source4/dsdb/samdb/ldb_modules/samldb.c   |   17 +++-
 source4/dsdb/samdb/samdb.c|2 +-
 source4/dsdb/tests/python/sam.py  |   42 +++-
 source4/lib/ldb-samba/ldb_wrap.c  |6 ++--
 source4/lib/ldb-samba/ldb_wrap.h  |6 ++--
 source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c |5 ++-
 source4/lib/ldb/pyldb.c   |   20 +++---
 source4/lib/ldb/tools/cmdline.c   |2 +-
 source4/lib/ldb/tools/ldbtest.c   |   10 +++---
 source4/rpc_server/lsa/dcesrv_lsa.c   |2 +-
 source4/torture/basic/attr.c  |2 +-
 source4/torture/raw/open.c|   10 +++---
 13 files changed, 90 insertions(+), 36 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth

[SCM] Samba Shared Repository - branch master updated

2011-04-29 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  e64ffee ldb:tdb backend - cache - remove unused last_attribute 
structure member
   via  bbf2870 s4:ldb_connect calls - proof for != LDB_SUCCESS
   via  6611f0109 s4:torture/rpc/testjoin.c - use a LDB result constant
   via  aec1bc7 ldb:tools/cmdline.c + tools/ldbtest.c - make use of LDB 
result constants
   via  cc1cf31 s4:repl_meta_data LDB module - quiet a discard const ptr 
warning
   via  d4a06d5 ldb:ldb_controls.c - fix comment indentation
   via  3884fec s4:token_group.py python test - fix typos
  from  df099e6 s3: Avoid a potential 100% CPU loop in winbindd

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit e64ffee1c212b6956a993ebb2032f664c0ac5802
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Apr 10 19:41:34 2011 +0200

ldb:tdb backend - cache - remove unused last_attribute structure member

Reviewed-by: abartlet

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Apr 29 20:07:27 CEST 2011 on sn-devel-104

commit bbf28703a47fc464a7d5dac25e6a4a6cf96fe3e9
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Apr 10 20:47:18 2011 +0200

s4:ldb_connect calls - proof for != LDB_SUCCESS

Reviewed-by: abartlet

commit 6611f0109b73d8c9ff5679e434aa8e354f28608a
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Apr 10 20:47:43 2011 +0200

s4:torture/rpc/testjoin.c - use a LDB result constant

Reviewed-by: abartlet

commit aec1bc7febfb8d3b18018e7b5b653210a0d94e93
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Apr 10 19:35:22 2011 +0200

ldb:tools/cmdline.c + tools/ldbtest.c - make use of LDB result constants

Reviewed-by: abartlet

commit cc1cf31e55b455f67d846ebe1fe60d305ae2ca11
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Apr 13 09:14:44 2011 +0200

s4:repl_meta_data LDB module - quiet a discard const ptr warning

commit d4a06d5dac813951cff3f76704199ec5b6dc834c
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Apr 10 19:24:16 2011 +0200

ldb:ldb_controls.c - fix comment indentation

Reviewed-by: abartlet

commit 3884fec3d504af8c4bc9cff1e6c1a540d874ec8c
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Apr 29 19:03:48 2011 +0200

s4:token_group.py python test - fix typos

---

Summary of changes:
 source4/dns_server/dlz_bind9.c  |2 +-
 source4/dsdb/samdb/ldb_modules/proxy.c  |2 +-
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c |2 +-
 source4/dsdb/tests/python/token_group.py|4 ++--
 source4/lib/ldb/common/ldb_controls.c   |8 
 source4/lib/ldb/ldb_tdb/ldb_cache.c |3 ---
 source4/lib/ldb/ldb_tdb/ldb_tdb.h   |5 -
 source4/lib/ldb/tools/cmdline.c |2 +-
 source4/lib/ldb/tools/ldbtest.c |2 +-
 source4/torture/rpc/testjoin.c  |4 ++--
 10 files changed, 13 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dns_server/dlz_bind9.c b/source4/dns_server/dlz_bind9.c
index 4399e1c..4873112 100644
--- a/source4/dns_server/dlz_bind9.c
+++ b/source4/dns_server/dlz_bind9.c
@@ -533,7 +533,7 @@ _PUBLIC_ isc_result_t dlz_create(const char *dlzname,
}
 
ret = ldb_connect(state-samdb, options.url, 0, NULL);
-   if (ret == -1) {
+   if (ret != LDB_SUCCESS) {
state-log(ISC_LOG_ERROR, samba_dlz: Failed to connect to %s - 
%s,
   options.url, ldb_errstring(state-samdb));
result = ISC_R_FAILURE;
diff --git a/source4/dsdb/samdb/ldb_modules/proxy.c 
b/source4/dsdb/samdb/ldb_modules/proxy.c
index 6fba24f..5f6e56f 100644
--- a/source4/dsdb/samdb/ldb_modules/proxy.c
+++ b/source4/dsdb/samdb/ldb_modules/proxy.c
@@ -138,7 +138,7 @@ static int load_proxy_info(struct ldb_module *module)
ldb_set_opaque(proxy-upstream, credentials, creds);
 
ret = ldb_connect(proxy-upstream, url, 0, NULL);
-   if (ret != 0) {
+   if (ret != LDB_SUCCESS) {
ldb_debug(ldb, LDB_DEBUG_FATAL, proxy failed to connect to 
%s\n, url);
goto failed;
}
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c 
b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 646abeb..90933c4 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -2488,7 +2488,7 @@ static int replmd_rename_callback(struct ldb_request 
*req, struct ldb_reply *are
if (ret == LDB_ERR_REFERRAL) {
struct ldb_dn *olddn = ac-req-op.rename.olddn;
struct loadparm_context *lp_ctx;
-   const char *referral;
+   char *referral

[SCM] Samba Shared Repository - branch master updated

2011-04-08 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  ab0a881 ldb:ldb/common/ldb_modules.c - change the request counter 
type to be unsigned
   via  a15ebe6 ldb:ldb/common/ldb_modules.c - trivial - fix integer output 
specifiers
  from  9705dab s3:net rpc trust: fix two C++ implicit void * cast warnings

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit ab0a881bb4015d0b32f4f577f2bbd3ca72d31217
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Apr 8 08:30:41 2011 +0200

ldb:ldb/common/ldb_modules.c - change the request counter type to be 
unsigned

Just for consistency since all other LDB counters are unsigned as well.

And also the debug output specifier has been chosen to be %u - so it
really should be unsigned.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Apr  8 09:17:47 CEST 2011 on sn-devel-104

commit a15ebe61c3a25c5097d1a320e3d8f47e4dba19f4
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Apr 8 08:29:51 2011 +0200

ldb:ldb/common/ldb_modules.c - trivial - fix integer output specifiers

---

Summary of changes:
 source4/lib/ldb/common/ldb_modules.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/common/ldb_modules.c 
b/source4/lib/ldb/common/ldb_modules.c
index 2e1aeb6..61d1901 100644
--- a/source4/lib/ldb/common/ldb_modules.c
+++ b/source4/lib/ldb/common/ldb_modules.c
@@ -402,7 +402,7 @@ int ldb_load_modules(struct ldb_context *ldb, const char 
*options[])
if (res-count == 0) {
ldb_debug(ldb, LDB_DEBUG_TRACE, no modules 
required by the db);
} else if (res-count  1) {
-   ldb_debug(ldb, LDB_DEBUG_FATAL, Too many 
records found (%d), bailing out, res-count);
+   ldb_debug(ldb, LDB_DEBUG_FATAL, Too many 
records found (%u), bailing out, res-count);
talloc_free(mem_ctx);
return LDB_ERR_OPERATIONS_ERROR;
} else {
@@ -783,7 +783,7 @@ int ldb_module_done(struct ldb_request *req,
if ((req-handle-ldb-flags  LDB_FLG_ENABLE_TRACING) 
req-handle-nesting == 0) {
ldb_debug_add(req-handle-ldb, ldb_trace_response: DONE\n);
-   ldb_debug_add(req-handle-ldb, error: %u\n, error);
+   ldb_debug_add(req-handle-ldb, error: %d\n, error);
if (ldb_errstring(req-handle-ldb)) {
ldb_debug_add(req-handle-ldb, msg: %s\n,
  ldb_errstring(req-handle-ldb));
@@ -1089,7 +1089,7 @@ int ldb_modules_load(const char *modules_path, const char 
*version)
 char *ldb_module_call_chain(struct ldb_request *req, TALLOC_CTX *mem_ctx)
 {
char *ret;
-   int i=0;
+   unsigned int i = 0;
 
ret = talloc_strdup(mem_ctx, );
if (ret == NULL) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-04-07 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  94f5b2f ldb:ldb_msg.c - make ldb_msg_find_attr_as_* more robust 
against invalid values
   via  df9d46a ldb:ldb_msg_check_sanity - clean it up from unneeded stuff
   via  ddb41f2 dsdb:schema/schema_syntax.c - correctly check error code of 
ldb_string_utc_to_time
   via  6cef940 dsdb:schema/schema_syntax.c - add some empty value checks 
on validate functions
   via  b7de06e s4:objectclass LDB module - ldb_msg_sanity_check call not 
really needed
   via  17f3413 ldb:ldbadd/modify tool - return error code when at least 
one operation has failed
   via  f146992 ldb:tests - init.ldif - deactivate empty seeAlso 
attribute
   via  3cd11b5 ldb:ldb/common/ldb_modules.c - always use LDB error codes 
if possible
   via  32cad76 ldb:common/*.c - check for some OOM conditions
   via  1d8980d s4:objectclass LDB module - fix a comment - add a )
  from  02c6f9d selftest:Samba4: setup DC_* variables in 
provision_rpc_proxy()

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 94f5b2f41346170fea90b4571f172df124139143
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Apr 6 09:57:51 2011 +0200

ldb:ldb_msg.c - make ldb_msg_find_attr_as_* more robust against invalid 
values

- Integer handling was modeled after validate code from schema_syntax.c.
- Double handling was modeled similar, but with a dynamic buffer.
  I don't know if there is a maximum literal length for double values but an
  allocation shouldn't a problem here since doubles are rare.
- String handlind is enhanced with a terminating 0 test for safety.

Reviewed-by: abartlet + metze

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Thu Apr  7 16:38:57 CEST 2011 on sn-devel-104

commit df9d46a353da15f68d299498f36ab0474c8e1e5a
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Apr 7 10:11:46 2011 +0200

ldb:ldb_msg_check_sanity - clean it up from unneeded stuff

commit ddb41f2af48caa856ce45338cffaadaa9226c76c
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Apr 4 21:34:12 2011 +0200

dsdb:schema/schema_syntax.c - correctly check error code of 
ldb_string_utc_to_time

This one doesn't set ERRNO. An error happens if the result is 0.

Reviewed-by: abartlet

commit 6cef940b40b859e0b80cad1a679818de2a5b418e
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Apr 4 21:33:11 2011 +0200

dsdb:schema/schema_syntax.c - add some empty value checks on validate 
functions

They are needed since the check in ldb_msg_sanity_check will be removed.

Reviewed-by: abartlet

commit b7de06e8e756eb338e40d319095311f8f7d70cba
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Apr 4 14:04:18 2011 +0200

s4:objectclass LDB module - ldb_msg_sanity_check call not really needed

This call should only be performed at the beginning of a request.
ldb_msg_sanity_check checks for DN validity (which should already have 
been
done at the beginning of the request) and empty attributes (which should
be done by the objectclass_attrs LDB module).

Hence it is superflous here.

Reviewed-by: abartlet

commit 17f34136bf67aa5e739b63aa3ef51d247d6dc901
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Apr 4 12:59:30 2011 +0200

ldb:ldbadd/modify tool - return error code when at least one operation has 
failed

This is required to better detect failures and should raise the
compatiblity to ldapadd/ldapmodify.

Reviewed-by: abartlet

commit f14699287ca7a4f2349658bd2ae602eb30f95bf9
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Apr 7 10:13:45 2011 +0200

ldb:tests - init.ldif - deactivate empty seeAlso attribute

commit 3cd11b5b755795c253a8214b4d1066b0589e3a7b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Apr 4 10:43:39 2011 +0200

ldb:ldb/common/ldb_modules.c - always use LDB error codes if possible

The callers do compare against LDB error codes - hence don't give back
-1.

Reviewed-by: Tridge + abartlet

commit 32cad7601a55b2c232c4914ab382714f331ae218
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Apr 4 10:26:47 2011 +0200

ldb:common/*.c - check for some OOM conditions

Reviewed-by: abartlet

commit 1d8980df0494af975278954dce4b24605602ed6f
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Apr 4 14:06:45 2011 +0200

s4:objectclass LDB module - fix a comment - add a )

Reviewed-by: abartlet

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/objectclass.c |7 +-
 source4/dsdb/schema/schema_syntax.c  |   12 ++-
 source4/lib/ldb/common/ldb.c |4 +
 source4/lib/ldb/common/ldb_modules.c 

[SCM] Samba Shared Repository - branch master updated

2011-04-04 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  513574a talloc - some documentation changes
  from  f00d258 s4-dsdb: implemented creation of conflict records

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 513574afd759bcb3832374d3ae170f1ed0b0062b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Mar 31 21:32:51 2011 +0200

talloc - some documentation changes

- Fix some typos
- Document better the differences in the behaviour between talloc 1.X and 
2.X.
  Previously this seemed a bit spongy to me.

Reviewed-by: Jelmer + Tridge

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Mon Apr  4 11:05:42 CEST 2011 on sn-devel-104

---

Summary of changes:
 lib/talloc/talloc.h |   49 +++
 lib/talloc/talloc_guide.txt |   52 +++---
 2 files changed, 48 insertions(+), 53 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h
index 64879b7..96c7e24 100644
--- a/lib/talloc/talloc.h
+++ b/lib/talloc/talloc.h
@@ -173,18 +173,11 @@ void *talloc_init(const char *fmt, ...) 
PRINTF_ATTRIBUTE(1,2);
  * destructors. Likewise, if ptr is NULL, then the function will make
  * no modifications and return -1.
  *
- * If this pointer has an additional parent when talloc_free() is called
- * then the memory is not actually released, but instead the most
- * recently established parent is destroyed. See talloc_reference() for
- * details on establishing additional parents.
- *
- * For more control on which parent is removed, see talloc_unlink()
- *
- * talloc_free() operates recursively on its children.
- *
- * From the 2.0 version of talloc, as a special case, talloc_free() is
- * refused on pointers that have more than one parent, as talloc would
- * have no way of knowing which parent should be removed. To free a
+ * From version 2.0 and onwards, as a special case, talloc_free() is
+ * refused on pointers that have more than one parent associated, as talloc
+ * would have no way of knowing which parent should be removed. This is
+ * different from older versions in the sense that always the reference to
+ * the most recently established parent has been destroyed. Hence to free a
  * pointer that has more than one parent please use talloc_unlink().
  *
  * To help you find problems in your code caused by this behaviour, if
@@ -201,6 +194,8 @@ void *talloc_init(const char *fmt, ...) 
PRINTF_ATTRIBUTE(1,2);
  * talloc_set_log_stderr() for more information on talloc logging
  * functions.
  *
+ * talloc_free() operates recursively on its children.
+ *
  * @param[in]  ptr  The chunk to be freed.
  *
  * @return  Returns 0 on success and -1 on error. A possible
@@ -233,7 +228,10 @@ int _talloc_free(void *ptr, const char *location);
  * The function walks along the list of all children of a talloc context and
  * talloc_free()s only the children, not the context itself.
  *
- * @param[in]  ptr  The chunk that you want to free the children of.
+ * A NULL argument is handled as no-op.
+ *
+ * @param[in]  ptr  The chunk that you want to free the children of
+ *  (NULL is allowed too)
  */
 void talloc_free_children(void *ptr);
 
@@ -702,9 +700,9 @@ void *_talloc_memdup(const void *t, const void *p, size_t 
size, const char *name
 /**
  * @brief Assign a type to a talloc chunk.
  *
- * This macro allows you to force the name of a pointer to be a particular 
type.
- * This can be used in conjunction with talloc_get_type() to do type checking 
on
- * void* pointers.
+ * This macro allows you to force the name of a pointer to be of a particular
+ * type. This can be used in conjunction with talloc_get_type() to do type
+ * checking on void* pointers.
  *
  * It is equivalent to this:
  *
@@ -905,9 +903,9 @@ size_t talloc_reference_count(const void *ptr);
  *   will reduce the number of parents of this pointer by 1, and will
  *   cause this pointer to be freed if it runs out of parents.
  *
- * - you can talloc_free() the pointer itself. That will destroy the
- *   most recently established parent to the pointer and leave the
- *   pointer as a child of its current parent.
+ * - you can talloc_free() the pointer itself if it has at maximum one
+ *   parent. This behaviour has been changed since the release of version
+ *   2.0. Further informations in the description of talloc_free.
  *
  * For more control on which parent to remove, see talloc_unlink()
  * @param[in]  ctx  The additional parent.
@@ -942,9 +940,10 @@ void *_talloc_reference_loc(const void *context, const 
void *ptr, const char *lo
  * either be a context used in talloc_reference() with this pointer, or must be
  * a direct parent of ptr.
  *
- * Usually you can just 

[SCM] Samba Shared Repository - branch master updated

2011-03-30 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  32a76ca s4:lib/policy/gp_ldap.c - make more use of LDB result 
constants
   via  dcdfc27 s4:lib/registry/registry.h - align a copyright line in 
header comment
   via  6723e90 talloc - improve doxygen comment of talloc_move
   via  05a9b7c s4:smb_server/smb/trans2.c - talloc_move isn't strictly 
necessary here
  from  72833e4 s3-ctdb_wrap: remove unused variable from 
db_ctdb_fetch_persistent().

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 32a76ca146104e94a974e23668e93464c2b35a9a
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Mar 27 22:14:56 2011 +0200

s4:lib/policy/gp_ldap.c - make more use of LDB result constants

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Wed Mar 30 09:33:38 CEST 2011 on sn-devel-104

commit dcdfc27dbf3e2f47a3fea0c2ee7e18918430be60
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 25 20:03:42 2011 +0100

s4:lib/registry/registry.h - align a copyright line in header comment

commit 6723e90d524c8e73f19c06b3ff28867a1a89b14b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Mar 24 09:41:19 2011 +0100

talloc - improve doxygen comment of talloc_move

Express better that this should be a pointer of a pointer.

Reviewed-by: Tridge

commit 05a9b7c32dd5831d2099a1c634d9380fe12a530e
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Mar 24 10:28:10 2011 +0100

s4:smb_server/smb/trans2.c - talloc_move isn't strictly necessary here

Since the set will be free'd afterwards talloc_steal is enough.

Reviewed-by: Tridge

---

Summary of changes:
 lib/talloc/talloc.h |6 +++---
 source4/lib/policy/gp_ldap.c|   26 +-
 source4/lib/registry/registry.h |2 +-
 source4/smb_server/smb/trans2.c |2 +-
 4 files changed, 18 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h
index 5710861..64879b7 100644
--- a/lib/talloc/talloc.h
+++ b/lib/talloc/talloc.h
@@ -402,14 +402,14 @@ const char *talloc_set_name(const void *ptr, const char 
*fmt, ...) PRINTF_ATTRIB
  *
  * @param[in]  new_ctx  The new parent context.
  *
- * @param[in]  ptr  Pointer to the talloc chunk to move.
+ * @param[in]  pptr Pointer to the talloc chunk to move.
  *
  * @return  The pointer of the talloc chunk it has been moved to,
  *  NULL on error.
  */
-void *talloc_move(const void *new_ctx, const void *ptr);
+void *talloc_move(const void *new_ctx, void **pptr);
 #else
-#define talloc_move(ctx, ptr) (_TALLOC_TYPEOF(*(ptr)))_talloc_move((ctx),(void 
*)(ptr))
+#define talloc_move(ctx, pptr) 
(_TALLOC_TYPEOF(*(pptr)))_talloc_move((ctx),(void *)(pptr))
 void *_talloc_move(const void *new_ctx, const void *pptr);
 #endif
 
diff --git a/source4/lib/policy/gp_ldap.c b/source4/lib/policy/gp_ldap.c
index 091af2e..de56e4c 100644
--- a/source4/lib/policy/gp_ldap.c
+++ b/source4/lib/policy/gp_ldap.c
@@ -641,7 +641,7 @@ NTSTATUS gp_set_gplink(struct gp_context *gp_ctx, const 
char *dn_str, struct gp_
msg-dn = dn;
 
rv = ldb_msg_add_string(msg, gPLink, gplink_str);
-   if (rv != 0) {
+   if (rv != LDB_SUCCESS) {
DEBUG(0, (LDB message add string failed: %s\n, 
ldb_strerror(rv)));
talloc_free(mem_ctx);
return NT_STATUS_UNSUCCESSFUL;
@@ -649,7 +649,7 @@ NTSTATUS gp_set_gplink(struct gp_context *gp_ctx, const 
char *dn_str, struct gp_
msg-elements[0].flags = LDB_FLAG_MOD_REPLACE;
 
rv = ldb_modify(gp_ctx-ldb_ctx, msg);
-   if (rv != 0) {
+   if (rv != LDB_SUCCESS) {
DEBUG(0, (LDB modify failed: %s\n, ldb_strerror(rv)));
talloc_free(mem_ctx);
return NT_STATUS_UNSUCCESSFUL;
@@ -717,14 +717,14 @@ NTSTATUS gp_del_gplink(struct gp_context *gp_ctx, const 
char *dn_str, const char
 
if (strcmp(gplink_str, ) == 0) {
rv = ldb_msg_add_empty(msg, gPLink, LDB_FLAG_MOD_DELETE, 
NULL);
-   if (rv != 0) {
+   if (rv != LDB_SUCCESS) {
DEBUG(0, (LDB message add empty element failed: %s\n, 
ldb_strerror(rv)));
talloc_free(mem_ctx);
return NT_STATUS_UNSUCCESSFUL;
}
} else {
rv = ldb_msg_add_string(msg, gPLink, gplink_str);
-   if (rv != 0) {
+   if (rv != LDB_SUCCESS) {
DEBUG(0, (LDB message add string failed: %s\n, 
ldb_strerror(rv)));
talloc_free(mem_ctx);
return NT_STATUS_UNSUCCESSFUL;
@@ -732,7 +732,7 @@ NTSTATUS gp_del_gplink(struct gp_context *gp_ctx, const 

[SCM] Samba Shared Repository - branch master updated

2011-03-22 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  3940777 s4:python bindings - handle NULL returns from 
loadparm_init_global
   via  5d09aca s4:param/loadparm.c - check for OOM
   via  bd25bc1 s4:auth/system_session.c - check for OOM
  from  b8d0994 s4:ntvfs/posix: name-dos.attrib isn't initialized in 
pvfs_access_check_create()

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 3940777a14a93dbf88fcc9e43452fc2f84a7b6fc
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Mar 21 10:32:24 2011 +0100

s4:python bindings - handle NULL returns from loadparm_init_global

Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Mar 22 19:52:57 CET 2011 on sn-devel-104

commit 5d09acab7e5e671f244d69f59d1714a16bdb93fb
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Mar 21 10:25:52 2011 +0100

s4:param/loadparm.c - check for OOM

Return NULL if the loadparm context hasn't been allocated

Reviewed-by: Jelmer

commit bd25bc133a2a6f2b4d755b6d3ea83c956a60e3af
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Mar 21 10:25:09 2011 +0100

s4:auth/system_session.c - check for OOM

Reviewed-by: Jelmer

---

Summary of changes:
 source4/auth/gensec/pygensec.c |   10 ++
 source4/auth/system_session.c  |2 ++
 source4/param/loadparm.c   |3 +++
 source4/param/pyparam.c|4 
 source4/param/pyparam_util.c   |3 +++
 5 files changed, 22 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/gensec/pygensec.c b/source4/auth/gensec/pygensec.c
index cd05bd7..5fe3703 100644
--- a/source4/auth/gensec/pygensec.c
+++ b/source4/auth/gensec/pygensec.c
@@ -113,6 +113,11 @@ static PyObject *py_gensec_start_client(PyTypeObject 
*type, PyObject *args, PyOb
}
 
settings-lp_ctx = loadparm_init_global(true);
+   if (settings-lp_ctx == NULL) {
+   PyErr_NoMemory();
+   PyObject_DEL(self);
+   return NULL;
+   }
}
 
ev = tevent_context_init(self-talloc_ctx);
@@ -181,6 +186,11 @@ static PyObject *py_gensec_start_server(PyTypeObject 
*type, PyObject *args, PyOb
}
 
settings-lp_ctx = loadparm_init_global(true);
+   if (settings-lp_ctx == NULL) {
+   PyErr_NoMemory();
+   PyObject_DEL(self);
+   return NULL;
+   }
}
 
ev = tevent_context_init(self-talloc_ctx);
diff --git a/source4/auth/system_session.c b/source4/auth/system_session.c
index ad0dab6..54b8f51 100644
--- a/source4/auth/system_session.c
+++ b/source4/auth/system_session.c
@@ -268,6 +268,8 @@ static NTSTATUS auth_domain_admin_session_info(TALLOC_CTX 
*parent_ctx,
struct auth_user_info_dc *user_info_dc = NULL;
TALLOC_CTX *mem_ctx = talloc_new(parent_ctx);
 
+   NT_STATUS_HAVE_NO_MEMORY(mem_ctx);
+
nt_status = auth_domain_admin_user_info_dc(mem_ctx, 
lpcfg_netbios_name(lp_ctx),
  lpcfg_workgroup(lp_ctx), 
domain_sid,
  user_info_dc);
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 1864436..49d2e1c 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -2533,6 +2533,9 @@ struct loadparm_context *loadparm_init_global(bool 
load_default)
if (global_loadparm_context == NULL) {
global_loadparm_context = loadparm_init(NULL);
}
+   if (global_loadparm_context == NULL) {
+   return NULL;
+   }
if (load_default  !global_loadparm_context-loaded) {
lpcfg_load_default(global_loadparm_context);
}
diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c
index a248215..3ba8146 100644
--- a/source4/param/pyparam.c
+++ b/source4/param/pyparam.c
@@ -335,6 +335,10 @@ static PyObject *py_lp_ctx_new(PyTypeObject *type, 
PyObject *args, PyObject *kwa
return NULL;
}
ret-ptr = loadparm_init_global(false);
+   if (ret-ptr == NULL) {
+   PyErr_NoMemory();
+   return NULL;
+   }
return (PyObject *)ret;
 }
 
diff --git a/source4/param/pyparam_util.c b/source4/param/pyparam_util.c
index 528c007..cbf2095 100644
--- a/source4/param/pyparam_util.c
+++ b/source4/param/pyparam_util.c
@@ -35,6 +35,9 @@ _PUBLIC_ struct loadparm_context 
*lpcfg_from_py_object(TALLOC_CTX *mem_ctx, PyOb
 
if (PyString_Check(py_obj)) {
lp_ctx = loadparm_init_global(false);
+   if (lp_ctx == NULL) {
+   return NULL;
+   }

[SCM] Samba Shared Repository - branch master updated

2011-03-10 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  22fcb8e s4:lib/tls/wscript - exclude known broken GNUTLS releases
   via  f5ce61e lib/util/fault.c - call_backtrace - no need to have 
backtrace_size as size_t
   via  e00893d s4:extended_dn_store LDB module - use the new request as 
generic memory contexts
   via  0cec610 s4:repl_meta_data LDB module - always ask manually for the 
current partition control
   via  68fbfa2 s4:partition LDB module - the current partition control 
should only be added if requested
   via  78b46c5 s4:partition LDB module - extended operations - make the 
initialisation check consistent
   via  e52c900 s4:partition LDB module - move the data check a bit higher
   via  4e6b8e0 s4:partition LDB module - partition_replicate doesn't 
handle the search requests
   via  210cab9 s4:partition LDB module - partition_sequence_number - 
remove meaningless ifs
   via  96600e5 s4:simple_ldap_map LDB module - enhance current partition 
control checks
   via  e669295 s4:repl_meta_data LDB module - don't remove the partition 
control twice
   via  e754f0c s4:repl_meta_data LDB module - remove the current partition 
control unless it was requested
   via  42da193 s4:new_partition LDB module - splitting up an if operation
   via  83517d2 s4:instancetype LDB module - perform here only the 
instanceType constraint checks
   via  8ce1314 s4:instancetype LDB module - don't impede control requests
   via  f68d542 s4:instancetype LDB module - use ldb pointer for 
referencing the LDB context
   via  8872a62 s4:partition LDB module - fill in parent requests for 
inheriting the flags
   via  b7ecc33 ldb:ldb_controls.c - ldb_save_controls - allow that 
saver can also be NULL
   via  78c9eb1 ldb:ldb_controls.c - always allocate enough space
   via  851396a s4:partition LDB module - add some comments
   via  79c65cc s4:new_partition LDB module - fix comments
   via  d2acd72 s4:partition_init LDB module - fix a typo
   via  82067b1 s4:partition LDB module - fix typo
   via  7aa0219 s4:setup/provision - fix an output message
  from  cdb9e4b libwbclient: Add some input check

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 22fcb8e4945ac43fda6f6891ea00f36a53e52102
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Mar 9 09:29:30 2011 +0100

s4:lib/tls/wscript - exclude known broken GNUTLS releases

This definitely fixes bug #7218.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Thu Mar 10 11:58:27 CET 2011 on sn-devel-104

commit f5ce61ea57e4851999eb0a2a805a5e2aab5b86e4
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Mar 9 09:09:15 2011 +0100

lib/util/fault.c - call_backtrace - no need to have backtrace_size as 
size_t

The function backtrace returns an int.

commit e00893d8395ed813a5bc9dd7bf28f29de369db46
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Mar 6 21:46:02 2011 +0100

s4:extended_dn_store LDB module - use the new request as generic memory 
contexts

To prevent memory leaks under valgrind.

commit 0cec6107d870ba2e67859b824306cde0686691cb
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Mar 5 14:42:40 2011 +0100

s4:repl_meta_data LDB module - always ask manually for the current 
partition control

Otherwise the partition LDB module doesn't give it back anymore.

commit 68fbfa2237a570a48d2ae3a5421cdcacae6e6d34
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Mar 5 14:25:59 2011 +0100

s4:partition LDB module - the current partition control should only be 
added if requested

That means if the informations before a request are unknown
(repl_meta_data LDB module) then an empty control (no data) has to be 
sent.

commit 78b46c533a36cdfa6c5f8ab305f13c5aa142b819
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Mar 6 15:56:48 2011 +0100

s4:partition LDB module - extended operations - make the initialisation 
check consistent

To the other operations.

commit e52c900b63bf61daf64e5495241a257a40998a06
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Mar 6 15:56:06 2011 +0100

s4:partition LDB module - move the data check a bit higher

It can be performed a bit earlier.

commit 4e6b8e0a181b2fa78fd72e7e2724ad5acd81672b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Mar 6 15:37:51 2011 +0100

s4:partition LDB module - partition_replicate doesn't handle the search 
requests

That is done by partition_search.

commit 210cab9bf0a72b670d20ea16f1f483e41b5a503c
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Mar 5 19:02:43 2011 +0100

s4:partition LDB module - partition_sequence_number - remove meaningless 
ifs

These current partition controls are always added for the 

[SCM] Samba Shared Repository - branch master updated

2011-03-04 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  b0c6899 ldb:ldb tools - remove a superflous return (usage 
internally calls exit)
   via  b50ebc3 ldb:ldb tools - return LDB_ERR_INVALID_DN_SYNTAX on wrong 
DN parameters
   via  1b93173 ldb:ldb tools - ldbtest - convert other result values to 
LDB codes as well
   via  1343c07 s4:LDAP server - remove validation checks of input DNs
   via  5896b72 s4:objectclass LDB module - if we cannot find DN's parent 
then the DN itself is invalid
  from  3560db3 debug: fixed a valgrind error

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit b0c6899973d3e0e5d4dbd2590157f7200c20f8ff
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Mar 2 22:46:03 2011 +0100

ldb:ldb tools - remove a superflous return (usage internally calls exit)

Reviewed by: Tridge

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Mar  4 09:39:22 CET 2011 on sn-devel-104

commit b50ebc3228c9b4eacbccaf1ec4572c3ee7b07e1c
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Mar 2 22:40:13 2011 +0100

ldb:ldb tools - return LDB_ERR_INVALID_DN_SYNTAX on wrong DN parameters

Not all LDB databases have further DN checks.

Reviewed by: Tridge

commit 1b9317381344c48be2d90353ba61490161615485
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Mar 2 22:28:27 2011 +0100

ldb:ldb tools - ldbtest - convert other result values to LDB codes as well

I've forgotten this in my first patchset.

Reviewed by: Tridge

commit 1343c0723f129606a3bc6fedd8d5f92f1080392b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Mar 2 19:14:01 2011 +0100

s4:LDAP server - remove validation checks of input DNs

We should rather try to let the LDB modules perform these checks
otherwise different backends behaviour differently.

Reviewed by: Tridge

commit 5896b7299331aedd065397d2078c62d85bcf68f6
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Mar 2 18:50:11 2011 +0100

s4:objectclass LDB module - if we cannot find DN's parent then the DN 
itself is invalid

ERR_INVALID_DN_SYNTAX fits better than ERR_OPERATION_ERROR in this case. 
This
one gets triggered if we perform add requests without the LDAP server.

Reviewed by: Tridge

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/objectclass.c |4 ++-
 source4/ldap_server/ldap_backend.c   |   31 ++--
 source4/lib/ldb/tools/ldbdel.c   |3 +-
 source4/lib/ldb/tools/ldbedit.c  |2 +-
 source4/lib/ldb/tools/ldbrename.c|4 +++
 source4/lib/ldb/tools/ldbsearch.c|2 +-
 source4/lib/ldb/tools/ldbtest.c  |   32 +-
 7 files changed, 34 insertions(+), 44 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c 
b/source4/dsdb/samdb/ldb_modules/objectclass.c
index f48917c..817f50a 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass.c
@@ -421,7 +421,9 @@ static int objectclass_add(struct ldb_module *module, 
struct ldb_request *req)
/* get copy of parent DN */
parent_dn = ldb_dn_get_parent(ac, ac-req-op.add.message-dn);
if (parent_dn == NULL) {
-   return ldb_operr(ldb);
+   /* the DN itself might be wrong - therefore
+* ERR_INVALID_DN_SYNTAX fits better here. */
+   return LDB_ERR_INVALID_DN_SYNTAX;
}
 
ret = ldb_build_search_req(search_req, ldb,
diff --git a/source4/ldap_server/ldap_backend.c 
b/source4/ldap_server/ldap_backend.c
index e96caa6..b180e0e 100644
--- a/source4/ldap_server/ldap_backend.c
+++ b/source4/ldap_server/ldap_backend.c
@@ -30,17 +30,6 @@
 #include ldb_module.h
 #include ldb_wrap.h
 
-#define VALID_DN_SYNTAX(dn) do {\
-   if (!(dn)) {\
-   return NT_STATUS_NO_MEMORY;\
-   } else if ( ! ldb_dn_validate(dn)) {\
-   result = LDAP_INVALID_DN_SYNTAX;\
-   map_ldb_error(local_ctx, LDB_ERR_INVALID_DN_SYNTAX, NULL,\
- errstr);\
-   goto reply;\
-   }\
-} while(0)
-
 static int map_ldb_error(TALLOC_CTX *mem_ctx, int ldb_err,
const char *add_err_string, const char **errstring)
 {
@@ -521,7 +510,7 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call 
*call)
NT_STATUS_HAVE_NO_MEMORY(local_ctx);
 
basedn = ldb_dn_new(local_ctx, samdb, req-basedn);
-   VALID_DN_SYNTAX(basedn);
+   NT_STATUS_HAVE_NO_MEMORY(basedn);
 
DEBUG(10, (SearchRequest: basedn: [%s]\n, req-basedn));
DEBUG(10, (SearchRequest: filter: [%s]\n, ldb_filter_from_tree(call, 
req-tree)));
@@ -735,7 

[SCM] Samba Shared Repository - branch master updated

2011-03-04 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  75706a6 ldb:ldb_msg.c - use LDB result constants for checking 
return values
   via  dabed32 s4:ldap.py - other important RDN check testcases
   via  2275bfb s4:ldap.py - remove a debug output
   via  736a462 ldb:rdn_name LDB module - more RDN constraint checks (from 
AD)
   via  ea12adf s4/ldb - remove now superflous ldb_dn_validate checks
   via  349b9b7 s4:dsdb - we don't need to check if a DN != NULL if we call 
ldb_dn_validate
   via  746194c Revert s4:objectclass LDB module - if we cannot find DN's 
parent then the DN itself is invalid
   via  76fb230 ldb:ldb_request - handle here the DN checks
   via  86707c7 s4:objectclass LDB module - fix a comment
   via  e4b5bce s4:libnet/libnet_site.c - make use of LDB return constants
   via  23810dc s4:waf-build fix disable-shared build for smbtorture
  from  4b86beb s4:selftest: test using the machine account of the rodc 
against itself

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 75706a627d0a54713f524cede1d7c72e5ff41cb4
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 4 20:51:07 2011 +0100

ldb:ldb_msg.c - use LDB result constants for checking return values

Reviewed by: Tridge

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Mar  4 22:51:57 CET 2011 on sn-devel-104

commit dabed32ffe631a334a126fec472f71e628032025
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 4 09:27:51 2011 +0100

s4:ldap.py - other important RDN check testcases

Reviewed by: Tridge

commit 2275bfb82d82e574f211389dc5ff9c594e8cb82c
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 4 09:26:40 2011 +0100

s4:ldap.py - remove a debug output

This has only been needed for developing this testcase and has been
forgotten to be removed afterwards.

Reviewed by: Tridge

commit 736a462c3e61500b9e53b76c6e5d743efa5a9e0a
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 4 11:11:08 2011 +0100

ldb:rdn_name LDB module - more RDN constraint checks (from AD)

Reviewed by: Tridge

commit ea12adf544ffaf86a7b323c60c7f9dfbede87808
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 4 10:49:47 2011 +0100

s4/ldb - remove now superflous ldb_dn_validate checks

If we immediately afterwards perform an LDB base operation then we don't
need an explicit ldb_dn_validate check anymore (only OOM makes sense).

Reviewed by: Tridge

commit 349b9b72ec36194a1275eaa42ca145071256b623
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 4 10:44:22 2011 +0100

s4:dsdb - we don't need to check if a DN != NULL if we call 
ldb_dn_validate

ldb_dn_validate is NULL-safe and does the check implicitly.

Reviewed by: Tridge

commit 746194cfc4e0c119e1947f79ffc7cb50d50b9f43
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 4 10:15:59 2011 +0100

Revert s4:objectclass LDB module - if we cannot find DN's parent then the 
DN itself is invalid

This is not needed anymore with the new DN checking.

This reverts commit 5896b7299331aedd065397d2078c62d85bcf68f6.

Reviewed by: Tridge

commit 76fb23064e6346346b5a9908b7908695456b5748
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 4 10:14:14 2011 +0100

ldb:ldb_request - handle here the DN checks

This is a much better solution than we had before - so all important DN
checks are enforced for each type of LDB database (and not limited to DSDB).

Many ldb_dn_validate checks will now become obsolete.

Reviewed by: Tridge

commit 86707c7cc49395453e9fa3fda14da159f0271961
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 4 09:33:52 2011 +0100

s4:objectclass LDB module - fix a comment

Reviewed by: Tridge

commit e4b5bce151232b64ec2190f230296c469bd94773
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 4 10:40:27 2011 +0100

s4:libnet/libnet_site.c - make use of LDB return constants

Reviewed by: Tridge

commit 23810dca45b2df1e54135974845260d94a88d16e
Author: Christian Ambach christian.amb...@de.ibm.com
Date:   Fri Mar 4 18:45:20 2011 +0100

s4:waf-build fix disable-shared build for smbtorture

building smbtorture4 with configure --disable-shared failed
with an error that ldb.h could not be found

Signed-off-by: Matthias Dieter Wallnöfer m...@samba.org
Reviewed by: Tridge

---

Summary of changes:
 source4/dsdb/common/util.c   |4 +-
 source4/dsdb/common/util_samr.c  |2 +-
 source4/dsdb/samdb/ldb_modules/objectclass.c |6 +-
 source4/dsdb/samdb/ldb_modules/rootdse.c |2 +-
 

[SCM] Samba Shared Repository - branch master updated

2011-03-04 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  eade61a s4:operational LDB module - fix attribute names to be right 
up/down-cased
   via  5a722f1 s4:ldap.py - rootdse tests should search for the rootDSE 
not the default DN
   via  71df279 s4:ldap.py - add a test in order to show the operational 
module fixed
   via  05d1d0d s4:operational LDB module - fix display of some constructed 
attributes
   via  5a98979 s4:operational LDB module - add groupToken as unsigned 
int (uint32_t)
   via  1ff28a2 s4:operational LDB module - readd structuralObjectClass 
- objectClass mapping
  from  75706a6 ldb:ldb_msg.c - use LDB result constants for checking 
return values

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit eade61ae035caba607b2f31af7561b8b35059139
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 4 23:02:29 2011 +0100

s4:operational LDB module - fix attribute names to be right up/down-cased

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Mar  4 23:56:07 CET 2011 on sn-devel-104

commit 5a722f187f6bab3423a449ecdd8013406f574ead
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 4 22:49:46 2011 +0100

s4:ldap.py - rootdse tests should search for the rootDSE not the default DN

Reviewed by: Tridge

commit 71df279f92dd37a55810ee874e9fce61472c6d14
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 4 22:49:08 2011 +0100

s4:ldap.py - add a test in order to show the operational module fixed

Reviewed by: Tridge

commit 05d1d0d8a627295bbb5c8cb0783ddad50801cdbb
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 4 22:39:42 2011 +0100

s4:operational LDB module - fix display of some constructed attributes

structuralObjectClass, createTimestamp and modifyTimestamp weren't
displayed anymore.

Reviewed by: Tridge

commit 5a98979e0c4928e1c359b7aff6f964f9ba896146
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 4 22:30:15 2011 +0100

s4:operational LDB module - add groupToken as unsigned int (uint32_t)

Reviewed by: Tridge

commit 1ff28a298635483710aab45172528d1bb48b6f9b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Mar 4 22:14:11 2011 +0100

s4:operational LDB module - readd structuralObjectClass - objectClass 
mapping

This has been removed accidentally by commit
a093e10896a4768dba0cd793a04b7d5d1366fee2.

Reviewed by: Tridge

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/operational.c |   22 +++---
 source4/dsdb/tests/python/ldap.py|   16 +++-
 2 files changed, 26 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/operational.c 
b/source4/dsdb/samdb/ldb_modules/operational.c
index f864a4f..dcc047f 100644
--- a/source4/dsdb/samdb/ldb_modules/operational.c
+++ b/source4/dsdb/samdb/ldb_modules/operational.c
@@ -25,11 +25,11 @@
  */
 
 /*
-  createTimestamp: HIDDEN, searchable, ldaptime, alias for whenCreated
-  modifyTimestamp: HIDDEN, searchable, ldaptime, alias for whenChanged
+  createTimeStamp: HIDDEN, searchable, ldaptime, alias for whenCreated
+  modifyTimeStamp: HIDDEN, searchable, ldaptime, alias for whenChanged
 
  for the above two, we do the search as normal, and if
- createTimestamp or modifyTimestamp is asked for, then do
+ createTimeStamp or modifyTimeStamp is asked for, then do
  additional searches for whenCreated and whenChanged and fill in
  the resulting values
 
@@ -117,7 +117,7 @@ static int construct_primary_group_token(struct ldb_module 
*module,
return LDB_SUCCESS;
}
 
-   return samdb_msg_add_int(ldb, msg, msg, primaryGroupToken,
+   return samdb_msg_add_uint(ldb, msg, msg, primaryGroupToken,
primary_group_token);
} else {
return LDB_SUCCESS;
@@ -587,8 +587,8 @@ static const struct {
const char *attr;
const char *replace;
 } parse_tree_sub[] = {
-   { createTimestamp, whenCreated },
-   { modifyTimestamp, whenChanged }
+   { createTimeStamp, whenCreated },
+   { modifyTimeStamp, whenChanged }
 };
 
 
@@ -602,9 +602,9 @@ static const struct {
const char *extra_attr;
int (*constructor)(struct ldb_module *, struct ldb_message *, enum 
ldb_scope, struct ldb_request *);
 } search_sub[] = {
-   { createTimestamp, whenCreated, NULL , NULL },
-   { modifyTimestamp, whenChanged, NULL , NULL },
-   { structuralObjectClass, NULL, NULL , NULL },
+   { createTimeStamp, whenCreated, NULL , NULL },
+   { modifyTimeStamp, whenChanged, NULL , NULL },
+   { structuralObjectClass, objectClass, NULL , NULL },

[SCM] Samba Shared Repository - branch master updated

2011-03-02 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  a5aecdf s4:torture/rap/rap.c - remove unused variable i
  from  d9945e9 s3:idmap_cache: remove an leftover wip comment

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit a5aecdf3610ea5febea5c85607c5f9192e9073e6
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Mar 2 17:49:49 2011 +0100

s4:torture/rap/rap.c - remove unused variable i

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Wed Mar  2 18:38:58 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/torture/rap/rap.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index ae505b9..923a95d 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -1556,7 +1556,6 @@ static NTSTATUS smbcli_rap_netsessionenum(struct 
smbcli_tree *tree,
 {
struct rap_call *call;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-   int i;
 
call = new_rap_cli_call(tree, RAP_WsessionEnum);
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-03-01 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  0e68867 s4:dsdb - always handle the attribute options as 32bit 
unsigned integer
  from  86aa05e libcli/security Add unix_token and unix_info to 
auth_session_info too

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 0e68867b269ad54a8b05441fa81a9ce523b0325b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Mar 1 11:40:23 2011 +0100

s4:dsdb - always handle the attribute options as 32bit unsigned integer

It is defined as LDAP syntax 2.5.5.9 so no need at all to treat it as
64-bit integer.

Reviewed by: Kamenim and Metze

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Mar  1 12:46:15 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/dsdb/common/util.c  |5 ++-
 source4/dsdb/kcc/kcc_connection.c   |2 +-
 source4/dsdb/kcc/kcc_topology.c |   37 ++-
 source4/rpc_server/drsuapi/dcesrv_drsuapi.c |2 +-
 4 files changed, 24 insertions(+), 22 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index fb742f9..d0efa05 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -1862,7 +1862,8 @@ failed:
 bool samdb_is_gc(struct ldb_context *ldb)
 {
const char *attrs[] = { options, NULL };
-   int ret, options;
+   uint32_t options;
+   int ret;
struct ldb_result *res;
TALLOC_CTX *tmp_ctx;
 
@@ -1883,7 +1884,7 @@ bool samdb_is_gc(struct ldb_context *ldb)
return false;
}
 
-   options = ldb_msg_find_attr_as_int(res-msgs[0], options, 0);
+   options = ldb_msg_find_attr_as_uint(res-msgs[0], options, 0);
talloc_free(tmp_ctx);
 
/* if options attribute has the 0x0001 flag set, then enable the 
global catlog */
diff --git a/source4/dsdb/kcc/kcc_connection.c 
b/source4/dsdb/kcc/kcc_connection.c
index 3c30909..66cd415 100644
--- a/source4/dsdb/kcc/kcc_connection.c
+++ b/source4/dsdb/kcc/kcc_connection.c
@@ -80,7 +80,7 @@ static int kccsrv_add_connection(struct kccsrv_service *s,
ldb_msg_add_string(msg, enabledConnection, TRUE);
ldb_msg_add_linearized_dn(msg, fromServer, server_dn);
/* ldb_msg_add_value(msg, schedule, schedule_val, NULL); */
-   ldb_msg_add_string(msg, options, 1);
+   samdb_msg_add_uint(s-samdb, msg, msg, options, 1);
 
ret = ldb_add(s-samdb, msg);
if (ret == LDB_SUCCESS) {
diff --git a/source4/dsdb/kcc/kcc_topology.c b/source4/dsdb/kcc/kcc_topology.c
index c13e330..6cf3d41 100644
--- a/source4/dsdb/kcc/kcc_topology.c
+++ b/source4/dsdb/kcc/kcc_topology.c
@@ -257,13 +257,14 @@ static int kcctpl_sort_bridgeheads(const void 
*bridgehead1,
   const void *bridgehead2)
 {
const struct ldb_message *bh1, *bh2;
-   uint64_t bh1_opts, bh2_opts, cmp_gc;
+   uint32_t bh1_opts, bh2_opts;
+   int cmp_gc;
 
bh1 = (const struct ldb_message *) bridgehead1;
bh2 = (const struct ldb_message *) bridgehead2;
 
-   bh1_opts = ldb_msg_find_attr_as_int64(bh1, options, 0);
-   bh2_opts = ldb_msg_find_attr_as_int64(bh2, options, 0);
+   bh1_opts = ldb_msg_find_attr_as_uint(bh1, options, 0);
+   bh2_opts = ldb_msg_find_attr_as_uint(bh2, options, 0);
 
cmp_gc = (bh1_opts  NTDSDSA_OPT_IS_GC) -
 (bh2_opts  NTDSDSA_OPT_IS_GC);
@@ -619,7 +620,7 @@ static NTSTATUS kcctpl_create_edge(struct ldb_context *ldb, 
TALLOC_CTX *mem_ctx,
}
 
edge-repl_info.cost = ldb_msg_find_attr_as_int64(site_link, cost, 0);
-   edge-repl_info.options = ldb_msg_find_attr_as_int64(site_link, 
options, 0);
+   edge-repl_info.options = ldb_msg_find_attr_as_uint(site_link, 
options, 0);
edge-repl_info.interval = ldb_msg_find_attr_as_int64(site_link,
  replInterval, 0);
/* TODO: edge-repl_info.schedule = site_link!schedule */
@@ -795,7 +796,7 @@ static NTSTATUS kcctpl_setup_graph(struct ldb_context *ldb, 
TALLOC_CTX *mem_ctx,
unsigned int i;
NTSTATUS status;
struct ldb_message *site;
-   uint64_t site_opts;
+   uint32_t site_opts;
 
tmp_ctx = talloc_new(mem_ctx);
NT_STATUS_HAVE_NO_MEMORY(tmp_ctx);
@@ -850,7 +851,7 @@ static NTSTATUS kcctpl_setup_graph(struct ldb_context *ldb, 
TALLOC_CTX *mem_ctx,
talloc_free(tmp_ctx);
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
-   site_opts = ldb_msg_find_attr_as_int64(site, options, 0);
+   site_opts = ldb_msg_find_attr_as_uint(site, options, 0);
 
transports_dn = kcctpl_transports_dn(ldb, tmp_ctx);
if (!transports_dn) {
@@ -878,7 +879,7 @@ static 

[SCM] Samba Shared Repository - branch master updated

2011-03-01 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  0b5719f s4:netlogon RPC server - LogonGetDomainInfo - check for 
NULL attributes
   via  fecf925 s4:drsuapi RPC server - check for the SPN attribute != 
NULL
  from  0e68867 s4:dsdb - always handle the attribute options as 32bit 
unsigned integer

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 0b5719f5fce6c7069c2faac72c83c20bb22db09f
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Mar 1 13:06:19 2011 +0100

s4:netlogon RPC server - LogonGetDomainInfo - check for NULL attributes

This is needed to complete the transition from samdb_msg_add_string to
ldb_msg_add_string.
And this patch yields better NTSTATUS error results than before
(INVALID_PARAMETER rather than OUT_OF_MEMORY).

Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Mar  1 14:42:15 CET 2011 on sn-devel-104

commit fecf925043be5de1ed9d6f3a171ffeab1530d9c9
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Mar 1 13:03:59 2011 +0100

s4:drsuapi RPC server - check for the SPN attribute != NULL

The SPN attribute could derive from an untrusted source (client).

Reviewed-by: Jelmer

---

Summary of changes:
 source4/rpc_server/drsuapi/writespn.c |6 +++
 source4/rpc_server/netlogon/dcerpc_netlogon.c |   46 +++-
 2 files changed, 35 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/rpc_server/drsuapi/writespn.c 
b/source4/rpc_server/drsuapi/writespn.c
index e2e12f1..63fdef2 100644
--- a/source4/rpc_server/drsuapi/writespn.c
+++ b/source4/rpc_server/drsuapi/writespn.c
@@ -59,6 +59,12 @@ static bool writespn_check_spn(struct drsuapi_bind_state 
*b_state,
krb5_principal principal;
const char *dns_name, *dnsHostName;
 
+   /* The service principal name shouldn't be NULL */
+   if (spn == NULL) {
+   talloc_free(tmp_ctx);
+   return false;
+   }
+
/*
  get the objectSid of the DN that is being modified, and
  check it matches the user_sid in their token
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c 
b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 3ec..8cd8257 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -1378,7 +1378,6 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct 
dcesrv_call_state *dce_cal
struct ldb_dn *workstation_dn;
struct netr_DomainInformation *domain_info;
struct netr_LsaPolicyInformation *lsa_policy_info;
-   struct netr_OsVersionInfoEx *os_version;
uint32_t default_supported_enc_types = 0x;
bool update_dns_hostname = true;
int ret, ret3, i;
@@ -1478,9 +1477,13 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct 
dcesrv_call_state *dce_cal
new_msg-dn = workstation_dn;
 
/* Sets the OS name */
-   ret = samdb_msg_set_string(sam_ctx, mem_ctx, new_msg,
-  operatingSystem,
-  
r-in.query-workstation_info-os_name.string);
+
+   if (r-in.query-workstation_info-os_name.string == NULL) {
+   return NT_STATUS_INVALID_PARAMETER;
+   }
+
+   ret = ldb_msg_add_string(new_msg, operatingSystem,
+
r-in.query-workstation_info-os_name.string);
if (ret != LDB_SUCCESS) {
return NT_STATUS_NO_MEMORY;
}
@@ -1490,22 +1493,31 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct 
dcesrv_call_state *dce_cal
 * the values are cleared.
 */
if (r-in.query-workstation_info-os_version.os != NULL) {
+   struct netr_OsVersionInfoEx *os_version;
+   const char *os_version_str;
+
os_version = 
r-in.query-workstation_info-os_version.os-os;
 
-   ret = samdb_msg_set_string(sam_ctx, mem_ctx, new_msg,
-  operatingSystemServicePack,
-  os_version-CSDVersion);
+   if (os_version-CSDVersion == NULL) {
+   return NT_STATUS_INVALID_PARAMETER;
+   }
+
+   os_version_str = talloc_asprintf(new_msg, %u.%u (%u),
+
os_version-MajorVersion,
+
os_version-MinorVersion,
+
os_version-BuildNumber);

[SCM] Samba Shared Repository - branch master updated

2011-03-01 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  80995fd s4:drsuapi RPC server - this resembles more samdb_is_gc
  from  ef224aa librpc/ndr: handle NOALIGN flag for relative pointers and 
alignment DATA_BLOBs

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 80995fde5a6b0ba274972676864e1985d990e1ea
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Mar 1 14:06:23 2011 +0100

s4:drsuapi RPC server - this resembles more samdb_is_gc

Reviewed by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Mar  1 17:57:47 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/rpc_server/drsuapi/dcesrv_drsuapi.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c 
b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
index 63eed63..5dbb238 100644
--- a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
+++ b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
@@ -702,7 +702,7 @@ static WERROR 
dcesrv_drsuapi_DsGetDomainControllerInfo_1(struct drsuapi_bind_sta
 LDB_SCOPE_BASE, attrs_ntds, 
objectClass=nTDSDSA);
if (ret == LDB_SUCCESS  res_ntds-count == 1) {
ctr2-array[i].is_gc
-   = 
(ldb_msg_find_attr_as_uint(res_ntds-msgs[0], options, 0) == 1);
+   = 
(ldb_msg_find_attr_as_uint(res_ntds-msgs[0], options, 0)  
DS_NTDSDSA_OPT_IS_GC);
ctr2-array[i].ntds_guid 
= samdb_result_guid(res_ntds-msgs[0], 
objectGUID);
ctr2-array[i].ntds_dn = 
ldb_dn_get_linearized(res_ntds-msgs[0]-dn);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-03-01 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  e1e3b5c libds/common/flag_mapping.c - fix another build dependency
  from  80995fd s4:drsuapi RPC server - this resembles more samdb_is_gc

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit e1e3b5c4295bd09f5ed5ec6c7f68cb43eb8fb91c
Author: Sean Finney sean...@seanius.net
Date:   Tue Mar 1 18:07:18 2011 +0100

libds/common/flag_mapping.c - fix another build dependency

Signed-off-by: Matthias Dieter Wallnöfer m...@samba.org

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Mar  1 18:53:40 CET 2011 on sn-devel-104

---

Summary of changes:
 libds/common/wscript_build |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libds/common/wscript_build b/libds/common/wscript_build
index 46787db..f6ed209 100644
--- a/libds/common/wscript_build
+++ b/libds/common/wscript_build
@@ -1,3 +1,4 @@
 
 bld.SAMBA_SUBSYSTEM('flag_mapping',
+public_deps='talloc replace',
 source='flag_mapping.c')


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-02-25 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  22c407d libcli/nbt/wscript_build - fix build of lmhosts
  from  1fbb3f2 s3-param: Make rlimit_max below minimum Windows limit 
notification less scary

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 22c407d8bd01d98498c1960b58b5d49d8dda8899
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Feb 25 10:13:45 2011 +0100

libcli/nbt/wscript_build - fix build of lmhosts

Needs also the talloc dependency.

Signed-off-by: Andrew Bartlett abart...@samba.org

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Feb 25 11:01:31 CET 2011 on sn-devel-104

---

Summary of changes:
 libcli/nbt/wscript_build |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/nbt/wscript_build b/libcli/nbt/wscript_build
index 6227482..6f7a174 100644
--- a/libcli/nbt/wscript_build
+++ b/libcli/nbt/wscript_build
@@ -8,8 +8,8 @@ bld.SAMBA_SUBSYSTEM('NDR_NBT_BUF',
 
 bld.SAMBA_SUBSYSTEM('lmhosts',
 source='lmhosts.c',
-deps='replace')
-
+deps='replace talloc'
+)
 
 if bld.env._SAMBA_BUILD_ == 4:
 bld.SAMBA_LIBRARY('cli-nbt',


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-02-25 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  ea9f72c s4:heimdal - fix valgrind issue on Fedora 14
   via  68c61a8 Revert heimdal_build omit #line statments to allow 
valgrind to work again
  from  80e23c6 heimdal_build omit #line statments to allow valgrind to 
work again

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit ea9f72c0c5dc2b8271b66c11d477c09cc303969d
Author: Milan Crha mc...@redhat.com
Date:   Fri Feb 25 11:38:04 2011 +0100

s4:heimdal - fix valgrind issue on Fedora 14

This should definitely fix bug #7858.

Signed-off-by: Matthias Dieter Wallnöfer m...@samba.org
Signed-off-by: Andrew Bartlett abart...@samba.org

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Feb 25 12:39:21 CET 2011 on sn-devel-104

commit 68c61a829b8487104483b23052b54c532fecb6ce
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Feb 25 11:54:02 2011 +0100

Revert heimdal_build omit #line statments to allow valgrind to work again

This reverts commit 80e23c68d83a7c9989f87d5a88a78bb76d222afc.
A better patch has been provided by Milan Crha in the following commit.

---

Summary of changes:
 source4/heimdal/lib/asn1/asn1parse.c |   97 +-
 source4/heimdal/lib/asn1/lex.c   |  109 +-
 source4/heimdal/lib/com_err/lex.c|   31 -
 source4/heimdal/lib/com_err/parse.c  |   14 
 source4/heimdal/lib/hx509/lex.yy.c   |  127 --
 source4/heimdal/lib/hx509/sel-gram.c |   29 
 source4/heimdal/lib/hx509/sel-lex.c  |   28 +++-
 source4/heimdal_build/lexyacc.sh |   16 ++---
 8 files changed, 386 insertions(+), 65 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/heimdal/lib/asn1/asn1parse.c 
b/source4/heimdal/lib/asn1/asn1parse.c
index 87868f1..0382bcf 100644
--- a/source4/heimdal/lib/asn1/asn1parse.c
+++ b/source4/heimdal/lib/asn1/asn1parse.c
@@ -31,6 +31,7 @@ static const char yysccsid[] = @(#)yaccpar   1.9 (Berkeley) 
02/21/93;
 
 extern int YYPARSE_DECL();
 
+#line 39 asn1parse.c
 
 #include config.h
 
@@ -61,6 +62,7 @@ struct string_list {
 #define YYMALLOC malloc
 #define YYFREE   free
 
+#line 71 asn1parse.c
 typedef union {
 int constant;
 struct value *value;
@@ -75,6 +77,7 @@ typedef union {
 struct memhead *members;
 struct constraint_spec *constraint_spec;
 } YYSTYPE;
+#line 80 asn1parse.c
 #define kw_ABSENT 257
 #define kw_ABSTRACT_SYNTAX 258
 #define kw_ALL 259
@@ -609,6 +612,7 @@ YYSTYPE  yylval;
 
 /* variables for the parser stack */
 static YYSTACKDATA yystack;
+#line 945 asn1parse.c
 
 void
 yyerror (const char *s)
@@ -702,6 +706,7 @@ fix_labels(Symbol *s)
 fix_labels2(s-type, p);
 free(p);
 }
+#line 709 asn1parse.c
 /* allocate initial stack or double stack size, up to YYMAXDEPTH */
 static int yygrowstack(YYSTACKDATA *data)
 {
@@ -904,20 +909,25 @@ yyreduce:
 switch (yyn)
 {
 case 1:
+#line 241 asn1parse.c
{
checkundefined();
}
 break;
 case 3:
+#line 248 asn1parse.c
{ lex_error_message(implicit tagging is not supported); }
 break;
 case 4:
+#line 250 asn1parse.c
{ lex_error_message(automatic tagging is not supported); }
 break;
 case 6:
+#line 255 asn1parse.c
{ lex_error_message(no extensibility options supported); }
 break;
 case 16:
+#line 276 asn1parse.c
{
struct string_list *sl;
for(sl = yystack.l_mark[-3].sl; sl != NULL; sl = sl-next) {
@@ -929,6 +939,7 @@ case 16:
}
 break;
 case 17:
+#line 288 asn1parse.c
{
struct string_list *sl;
for(sl = yystack.l_mark[-1].sl; sl != NULL; sl = sl-next)
@@ -936,6 +947,7 @@ case 17:
}
 break;
 case 24:
+#line 306 asn1parse.c
{
yyval.sl = emalloc(sizeof(*yyval.sl));
yyval.sl-string = yystack.l_mark[-2].name;
@@ -943,6 +955,7 @@ case 24:
}
 break;
 case 25:
+#line 312 asn1parse.c
{
yyval.sl = emalloc(sizeof(*yyval.sl));
yyval.sl-string = yystack.l_mark[0].name;
@@ -950,6 +963,7 @@ case 25:
}
 break;
 case 26:
+#line 320 asn1parse.c
{
Symbol *s = addsym (yystack.l_mark[-2].name);
s-stype = Stype;
@@ -959,12 +973,14 @@ case 26:
}
 break;
 case 44:
+#line 351 asn1parse.c
{
yyval.type = new_tag(ASN1_C_UNIV, UT_Boolean,
 TE_EXPLICIT, new_type(TBoolean));
}
 break;
 case 45:
+#line 358 asn1parse.c
{
if(yystack.l_mark[-3].value-type != integervalue)

[SCM] Samba Shared Repository - branch master updated

2011-02-22 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  85f4f73 s4:torture/rpc/netlogon.c - fix two build warnings by casts
  from  5590ac2 selftest the raw.mux test is flaky:

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 85f4f73ed4eacc96005e1eb8a591c84474c20845
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Feb 22 10:26:04 2011 +0100

s4:torture/rpc/netlogon.c - fix two build warnings by casts

Signed-off-by: Stefan Metzmacher me...@samba.org

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Feb 22 11:45:49 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/torture/rpc/netlogon.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 30c42c0..e05fe9b 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -776,7 +776,7 @@ static bool test_netlogon_ops_args(struct dcerpc_pipe *p, 
struct torture_context
for (i=52;i53;i++) {
ZERO_STRUCT(auth2);
/* the authenticator should be ignored by the server */
-   generate_random_buffer(auth, sizeof(auth));
+   generate_random_buffer((uint8_t *) auth, sizeof(auth));
 
r.in.validation_level = i;
 
@@ -815,7 +815,7 @@ static bool test_netlogon_ops_args(struct dcerpc_pipe *p, 
struct torture_context
for (i=2;i=3;i++) {
ZERO_STRUCT(auth2);
/* the authenticator should be ignored by the server */
-   generate_random_buffer(auth, sizeof(auth));
+   generate_random_buffer((uint8_t *) auth, sizeof(auth));
 
r.in.validation_level = i;
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-02-21 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  2ba57fd s4:smbtorture do not leave output directory around
   via  d2b336a libcli/security/security_descriptor.c - fix three wrong 
counter variables
   via  618c11c libcli/security/privileges.c - fix wrong counter type
   via  e7659fa libcli/security/privileges.c - fix the counting of 
privileges
   via  a2ded04 libcli/security/sddl.c - fix wrong counter type
   via  055857a libcli/security/display_sec.c - fix wrong counter type
  from  e37db96 s4: avoid overwritting the dceprc.h file from toplevel 
librpc

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 2ba57fd1832a4bc3c4c652c08e5f62054ecab79b
Author: Christian Ambach christian.amb...@de.ibm.com
Date:   Fri Feb 18 15:02:35 2011 +0100

s4:smbtorture do not leave output directory around

calling smbtorture with no or invalid arguments left the temporary
output directory around
this patches removes the dead-end exit from usage and makes the
logic go on until the final cleanup state is reached

output directory will still be left around when test times out
or testcases itself force an exit

also make sure that the directory itself is deleted, not just
the objects in it

Signed-off-by: Matthias Dieter Wallnöfer m...@samba.org
Signed-off-by: Andrew Bartlett abart...@samba.org

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Mon Feb 21 11:35:30 CET 2011 on sn-devel-104

commit d2b336ae319053dee96476131a3dc0c45b306b5f
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Feb 16 09:22:43 2011 +0100

libcli/security/security_descriptor.c - fix three wrong counter variables

These strictly need to be uint32_t since acl*-num_aces has been
defined by this type.

This counter patchset has been reviewed by Andrew Bartlett.

commit 618c11cc15b0c7b16cd21e9bc10dbe474aa514ff
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Feb 16 09:12:17 2011 +0100

libcli/security/privileges.c - fix wrong counter type

This strictly needs to be from type uint32_t since privset-count
is defined with this type.

commit e7659fa802627b472bd514672de76193b4694aa2
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Feb 16 09:20:11 2011 +0100

libcli/security/privileges.c - fix the counting of privileges

Since the privileges are always counted with a signed integer, there is no
reason to specify the upper limit with a uint32_t.

commit a2ded049730074beb05cc1124c24ca848a28c297
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Feb 16 09:12:17 2011 +0100

libcli/security/sddl.c - fix wrong counter type

This strictly needs to be from type uint32_t since acl-num_aces is
defined of this type.

commit 055857a8d46f315014f13a845c9a66a837d86f76
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Feb 16 09:12:17 2011 +0100

libcli/security/display_sec.c - fix wrong counter type

This strictly needs to be of type uint32_t due to
sec_acl-num_aces which is of type uint32_t.

---

Summary of changes:
 lib/torture/torture.c |1 +
 libcli/security/display_sec.c |2 +-
 libcli/security/privileges.c  |   15 +--
 libcli/security/sddl.c|2 +-
 libcli/security/security_descriptor.c |6 +++---
 source4/torture/smbtorture.c  |   23 ++-
 6 files changed, 21 insertions(+), 28 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/torture/torture.c b/lib/torture/torture.c
index a12ce65..a0b35bf 100644
--- a/lib/torture/torture.c
+++ b/lib/torture/torture.c
@@ -138,6 +138,7 @@ static int local_deltree(const char *path)
}
}
closedir(dir);
+   rmdir(path);
return ret;
 }
 
diff --git a/libcli/security/display_sec.c b/libcli/security/display_sec.c
index 3d60e42..0aa89b4 100644
--- a/libcli/security/display_sec.c
+++ b/libcli/security/display_sec.c
@@ -233,7 +233,7 @@ void display_sec_ace(struct security_ace *ace)
  /
 void display_sec_acl(struct security_acl *sec_acl)
 {
-   int i;
+   uint32_t i;
 
printf(\tACL\tNum ACEs:\t%u\trevision:\t%x\n,
 sec_acl-num_aces, sec_acl-revision); 
diff --git a/libcli/security/privileges.c b/libcli/security/privileges.c
index e215b5f..adb67c1 100644
--- a/libcli/security/privileges.c
+++ b/libcli/security/privileges.c
@@ -190,10 +190,9 @@ uint64_t sec_privilege_mask(enum sec_privilege privilege)
 void se_priv_put_all_privileges(uint64_t *privilege_mask)
 {
int i;
-   uint32_t num_privs = ARRAY_SIZE(privs);
 
*privilege_mask = 0;
-   for 

[SCM] Samba Shared Repository - branch master updated

2011-02-21 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  5135e40 s4:scripting/python/modules.[ch] - explicitly say that 
py_update_path takes no argument
  from  1820084 s3:tests: move the log directory of the smbclient_s3 test 
to st/

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 5135e40277f5603bfc439aca6a795b267bf70cb3
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Feb 21 11:47:17 2011 +0100

s4:scripting/python/modules.[ch] - explicitly say that py_update_path 
takes no argument

This quiets some build warnings.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Mon Feb 21 14:42:00 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/scripting/python/modules.c |2 +-
 source4/scripting/python/modules.h |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/modules.c 
b/source4/scripting/python/modules.c
index abf5c46..78cdbc0 100644
--- a/source4/scripting/python/modules.c
+++ b/source4/scripting/python/modules.c
@@ -31,7 +31,7 @@ static bool PySys_PathPrepend(PyObject *list, const char 
*path)
return (PyList_Insert(list, 0, py_path) == 0);
 }
 
-bool py_update_path()
+bool py_update_path(void)
 {
PyObject *mod_sys, *py_path;
 
diff --git a/source4/scripting/python/modules.h 
b/source4/scripting/python/modules.h
index 4e43e6d..e7e97aa 100644
--- a/source4/scripting/python/modules.h
+++ b/source4/scripting/python/modules.h
@@ -20,6 +20,6 @@
 #ifndef __SAMBA_PYTHON_MODULES_H__
 #define __SAMBA_PYTHON_MODULES_H__
 
-bool py_update_path();
+bool py_update_path(void);
 
 #endif /* __SAMBA_PYTHON_MODULES_H__ */ 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-02-17 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  aa3f749 s4:scripting/python/modules.c - remove a really unnecessary 
variable
  from  2045cd7 s3-waf: add check for struct sigevent and some of its 
members.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit aa3f749575ac551b1b0886838ef023aab14d123f
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Feb 17 14:47:10 2011 +0100

s4:scripting/python/modules.c - remove a really unnecessary variable

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Thu Feb 17 16:01:44 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/scripting/python/modules.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/modules.c 
b/source4/scripting/python/modules.c
index 9c6a008..abf5c46 100644
--- a/source4/scripting/python/modules.c
+++ b/source4/scripting/python/modules.c
@@ -33,7 +33,6 @@ static bool PySys_PathPrepend(PyObject *list, const char 
*path)
 
 bool py_update_path()
 {
-   char *newpath;
PyObject *mod_sys, *py_path;
 
mod_sys = PyImport_ImportModule(sys);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-02-15 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  738b2ab s4: Don't grant level II oplock to a file with byte-range 
locks.
  from  3c5f537 s4:drsuapi/getncchanges: make sure we don't process 
filteres objects more than once

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 738b2abe784bc38bdaf1abc913a401e0e732e188
Author: Pavel Shilovsky pias...@etersoft.ru
Date:   Mon Jan 31 20:20:24 2011 +0300

s4: Don't grant level II oplock to a file with byte-range locks.

Signed-off-by: Pavel Shilovsky pias...@etersoft.ru
Signed-off-by: Matthias Dieter Wallnöfer m...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Feb 15 11:09:17 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/ntvfs/common/brlock.c |   10 ++
 source4/ntvfs/common/brlock.h |3 +++
 source4/ntvfs/common/brlock_tdb.c |   29 -
 source4/ntvfs/posix/pvfs_open.c   |   12 +++-
 4 files changed, 52 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/ntvfs/common/brlock.c b/source4/ntvfs/common/brlock.c
index a5bc5c1..154494e 100644
--- a/source4/ntvfs/common/brlock.c
+++ b/source4/ntvfs/common/brlock.c
@@ -125,3 +125,13 @@ NTSTATUS brl_close(struct brl_context *brl,
 {
return ops-brl_close(brl, brlh);
 }
+
+/*
+ Get a number of locks associated with a open file.
+*/
+NTSTATUS brl_count(struct brl_context *brl,
+  struct brl_handle *brlh,
+  int *count)
+{
+   return ops-brl_count(brl, brlh, count);
+}
diff --git a/source4/ntvfs/common/brlock.h b/source4/ntvfs/common/brlock.h
index 75f142b..e5e618d 100644
--- a/source4/ntvfs/common/brlock.h
+++ b/source4/ntvfs/common/brlock.h
@@ -46,6 +46,9 @@ struct brlock_ops {
 enum brl_type );
NTSTATUS (*brl_close)(struct brl_context *,
  struct brl_handle *);
+   NTSTATUS (*brl_count)(struct brl_context *,
+ struct brl_handle *,
+ int *count);
 };
 
 
diff --git a/source4/ntvfs/common/brlock_tdb.c 
b/source4/ntvfs/common/brlock_tdb.c
index df95d4c..07e7c1a 100644
--- a/source4/ntvfs/common/brlock_tdb.c
+++ b/source4/ntvfs/common/brlock_tdb.c
@@ -738,6 +738,32 @@ static NTSTATUS brl_tdb_close(struct brl_context *brl,
return status;
 }
 
+static NTSTATUS brl_tdb_count(struct brl_context *brl, struct brl_handle *brlh,
+ int *count)
+{
+   TDB_DATA kbuf, dbuf;
+
+   kbuf.dptr = brlh-key.data;
+   kbuf.dsize = brlh-key.length;
+   *count = 0;
+
+   if (tdb_chainlock(brl-w-tdb, kbuf) != 0) {
+   return NT_STATUS_INTERNAL_DB_CORRUPTION;
+   }
+
+   dbuf = tdb_fetch(brl-w-tdb, kbuf);
+   if (!dbuf.dptr) {
+   tdb_chainunlock(brl-w-tdb, kbuf);
+   return NT_STATUS_OK;
+   }
+
+   *count = dbuf.dsize / sizeof(struct lock_struct);
+
+   free(dbuf.dptr);
+   tdb_chainunlock(brl-w-tdb, kbuf);
+
+   return NT_STATUS_OK;
+}
 
 static const struct brlock_ops brlock_tdb_ops = {
.brl_init   = brl_tdb_init,
@@ -746,7 +772,8 @@ static const struct brlock_ops brlock_tdb_ops = {
.brl_unlock = brl_tdb_unlock,
.brl_remove_pending = brl_tdb_remove_pending,
.brl_locktest   = brl_tdb_locktest,
-   .brl_close  = brl_tdb_close
+   .brl_close  = brl_tdb_close,
+   .brl_count  = brl_tdb_count
 };
 
 
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index da32c7f..08a54f8 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -1197,7 +1197,7 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
struct pvfs_file *f;
struct ntvfs_handle *h;
NTSTATUS status;
-   int fd;
+   int fd, count;
struct odb_lock *lck;
uint32_t create_options;
uint32_t create_options_must_ignore_mask;
@@ -1569,6 +1569,16 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
 
f-handle-fd = fd;
 
+   status = brl_count(f-pvfs-brl_context, f-brl_handle, count);
+   if (!NT_STATUS_IS_OK(status)) {
+   talloc_free(lck);
+   return status;
+   }
+
+   if (count != 0) {
+   oplock_level = OPLOCK_NONE;
+   }
+
/* now really mark the file as open */
status = odb_open_file(lck, f-handle, name-full_name,
   f-handle-fd, name-dos.write_time,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-02-15 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  7312dac s4:acl LDB module - interpret userAccountControl as 
uint32_t
   via  6bfaa4c libcli/security - fix two output format specifiers
  from  738b2ab s4: Don't grant level II oplock to a file with byte-range 
locks.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 7312dacb6346ced62557ed2cc6a733907c7b3401
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Feb 11 15:10:04 2011 +0100

s4:acl LDB module - interpret userAccountControl as uint32_t

This is the same way as it is done in the samldb LDB module.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Feb 15 12:08:26 CET 2011 on sn-devel-104

commit 6bfaa4c10903dc5ccbad5729cba48cdf4cc41b79
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Feb 10 10:17:33 2011 +0100

libcli/security - fix two output format specifiers

---

Summary of changes:
 libcli/security/create_descriptor.c  |2 +-
 libcli/security/display_sec.c|2 +-
 source4/dsdb/samdb/ldb_modules/acl.c |6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/security/create_descriptor.c 
b/libcli/security/create_descriptor.c
index 9e348a7..62919a1 100644
--- a/libcli/security/create_descriptor.c
+++ b/libcli/security/create_descriptor.c
@@ -226,7 +226,7 @@ static struct security_acl *process_user_acl(TALLOC_CTX 
*mem_ctx,
return NULL;
 
tmp_acl-revision = acl-revision;
-   DEBUG(6,(__location__ : acl revision %u\n, acl-revision));
+   DEBUG(6,(__location__ : acl revision %d\n, acl-revision));
 
co = dom_sid_parse_talloc(tmp_ctx,  SID_CREATOR_OWNER);
cg = dom_sid_parse_talloc(tmp_ctx,  SID_CREATOR_GROUP);
diff --git a/libcli/security/display_sec.c b/libcli/security/display_sec.c
index f45b770..3d60e42 100644
--- a/libcli/security/display_sec.c
+++ b/libcli/security/display_sec.c
@@ -235,7 +235,7 @@ void display_sec_acl(struct security_acl *sec_acl)
 {
int i;
 
-   printf(\tACL\tNum ACEs:\t%d\trevision:\t%x\n,
+   printf(\tACL\tNum ACEs:\t%u\trevision:\t%x\n,
 sec_acl-num_aces, sec_acl-revision); 
printf(\t---\n);
 
diff --git a/source4/dsdb/samdb/ldb_modules/acl.c 
b/source4/dsdb/samdb/ldb_modules/acl.c
index a96ea37..20f09a5 100644
--- a/source4/dsdb/samdb/ldb_modules/acl.c
+++ b/source4/dsdb/samdb/ldb_modules/acl.c
@@ -436,7 +436,7 @@ static int acl_sDRightsEffective(struct ldb_module *module,
 static int acl_validate_spn_value(TALLOC_CTX *mem_ctx,
  struct ldb_context *ldb,
  const char *spn_value,
- int userAccountControl,
+ uint32_t userAccountControl,
  const char *samAccountName,
  const char *dnsHostName,
  const char *netbios_name,
@@ -544,7 +544,7 @@ static int acl_check_spn(TALLOC_CTX *mem_ctx,
struct ldb_result *netbios_res;
struct ldb_message_element *el;
struct ldb_dn *partitions_dn = samdb_partitions_dn(ldb, tmp_ctx);
-   int userAccountControl;
+   uint32_t userAccountControl;
const char *samAccountName;
const char *dnsHostName;
const char *netbios_name;
@@ -597,7 +597,7 @@ static int acl_check_spn(TALLOC_CTX *mem_ctx,
return ret;
}
 
-   userAccountControl = ldb_msg_find_attr_as_int(acl_res-msgs[0], 
userAccountControl, 0);
+   userAccountControl = ldb_msg_find_attr_as_uint(acl_res-msgs[0], 
userAccountControl, 0);
dnsHostName = ldb_msg_find_attr_as_string(acl_res-msgs[0], 
dnsHostName, NULL);
samAccountName = ldb_msg_find_attr_as_string(acl_res-msgs[0], 
samAccountName, NULL);
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-02-15 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  fa36577 s4:sam.py - add another description test case
  from  0085d6e s3-waf: fix the build.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit fa36577ae125a9043edcc896333d97b21280489d
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Feb 15 14:47:28 2011 +0100

s4:sam.py - add another description test case

Exactly for the syntax which is needed by Volker in s3's pdb_ads.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Feb 15 16:10:15 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/dsdb/tests/python/sam.py |   13 +
 1 files changed, 13 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/tests/python/sam.py b/source4/dsdb/tests/python/sam.py
index a623ebc..5f7c90d 100755
--- a/source4/dsdb/tests/python/sam.py
+++ b/source4/dsdb/tests/python/sam.py
@@ -2365,6 +2365,19 @@ class SamTests(unittest.TestCase):
 self.assertTrue(len(res[0][description]) == 1)
 self.assertEquals(res[0][description][0], desc1)
 
+m = Message()
+m.dn = Dn(ldb, cn=ldaptestgroup,cn=users, + self.base_dn)
+m.add(MessageElement(desc1, FLAG_MOD_DELETE, description))
+m.add(MessageElement(desc2, FLAG_MOD_ADD, description))
+ldb.modify(m)
+
+res = ldb.search(cn=ldaptestgroup,cn=users, + self.base_dn,
+ scope=SCOPE_BASE, attrs=[description])
+self.assertTrue(len(res) == 1)
+self.assertTrue(description in res[0])
+self.assertTrue(len(res[0][description]) == 1)
+self.assertEquals(res[0][description][0], desc2)
+
 delete_force(self.ldb, cn=ldaptestgroup,cn=users, + self.base_dn)
 
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-02-15 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  20197c6 s4:torture/rpc/samr.c - fix up the test_GroupList suite 
regarding QueryDisplayInfo
   via  2e0a933 s4:samr RPC server - QueryDisplayInfo returns always all 
domains users, aliases and groups
  from  aaae316 s4-ldb_modules/operational: Make use of 
dsdb_module_reference_dn() function

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 20197c6687f83154aefa33706829af08d1d5c50a
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Feb 15 10:24:51 2011 +0100

s4:torture/rpc/samr.c - fix up the test_GroupList suite regarding 
QueryDisplayInfo

This is needed to comply with the previous patch.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Feb 15 17:40:22 CET 2011 on sn-devel-104

commit 2e0a933ac87a378bf18f6a73186d291803d09d8b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Jan 15 12:30:16 2011 +0100

s4:samr RPC server - QueryDisplayInfo returns always all domains users, 
aliases and groups

That means when calling QueryDisplayInfo on the BUILTIN handle we
still get all related domain objects - for example all domain (global
+ universal) groups. This is contrary to the EnumDomain... calls which
do really only return the objects in the specified domain policy handle.

This has been observed against Windows Server 2008 and confirmed by
dochelp.

In the same occasion I've converted from a gendb*-oriented search call to 
dsdb_search.

Patch-reviewed-by: Andrew Tridgell tri...@samba.org

---

Summary of changes:
 source4/rpc_server/samr/dcesrv_samr.c |   74 ++---
 source4/torture/rpc/samr.c|   18 +++-
 2 files changed, 56 insertions(+), 36 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/rpc_server/samr/dcesrv_samr.c 
b/source4/rpc_server/samr/dcesrv_samr.c
index c2b0d03..a9a72a7 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -3621,8 +3621,8 @@ static NTSTATUS dcesrv_samr_QueryDisplayInfo(struct 
dcesrv_call_state *dce_call,
 {
struct dcesrv_handle *h;
struct samr_domain_state *d_state;
-   struct ldb_message **res;
-   int i, ldb_cnt;
+   struct ldb_result *res;
+   unsigned int i;
uint32_t count;
const char * const attrs[] = { objectSid, sAMAccountName,
displayName, description, userAccountControl,
@@ -3632,6 +3632,7 @@ static NTSTATUS dcesrv_samr_QueryDisplayInfo(struct 
dcesrv_call_state *dce_call,
struct samr_DispEntryAscii *entriesAscii = NULL;
struct samr_DispEntryGeneral *entriesGeneral = NULL;
const char *filter;
+   int ret;
 
DCESRV_PULL_HANDLE(h, r-in.domain_handle, SAMR_HANDLE_DOMAIN);
 
@@ -3661,39 +3662,38 @@ static NTSTATUS dcesrv_samr_QueryDisplayInfo(struct 
dcesrv_call_state *dce_call,
return NT_STATUS_INVALID_INFO_CLASS;
}
 
-   /* search for all requested objects in this domain. This could
+   /* search for all requested objects in all domains. This could
   possibly be cached and resumed based on resume_key */
-   ldb_cnt = samdb_search_domain(d_state-sam_ctx, mem_ctx,
- d_state-domain_dn, res, attrs,
- d_state-domain_sid, %s, filter);
-   if (ldb_cnt == -1) {
+   ret = dsdb_search(d_state-sam_ctx, mem_ctx, res, NULL,
+ LDB_SCOPE_SUBTREE, attrs, 0, %s, filter);
+   if (ret != LDB_SUCCESS) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
-   if (ldb_cnt == 0 || r-in.max_entries == 0) {
+   if ((res-count == 0) || (r-in.max_entries == 0)) {
return NT_STATUS_OK;
}
 
switch (r-in.level) {
case 1:
entriesGeneral = talloc_array(mem_ctx,
-struct samr_DispEntryGeneral,
-ldb_cnt);
+ struct samr_DispEntryGeneral,
+ res-count);
break;
case 2:
entriesFull = talloc_array(mem_ctx,
-struct samr_DispEntryFull,
-ldb_cnt);
+  struct samr_DispEntryFull,
+  res-count);
break;
case 3:
entriesFullGroup = talloc_array(mem_ctx,
-struct samr_DispEntryFullGroup,
-ldb_cnt);
+   struct 

[SCM] Samba Shared Repository - branch master updated

2011-02-09 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  be80812 s4:WAF build - remove source4/configure.developer
   via  8d80225 ldb:tools - return LDB_ERR_OPERATIONS_ERROR on generic 
errors
   via  5e06b21 ldb:tools - always check if ldb connection has been 
estabilished
   via  22f4030 ldb:ldbsearch tool - use LDB result constants where possible
   via  23c0ae7 ldb:ldbsearch tool - simplify error code return
   via  ff7dff6 ldb:ldbsearch tool - use %u for printing unsigned integers
   via  475ea1c ldb:ldbedit tool - don't forget about the do_edit result 
code
   via  79d3532 ldb:ldbedit tool - fix bug #7914
   via  b5ccf18 ldb:ldbedit tool - use unsigned counters for consistency 
with other LDB tools
   via  bc675aa ldb:ldbedit tool - use %u for printing out unsigned 
integers
   via  b2c1831 ldb:ldbedit tool - use LDB result constants where needed
   via  bd727a9 ldb:ldbrename tool - use LDB result constant where needed
   via  ef0477a ldb:ldbmodify tool - use unsigned counters for consistency 
with other LDB tools
   via  6f52070 ldb:ldbdel tool - use LDB result constants for consistency
   via  2937e63 ldb:ldbadd tool - use LDB return codes where possible
   via  de9217b ldb:ldbadd tool - use %u for printing out unsigned 
integers
   via  c3ca0b0 ldb:ldbadd tool - use LDB result constants for consistency
  from  a0e5761 s3-waf: we check for attr in ../lib/util/script already, so 
we cannot set to EMPTY here.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit be808123cb2b2bd050edb848bfdeaacc26ab397e
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Feb 9 16:51:52 2011 +0100

s4:WAF build - remove source4/configure.developer

This isn't needed anymore - discussed with abartlet.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Wed Feb  9 19:44:05 CET 2011 on sn-devel-104

commit 8d80225afb764e937e41e0d52586e1f038871734
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Feb 1 20:34:44 2011 +0100

ldb:tools - return LDB_ERR_OPERATIONS_ERROR on generic errors

Use return when located in main for consistency (exit would do the
same).

The patchset has been discussed with Jelmer Vernooij and afterwards LDB
maintainer Simo Sorce.

commit 5e06b21cc1553606efaeae03504e91d811793085
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Feb 1 20:26:12 2011 +0100

ldb:tools - always check if ldb connection has been estabilished

Otherwise return LDB_ERR_OPERATIONS_ERROR.

commit 22f4030c303224ecc7ee28b0b93d80d27869a4a0
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Feb 1 20:48:52 2011 +0100

ldb:ldbsearch tool - use LDB result constants where possible

commit 23c0ae74523c5d35e0c9b41d6a7381a72bb7f6ec
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Feb 1 20:40:27 2011 +0100

ldb:ldbsearch tool - simplify error code return

commit ff7dff6ef06c5327f5f3b01572f6bae88e36c4df
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Feb 1 20:51:26 2011 +0100

ldb:ldbsearch tool - use %u for printing unsigned integers

commit 475ea1ca595b3f6ea5fd6476c28f21995d781529
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Feb 5 13:19:56 2011 +0100

ldb:ldbedit tool - don't forget about the do_edit result code

Use it for computing the program exit code. The result has not to be
free'd explicitly since it's a child by ldb which itself is child by
mem_ctx.

commit 79d3532f7f905afe1a48acabf75247cef6f791e3
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Jan 14 12:48:54 2011 +0100

ldb:ldbedit tool - fix bug #7914

modify_record returns -1 when failing, otherwise the number of
modifies performed as an unsigned int converted to int.
When we get -1 we immediately need to stop (the error message has
already been generated by the function itself).

commit b5ccf181f55192ac199af5e377254057a876a216
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Jan 14 12:39:42 2011 +0100

ldb:ldbedit tool - use unsigned counters for consistency with other LDB 
tools

commit bc675aa391ef29a04d841778771fef1fb737cde4
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Feb 1 20:52:33 2011 +0100

ldb:ldbedit tool - use %u for printing out unsigned integers

commit b2c183133767b5c761e982558bddd2d676f9f84f
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Jan 14 12:39:04 2011 +0100

ldb:ldbedit tool - use LDB result constants where needed

commit bd727a967d313f0c2552c7de36b5b85e043f250a
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Jan 14 12:38:10 2011 +0100

ldb:ldbrename tool - use LDB result constant where needed

commit ef0477a0b92d2e46bf78446c8beb55e16ca3128b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   

[SCM] Samba Shared Repository - branch master updated

2011-02-01 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  3b94800 Added SSL global catalog
  from  ff0f633 s3:rpcclient/cmd_samr: remove useless ';'

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 3b948008ce4083ab551257c18659d5ff912990bd
Author: William Brown william.e.br...@adelaide.edu.au
Date:   Thu Jan 20 11:41:01 2011 +1030

Added SSL global catalog

Reviewed-by: Andrew Bartlett
Signed-off-by: Matthias Dieter Wallnöfer m...@samba.org

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Feb  1 20:05:39 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/ldap_server/ldap_server.c |   21 ++---
 1 files changed, 18 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/ldap_server/ldap_server.c 
b/source4/ldap_server/ldap_server.c
index 21030ba..4547759 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -314,7 +314,7 @@ static void ldapsrv_accept(struct stream_connection *c,
}
port = socket_address-port;
talloc_free(socket_address);
-   if (port == 3268) /* Global catalog */ {
+   if (port == 3268 || port == 3269) /* Global catalog */ {
conn-global_catalog = true;
}
 
@@ -347,7 +347,7 @@ static void ldapsrv_accept(struct stream_connection *c,
 
conn-sockets.active = conn-sockets.raw;
 
-   if (port != 636) {
+   if (port != 636  port != 3269) {
ldapsrv_call_read_next(conn);
return;
}
@@ -860,9 +860,24 @@ static NTSTATUS add_socket(struct task_server *task,
 address, port, nt_errstr(status)));
return status;
}
+   if (tstream_tls_params_enabled(ldap_service-tls_params)) {
+   /* add ldaps server for the global catalog */
+   port = 3269;
+   status = stream_setup_socket(task, task-event_ctx, 
lp_ctx,
+model_ops,
+ldap_stream_nonpriv_ops,
+ipv4, address, port,
+
lpcfg_socket_options(lp_ctx),
+ldap_service);
+   if (!NT_STATUS_IS_OK(status)) {
+   DEBUG(0,(ldapsrv failed to bind to %s:%u - 
%s\n,
+address, port, nt_errstr(status)));
+   return status;
+   }
+   }
}
 
-   /* And once we are bound, free the tempoary ldb, it will
+   /* And once we are bound, free the temporary ldb, it will
 * connect again on each incoming LDAP connection */
talloc_unlink(ldap_service, ldb);
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-01-30 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  7b9ead1 s4:auth/pyauth.c - temporarily add compatibility code for 
Python 2.4
  from  4d66e0e librpc/rpc: add dcerpc_fault_to_nt_status() mapping from 
DCERPC_FAULT_SEC_PKG_ERROR

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 7b9ead17f1b6a3698bb5d5eb4a9448f26428dad1
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Jan 30 17:55:41 2011 +0100

s4:auth/pyauth.c - temporarily add compatibility code for Python 2.4

This patch has been commited by request of Jelmer.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sun Jan 30 19:07:57 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/auth/pyauth.c |   11 +++
 1 files changed, 11 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/pyauth.c b/source4/auth/pyauth.c
index 26de2c3..2b310bf 100644
--- a/source4/auth/pyauth.c
+++ b/source4/auth/pyauth.c
@@ -33,6 +33,17 @@
 
 staticforward PyTypeObject PyAuthContext;
 
+/* There's no Py_ssize_t in 2.4, apparently */
+#if PY_MAJOR_VERSION == 2  PY_MINOR_VERSION  5
+typedef int Py_ssize_t;
+typedef inquiry lenfunc;
+typedef intargfunc ssizeargfunc;
+#endif
+
+#ifndef Py_RETURN_NONE
+#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
+#endif
+
 static PyObject *py_auth_session_get_security_token(PyObject *self, void 
*closure)
 {
struct auth_session_info *session = py_talloc_get_type(self, struct 
auth_session_info);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-01-15 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  3f6ae94 s4:samr RPC server - always interpret filter integer values 
as signed
  from  dbaeb52 Add OPLOCK4 test which explores how Windows copes with 
oplock and share mode breaks on hard links.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 3f6ae9422b5be82c36af75ba7c92132576f867fe
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Jan 15 13:15:54 2011 +0100

s4:samr RPC server - always interpret filter integer values as signed

To prevent platform-dependant problems.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sat Jan 15 14:54:14 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/rpc_server/samr/dcesrv_samr.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/rpc_server/samr/dcesrv_samr.c 
b/source4/rpc_server/samr/dcesrv_samr.c
index 399b146..8b53aef 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -522,12 +522,12 @@ static NTSTATUS 
dcesrv_samr_info_DomGeneralInformation(struct samr_domain_state
 (objectClass=user));
info-num_groups = samdb_search_count(state-sam_ctx, mem_ctx,
  state-domain_dn,
- 
((objectClass=group)(|(groupType=%u)(groupType=%u))),
+ 
((objectClass=group)(|(groupType=%d)(groupType=%d))),
  GTYPE_SECURITY_UNIVERSAL_GROUP,
  GTYPE_SECURITY_GLOBAL_GROUP);
info-num_aliases = samdb_search_count(state-sam_ctx, mem_ctx,
   state-domain_dn,
-  
((objectClass=group)(|(groupType=%u)(groupType=%u))),
+  
((objectClass=group)(|(groupType=%d)(groupType=%d))),
   
GTYPE_SECURITY_BUILTIN_LOCAL_GROUP,
   
GTYPE_SECURITY_DOMAIN_LOCAL_GROUP);
 
@@ -3641,12 +3641,12 @@ static NTSTATUS dcesrv_samr_QueryDisplayInfo(struct 
dcesrv_call_state *dce_call,
case 1:
case 4:
filter = talloc_asprintf(mem_ctx, ((objectclass=user)
-(sAMAccountType=%u)),
+(sAMAccountType=%d)),
 ATYPE_NORMAL_ACCOUNT);
break;
case 2:
filter = talloc_asprintf(mem_ctx, ((objectclass=user)
-(sAMAccountType=%u)),
+(sAMAccountType=%d)),
 ATYPE_WORKSTATION_TRUST);
break;
case 3:


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-01-15 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  32e7d76 s4:auth/ntlm/auth_sam.c - fix call to 
get_server_info_principal
  from  77f8b00 s3: Avoid some calls to cli_errstr

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 32e7d7654f6e446d85da4b81b14e7989b8d030d5
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Jan 15 16:54:23 2011 +0100

s4:auth/ntlm/auth_sam.c - fix call to get_server_info_principal

This should obviously point to the wrapper not the call itself.

Found out by Tru64 host build warning.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sat Jan 15 18:05:59 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/auth/ntlm/auth_sam.c |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/ntlm/auth_sam.c b/source4/auth/ntlm/auth_sam.c
index 6457132..d9aec66 100644
--- a/source4/auth/ntlm/auth_sam.c
+++ b/source4/auth/ntlm/auth_sam.c
@@ -354,11 +354,11 @@ static NTSTATUS authsam_want_check(struct 
auth_method_context *ctx,
 
   
 /* Wrapper for the auth subsystem pointer */
-NTSTATUS authsam_get_server_info_principal_wrapper(TALLOC_CTX *mem_ctx,
-  struct auth_context 
*auth_context,
-  const char *principal,
-  struct ldb_dn *user_dn,
-  struct 
auth_serversupplied_info **server_info)
+static NTSTATUS authsam_get_server_info_principal_wrapper(TALLOC_CTX *mem_ctx,
+ struct auth_context 
*auth_context,
+ const char *principal,
+ struct ldb_dn 
*user_dn,
+ struct 
auth_serversupplied_info **server_info)
 {
return authsam_get_server_info_principal(mem_ctx, auth_context-lp_ctx, 
auth_context-sam_ctx,
 principal, user_dn, 
server_info);
@@ -368,7 +368,7 @@ static const struct auth_operations sam_ignoredomain_ops = {
.get_challenge = auth_get_challenge_not_implemented,
.want_check= authsam_ignoredomain_want_check,
.check_password= authsam_check_password_internals,
-   .get_server_info_principal = authsam_get_server_info_principal
+   .get_server_info_principal = authsam_get_server_info_principal_wrapper
 };
 
 static const struct auth_operations sam_ops = {
@@ -376,7 +376,7 @@ static const struct auth_operations sam_ops = {
.get_challenge = auth_get_challenge_not_implemented,
.want_check= authsam_want_check,
.check_password= authsam_check_password_internals,
-   .get_server_info_principal = authsam_get_server_info_principal
+   .get_server_info_principal = authsam_get_server_info_principal_wrapper
 };
 
 _PUBLIC_ NTSTATUS auth_sam_init(void)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-01-15 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  93d9641 s4:dsdb_find_nc_root - fix it up to let the provisioning 
work correctly
  from  32e7d76 s4:auth/ntlm/auth_sam.c - fix call to 
get_server_info_principal

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 93d96414be1e7fbf895a05025c0a3422dc55c88e
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Jan 15 18:12:09 2011 +0100

s4:dsdb_find_nc_root - fix it up to let the provisioning work correctly

Use the temporary list unless we have at least the three main
namingContexts from the rootDSE available (Default, Configuration, Schema 
-
these are mandatory on all AD deployments!).

This bug has been discovered by Nadya in relation with her SD work.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sat Jan 15 19:01:11 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/dsdb/common/util.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index b2d4be0..148a77d 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -3284,10 +3284,10 @@ int dsdb_find_nc_root(struct ldb_context *samdb, 
TALLOC_CTX *mem_ctx, struct ldb
}
 
el = ldb_msg_find_element(root_res-msgs[0], namingContexts);
-   if (!el) {
+   if ((el == NULL) || (el-num_values  3)) {
struct ldb_message *tmp_msg;
 
-   DEBUG(5,(Finding namingContexts element in root_res failed. 
Using a temporary list.));
+   DEBUG(5,(dsdb_find_nc_root: Finding a valid 'namingContexts' 
element in the RootDSE failed. Using a temporary list.));
 
/* This generates a temporary list of NCs in order to let the
 * provisioning work. */


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-01-14 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  6737231 ldb:ldb_dn.c - fix counter type in ldb_dn_minimise
  from  70b4c08 s3:vfs aio_fork children do not go away

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 6737231d9014bfac7449a8f683c1a72d2c9329ef
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Jan 14 09:38:41 2011 +0100

ldb:ldb_dn.c - fix counter type in ldb_dn_minimise

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Jan 14 10:43:29 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/lib/ldb/common/ldb_dn.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c
index d5442e4..cd9055d 100644
--- a/source4/lib/ldb/common/ldb_dn.c
+++ b/source4/lib/ldb/common/ldb_dn.c
@@ -2056,7 +2056,7 @@ int ldb_dn_update_components(struct ldb_dn *dn, const 
struct ldb_dn *ref_dn)
  */
 bool ldb_dn_minimise(struct ldb_dn *dn)
 {
-   int i;
+   unsigned int i;
 
if (!ldb_dn_validate(dn)) {
return false;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-01-14 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  39eea5c s4:samldb LDB module - fix userAccountControl handling
  from  109cbe3 s3: Fix bug 7917: Yet another bug in chain_reply

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 39eea5ca43ec6704e9d64a9d707adedb094d0aeb
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Jan 14 12:10:25 2011 +0100

s4:samldb LDB module - fix userAccountControl handling

UF_ACCOUNTDISABLE is only added automatically if no userAccountControl 
flags
are set on LDAP add operations.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Jan 14 18:29:07 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/samldb.c |   28 
 source4/dsdb/tests/python/sam.py|   26 +++---
 2 files changed, 39 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c 
b/source4/dsdb/samdb/ldb_modules/samldb.c
index 5653ba1..e60f240 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -800,7 +800,6 @@ static int samldb_objectclass_trigger(struct samldb_ctx *ac)
struct ldb_message_element *el, *el2;
enum sid_generator sid_generator;
struct dom_sid *sid;
-   const char *tempstr;
int ret;
 
/* make sure that sAMAccountType is not specified */
@@ -834,6 +833,8 @@ static int samldb_objectclass_trigger(struct samldb_ctx *ac)
}
 
if (strcmp(ac-type, user) == 0) {
+   bool uac_generated = false;
+
/* Step 1.2: Default values */
ret = samdb_find_or_add_attribute(ldb, ac-msg,
accountExpires, 9223372036854775807);
@@ -863,11 +864,18 @@ static int samldb_objectclass_trigger(struct samldb_ctx 
*ac)
pwdLastSet, 0);
if (ret != LDB_SUCCESS) return ret;
 
-   tempstr = talloc_asprintf(ac-msg, %d, UF_NORMAL_ACCOUNT);
-   if (tempstr == NULL) return ldb_operr(ldb);
-   ret = samdb_find_or_add_attribute(ldb, ac-msg,
-   userAccountControl, tempstr);
-   if (ret != LDB_SUCCESS) return ret;
+   /* On add operations we might need to generate a
+* userAccountControl (if it isn't specified). */
+   el = ldb_msg_find_element(ac-msg, userAccountControl);
+   if ((el == NULL)  (ac-req-operation == LDB_ADD)) {
+   ret = samdb_msg_set_uint(ldb, ac-msg, ac-msg,
+userAccountControl,
+UF_NORMAL_ACCOUNT);
+   if (ret != LDB_SUCCESS) {
+   return ret;
+   }
+   uac_generated = true;
+   }
 
el = ldb_msg_find_element(ac-msg, userAccountControl);
if (el != NULL) {
@@ -924,8 +932,10 @@ static int samldb_objectclass_trigger(struct samldb_ctx 
*ac)
}
 
/* Step 1.5: Add additional flags when needed */
-   if ((user_account_control  UF_NORMAL_ACCOUNT) 
-   (ldb_request_get_control(ac-req, 
LDB_CONTROL_RELAX_OID) == NULL)) {
+   /* Obviously this is done when the userAccountControl
+* has been generated here (tested against Windows
+* Server) */
+   if (uac_generated) {
user_account_control |= UF_ACCOUNTDISABLE;
user_account_control |= UF_PASSWD_NOTREQD;
 
@@ -939,6 +949,8 @@ static int samldb_objectclass_trigger(struct samldb_ctx *ac)
}
 
} else if (strcmp(ac-type, group) == 0) {
+   const char *tempstr;
+
/* Step 2.2: Default values */
tempstr = talloc_asprintf(ac-msg, %d,
  GTYPE_SECURITY_GLOBAL_GROUP);
diff --git a/source4/dsdb/tests/python/sam.py b/source4/dsdb/tests/python/sam.py
index 03d6984..69dd757 100755
--- a/source4/dsdb/tests/python/sam.py
+++ b/source4/dsdb/tests/python/sam.py
@@ -24,7 +24,7 @@ from ldb import ERR_UNDEFINED_ATTRIBUTE_TYPE
 from ldb import Message, MessageElement, Dn
 from ldb import FLAG_MOD_ADD, FLAG_MOD_REPLACE, FLAG_MOD_DELETE
 from samba.samdb import SamDB
-from samba.dsdb import (UF_NORMAL_ACCOUNT,
+from samba.dsdb import (UF_NORMAL_ACCOUNT, UF_ACCOUNTDISABLE,
 UF_WORKSTATION_TRUST_ACCOUNT, UF_SERVER_TRUST_ACCOUNT,
 UF_PARTIAL_SECRETS_ACCOUNT, UF_TEMP_DUPLICATE_ACCOUNT,
 UF_PASSWD_NOTREQD, ATYPE_NORMAL_ACCOUNT,
@@ 

[SCM] Samba Shared Repository - branch master updated

2011-01-14 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  a87b2f9 s4:urgent_replication.py - remove a now superflous RELAX 
control
  from  39eea5c s4:samldb LDB module - fix userAccountControl handling

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit a87b2f9ec0b57fe56d14309e4b94e30e10b27f04
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Jan 14 18:45:32 2011 +0100

s4:urgent_replication.py - remove a now superflous RELAX control

The LSA object creation protection changed to the trusted/untrusted
connection model.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Jan 14 19:30:52 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/dsdb/tests/python/urgent_replication.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/tests/python/urgent_replication.py 
b/source4/dsdb/tests/python/urgent_replication.py
index f35dc6d..bf92d0a 100755
--- a/source4/dsdb/tests/python/urgent_replication.py
+++ b/source4/dsdb/tests/python/urgent_replication.py
@@ -248,7 +248,7 @@ defaultHidingValue: TRUE)
 objectClass:secret,
 cn:test secret,
 name:test secret,
-currentValue:xxx}, [relax:0])
+currentValue:xxx})
 
 # urgent replication should be enabled when creating
 res = self.ldb.load_partition_usn(self.base_dn)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-01-14 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  fef1174 s4:web_server - immeditately assign wdata as private data 
for the stream socket
  from  a87b2f9 s4:urgent_replication.py - remove a now superflous RELAX 
control

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit fef1174ba87b6548f93d788c32360bd192b7c7f2
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri Jan 14 21:46:37 2011 +0100

s4:web_server - immeditately assign wdata as private data for the stream 
socket

This fixes bug #7887.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Jan 14 22:33:13 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/web_server/web_server.c |   22 +++---
 1 files changed, 11 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/web_server/web_server.c b/source4/web_server/web_server.c
index 9531115..8e81685 100644
--- a/source4/web_server/web_server.c
+++ b/source4/web_server/web_server.c
@@ -305,6 +305,11 @@ static void websrv_task_init(struct task_server *task)
model_ops = process_model_startup(single);
if (!model_ops) goto failed;
 
+   /* startup the Python processor - unfortunately we can't do this
+  per connection as that wouldn't allow for session variables */
+   wdata = talloc_zero(task, struct web_server_data);
+   if (wdata == NULL) goto failed;
+
if (lpcfg_interfaces(task-lp_ctx)  
lpcfg_bind_interfaces_only(task-lp_ctx)) {
int num_interfaces;
int i;
@@ -321,25 +326,20 @@ static void websrv_task_init(struct task_server *task)
 web_stream_ops, 
 ipv4, address, 
 port, 
lpcfg_socket_options(task-lp_ctx),
-task);
+wdata);
if (!NT_STATUS_IS_OK(status)) goto failed;
}
 
talloc_free(ifaces);
} else {
-   status = stream_setup_socket(task, task-event_ctx, 
task-lp_ctx,
-model_ops, web_stream_ops, 
+   status = stream_setup_socket(task, task-event_ctx,
+task-lp_ctx, model_ops,
+web_stream_ops,
 ipv4, 
lpcfg_socket_address(task-lp_ctx),
-port, 
lpcfg_socket_options(task-lp_ctx), task);
+port, 
lpcfg_socket_options(task-lp_ctx),
+wdata);
if (!NT_STATUS_IS_OK(status)) goto failed;
}
-
-   /* startup the esp processor - unfortunately we can't do this
-  per connection as that wouldn't allow for session variables */
-   wdata = talloc_zero(task, struct web_server_data);
-   if (wdata == NULL)goto failed;
-
-   task-private_data = wdata;

wdata-tls_params = tls_initialise(wdata, task-lp_ctx);
if (wdata-tls_params == NULL) goto failed;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-01-12 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  3b78fcf s4:torture/nbench/nbench.c - initialise n
   via  aa759de s4:dns_server/dlz_bind9.c - initialise ret variables
   via  d35d2bf s4:extended_dn_out LDB module - initialise 
have_reveal_control
   via  0932c91 s4:librpc/rpc/dcerpc_connect.c - fix uninitialised variable
   via  dd5367e ldb:ltdb_sequence_number - initialise tmp_ctx to prevent 
uninitialisation warning
   via  ee4fd13 ldb:ldbsearch.c - fix possible uninitialised variable
   via  a26a489 torture:drs/rpc/msds_intid.c - proof for the correct intId
   via  90db6a7 s4:winbind/idmap.c - we cannot use failed until we are in 
a transaction
   via  25964e7 ldb:ltdb_sequence_number - check for an OOM exception
   via  b804c53 ldb:ldb_dn_explode - remove/unify some duplicate 
initialisations
   via  47adb9d s4:dynconfig/dynconfig.h - fix ending newline warning
  from  c39e800 drsuapi.idl: add some more DRSUAPI_ATTID_* values

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 3b78fcff5a608de8eb1b0ddd92adc8e0aaeb689d
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Jan 9 11:41:51 2011 +0100

s4:torture/nbench/nbench.c - initialise n

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Wed Jan 12 20:38:02 CET 2011 on sn-devel-104

commit aa759de6b3ee7766925c0e713253bf01f30967e5
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Jan 8 22:32:12 2011 +0100

s4:dns_server/dlz_bind9.c - initialise ret variables

commit d35d2bf392f819c8579f0d024a7c398732bdeb09
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Jan 8 22:21:13 2011 +0100

s4:extended_dn_out LDB module - initialise have_reveal_control

commit 0932c91186dc4aae2caf51828e6edd786927a44c
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Jan 8 22:14:48 2011 +0100

s4:librpc/rpc/dcerpc_connect.c - fix uninitialised variable

commit dd5367ebe95434a6e01bd9be7487ed7768d3c139
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Jan 8 22:04:32 2011 +0100

ldb:ltdb_sequence_number - initialise tmp_ctx to prevent uninitialisation 
warning

commit ee4fd13ea368e7d235e709959e5fda38ee27d0e6
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Jan 8 22:08:40 2011 +0100

ldb:ldbsearch.c - fix possible uninitialised variable

And add a comparison for the ret result - this is more standard-oriented

commit a26a48934df146bbd1fe48dabdad1656cca8713a
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Jan 9 11:38:53 2011 +0100

torture:drs/rpc/msds_intid.c - proof for the correct intId

drs_attr is uninitialised in this loop

commit 90db6a793ad368690b178e5c170c05be79aaa884
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Jan 9 11:27:01 2011 +0100

s4:winbind/idmap.c - we cannot use failed until we are in a transaction

We've to wait until trans is initialised.

commit 25964e775ac9e2700025e1beadc09ead31e25d0b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Jan 8 22:07:30 2011 +0100

ldb:ltdb_sequence_number - check for an OOM exception

commit b804c5396cb5c14612f8336c9b71afdbc3f81b0e
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Jan 8 21:59:37 2011 +0100

ldb:ldb_dn_explode - remove/unify some duplicate initialisations

commit 47adb9df10c7bed56fe92513e2602ac01e9590b2
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Jan 8 22:10:17 2011 +0100

s4:dynconfig/dynconfig.h - fix ending newline warning

---

Summary of changes:
 source4/dns_server/dlz_bind9.c   |4 ++--
 source4/dsdb/samdb/ldb_modules/extended_dn_out.c |2 +-
 source4/dynconfig/dynconfig.h|2 +-
 source4/lib/ldb/common/ldb_dn.c  |8 ++--
 source4/lib/ldb/ldb_tdb/ldb_tdb.c|7 ++-
 source4/lib/ldb/tools/ldbsearch.c|4 ++--
 source4/librpc/rpc/dcerpc_connect.c  |1 +
 source4/torture/drs/rpc/msds_intid.c |2 +-
 source4/torture/nbench/nbench.c  |2 +-
 source4/winbind/idmap.c  |   22 ++
 10 files changed, 31 insertions(+), 23 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dns_server/dlz_bind9.c b/source4/dns_server/dlz_bind9.c
index 7f5125d..d2fa81a 100644
--- a/source4/dns_server/dlz_bind9.c
+++ b/source4/dns_server/dlz_bind9.c
@@ -680,7 +680,7 @@ static isc_result_t dlz_lookup_types(struct dlz_bind9_data 
*state,
 {
TALLOC_CTX *tmp_ctx = talloc_new(state);
const char *attrs[] = { dnsRecord, NULL };
-   int ret, i;
+   int ret = LDB_SUCCESS, i;
struct ldb_result *res;
struct ldb_message_element *el;
struct ldb_dn *dn;
@@ 

[SCM] Samba Shared Repository - branch master updated

2010-12-24 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  bf0d5d0 Typo fix in KDC parameters.
  from  1a20d59 mkrelease: Simplify further.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit bf0d5d04ab3900361d0b4762de8d51571a4c5176
Author: Brad Hards br...@frogmouth.net
Date:   Fri Dec 24 18:02:06 2010 +1100

Typo fix in KDC parameters.

Signed-off-by: Matthias Dieter Wallnöfer m...@samba.org

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Dec 24 12:09:00 CET 2010 on sn-devel-104

---

Summary of changes:
 source4/kdc/policy.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/kdc/policy.c b/source4/kdc/policy.c
index 7502148..8f62c48 100644
--- a/source4/kdc/policy.c
+++ b/source4/kdc/policy.c
@@ -34,11 +34,11 @@ void kdc_get_policy(struct loadparm_context *lp_ctx,
k-authentication_options = LSA_POLICY_KERBEROS_VALIDATE_CLIENT;
 
unix_to_nt_time(k-service_tkt_lifetime,
-   lpcfg_parm_int(lp_ctx, NULL, kdc, service ticket 
lifefime, 10) * 60 * 60); 
+   lpcfg_parm_int(lp_ctx, NULL, kdc, service ticket 
lifetime, 10) * 60 * 60);
unix_to_nt_time(k-user_tkt_lifetime,
-   lpcfg_parm_int(lp_ctx, NULL, kdc, user ticket 
lifefime, 10) * 60 * 60); 
+   lpcfg_parm_int(lp_ctx, NULL, kdc, user ticket 
lifetime, 10) * 60 * 60);
unix_to_nt_time(k-user_tkt_renewaltime,
-   lpcfg_parm_int(lp_ctx, NULL, kdc, renewal lifefime, 
24*7) * 60 * 60); 
+   lpcfg_parm_int(lp_ctx, NULL, kdc, renewal lifetime, 
24*7) * 60 * 60);
if (smb_krb5_context) {
unix_to_nt_time(k-clock_skew, 

krb5_get_max_time_skew(smb_krb5_context-krb5_context));


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-23 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  78d12e5 s4:torture/ndr/spoolss.c - add a ULL suffix for a 64 bit 
unsigned integer literal
   via  da78e24 lib/replace/testsuite.c - fix test output
  from  e9dddc5 s3:libsmb: use 16 zero bytes as channel binding checksum in 
the gssapi checksum (bug #7883)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 78d12e5629e6f5a1b4907eb03d5eef4e7eab4b9a
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Dec 23 12:55:09 2010 +0100

s4:torture/ndr/spoolss.c - add a ULL suffix for a 64 bit unsigned integer 
literal

To quiet a warning on Solaris

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Thu Dec 23 13:43:57 CET 2010 on sn-devel-104

commit da78e24ca201dcdac8a498a5d0da8c30154d4d9a
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Dec 23 12:42:37 2010 +0100

lib/replace/testsuite.c - fix test output

---

Summary of changes:
 lib/replace/test/testsuite.c  |2 +-
 source4/torture/ndr/spoolss.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/test/testsuite.c b/lib/replace/test/testsuite.c
index 1f242eb..0e455f2 100644
--- a/lib/replace/test/testsuite.c
+++ b/lib/replace/test/testsuite.c
@@ -771,7 +771,7 @@ static int test_FUNCTION(void)
 {
printf(test: FUNCTION\n);
if (strcmp(__FUNCTION__, test_FUNCTION) != 0) {
-   printf(failure: FAILURE [\nFAILURE invalid\n]\n);
+   printf(failure: FUNCTION [\nFUNCTION invalid\n]\n);
return false;
}
printf(success: FUNCTION\n);
diff --git a/source4/torture/ndr/spoolss.c b/source4/torture/ndr/spoolss.c
index d028c90..2c525d9 100644
--- a/source4/torture/ndr/spoolss.c
+++ b/source4/torture/ndr/spoolss.c
@@ -688,7 +688,7 @@ static bool getprinterdriver2_out_check(struct 
torture_context *tctx,
torture_assert(tctx, r-out.info-info6.default_datatype == NULL, 
default_datatype);
torture_assert(tctx, r-out.info-info6.previous_names == NULL, 
previous_names);
/* driver_date  : Wed Jun 21 02:00:00 2006 CEST */
-   torture_assert_u64_equal(tctx, r-out.info-info6.driver_version, 
0x000600011db04001, driver_version);
+   torture_assert_u64_equal(tctx, r-out.info-info6.driver_version, 
0x000600011db04001ULL, driver_version);
torture_assert_str_equal(tctx, r-out.info-info6.manufacturer_name, 
Ricoh, manufacturer_name);
torture_assert_str_equal(tctx, r-out.info-info6.manufacturer_url, 
http://go.microsoft.com/fwlink/?LinkID=47prd=10798sbp=Printers;, 
manufacturer_url);
torture_assert_str_equal(tctx, r-out.info-info6.hardware_id, 
ricohricoh_aficio_mp5063, hardware_id);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-23 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  e30299e s4:acl LDB module - add a missing talloc_free(tmp_ctx) in 
an error path
  from  46ee690 tdb: add ABI/tdb-1.2.8.sigs

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit e30299eabd0a7ddc4db2042982fcffd727dcfba9
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Dec 23 20:54:08 2010 +0100

s4:acl LDB module - add a missing talloc_free(tmp_ctx) in an error path

Just for consistency.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Thu Dec 23 21:46:38 CET 2010 on sn-devel-104

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/acl.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/acl.c 
b/source4/dsdb/samdb/ldb_modules/acl.c
index 42e08cd..33dcc6b 100644
--- a/source4/dsdb/samdb/ldb_modules/acl.c
+++ b/source4/dsdb/samdb/ldb_modules/acl.c
@@ -613,6 +613,7 @@ static int acl_check_spn(TALLOC_CTX *mem_ctx,
 
el = ldb_msg_find_element(req-op.mod.message, servicePrincipalName);
if (!el) {
+   talloc_free(tmp_ctx);
return ldb_error(ldb, LDB_ERR_OPERATIONS_ERROR,
 Error finding element for 
servicePrincipalName.);
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-23 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  37c4ced s4:acl LDB module - acl_rename - memory contexts fixup
  from  e30299e s4:acl LDB module - add a missing talloc_free(tmp_ctx) in 
an error path

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 37c4ced9bdf6ccca2b00e1189fbdf90cb9836dc7
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Dec 23 21:56:52 2010 +0100

s4:acl LDB module - acl_rename - memory contexts fixup

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Thu Dec 23 22:49:41 CET 2010 on sn-devel-104

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/acl.c |   24 +++-
 1 files changed, 19 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/acl.c 
b/source4/dsdb/samdb/ldb_modules/acl.c
index 33dcc6b..00dc565 100644
--- a/source4/dsdb/samdb/ldb_modules/acl.c
+++ b/source4/dsdb/samdb/ldb_modules/acl.c
@@ -1148,26 +1148,28 @@ static int acl_rename(struct ldb_module *module, struct 
ldb_request *req)
 
/* Look for the parent */
 
-   ret = dsdb_module_search_dn(module, req, acl_res, req-op.rename.olddn,
-   acl_attrs,
+   ret = dsdb_module_search_dn(module, tmp_ctx, acl_res,
+   req-op.rename.olddn, acl_attrs,
DSDB_FLAG_NEXT_MODULE |
DSDB_SEARCH_SHOW_RECYCLED);
/* we sould be able to find the parent */
if (ret != LDB_SUCCESS) {
DEBUG(10,(acl: failed to find object %s\n,
  ldb_dn_get_linearized(req-op.rename.olddn)));
+   talloc_free(tmp_ctx);
return ret;
}
 
schema = dsdb_get_schema(ldb, acl_res);
if (!schema) {
-   talloc_free(acl_res);
+   talloc_free(tmp_ctx);
return ldb_operr(ldb);
}
 
guid = get_oc_guid_from_message(module, schema, acl_res-msgs[0]);
if (!insert_in_object_tree(tmp_ctx, guid, SEC_ADS_WRITE_PROP,
   root, new_node)) {
+   talloc_free(tmp_ctx);
return ldb_operr(ldb);
};
 
@@ -1175,27 +1177,32 @@ static int acl_rename(struct ldb_module *module, struct 
ldb_request *req)
  name);
if (!insert_in_object_tree(tmp_ctx, guid, SEC_ADS_WRITE_PROP,
   new_node, new_node)) {
+   talloc_free(tmp_ctx);
return ldb_operr(ldb);
};
 
rdn_name = ldb_dn_get_rdn_name(req-op.rename.olddn);
if (rdn_name == NULL) {
+   talloc_free(tmp_ctx);
return ldb_operr(ldb);
}
guid = attribute_schemaid_guid_by_lDAPDisplayName(schema,
  rdn_name);
if (!insert_in_object_tree(tmp_ctx, guid, SEC_ADS_WRITE_PROP,
   new_node, new_node)) {
+   talloc_free(tmp_ctx);
return ldb_operr(ldb);
};
 
ret = dsdb_get_sd_from_ldb_message(ldb, req, acl_res-msgs[0], sd);
 
if (ret != LDB_SUCCESS) {
+   talloc_free(tmp_ctx);
return ldb_operr(ldb);
}
/* Theoretically we pass the check if the object has no sd */
if (!sd) {
+   talloc_free(tmp_ctx);
return LDB_SUCCESS;
}
sid = samdb_result_dom_sid(req, acl_res-msgs[0], objectSid);
@@ -1213,28 +1220,30 @@ static int acl_rename(struct ldb_module *module, struct 
ldb_request *req)
  req-op.rename.olddn,
  true,
  10);
+   talloc_free(tmp_ctx);
return LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS;
}
 
if (ldb_dn_compare(oldparent, newparent) == 0) {
/* regular rename, not move, nothing more to do */
+   talloc_free(tmp_ctx);
return ldb_next_request(module, req);
}
 
/* new parent should have create child */
-   talloc_free(tmp_ctx);
-   tmp_ctx = talloc_new(req);
root = NULL;
new_node = NULL;
guid = get_oc_guid_from_message(module, schema, acl_res-msgs[0]);
if (!guid) {
DEBUG(10,(acl:renamed object has no object class\n));
+   talloc_free(tmp_ctx);
return ldb_module_done(req, NULL, NULL,  
LDB_ERR_OPERATIONS_ERROR);
}
 
ret = dsdb_module_check_access_on_dn(module, req, newparent, 
SEC_ADS_CREATE_CHILD, guid);
if (ret != LDB_SUCCESS) {
DEBUG(10,(acl:access_denied renaming %s, 

[SCM] Samba Shared Repository - branch master updated

2010-12-21 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  71d0fd8 s4:auth/session.h - use a forward declaration for type 
struct ldb_context
  from  446f8a1 s4-auth Ensure that we always copy across domain groups

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 71d0fd88d2d39bd2ad0040630c17bdbbf7ab39b8
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Dec 21 10:13:41 2010 +0100

s4:auth/session.h - use a forward declaration for type struct ldb_context

And remove the now obsolete one for struct tevent_context

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Dec 21 11:17:34 CET 2010 on sn-devel-104

---

Summary of changes:
 source4/auth/session.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/session.h b/source4/auth/session.h
index bdcfe7a..39c818f 100644
--- a/source4/auth/session.h
+++ b/source4/auth/session.h
@@ -30,7 +30,7 @@ struct auth_session_info {
 
 #include librpc/gen_ndr/netlogon.h
 
-struct tevent_context;
+struct ldb_context;
 /* Create a security token for a session SYSTEM (the most
  * trusted/prvilaged account), including the local machine account as
  * the off-host credentials */


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-21 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  17d6583 ldb:tools/ldbdel.c - replace.h should be the first include
  from  901f348 s4-dns: set dwSerial and dwFlags

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 17d6583dbfd9e9a9a7e6d25a72b027f435621647
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Dec 21 11:46:29 2010 +0100

ldb:tools/ldbdel.c - replace.h should be the first include

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Dec 21 12:50:54 CET 2010 on sn-devel-104

---

Summary of changes:
 source4/lib/ldb/tools/ldbdel.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/tools/ldbdel.c b/source4/lib/ldb/tools/ldbdel.c
index 6f7c8ae..0b970d9 100644
--- a/source4/lib/ldb/tools/ldbdel.c
+++ b/source4/lib/ldb/tools/ldbdel.c
@@ -31,10 +31,10 @@
  *  Author: Andrew Tridgell
  */
 
+#include replace.h
 #include ldb.h
 #include tools/cmdline.h
 #include ldbutil.h
-#include replace.h
 
 static int dn_cmp(struct ldb_message **msg1, struct ldb_message **msg2)
 {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-12 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  faa7ae4 s4:smbd/process*.c - fix PID warnings on Solaris
   via  c7b2ec6 s4:kdc/proxy.c - optimise includes in order to fix a build 
warning on Tru64
   via  6b2a19d s4:param/loadparm.c - fix a warning by introducing a 
const cast
   via  3c38166 s4:kdc/kpasswdd.c - don't return an uninitialised NT_STATUS
  from  24cac44 build: change lib order to fix build on netbsd

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit faa7ae47d675c3007e53737eef70c34675e952ba
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 12:33:08 2010 +0100

s4:smbd/process*.c - fix PID warnings on Solaris

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sun Dec 12 13:21:13 CET 2010 on sn-devel-104

commit c7b2ec6fbb74955f787c492eec1e06558d523ecb
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 12:15:51 2010 +0100

s4:kdc/proxy.c - optimise includes in order to fix a build warning on Tru64

commit 6b2a19d50bc29aa4c905e437fc2002c3c959d4e8
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 12:07:24 2010 +0100

s4:param/loadparm.c - fix a warning by introducing a const cast

commit 3c38166cdb97cba52a11fe2e15445b45bef15de0
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 11:58:59 2010 +0100

s4:kdc/kpasswdd.c - don't return an uninitialised NT_STATUS

Discovered by Tru64 build

---

Summary of changes:
 source4/kdc/kpasswdd.c  |3 +--
 source4/kdc/proxy.c |7 +--
 source4/param/loadparm.c|2 +-
 source4/smbd/process_onefork.c  |2 +-
 source4/smbd/process_prefork.c  |4 ++--
 source4/smbd/process_standard.c |4 ++--
 6 files changed, 8 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/kdc/kpasswdd.c b/source4/kdc/kpasswdd.c
index 6f4c84b..2c879c3 100644
--- a/source4/kdc/kpasswdd.c
+++ b/source4/kdc/kpasswdd.c
@@ -519,8 +519,7 @@ enum kdc_process_ret kpasswdd_process(struct kdc_server 
*kdc,
ret = kpasswdd_make_unauth_error_reply(kdc, mem_ctx,
   KRB5_KPASSWD_HARDERROR,
   talloc_asprintf(mem_ctx,
-  Failed 
to obtain server credentials for kadmin/changepw: %s\n,
-  
nt_errstr(nt_status)),
+  Failed 
to obtain server credentials for kadmin/changepw!),
   krb_priv_rep);
ap_rep.length = 0;
if (ret) {
diff --git a/source4/kdc/proxy.c b/source4/kdc/proxy.c
index 3929a12..6179bf1 100644
--- a/source4/kdc/proxy.c
+++ b/source4/kdc/proxy.c
@@ -24,14 +24,9 @@
 #include smbd/process_model.h
 #include lib/tsocket/tsocket.h
 #include libcli/util/tstream.h
-#include system/network.h
-#include param/param.h
 #include lib/stream/packet.h
 #include kdc/kdc-glue.h
-#include ldb.h
-#include librpc/gen_ndr/drsblobs.h
-#include dsdb/schema/schema.h
-#include dsdb/common/proto.h
+#include dsdb/samdb/samdb.h
 #include libcli/composite/composite.h
 #include libcli/resolve/resolve.h
 
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index e7a0aac..531789e 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -1710,7 +1710,7 @@ static bool set_variable(TALLOC_CTX *mem_ctx, int 
parmnum, void *parm_ptr,
  pszParmName, 
pszParmValue));
return false;
}
-   *(const char ***)parm_ptr = new_list;
+   *(const char ***)parm_ptr = (const char 
**) new_list;
break;
}
}
diff --git a/source4/smbd/process_onefork.c b/source4/smbd/process_onefork.c
index 5194e1b..59e583d 100644
--- a/source4/smbd/process_onefork.c
+++ b/source4/smbd/process_onefork.c
@@ -111,7 +111,7 @@ static void onefork_new_task(struct tevent_context *ev,
smb_panic(Failed to re-initialise tevent after fork);
}
 
-   setproctitle(task %s server_id[%d], service_name, pid);
+   setproctitle(task %s server_id[%d], service_name, (int)pid);
 
onefork_reload_after_fork();
 
diff --git a/source4/smbd/process_prefork.c b/source4/smbd/process_prefork.c
index 71c1c57..66222af 100644
--- a/source4/smbd/process_prefork.c
+++ b/source4/smbd/process_prefork.c
@@ -122,7 +122,7 @@ static void 

[SCM] Samba Shared Repository - branch master updated

2010-12-12 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  136a5d7 s4:kdc/*.c - minimise includes
  from  faa7ae4 s4:smbd/process*.c - fix PID warnings on Solaris

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 136a5d7a267ea21550208162c6ccb82c08d1e142
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 14:34:14 2010 +0100

s4:kdc/*.c - minimise includes

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sun Dec 12 15:20:46 CET 2010 on sn-devel-104

---

Summary of changes:
 source4/kdc/db-glue.c|9 -
 source4/kdc/hdb-samba4.c |4 
 source4/kdc/kdc.c|   11 +--
 source4/kdc/kpasswdd.c   |9 -
 source4/kdc/mit_samba.c  |4 +---
 source4/kdc/pac-glue.c   |3 ---
 source4/kdc/policy.c |3 ---
 source4/kdc/wdc-samba4.c |3 ---
 8 files changed, 2 insertions(+), 44 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/kdc/db-glue.c b/source4/kdc/db-glue.c
index 15024fa..cdfec7b 100644
--- a/source4/kdc/db-glue.c
+++ b/source4/kdc/db-glue.c
@@ -22,27 +22,18 @@
 */
 
 #include includes.h
-#include system/time.h
-#include ../libds/common/flags.h
-#include lib/ldb/include/ldb.h
-#include librpc/gen_ndr/netlogon.h
 #include libcli/security/security.h
 #include auth/auth.h
-#include auth/credentials/credentials.h
 #include auth/auth_sam.h
 #include dsdb/samdb/samdb.h
 #include dsdb/common/util.h
-#include librpc/ndr/libndr.h
 #include librpc/gen_ndr/ndr_drsblobs.h
-#include librpc/gen_ndr/lsa.h
-#include libcli/auth/libcli_auth.h
 #include param/param.h
 #include ../lib/crypto/md4.h
 #include system/kerberos.h
 #include auth/kerberos/kerberos.h
 #include hdb.h
 #include kdc/samba_kdc.h
-#include kdc/db-glue.h
 #include kdc/kdc-policy.h
 
 enum samba_kdc_ent_type
diff --git a/source4/kdc/hdb-samba4.c b/source4/kdc/hdb-samba4.c
index 313f419..8511b2f 100644
--- a/source4/kdc/hdb-samba4.c
+++ b/source4/kdc/hdb-samba4.c
@@ -33,10 +33,6 @@
  */
 
 #include includes.h
-#include auth/auth.h
-#include auth/credentials/credentials.h
-#include dsdb/samdb/samdb.h
-#include param/param.h
 #include kdc/kdc-glue.h
 #include kdc/db-glue.h
 
diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c
index 99b0711..c5beaba 100644
--- a/source4/kdc/kdc.c
+++ b/source4/kdc/kdc.c
@@ -22,25 +22,16 @@
 */
 
 #include includes.h
-#include smbd/service_task.h
-#include smbd/service.h
-#include smbd/service_stream.h
 #include smbd/process_model.h
-#include lib/events/events.h
-#include lib/socket/socket.h
 #include lib/tsocket/tsocket.h
 #include libcli/util/tstream.h
-#include system/network.h
-#include ../lib/util/dlinklist.h
 #include lib/messaging/irpc.h
-#include lib/stream/packet.h
-#include librpc/gen_ndr/samr.h
 #include librpc/gen_ndr/ndr_irpc.h
 #include librpc/gen_ndr/ndr_krb5pac.h
+#include lib/stream/packet.h
 #include lib/socket/netif.h
 #include param/param.h
 #include kdc/kdc-glue.h
-#include librpc/gen_ndr/ndr_misc.h
 #include dsdb/samdb/samdb.h
 #include auth/session.h
 
diff --git a/source4/kdc/kpasswdd.c b/source4/kdc/kpasswdd.c
index 2c879c3..800d560 100644
--- a/source4/kdc/kpasswdd.c
+++ b/source4/kdc/kpasswdd.c
@@ -22,20 +22,11 @@
 
 #include includes.h
 #include smbd/service_task.h
-#include lib/events/events.h
-#include lib/socket/socket.h
-#include lib/tsocket/tsocket.h
-#include system/network.h
-#include ../lib/util/dlinklist.h
-#include lib/ldb/include/ldb.h
 #include auth/gensec/gensec.h
 #include auth/credentials/credentials.h
-#include auth/credentials/credentials_krb5.h
 #include auth/auth.h
 #include dsdb/samdb/samdb.h
 #include ../lib/util/util_ldb.h
-#include rpc_server/dcerpc_server.h
-#include rpc_server/samr/proto.h
 #include libcli/security/security.h
 #include param/param.h
 #include kdc/kdc-glue.h
diff --git a/source4/kdc/mit_samba.c b/source4/kdc/mit_samba.c
index 3d5888c..b959978 100644
--- a/source4/kdc/mit_samba.c
+++ b/source4/kdc/mit_samba.c
@@ -20,10 +20,8 @@
 #include includes.h
 #include param/param.h
 #include dsdb/samdb/samdb.h
-#include auth/auth.h
-#include auth/credentials/credentials.h
 #include system/kerberos.h
-#include hdb.h
+#include hdb.h
 #include mit_samba_interface.h
 #include auth/kerberos/kerberos.h
 #include kdc/samba_kdc.h
diff --git a/source4/kdc/pac-glue.c b/source4/kdc/pac-glue.c
index 3c0c504..6dbeb35 100644
--- a/source4/kdc/pac-glue.c
+++ b/source4/kdc/pac-glue.c
@@ -24,10 +24,7 @@
 #include includes.h
 #include ../libds/common/flags.h
 #include lib/ldb/include/ldb.h
-#include librpc/gen_ndr/ndr_krb5pac.h
-#include librpc/gen_ndr/krb5pac.h
 #include auth/auth.h
-#include auth/auth_sam.h
 #include auth/auth_sam_reply.h
 #include kdc/kdc-glue.h
 #include param/param.h
diff --git a/source4/kdc/policy.c b/source4/kdc/policy.c
index 2760e06..7502148 100644
--- a/source4/kdc/policy.c
+++ 

[SCM] Samba Shared Repository - branch master updated

2010-12-12 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  05706e1 s4:web_server/*.c - optimise includes
   via  978a14d s4:web_server/wsgi.c - fix a counter type
   via  f05ddcf s4:web_server/wsgi.c - add missing Python compatibility code
  from  136a5d7 s4:kdc/*.c - minimise includes

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 05706e1801d2e86810157e667e0c480546496752
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 17:36:16 2010 +0100

s4:web_server/*.c - optimise includes

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sun Dec 12 18:23:05 CET 2010 on sn-devel-104

commit 978a14d40c4ccafa493753bd3dc3efe8269a5cad
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 17:27:36 2010 +0100

s4:web_server/wsgi.c - fix a counter type

commit f05ddcfbe658834c3ac8054eea5fa6d0bc66d2b6
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 17:27:09 2010 +0100

s4:web_server/wsgi.c - add missing Python compatibility code

---

Summary of changes:
 source4/web_server/web_server.c |9 ++---
 source4/web_server/wsgi.c   |   14 --
 2 files changed, 14 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/web_server/web_server.c b/source4/web_server/web_server.c
index 4cc2cb8..9531115 100644
--- a/source4/web_server/web_server.c
+++ b/source4/web_server/web_server.c
@@ -21,16 +21,11 @@
 */
 
 #include includes.h
-#include smbd/service_task.h
-#include smbd/service_stream.h
-#include smbd/service.h
 #include web_server/web_server.h
+#include ../lib/util/dlinklist.h
+#include lib/tls/tls.h
 #include lib/events/events.h
-#include system/filesys.h
-#include system/network.h
 #include lib/socket/netif.h
-#include lib/tls/tls.h
-#include ../lib/util/dlinklist.h
 #include param/param.h
 
 /* don't allow connections to hang around forever */
diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c
index e1e2118..03e1285 100644
--- a/source4/web_server/wsgi.c
+++ b/source4/web_server/wsgi.c
@@ -24,10 +24,20 @@
 #include includes.h
 #include web_server/web_server.h
 #include ../lib/util/dlinklist.h
-#include ../lib/util/data_blob.h
 #include lib/tls/tls.h
 #include lib/tsocket/tsocket.h
 
+/* There's no Py_ssize_t in 2.4, apparently */
+#if PY_MAJOR_VERSION == 2  PY_MINOR_VERSION  5
+typedef int Py_ssize_t;
+typedef inquiry lenfunc;
+typedef intargfunc ssizeargfunc;
+#endif
+
+#ifndef Py_RETURN_NONE
+#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
+#endif
+
 typedef struct {
PyObject_HEAD
struct websrv_context *web;
@@ -37,7 +47,7 @@ static PyObject *start_response(PyObject *self, PyObject 
*args, PyObject *kwargs
 {
PyObject *response_header, *exc_info = NULL;
char *status;
-   int i;
+   Py_ssize_t i;
const char *kwnames[] = {
status, response_header, exc_info, NULL
};


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-12 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  4c373d2 s4:scripting/python/pyglue.c - add a OOM handling
   via  13da83b s4:scripting/python/pyglue.c - optimise includes
   via  c5deda5 s4:param/provision.c - optimise includes
   via  34c5bdc s4:libcli/finddc.h - fix header dependancies
   via  721c3b1 s4:libcli/finddcs_nbt.c - optimise headers
   via  f9b8735 s4:libnet/py_net.c - add checks for OOM conditions
   via  c8d8887 s4:dsdb/pydsdb.c and web_server/wsgi.c - remove 
accidentally introduced Py_RETURN_NONE
   via  65bcde2 s4:lib/ldb-samba/pyldb.c - optimise includes
   via  b974966 s4:dsdb/pydsdb.c - clean up memory handling
   via  b56a6f2 ldb:pyldb - optimise includes
  from  93ea5cb change searched name from _ss_family to __ss_family

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 4c373d20131fecf09a3e8c053597f68d772b8d55
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 19:23:53 2010 +0100

s4:scripting/python/pyglue.c - add a OOM handling

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sun Dec 12 20:50:55 CET 2010 on sn-devel-104

commit 13da83be60ef79d1ba75455f9b96f7dfb80bd43a
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 19:23:34 2010 +0100

s4:scripting/python/pyglue.c - optimise includes

commit c5deda5d85707cf12b491e4887ca2871be742128
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 19:19:43 2010 +0100

s4:param/provision.c - optimise includes

commit 34c5bdc1c329a2f3b4ab3a4dfff4c747f2910379
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 19:13:51 2010 +0100

s4:libcli/finddc.h - fix header dependancies

And optimise includes

commit 721c3b1c4ba75f9fc846483af325615e0d0420f0
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 19:01:23 2010 +0100

s4:libcli/finddcs_nbt.c - optimise headers

commit f9b87352f40c04446bd2456064088df2510e8f70
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 18:54:56 2010 +0100

s4:libnet/py_net.c - add checks for OOM conditions

commit c8d888772a855b6f9b7f4b06412b1b4c84174ef8
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 18:45:07 2010 +0100

s4:dsdb/pydsdb.c and web_server/wsgi.c - remove accidentally introduced 
Py_RETURN_NONE

This was only thought for Python 2.3 which we generally no longer support 
(only
pyldb in the LDB library is an exception).

commit 65bcde23346c16e044e7587de1e7a6fc130b276f
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 18:42:58 2010 +0100

s4:lib/ldb-samba/pyldb.c - optimise includes

commit b974966cc2b4d0b5b0d83206070b5f7c5c6495d1
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 18:31:37 2010 +0100

s4:dsdb/pydsdb.c - clean up memory handling

- Remove memory contexts when not really useful (if only one allocation)
- Try to find out OOM conditions and return correct error codes
- Move the parameter parsing always to the beginning (to prevent
  unneeded allocations in case of errors)

commit b56a6f2eda228698a2433ea2365fda5967bd904c
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 17:44:04 2010 +0100

ldb:pyldb - optimise includes

---

Summary of changes:
 source4/dsdb/pydsdb.c |  128 -
 source4/lib/ldb-samba/pyldb.c |4 +-
 source4/lib/ldb/pyldb.c   |3 -
 source4/lib/ldb/pyldb.h   |3 +-
 source4/lib/ldb/pyldb_util.c  |3 -
 source4/libcli/finddc.h   |2 +
 source4/libcli/finddcs_cldap.c|2 -
 source4/libcli/finddcs_nbt.c  |2 -
 source4/libnet/libnet_lookup.c|6 --
 source4/libnet/py_net.c   |   19 --
 source4/param/provision.c |   10 +---
 source4/scripting/python/pyglue.c |8 +-
 source4/web_server/wsgi.c |4 -
 source4/winbind/wb_dom_info.c |2 -
 14 files changed, 94 insertions(+), 102 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c
index f5832d1..64b7266 100644
--- a/source4/dsdb/pydsdb.c
+++ b/source4/dsdb/pydsdb.c
@@ -17,11 +17,9 @@
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
 
-#include Python.h
+#include lib/ldb/pyldb.h
 #include includes.h
-#include libcli/util/pyerrors.h
 #include dsdb/samdb/samdb.h
-#include lib/ldb/pyldb.h
 #include libcli/security/security.h
 #include librpc/ndr/libndr.h
 #include system/kerberos.h
@@ -36,10 +34,6 @@ typedef inquiry lenfunc;
 typedef intargfunc ssizeargfunc;
 #endif
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 /* FIXME: These should be in a header file somewhere, once we finish 

Re: [SCM] Samba Shared Repository - branch master updated

2010-12-12 Thread Matthias Dieter Wallnöfer

Hi Jelmer,

Jelmer Vernooij wrote:

On Sun, 2010-12-12 at 20:51 +0100, Matthias Dieter Wallnöfer wrote:
   

@@ -163,6 +165,8 @@ static PyObject *py_samdb_set_ntds_settings_dn(PyLdbObject 
*self, PyObject *args
}

if (!PyObject_AsDn(tmp_ctx, py_ntds_settings_dn, 
ldb,ntds_settings_dn)) {
+   PyErr_NoMemory();
+   talloc_free(tmp_ctx);
return NULL;
}
 

This is incorrect, PyObject_AsDn will already set an exception itself.
The fact that it fails is not necessarily an indication of an out of
memory error.
   

ah - sorry.

@@ -248,27 +253,19 @@ static PyObject *py_dsdb_get_oid_from_attid(PyObject 
*self, PyObject *args)

PyErr_LDB_OR_RAISE(py_ldb, ldb);

-   mem_ctx = talloc_new(NULL);
-   if (mem_ctx == NULL) {
-  PyErr_NoMemory();
-  return NULL;
-   }
-
schema = dsdb_get_schema(ldb, NULL);

if (!schema) {
PyErr_SetString(PyExc_RuntimeError, Failed to find a schema from 
ldb \n);
-   talloc_free(mem_ctx);
return NULL;
}

status = dsdb_schema_pfm_oid_from_attid(schema-prefixmap, attid,
-   mem_ctx,oid);
+   NULL,oid);
PyErr_WERROR_IS_ERR_RAISE(status);

ret = PyString_FromString(oid);
-
-   talloc_free(mem_ctx);
+   talloc_free(discard_const_p(char, oid));
 

^^ Is this really necessary? I'd rather have the extra memory context
than add an extra discard_const_p.
   
I've really thought hard about this change - but it seems more correct 
to me.
The problem is that the memory context isn't freed when 
PyERR_WERROR_IS_ERR_RAISE raises an exception.

diff --git a/source4/lib/ldb-samba/pyldb.c b/source4/lib/ldb-samba/pyldb.c
index e8cdb90..f198d74 100644
--- a/source4/lib/ldb-samba/pyldb.c
+++ b/source4/lib/ldb-samba/pyldb.c
@@ -19,10 +19,8 @@
 License along with this library; if not, seehttp://www.gnu.org/licenses/.
  */

-#includePython.h
-#include includes.h
-#includeldb.h
  #include lib/ldb/pyldb.h
+#include includes.h
  #include param/pyparam.h
  #include auth/credentials/pycredentials.h
  #include ldb_wrap.h
 

Can you please stop reordering include files? There's a good reason
Python.h is included first, it prevents warnings on some systems.

What is the benefit of this sort of reordering?
   

pyldb.h includes Python.h - therefore I had to do the reordering.

diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index 3bee9ab..44a006f 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -26,9 +26,6 @@
 License along with this library; if not, seehttp://www.gnu.org/licenses/.
  */

-#includePython.h
-#include replace.h
-#include ldb_private.h
  #include pyldb.h

  /* There's no Py_ssize_t in 2.4, apparently */
 

Same here.

   

diff --git a/source4/lib/ldb/pyldb.h b/source4/lib/ldb/pyldb.h
index 1f4bdf7..afc8c51 100644
--- a/source4/lib/ldb/pyldb.h
+++ b/source4/lib/ldb/pyldb.h
@@ -28,6 +28,7 @@

  #includePython.h
  #includetalloc.h
+#include ldb_private.h

  typedef struct {
PyObject_HEAD
 

^^^ We can't include ldb_private.h here, it's not installed so this will
break system installs of pyldb.
   

Oh sorry - that wasn't clear. I will change this.

diff --git a/source4/lib/ldb/pyldb_util.c b/source4/lib/ldb/pyldb_util.c
index 3e015d0..35071f3 100644
--- a/source4/lib/ldb/pyldb_util.c
+++ b/source4/lib/ldb/pyldb_util.c
@@ -23,10 +23,7 @@
 License along with this library; if not, seehttp://www.gnu.org/licenses/.
  */

-#includePython.h
-#include replace.h
  #include pyldb.h
-#includeldb.h

  static PyObject *ldb_module = NULL;
 

See above. Python.h is included for a reason. Also, replace.h might not
be necessary on your system but necessary on others (as some
functionality is not provided by the OS).
   
But let me think - we include system headers only by libreplace. So at 
the end it doesn't matter if replace or a system header defines it. 
Obviously there we have no need for a system call - otherwise the build 
would have broken.
   

diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c
index 9775e24..28dee59 100644
--- a/source4/libnet/py_net.c
+++ b/source4/libnet/py_net.c
@@ -18,19 +18,15 @@
 along with this program.  If not, seehttp://www.gnu.org/licenses/.
  */

-#includePython.h
+#include lib/ldb/pyldb.h
 

^^ We shouldn't include lib/ldb/pyldb.h directly, but alwayspyldb.h
in case the system pyldb is being used.
   
Could you point out a rule when to use lib/ldb/pyldb.h or pyldb.h? 
This isn't clear.


Cheers,
Matthias


Re: [SCM] Samba Shared Repository - branch master updated

2010-12-12 Thread Matthias Dieter Wallnöfer

Hi Jelmer,

Jelmer Vernooij wrote:

On Sun, 2010-12-12 at 21:29 +0100, Matthias Dieter Wallnöfer wrote:
   

Jelmer Vernooij wrote:
 

On Sun, 2010-12-12 at 20:51 +0100, Matthias Dieter Wallnöfer wrote:
   

@@ -248,27 +253,19 @@ static PyObject *py_dsdb_get_oid_from_attid(PyObject 
*self, PyObject *args)

PyErr_LDB_OR_RAISE(py_ldb, ldb);

-   mem_ctx = talloc_new(NULL);
-   if (mem_ctx == NULL) {
-  PyErr_NoMemory();
-  return NULL;
-   }
-
schema = dsdb_get_schema(ldb, NULL);

if (!schema) {
PyErr_SetString(PyExc_RuntimeError, Failed to find a schema from 
ldb \n);
-   talloc_free(mem_ctx);
return NULL;
}

status = dsdb_schema_pfm_oid_from_attid(schema-prefixmap, attid,
-   mem_ctx,oid);
+   NULL,oid);
PyErr_WERROR_IS_ERR_RAISE(status);

ret = PyString_FromString(oid);
-
-   talloc_free(mem_ctx);
+   talloc_free(discard_const_p(char, oid));

 

^^ Is this really necessary? I'd rather have the extra memory context
than add an extra discard_const_p.

   

I've really thought hard about this change - but it seems more correct
to me.
The problem is that the memory context isn't freed when
PyERR_WERROR_IS_ERR_RAISE raises an exception.
 

I suspect you mean PyErr_LDB_OR_RAISE?

That macro never does a return at the moment, it's just a stub for ldb
= PyLdb_AsLdbContext. Even if it did return, I think we should just
avoid using it, and manually check whether py_ldb is a ldb handle and
talloc_free and return if it isn't.
   
No Jelmer, I mean the macro below dsdb_schema_pfm_oid_from_attid. When 
that one raises an exception, what does succeed to tmp_ctx? I imagine 
that it never will be freed - therefore I've provided this fix.
   

diff --git a/source4/lib/ldb-samba/pyldb.c b/source4/lib/ldb-samba/pyldb.c
index e8cdb90..f198d74 100644
--- a/source4/lib/ldb-samba/pyldb.c
+++ b/source4/lib/ldb-samba/pyldb.c
@@ -19,10 +19,8 @@
  License along with this library; if not, 
seehttp://www.gnu.org/licenses/.
   */

-#includePython.h
-#include includes.h
-#includeldb.h
   #include lib/ldb/pyldb.h
+#include includes.h
   #include param/pyparam.h
   #include auth/credentials/pycredentials.h
   #include ldb_wrap.h

 

Can you please stop reordering include files? There's a good reason
Python.h is included first, it prevents warnings on some systems.

What is the benefit of this sort of reordering?

   

pyldb.h includesPython.h - therefore I had to do the reordering.
 

But why did you have to change these include lines at all? I can
understand removing #include lines that are not necessary but there's no
need to use the smallest subset of include lines. If an include file was
already processed earlier then the overhead of including it again is
minimal.
   
Sorry, this was a mistake - the previous behaviour was better. I will 
push a revert fix.
   

diff --git a/source4/lib/ldb/pyldb_util.c b/source4/lib/ldb/pyldb_util.c
index 3e015d0..35071f3 100644
--- a/source4/lib/ldb/pyldb_util.c
+++ b/source4/lib/ldb/pyldb_util.c
@@ -23,10 +23,7 @@
  License along with this library; if not, 
seehttp://www.gnu.org/licenses/.
   */

-#includePython.h
-#include replace.h
   #include pyldb.h
-#includeldb.h

   static PyObject *ldb_module = NULL;

 

See above. Python.h is included for a reason. Also, replace.h might not
be necessary on your system but necessary on others (as some
functionality is not provided by the OS).
   

But let me think - we include system headers only by libreplace. So at
the end it doesn't matter if replace or a system header defines it.
Obviously there we have no need for a system call - otherwise the build
would have broken.
 

replace.h isn't the only way in which we get system headers, e.g.
Python.h also includes a bunch - at least stdlib.h, unistd.h, stddef.h,
string.h, stdio.h, limits.h and assert.h.
   
In this special case we don't need the replace.h anymore since I do 
now include ldb_private.h (which itself includes it).
   

diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c
index 9775e24..28dee59 100644
--- a/source4/libnet/py_net.c
+++ b/source4/libnet/py_net.c
@@ -18,19 +18,15 @@
  along with this program.  If not, seehttp://www.gnu.org/licenses/.
   */

-#includePython.h
+#include lib/ldb/pyldb.h

 

^^ We shouldn't include lib/ldb/pyldb.h directly, but alwayspyldb.h
in case the system pyldb is being used.
   

Could you point out a rule when to use lib/ldb/pyldb.h orpyldb.h?
This isn't clear.
 

Always usepyldb.h, except in lib/ldb/ itself.
   

Okay, I will fix this.

PS: Could you please start the implementation of the other message 
attribute-mapping function in pyldb?


Cheers,
Matthias


Re: [SCM] Samba Shared Repository - branch master updated

2010-12-12 Thread Matthias Dieter Wallnöfer

Hi Jelmer,

Jelmer Vernooij wrote:

The same goes for that macro - if it doesn't deal with proper free'ing,
then why not avoid it rather than rewrite the rest of the function that
uses it?

discard_const_p is bad, and we should avoid it unless we really can.
   
well, I agree that discard_const_p isn't so nice. But I think the 
right solution (if we make use of memory contexts) would be to never 
derive them from NULL, but from a self instance or kind of this or if 
not possible (static) the LDB context.
   

diff --git a/source4/lib/ldb/pyldb_util.c b/source4/lib/ldb/pyldb_util.c
index 3e015d0..35071f3 100644
--- a/source4/lib/ldb/pyldb_util.c
+++ b/source4/lib/ldb/pyldb_util.c
@@ -23,10 +23,7 @@
   License along with this library; if not, 
seehttp://www.gnu.org/licenses/.
*/

-#includePython.h
-#include replace.h
#include pyldb.h
-#includeldb.h

static PyObject *ldb_module = NULL;


 

See above. Python.h is included for a reason. Also, replace.h might not
be necessary on your system but necessary on others (as some
functionality is not provided by the OS).

   

But let me think - we include system headers only by libreplace. So at
the end it doesn't matter if replace or a system header defines it.
Obviously there we have no need for a system call - otherwise the build
would have broken.

 

replace.h isn't the only way in which we get system headers, e.g.
Python.h also includes a bunch - at least stdlib.h, unistd.h, stddef.h,
string.h, stdio.h, limits.h and assert.h.

   

In this special case we don't need the replace.h anymore since I do
now include ldb_private.h (which itself includes it).
 

Is there any particular reason why pyldb_util.c requires ldb_private.h ?
We should avoid including it if we can (and thus avoid tying pyldb_util
to a specific version of ldb).
   

Okay.

PS: Could you please start the implementation of the other message
attribute-mapping function in pyldb?
 

Sorry, that's on my todo list as are several other things. I'd be happy
to review a patch that adds it though.
   

Okay.

Cheers,
Matthias


[SCM] Samba Shared Repository - branch master updated

2010-12-12 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  a910d0c s4:dsdb/pydsdb.c - don't throw another exception on 
PyObject_AsDn
   via  e4b2270 ldb:pyldb.h - revert to the previous header behaviour
  from  35206df build: move the import near the place where need it, so 
that we can build on hosts with python's zlib

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit a910d0cc643525cbbf654ea55e376598fb5106e3
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 21:42:30 2010 +0100

s4:dsdb/pydsdb.c - don't throw another exception on PyObject_AsDn

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sun Dec 12 23:40:17 CET 2010 on sn-devel-104

commit e4b22702b6fc72a6ac8989144ded3f78cb05d641
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 12 21:40:03 2010 +0100

ldb:pyldb.h - revert to the previous header behaviour

ldb_private.h is private and therefore might not always be available.

---

Summary of changes:
 source4/dsdb/pydsdb.c |6 --
 source4/lib/ldb-samba/pyldb.c |4 +++-
 source4/lib/ldb/pyldb.c   |2 ++
 source4/lib/ldb/pyldb.h   |2 --
 source4/lib/ldb/pyldb_util.c  |2 ++
 source4/libnet/py_net.c   |4 +++-
 source4/param/provision.c |4 +++-
 7 files changed, 17 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c
index 64b7266..af03504 100644
--- a/source4/dsdb/pydsdb.c
+++ b/source4/dsdb/pydsdb.c
@@ -17,8 +17,10 @@
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
 
-#include lib/ldb/pyldb.h
+#include Python.h
 #include includes.h
+#include ldb.h
+#include pyldb.h
 #include dsdb/samdb/samdb.h
 #include libcli/security/security.h
 #include librpc/ndr/libndr.h
@@ -165,7 +167,7 @@ static PyObject *py_samdb_set_ntds_settings_dn(PyLdbObject 
*self, PyObject *args
}
 
if (!PyObject_AsDn(tmp_ctx, py_ntds_settings_dn, ldb, 
ntds_settings_dn)) {
-   PyErr_NoMemory();
+   /* exception thrown by PyObject_AsDn */
talloc_free(tmp_ctx);
return NULL;
}
diff --git a/source4/lib/ldb-samba/pyldb.c b/source4/lib/ldb-samba/pyldb.c
index f198d74..9345145 100644
--- a/source4/lib/ldb-samba/pyldb.c
+++ b/source4/lib/ldb-samba/pyldb.c
@@ -19,8 +19,10 @@
License along with this library; if not, see http://www.gnu.org/licenses/.
 */
 
-#include lib/ldb/pyldb.h
+#include Python.h
 #include includes.h
+#include ldb.h
+#include pyldb.h
 #include param/pyparam.h
 #include auth/credentials/pycredentials.h
 #include ldb_wrap.h
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index 44a006f..0167c57 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -26,6 +26,8 @@
License along with this library; if not, see http://www.gnu.org/licenses/.
 */
 
+#include Python.h
+#include ldb_private.h
 #include pyldb.h
 
 /* There's no Py_ssize_t in 2.4, apparently */
diff --git a/source4/lib/ldb/pyldb.h b/source4/lib/ldb/pyldb.h
index afc8c51..211789c 100644
--- a/source4/lib/ldb/pyldb.h
+++ b/source4/lib/ldb/pyldb.h
@@ -26,9 +26,7 @@
 #ifndef _PYLDB_H_
 #define _PYLDB_H_
 
-#include Python.h
 #include talloc.h
-#include ldb_private.h
 
 typedef struct {
PyObject_HEAD
diff --git a/source4/lib/ldb/pyldb_util.c b/source4/lib/ldb/pyldb_util.c
index 35071f3..7907741 100644
--- a/source4/lib/ldb/pyldb_util.c
+++ b/source4/lib/ldb/pyldb_util.c
@@ -23,6 +23,8 @@
License along with this library; if not, see http://www.gnu.org/licenses/.
 */
 
+#include Python.h
+#include ldb.h
 #include pyldb.h
 
 static PyObject *ldb_module = NULL;
diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c
index 28dee59..48cf4a4 100644
--- a/source4/libnet/py_net.c
+++ b/source4/libnet/py_net.c
@@ -18,8 +18,10 @@
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
 
-#include lib/ldb/pyldb.h
+#include Python.h
 #include includes.h
+#include ldb.h
+#include pyldb.h
 #include libnet.h
 #include auth/credentials/pycredentials.h
 #include libcli/security/security.h
diff --git a/source4/param/provision.c b/source4/param/provision.c
index 790cf83..f1ef695 100644
--- a/source4/param/provision.c
+++ b/source4/param/provision.c
@@ -18,7 +18,9 @@
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
 
-#include lib/ldb/pyldb.h
+#include Python.h
+#include ldb.h
+#include pyldb.h
 #include includes.h
 #include librpc/ndr/libndr.h
 #include param/provision.h


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-07 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  055a3e0 s4:libnet_samsync_ldb.c - simplify a talloc steal call
   via  a07d208 s4:libnet_samsync_ldb.c - introduce an error message on 
failed domain synchronisation
  from  d911897 s3:registry: improve debug messages about regdb refcount 
changes

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 055a3e0fae1c59567057239d5d6e3f20cf962c33
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Dec 7 14:58:52 2010 +0100

s4:libnet_samsync_ldb.c - simplify a talloc steal call

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Tue Dec  7 16:05:30 CET 2010 on sn-devel-104

commit a07d20821ac9d09831bac10eca91ae8cb7b5106f
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Dec 7 14:57:17 2010 +0100

s4:libnet_samsync_ldb.c - introduce an error message on failed domain 
synchronisation

---

Summary of changes:
 source4/libnet/libnet_samsync_ldb.c |   12 +++-
 1 files changed, 7 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/libnet/libnet_samsync_ldb.c 
b/source4/libnet/libnet_samsync_ldb.c
index 9626341..07e085e 100644
--- a/source4/libnet/libnet_samsync_ldb.c
+++ b/source4/libnet/libnet_samsync_ldb.c
@@ -222,9 +222,12 @@ static NTSTATUS samsync_ldb_handle_domain(TALLOC_CTX 
*mem_ctx,
/* TODO: Account lockout, password properties */

ret = dsdb_replace(state-sam_ldb, msg, 0);
-
-   if (ret) {
-   return NT_STATUS_INTERNAL_ERROR;
+   if (ret != LDB_SUCCESS) {
+   *error_string = talloc_asprintf(mem_ctx,
+   Failed to modify domain record 
%s: %s,
+   ldb_dn_get_linearized(msg-dn),
+   ldb_errstring(state-sam_ldb));
+   return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
return NT_STATUS_OK;
 }
@@ -308,8 +311,7 @@ static NTSTATUS samsync_ldb_handle_user(TALLOC_CTX *mem_ctx,

/* Try to put things in the same location as the remote 
server */
} else if (add) {
-   msg-dn = remote_msgs[0]-dn;
-   talloc_steal(msg, remote_msgs[0]-dn);
+   msg-dn = talloc_steal(msg, remote_msgs[0]-dn);
}
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-06 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  bd3e580 Revert lib/util:tests/time.c - test_timestring - fix it 
on Solaris
   via  619a49c lib/util/fault.c - fix pid_t printf warning on Solaris
   via  2664a67 s4:torture/locktest.c - fix pid_t printf warning on 
Solaris
   via  3b7e2ee s4:torture/locktest.c - fix one indentation
   via  0c8cf66 s4:client/client.c - fix Solaris warning by a type cast
   via  93d85ca s4:fix some shadowed declaration warnings on Solaris by 
renaming the symbols
  from  5845cc9 s4-dns: return the correct TTL

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit bd3e5804a41fdfc8a43bebd95c53e4f0ff1d7a10
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Dec 6 11:28:22 2010 +0100

Revert lib/util:tests/time.c - test_timestring - fix it on Solaris

This reverts commit 654e0102ddb0acaaf45fb55c15818722235fcc9f.
This should better be handled by the replace library.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Mon Dec  6 12:17:31 CET 2010 on sn-devel-104

commit 619a49c4219282bf8776183e76c1b4f0629a6d4c
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Dec 6 11:27:05 2010 +0100

lib/util/fault.c - fix pid_t printf warning on Solaris

According to http://www.ibm.com/developerworks/linux/library/l-solar/;
it's generally a 32bit int - therefore this cast should fit.

commit 2664a67c86e817fec2392fa08698813a8800533d
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Dec 6 11:24:55 2010 +0100

s4:torture/locktest.c - fix pid_t printf warning on Solaris

According to http://www.ibm.com/developerworks/linux/library/l-solar/;
it's generally a 32bit int - therefore this cast should fit.

commit 3b7e2ee5e4b6e15ddd24f781d389b9dbe88dc887
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Dec 6 11:24:12 2010 +0100

s4:torture/locktest.c - fix one indentation

commit 0c8cf666fc3cd35961e6bc2862b67527b922731a
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Dec 6 11:23:30 2010 +0100

s4:client/client.c - fix Solaris warning by a type cast

commit 93d85ca5fd57d87e720ab627865f0e5af25e07b5
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Dec 6 11:06:27 2010 +0100

s4:fix some shadowed declaration warnings on Solaris by renaming the symbols

---

Summary of changes:
 lib/util/fault.c  |2 +-
 lib/util/tests/time.c |7 ++-
 libcli/security/access_check.h|2 +-
 source4/client/client.c   |2 +-
 source4/dsdb/common/dsdb_access.c |   11 ++-
 source4/dsdb/samdb/ldb_modules/acl_util.c |   25 +++--
 source4/lib/ldb/common/ldb_dn.c   |4 ++--
 source4/lib/ldb/include/ldb.h |2 +-
 source4/rpc_server/lsa/dcesrv_lsa.c   |2 +-
 source4/torture/locktest.c|4 ++--
 10 files changed, 32 insertions(+), 29 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/fault.c b/lib/util/fault.c
index 11b31d7..bbb3190 100644
--- a/lib/util/fault.c
+++ b/lib/util/fault.c
@@ -125,7 +125,7 @@ _PUBLIC_ _NORETURN_ void smb_panic(const char *why)
char pidstr[20];
char cmdstring[200];
safe_strcpy(cmdstring, panic_action, sizeof(cmdstring));
-   snprintf(pidstr, sizeof(pidstr), %u, getpid());
+   snprintf(pidstr, sizeof(pidstr), %d, (int) getpid());
all_string_sub(cmdstring, %PID%, pidstr, sizeof(cmdstring));
if (progname) {
all_string_sub(cmdstring, %PROG%, progname, 
sizeof(cmdstring));
diff --git a/lib/util/tests/time.c b/lib/util/tests/time.c
index 8b0a0c3..78e8121 100644
--- a/lib/util/tests/time.c
+++ b/lib/util/tests/time.c
@@ -64,7 +64,7 @@ static bool test_http_timestring(struct torture_context *tctx)
 
 static bool test_timestring(struct torture_context *tctx)
 {
-   const char *start = Thu Jan  1, *start2 = Thu Jan 01;
+   const char *start = Thu Jan  1;
char *result;
/*
 * Correct test for negative UTC offset.  Without the correction, the
@@ -77,10 +77,7 @@ static bool test_timestring(struct torture_context *tctx)
time_t utc_offset = mktime(local) - mktime(gmt);
 
result = timestring(tctx, 42 - (utc_offset  0 ? utc_offset : 0));
-   torture_assert(tctx,
-  (strncmp(start, result, strlen(start)) == 0) ||
-  (strncmp(start2, result, strlen(start2)) == 0),
-  result);
+   torture_assert(tctx, !strncmp(start, result, strlen(start)), result);
return true;
 }
 
diff --git a/libcli/security/access_check.h b/libcli/security/access_check.h
index 

[SCM] Samba Shared Repository - branch master updated

2010-12-06 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  15a2eff s4:acl_read LDB module - fix attributes list
  from  91bf913 s4-acl: Some optimisation of the aclread module

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 15a2eff516fbde3498b88ff4c5adf6e1760d80c6
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Dec 6 14:27:20 2010 +0100

s4:acl_read LDB module - fix attributes list

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Mon Dec  6 15:11:44 CET 2010 on sn-devel-104

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/acl_read.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/acl_read.c 
b/source4/dsdb/samdb/ldb_modules/acl_read.c
index 0e9de9a..5ee7c95 100644
--- a/source4/dsdb/samdb/ldb_modules/acl_read.c
+++ b/source4/dsdb/samdb/ldb_modules/acl_read.c
@@ -62,7 +62,7 @@ static int aclread_callback(struct ldb_request *req, struct 
ldb_reply *ares)
 static const char *acl_attrs[] = {
 nTSecurityDescriptor,
 objectSid,
-insyanceType,
+instanceType,
 NULL
 };
 int ret;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-05 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  55dba7b s4:cluster/cluster.h - fix another gcc 3.4 struct warning
   via  84c95bf s4:dsdb/samdb/ldb_modules/util.h - fix a gcc 3.4 compile 
warning
   via  67318d1 s4:lib/messaging/*.h - fix compile warnings on gcc 3.4
  from  8897935 pytalloc: Add docstring for talloc.Object.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 55dba7bd160e1514d06f6361879c5b789e64aca8
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 5 20:31:09 2010 +0100

s4:cluster/cluster.h - fix another gcc 3.4 struct warning

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sun Dec  5 21:22:18 CET 2010 on sn-devel-104

commit 84c95bf88e3511df1818c6cf11ba3c97b830398e
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 5 20:28:44 2010 +0100

s4:dsdb/samdb/ldb_modules/util.h - fix a gcc 3.4 compile warning

commit 67318d18c12a22057fb0cc8cf84372c20897a92d
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 5 20:24:18 2010 +0100

s4:lib/messaging/*.h - fix compile warnings on gcc 3.4

For example on OpenSolaris

---

Summary of changes:
 source4/cluster/cluster.h |2 ++
 source4/dsdb/samdb/ldb_modules/util.h |2 +-
 source4/lib/messaging/irpc.h  |1 -
 source4/lib/messaging/messaging.h |4 ++--
 4 files changed, 5 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/cluster/cluster.h b/source4/cluster/cluster.h
index 7545757..8de58a3 100644
--- a/source4/cluster/cluster.h
+++ b/source4/cluster/cluster.h
@@ -22,6 +22,8 @@
 #ifndef __CLUSTER_H__
 #define __CLUSTER_H__ 
 
+#include librpc/gen_ndr/server_id.h
+
 /*
   test for same cluster id
 */
diff --git a/source4/dsdb/samdb/ldb_modules/util.h 
b/source4/dsdb/samdb/ldb_modules/util.h
index 0d4b692..e37b0b7 100644
--- a/source4/dsdb/samdb/ldb_modules/util.h
+++ b/source4/dsdb/samdb/ldb_modules/util.h
@@ -21,12 +21,12 @@
 
 /* predeclare some structures used by utility functions */
 struct dsdb_schema;
-struct GUID;
 struct dsdb_attribute;
 struct dsdb_fsmo_extended_op;
 struct security_descriptor;
 struct dom_sid;
 
+#include librpc/gen_ndr/misc.h
 #include dsdb/samdb/ldb_modules/util_proto.h
 #include dsdb/common/util.h
 
diff --git a/source4/lib/messaging/irpc.h b/source4/lib/messaging/irpc.h
index 5236021..bdb1b8f 100644
--- a/source4/lib/messaging/irpc.h
+++ b/source4/lib/messaging/irpc.h
@@ -24,7 +24,6 @@
 
 #include lib/messaging/messaging.h
 #include librpc/gen_ndr/irpc.h
-#include librpc/gen_ndr/server_id.h
 
 /*
   an incoming irpc message
diff --git a/source4/lib/messaging/messaging.h 
b/source4/lib/messaging/messaging.h
index 274ba0b..75990e3 100644
--- a/source4/lib/messaging/messaging.h
+++ b/source4/lib/messaging/messaging.h
@@ -21,9 +21,9 @@
 #ifndef _MESSAGES_H_
 #define _MESSAGES_H_
 
-struct messaging_context;
-struct server_id;
+#include librpc/gen_ndr/server_id.h
 
+struct messaging_context;
 
 /* general messages */
 #define MSG_DEBUG  1


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-05 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  654e010 lib/util:tests/time.c - test_timestring - fix it on 
Solaris
  from  55dba7b s4:cluster/cluster.h - fix another gcc 3.4 struct warning

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 654e0102ddb0acaaf45fb55c15818722235fcc9f
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 5 22:20:06 2010 +0100

lib/util:tests/time.c - test_timestring - fix it on Solaris

Solaris returns Thu Jan 01 and not Thu Jan  1 - therefore proof for
both.

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sun Dec  5 23:09:13 CET 2010 on sn-devel-104

---

Summary of changes:
 lib/util/tests/time.c |8 +---
 1 files changed, 5 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/tests/time.c b/lib/util/tests/time.c
index d08a4e7..8b0a0c3 100644
--- a/lib/util/tests/time.c
+++ b/lib/util/tests/time.c
@@ -64,7 +64,7 @@ static bool test_http_timestring(struct torture_context *tctx)
 
 static bool test_timestring(struct torture_context *tctx)
 {
-   const char *start = Thu Jan  1;
+   const char *start = Thu Jan  1, *start2 = Thu Jan 01;
char *result;
/*
 * Correct test for negative UTC offset.  Without the correction, the
@@ -77,8 +77,10 @@ static bool test_timestring(struct torture_context *tctx)
time_t utc_offset = mktime(local) - mktime(gmt);
 
result = timestring(tctx, 42 - (utc_offset  0 ? utc_offset : 0));
-   torture_assert(tctx, !strncmp(start, result, strlen(start)),
-  result);
+   torture_assert(tctx,
+  (strncmp(start, result, strlen(start)) == 0) ||
+  (strncmp(start2, result, strlen(start2)) == 0),
+  result);
return true;
 }
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-04 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  14d3027 s4:samr RPC server - dcesrv_samr_GetBootKeyInformation - 
return NOT_SUPPORTED
   via  b6750ee s4:dsdb/common/util_samr.c - dsdb_enum_group_mem - fix it 
up regarding non SAM members
   via  b604e94 s4:torture/rpc/samr.c - fix output message
  from  b8282a2 Fix bug #3185 - testparm exits 0 if it can read the config 
file regardless of errors

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 14d3027458dc3831330e316e9de1cc71b73c9c5b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Dec 4 10:34:05 2010 +0100

s4:samr RPC server - dcesrv_samr_GetBootKeyInformation - return 
NOT_SUPPORTED

Windows Server 2008 does this

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sat Dec  4 12:11:47 CET 2010 on sn-devel-104

commit b6750eee281427bf7c570b9b594f924583fa6bb5
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Dec 4 10:24:30 2010 +0100

s4:dsdb/common/util_samr.c - dsdb_enum_group_mem - fix it up regarding 
non SAM members

For example contacts.

commit b604e9425b3f1a1c4c9a627ac6f939837c9c0665
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Dec 4 10:07:25 2010 +0100

s4:torture/rpc/samr.c - fix output message

---

Summary of changes:
 source4/dsdb/common/util_samr.c   |   23 ---
 source4/rpc_server/samr/dcesrv_samr.c |3 ++-
 source4/torture/rpc/samr.c|2 +-
 3 files changed, 19 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/common/util_samr.c b/source4/dsdb/common/util_samr.c
index 72d42cb..e6c7797 100644
--- a/source4/dsdb/common/util_samr.c
+++ b/source4/dsdb/common/util_samr.c
@@ -409,7 +409,7 @@ NTSTATUS dsdb_enum_group_mem(struct ldb_context *ldb,
 unsigned int *pnum_members)
 {
struct ldb_message *msg;
-   unsigned int i;
+   unsigned int i, j;
int ret;
struct dom_sid *members;
struct ldb_message_element *member_el;
@@ -443,6 +443,7 @@ NTSTATUS dsdb_enum_group_mem(struct ldb_context *ldb,
return NT_STATUS_NO_MEMORY;
}
 
+   j = 0;
for (i=0; i member_el-num_values; i++) {
struct ldb_dn *member_dn = ldb_dn_from_ldb_val(tmp_ctx, ldb,
   
member_el-values[i]);
@@ -455,17 +456,25 @@ NTSTATUS dsdb_enum_group_mem(struct ldb_context *ldb,
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
 
-   status = dsdb_get_extended_dn_sid(member_dn, members[i], 
SID);
-   if (!NT_STATUS_IS_OK(status)) {
-   DEBUG(1, (Could find SID attribute on extended DN 
%s\n,
- ldb_dn_get_extended_linearized(tmp_ctx, dn, 
1)));
+   status = dsdb_get_extended_dn_sid(member_dn, members[j],
+ SID);
+   if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) {
+   /* If we fail finding a SID then this is no error since
+* it could be a non SAM object - e.g. a contact */
+   continue;
+   } else if (!NT_STATUS_IS_OK(status)) {
+   DEBUG(1, (When parsing DN %s we failed to parse our 
SID component, so we cannot fetch the membership: %s\n,
+ ldb_dn_get_extended_linearized(tmp_ctx, dn, 
1),
+ nt_errstr(status)));
talloc_free(tmp_ctx);
-   return NT_STATUS_INTERNAL_DB_CORRUPTION;
+   return status;
}
+
+   ++j;
}
 
*members_out = talloc_steal(mem_ctx, members);
-   *pnum_members = member_el-num_values;
+   *pnum_members = j;
talloc_free(tmp_ctx);
return NT_STATUS_OK;
 }
diff --git a/source4/rpc_server/samr/dcesrv_samr.c 
b/source4/rpc_server/samr/dcesrv_samr.c
index 391bc7f..399b146 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -4172,7 +4172,8 @@ static NTSTATUS dcesrv_samr_SetBootKeyInformation(struct 
dcesrv_call_state *dce_
 static NTSTATUS dcesrv_samr_GetBootKeyInformation(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
   struct samr_GetBootKeyInformation *r)
 {
-   DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
+   /* Windows Server 2008 returns this */
+   return NT_STATUS_NOT_SUPPORTED;
 }
 
 
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 8ee1198..8d10671 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -5630,7 +5630,7 @@ static bool 

[SCM] Samba Shared Repository - branch master updated

2010-12-04 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  3fb5ae6 s4:auth/kerberos/kerberos_pac.c - fix another memory leak 
regarding the KRB principal
   via  f92055f s4:dsdb/common/util_samr.c and auth/sam.c - fix error 
message
  from  929063b lib/torture: add torture_assert_u64_equal_goto()

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 3fb5ae600efaeeb1cb7ee02d465b49bc52d111bf
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Dec 4 14:24:43 2010 +0100

s4:auth/kerberos/kerberos_pac.c - fix another memory leak regarding the KRB 
principal

In addition fix a counter type

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sat Dec  4 15:14:46 CET 2010 on sn-devel-104

commit f92055f298a94ee53ed409f425198d0942238a8c
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Dec 4 12:31:34 2010 +0100

s4:dsdb/common/util_samr.c and auth/sam.c - fix error message

---

Summary of changes:
 source4/auth/kerberos/kerberos_pac.c |5 -
 source4/auth/sam.c   |2 +-
 source4/dsdb/common/util_samr.c  |4 ++--
 3 files changed, 7 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/kerberos/kerberos_pac.c 
b/source4/auth/kerberos/kerberos_pac.c
index 5e31c45..23b8750 100644
--- a/source4/auth/kerberos/kerberos_pac.c
+++ b/source4/auth/kerberos/kerberos_pac.c
@@ -93,7 +93,7 @@ krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
DATA_BLOB modified_pac_blob;
NTTIME tgs_authtime_nttime;
krb5_principal client_principal_pac;
-   int i;
+   uint32_t i;
 
krb5_clear_error_message(context);
 
@@ -316,9 +316,12 @@ krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
if (!krb5_principal_compare_any_realm(context, client_principal, 
client_principal_pac)) {
DEBUG(2, (Name in PAC [%s] does not match principal name in 
ticket\n,
  logon_name-account_name));
+   krb5_free_principal(context, client_principal_pac);
return NT_STATUS_ACCESS_DENIED;
}
 
+   krb5_free_principal(context, client_principal_pac);
+
 #if 0
if (strcasecmp(logon_info-info3.base.account_name.string,
   Administrator)== 0) {
diff --git a/source4/auth/sam.c b/source4/auth/sam.c
index 2b3ed91..0da36ea 100644
--- a/source4/auth/sam.c
+++ b/source4/auth/sam.c
@@ -337,7 +337,7 @@ NTSTATUS authsam_expand_nested_groups(struct ldb_context 
*sam_ctx,
talloc_free(tmp_ctx);
return NT_STATUS_OK;
} else if (!NT_STATUS_IS_OK(status)) {
-   DEBUG(0, (__location__ : when parsing DN %s we failed to parse 
our SID component, so we cannot calculate the group token: %s\n,
+   DEBUG(0, (__location__ : when parsing DN '%s' we failed to 
parse it's SID component, so we cannot calculate the group token: %s\n,
  ldb_dn_get_extended_linearized(tmp_ctx, dn, 1),
  nt_errstr(status)));
talloc_free(tmp_ctx);
diff --git a/source4/dsdb/common/util_samr.c b/source4/dsdb/common/util_samr.c
index e6c7797..621c9be 100644
--- a/source4/dsdb/common/util_samr.c
+++ b/source4/dsdb/common/util_samr.c
@@ -463,8 +463,8 @@ NTSTATUS dsdb_enum_group_mem(struct ldb_context *ldb,
 * it could be a non SAM object - e.g. a contact */
continue;
} else if (!NT_STATUS_IS_OK(status)) {
-   DEBUG(1, (When parsing DN %s we failed to parse our 
SID component, so we cannot fetch the membership: %s\n,
- ldb_dn_get_extended_linearized(tmp_ctx, dn, 
1),
+   DEBUG(1, (When parsing DN '%s' we failed to parse it's 
SID component, so we cannot fetch the membership: %s\n,
+ ldb_dn_get_extended_linearized(tmp_ctx, 
member_dn, 1),
  nt_errstr(status)));
talloc_free(tmp_ctx);
return status;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-04 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  536622e s4:dsdb/samdb/cracknames.c - fix another memory leak
   via  f156c34 s4:kdc/kpasswdd.c - fix memory leaks
   via  f1db3c5 s4:auth/gensec/gensec_krb5.c - fix/reorder memory free 
operations
   via  ee311be s4:auth/gensec/gensec_krb5.c - remove a pointless 
nt_status test
  from  3fb5ae6 s4:auth/kerberos/kerberos_pac.c - fix another memory leak 
regarding the KRB principal

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 536622e7d1b9944a4455be4d4c3e83146659acbb
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Dec 4 16:39:01 2010 +0100

s4:dsdb/samdb/cracknames.c - fix another memory leak

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Sat Dec  4 17:26:39 CET 2010 on sn-devel-104

commit f156c340b4283593c858a3ae6dc7ec9702381331
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Dec 4 16:38:45 2010 +0100

s4:kdc/kpasswdd.c - fix memory leaks

commit f1db3c52de6e5a68efe697a9af3497251c30f8fb
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Dec 4 16:38:02 2010 +0100

s4:auth/gensec/gensec_krb5.c - fix/reorder memory free operations

To prevent memory leaks

commit ee311beabe0dd9f904f05a4c8d8bab065eda1fb7
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sat Dec 4 16:36:27 2010 +0100

s4:auth/gensec/gensec_krb5.c - remove a pointless nt_status test

There is no operation which sets the nt_status before the if.

---

Summary of changes:
 source4/auth/gensec/gensec_krb5.c |   29 ++---
 source4/dsdb/samdb/cracknames.c   |1 +
 source4/kdc/kpasswdd.c|   17 +++--
 3 files changed, 34 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/gensec/gensec_krb5.c 
b/source4/auth/gensec/gensec_krb5.c
index b0ab3f6..fc96e38 100644
--- a/source4/auth/gensec/gensec_krb5.c
+++ b/source4/auth/gensec/gensec_krb5.c
@@ -153,6 +153,7 @@ static NTSTATUS gensec_krb5_start(struct gensec_security 
*gensec_security, bool
(struct sockaddr *) ss,
sizeof(struct sockaddr_storage));
if (socklen  0) {
+   talloc_free(gensec_krb5_state);
return NT_STATUS_INTERNAL_ERROR;
}
ret = 
krb5_sockaddr2address(gensec_krb5_state-smb_krb5_context-krb5_context,
@@ -175,6 +176,7 @@ static NTSTATUS gensec_krb5_start(struct gensec_security 
*gensec_security, bool
(struct sockaddr *) ss,
sizeof(struct sockaddr_storage));
if (socklen  0) {
+   talloc_free(gensec_krb5_state);
return NT_STATUS_INTERNAL_ERROR;
}
ret = 
krb5_sockaddr2address(gensec_krb5_state-smb_krb5_context-krb5_context,
@@ -633,6 +635,7 @@ static NTSTATUS gensec_krb5_session_info(struct 
gensec_security *gensec_security
DEBUG(1, (Unable to parse client principal: %s\n,
  smb_get_krb5_error_message(context, 
 ret, mem_ctx)));
+   krb5_free_principal(context, client_principal);
talloc_free(mem_ctx);
return NT_STATUS_NO_MEMORY;
}
@@ -646,8 +649,9 @@ static NTSTATUS gensec_krb5_session_info(struct 
gensec_security *gensec_security
  principal_string,
  smb_get_krb5_error_message(context, 
 ret, mem_ctx)));
-   krb5_free_principal(context, client_principal);
free(principal_string);
+   krb5_free_principal(context, client_principal);
+   talloc_free(mem_ctx);
return NT_STATUS_ACCESS_DENIED;
} else if (ret) {
/* NO pac */
@@ -664,29 +668,26 @@ static NTSTATUS gensec_krb5_session_info(struct 
gensec_security *gensec_security

 principal_string,

 NULL, server_info);
if (!NT_STATUS_IS_OK(nt_status)) {
+   free(principal_string);
+   krb5_free_principal(context, client_principal);
talloc_free(mem_ctx);
return nt_status;
}
} else {
DEBUG(1, (Unable to find PAC in ticket from %s, 
failing to allow access\n,
  principal_string));

  1   2   3   4   5   6   7   >