[SCM] Samba Shared Repository - branch master updated

2012-06-15 Thread Jeremy Allison
The branch, master has been updated
   via  bbb7cbf Same fix as bug 8989 - Samba 3.5.x (and probably all other 
versions of Samba) does not send correct responses to NT Transact Secondary 
when no data and no params
   via  816c40c Fix Bug 8989 - Samba 3.5.x (and probably all other versions 
of Samba) does not send correct responses to NT Transact Secondary when no data 
and no params
   via  985dbed s3: Slightly simplify grant_fsp_oplock_type
  from  d1d36d2 s4-selftest: Add tests for dbcheck on an old database that 
needs repair

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


- Log -
commit bbb7cbfb7cdf5cbd9700cdfaced9e7582de9eff5
Author: Jeremy Allison 
Date:   Fri Jun 15 21:10:59 2012 -0700

Same fix as bug 8989 - Samba 3.5.x (and probably all other versions of 
Samba) does not send correct responses to NT Transact Secondary when no data 
and no params

for the Trans2 calls. See MS-CIFS 2.2.4.47.2 for details.

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Sat Jun 16 07:59:19 CEST 2012 on sn-devel-104

commit 816c40cb0d6cfa39690e5a9ccca914c731f898a3
Author: Jeremy Allison 
Date:   Fri Jun 15 21:10:37 2012 -0700

Fix Bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does 
not send correct responses to NT Transact Secondary when no data and no params

Found by Richard Sharpe . The correct
command code in a reply to NT Transact Secondary (0xa1) is
NT Transact (0xa0).

commit 985dbedf2764b63048d4ae7a2fd319b1e3560229
Author: Volker Lendecke 
Date:   Wed May 30 11:28:19 2012 +0200

s3: Slightly simplify grant_fsp_oplock_type

The "else" is not necessary, we did a return in the if-branch

Signed-off-by: Jeremy Allison 

---

Summary of changes:
 source3/smbd/nttrans.c |6 ++
 source3/smbd/open.c|4 +++-
 source3/smbd/trans2.c  |9 +
 3 files changed, 18 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 3721125..5410fcb 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -2928,6 +2928,12 @@ void reply_nttranss(struct smb_request *req)
 
show_msg((const char *)req->inbuf);
 
+   /* Windows clients expect all replies to
+  an NT transact secondary (SMBnttranss 0xA1)
+  to have a command code of NT transact
+  (SMBnttrans 0xA0). See bug #8989 for details. */
+   req->cmd = SMBnttrans;
+
if (req->wct < 18) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
END_PROFILE(SMBnttranss);
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 8fa28be..26d6971 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1283,7 +1283,9 @@ static void grant_fsp_oplock_type(files_struct *fsp,
DEBUG(10,("grant_fsp_oplock_type: oplock type 0x%x on file 
%s\n",
fsp->oplock_type, fsp_str_dbg(fsp)));
return;
-   } else if (lp_locking(fsp->conn->params) && file_has_brlocks(fsp)) {
+   }
+
+   if (lp_locking(fsp->conn->params) && file_has_brlocks(fsp)) {
DEBUG(10,("grant_fsp_oplock_type: file %s has byte range 
locks\n",
fsp_str_dbg(fsp)));
fsp->oplock_type = NO_OPLOCK;
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index a093575..3a13cd2 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -8870,6 +8870,15 @@ void reply_transs2(struct smb_request *req)
 
show_msg((const char *)req->inbuf);
 
+   /* Windows clients expect all replies to
+  a transact secondary (SMBtranss2 0x33)
+  to have a command code of transact
+  (SMBtrans2 0x32). See bug #8989
+  and also [MS-CIFS] section 2.2.4.47.2
+  for details.
+   */
+   req->cmd = SMBtrans2;
+
if (req->wct < 8) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
END_PROFILE(SMBtranss2);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-06-15 Thread Andrew Bartlett
The branch, master has been updated
   via  d1d36d2 s4-selftest: Add tests for dbcheck on an old database that 
needs repair
   via  fa223eb s4-dbcheck: Always specify the dhcheck control
   via  72953b1 selftest: Add targetdir and tdbrestore parameters to 
undump.sh
  from  7a723c6 build: Remove support for non-64bit sendfile()

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


- Log -
commit d1d36d2563685a71874e5d584662dfd8de9418a5
Author: Andrew Bartlett 
Date:   Sat Jun 16 11:56:53 2012 +1000

s4-selftest: Add tests for dbcheck on an old database that needs repair

We changed a lot since alpha13, so there are lots of legitimate errors to 
fix.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Sat Jun 16 05:44:15 CEST 2012 on sn-devel-104

commit fa223eb26b07bba9e8055c35584886e6deb6e4a2
Author: Andrew Bartlett 
Date:   Sat Jun 16 11:51:22 2012 +1000

s4-dbcheck: Always specify the dhcheck control

This will then allow us to make schema modifications, overriding the 
default ban.

Andrew Bartlett

commit 72953b1eb8fa42257c7f8eff603e04c953fac361
Author: Andrew Bartlett 
Date:   Sat Jun 16 11:06:59 2012 +1000

selftest: Add targetdir and tdbrestore parameters to undump.sh

---

Summary of changes:
 source4/scripting/python/samba/dbchecker.py |1 +
 source4/selftest/provisions/undump.sh   |   27 ++---
 source4/selftest/tests.py   |2 +
 testprogs/blackbox/dbcheck-alpha13.sh   |   42 +++
 4 files changed, 67 insertions(+), 5 deletions(-)
 create mode 100755 testprogs/blackbox/dbcheck-alpha13.sh


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/dbchecker.py 
b/source4/scripting/python/samba/dbchecker.py
index 95be1ce..72d0604 100644
--- a/source4/scripting/python/samba/dbchecker.py
+++ b/source4/scripting/python/samba/dbchecker.py
@@ -118,6 +118,7 @@ class dbcheck(object):
 if self.verbose:
 self.report(self.samdb.write_ldif(m, ldb.CHANGETYPE_MODIFY))
 try:
+controls = controls + ["local_oid:%s:0" % 
dsdb.DSDB_CONTROL_DBCHECK]
 self.samdb.modify(m, controls=controls, validate=validate)
 except Exception, err:
 self.report("%s : %s" % (msg, err))
diff --git a/source4/selftest/provisions/undump.sh 
b/source4/selftest/provisions/undump.sh
index 07408b7..7ffea3e 100755
--- a/source4/selftest/provisions/undump.sh
+++ b/source4/selftest/provisions/undump.sh
@@ -1,18 +1,35 @@
 #!/bin/sh
 # undump a provision directory
 
-[ "$#" -eq 1 ] || {
-echo "Usage: undump.sh "
+[ "$#" -gt 0 ] || {
+echo "Usage: undump.sh  [TARGETDIR] [TDBRESTORE]"
 exit 1
 }
+
+TDBRESTORE=tdbrestore
+[ "$#" -lt 3 ] || {
+TDBRESTORE=$3
+}
+
+
 dirbase="$1"
-for f in $(find $dirbase -name '*.dump'); do
-dname=$(dirname $f)
+
+TARGETDIR=`pwd`/$dirbase
+
+cd $dirbase
+
+[ "$#" -lt 2 ] || {
+TARGETDIR=$2
+}
+
+for f in $(find . -name '*.dump'); do
+dname=$TARGETDIR/$(dirname $f)
+mkdir -p $dname
 bname=$(basename $f .dump)
 outname=$dname/$bname
 echo "Restoring $outname"
 rm -f $outname
-bin/tdbrestore $outname < $f || {
+$TDBRESTORE $outname < $f || {
echo "Failed to restore $outname"
exit 1
 }
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index 8e868dc..ece0325 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -463,6 +463,8 @@ for env in ["dc", "fl2000dc", "fl2003dc", "fl2008r2dc"]:
 # isn't available on DCs with Windows 2000 domain function level -
 # therefore skip it in that configuration
 plantestsuite("samba4.ldap.passwords.python(%s)" % env, env, [python, 
os.path.join(samba4srcdir, "dsdb/tests/python/passwords.py"), "$SERVER", 
'-U"$USERNAME%$PASSWORD"', "-W$DOMAIN"])
+
+plantestsuite("samba4.blackbox.dbcheck.alpha13", "none" , ["PYTHON=%s" % 
python, os.path.join(bbdir, "dbcheck-alpha13.sh"), '$PREFIX_ABS/provision', 
configuration])
 planpythontestsuite("dc:local", "samba.tests.upgradeprovisionneeddc")
 planpythontestsuite("none", "samba.tests.upgradeprovision")
 planpythontestsuite("none", "samba.tests.xattr")
diff --git a/testprogs/blackbox/dbcheck-alpha13.sh 
b/testprogs/blackbox/dbcheck-alpha13.sh
new file mode 100755
index 000..00cb97a
--- /dev/null
+++ b/testprogs/blackbox/dbcheck-alpha13.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+if [ $# -lt 1 ]; then
+cat <

[SCM] Samba Shared Repository - branch master updated

2012-06-15 Thread Andrew Bartlett
The branch, master has been updated
   via  7a723c6 build: Remove support for non-64bit sendfile()
  from  6440720 selftest/flapping: mark samba4.nss.test using winbind(s3dc) 
as flakey

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


- Log -
commit 7a723c6b386513ce58fe27469440bfc71debf685
Author: Andrew Bartlett 
Date:   Tue Jun 5 14:43:24 2012 +1000

build: Remove support for non-64bit sendfile()

Some early Linux 2.6 platforms can not handle sendfile and 
_FILE_OFFSET_BITS == 64

This disables sendfile() on these platforms.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Sat Jun 16 02:21:28 CEST 2012 on sn-devel-104

---

Summary of changes:
 source3/configure.in   |   18 --
 source3/lib/sendfile.c |   87 
 source3/wscript|   15 
 3 files changed, 0 insertions(+), 120 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index f2885d2..c521e2e 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -5484,28 +5484,10 @@ ssize_t nwritten = sendfile(tofd, fromfd, &offset, 
total);
 ],
 samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)])
 
-# Try and cope with broken Linux sendfile
-   AC_CACHE_CHECK([for broken linux sendfile 
support],samba_cv_HAVE_BROKEN_LINUX_SENDFILE,[
-   AC_TRY_LINK([\
-#if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
-#undef _FILE_OFFSET_BITS
-#endif
-#include ],
-[\
-int tofd, fromfd;
-off_t offset;
-size_t total;
-ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
-],
-samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no)])
-
 if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() is available])
AC_DEFINE(LINUX_SENDFILE_API,1,[Whether linux sendfile() API is 
available])
AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() should be used])
-   elif test x"$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" = x"yes"; then
-   AC_DEFINE(LINUX_BROKEN_SENDFILE_API,1,[Whether (linux) 
sendfile() is broken])
-   AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile should be used])
else
AC_MSG_RESULT(no);
fi
diff --git a/source3/lib/sendfile.c b/source3/lib/sendfile.c
index a9607fa..196ef68 100644
--- a/source3/lib/sendfile.c
+++ b/source3/lib/sendfile.c
@@ -89,93 +89,6 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB 
*header, off_t offset
return count + hdr_len;
 }
 
-#elif defined(LINUX_BROKEN_SENDFILE_API)
-
-/*
- * We must use explicit 32 bit types here. This code path means Linux
- * won't do proper 64-bit sendfile. JRA.
- */
-
-extern int32 sendfile (int out_fd, int in_fd, int32 *offset, uint32 count);
-
-
-#ifndef MSG_MORE
-#define MSG_MORE 0x8000
-#endif
-
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, off_t 
offset, size_t count)
-{
-   size_t total=0;
-   ssize_t ret;
-   ssize_t hdr_len = 0;
-   uint32 small_total = 0;
-   int32 small_offset;
-
-   /* 
-* Fix for broken Linux 2.4 systems with no working sendfile64().
-* If the offset+count > 2 GB then pretend we don't have the
-* system call sendfile at all. The upper layer catches this
-* and uses a normal read. JRA.
-*/
-
-   if ((sizeof(off_t) >= 8) && (offset + count > (off_t)0x7FFF)) {
-   errno = ENOSYS;
-   return -1;
-   }
-
-   /*
-* Send the header first.
-* Use MSG_MORE to cork the TCP output until sendfile is called.
-*/
-
-   if (header) {
-   hdr_len = header->length;
-   while (total < hdr_len) {
-   ret = sys_send(tofd, header->data + total,hdr_len - 
total, MSG_MORE);
-   if (ret == -1)
-   return -1;
-   total += ret;
-   }
-   }
-
-   small_total = (uint32)count;
-   small_offset = (int32)offset;
-
-   while (small_total) {
-   int32 nwritten;
-   do {
-   nwritten = sendfile(tofd, fromfd, &small_offset, 
small_total);
-#if defined(EWOULDBLOCK)
-   } while (nwritten == -1 && (errno == EINTR || errno == EAGAIN 
|| errno == EWOULDBLOCK));
-#else
-   } while (nwritten == -1 && (errno == EINTR || errno == EAGAIN));
-#endif
-   if (nwritten == -1) {
-   if (errno == ENOSYS || errno == EINVAL) {
-   /* Ok - we're in a world of pain here. We just 
sent
-* the header, but the sendfile failed. We h

[SCM] Samba Shared Repository - branch v3-6-test updated

2012-06-15 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  0ace3ca Part 2 of fix for bug #8998 - Notify code can miss a ChDir.
   via  2b92491 Part 1 of fix for bug #8998 - Notify code can miss a ChDir.
  from  6330936 Fix bug #8922.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 0ace3ca03df76a1c22e112ea41d491f90afc0f94
Author: Volker Lendecke 
Date:   Thu Jun 14 11:26:44 2012 -0700

Part 2 of fix for bug #8998 - Notify code can miss a ChDir.

Do a ChDir for notify_onelevel.

commit 2b92491ba7cc5fd541e3f8988ecf831c3949fb00
Author: Volker Lendecke 
Date:   Thu Jun 14 11:24:01 2012 -0700

Part 1 of fix for bug #8998 - Notify code can miss a ChDir.

Factor out notify_parent_dir.

---

Summary of changes:
 source3/smbd/notify.c |   52 +++-
 1 files changed, 38 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c
index 24385c9..d9a28eb 100644
--- a/source3/smbd/notify.c
+++ b/source3/smbd/notify.c
@@ -345,28 +345,52 @@ void 
remove_pending_change_notify_requests_by_fid(files_struct *fsp,
}
 }
 
-void notify_fname(connection_struct *conn, uint32 action, uint32 filter,
- const char *path)
+static void notify_parent_dir(connection_struct *conn,
+ uint32 action, uint32 filter,
+ const char *path)
 {
-   char *fullpath;
+   struct smb_filename smb_fname_parent;
char *parent;
const char *name;
+   char *oldwd;
 
-   if (path[0] == '.' && path[1] == '/') {
-   path += 2;
+   if (!parent_dirname(talloc_tos(), path, &parent, &name)) {
+   return;
}
-   if (parent_dirname(talloc_tos(), path, &parent, &name)) {
-   struct smb_filename smb_fname_parent;
 
-   ZERO_STRUCT(smb_fname_parent);
-   smb_fname_parent.base_name = parent;
+   ZERO_STRUCT(smb_fname_parent);
+   smb_fname_parent.base_name = parent;
 
-   if (SMB_VFS_STAT(conn, &smb_fname_parent) != -1) {
-   notify_onelevel(conn->notify_ctx, action, filter,
-   SMB_VFS_FILE_ID_CREATE(conn, &smb_fname_parent.st),
-   name);
-   }
+   oldwd = vfs_GetWd(parent, conn);
+   if (oldwd == NULL) {
+   goto done;
+   }
+   if (vfs_ChDir(conn, conn->connectpath) == -1) {
+   goto done;
+   }
+
+   if (SMB_VFS_STAT(conn, &smb_fname_parent) == -1) {
+   goto chdir_done;
+   }
+
+   notify_onelevel(conn->notify_ctx, action, filter,
+   SMB_VFS_FILE_ID_CREATE(conn, &smb_fname_parent.st),
+   name);
+chdir_done:
+   vfs_ChDir(conn, oldwd);
+done:
+   TALLOC_FREE(parent);
+}
+
+void notify_fname(connection_struct *conn, uint32 action, uint32 filter,
+ const char *path)
+{
+   char *fullpath;
+
+   if (path[0] == '.' && path[1] == '/') {
+   path += 2;
}
+   notify_parent_dir(conn, action, filter, path);
 
fullpath = talloc_asprintf(talloc_tos(), "%s/%s", conn->connectpath,
   path);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-06-15 Thread Stefan Metzmacher
The branch, master has been updated
   via  6440720 selftest/flapping: mark samba4.nss.test using winbind(s3dc) 
as flakey
   via  917612a docs-xml: vfs_gpfs: add comment "per share option"
   via  3eba94c docs-xml: vfs_gpfs: fix typo
   via  54b6d29 docs-xml: add gpfs:acl option to vfs_gpfs man page
   via  289255c s3:vfs_gpfs: add "gpfs:acl" option
   via  442cb66 dbwrap: Remove an unnecessary ZERO_STRUCT
  from  3c94ba5 s3-winbindd: fix the build of idmap_ad modules.

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


- Log -
commit 6440720de3123c17baa99b31a3a72f5dba938873
Author: Stefan Metzmacher 
Date:   Fri Jun 15 18:30:43 2012 +0200

selftest/flapping: mark samba4.nss.test using winbind(s3dc) as flakey

I saw this at least 10 times in the last weeks.

[1425/1517 in 1h12m22s] samba4.nss.test using winbind(s3dc)
UNEXPECTED(failure): samba4.nss.test using winbind(s3dc).run nsstest(s3dc)
REASON: _StringException: _StringException: ERROR setpwent: NSS_STATUS=-1  
1 (nss_errno=0)
ERROR getpwent: NSS_STATUS=-1  1 (nss_errno=0)
ERROR endpwent: NSS_STATUS=-1  1 (nss_errno=0)
ERROR setgrent: NSS_STATUS=-1  1 (nss_errno=0)
ERROR getgrent: NSS_STATUS=-1  1 (nss_errno=0)
ERROR endgrent: NSS_STATUS=-1  1 (nss_errno=0)
ERROR Non existent user gave error -1
ERROR Non existent uid gave error -1
ERROR Non existent group gave error -1
ERROR Non existent gid gave error -1
total_errors=10

FAILED (1 failures, 0 errors and 0 unexpected successes in 0 testsuites)

metze

Autobuild-User(master): Stefan Metzmacher 
Autobuild-Date(master): Fri Jun 15 20:24:11 CEST 2012 on sn-devel-104

commit 917612a26fc567323e266762b895e09047cf40aa
Author: Björn Baumbach 
Date:   Fri Jun 15 12:33:32 2012 +0200

docs-xml: vfs_gpfs: add comment "per share option"

Signed-off-by: Stefan Metzmacher 

commit 3eba94c0f170a998e2c779c03c39e48848c605d4
Author: Björn Baumbach 
Date:   Fri Jun 15 12:33:32 2012 +0200

docs-xml: vfs_gpfs: fix typo

Signed-off-by: Stefan Metzmacher 

commit 54b6d294eecbcd4b9b9965311a8886d06f4aff05
Author: Björn Baumbach 
Date:   Fri Jun 15 12:33:32 2012 +0200

docs-xml: add gpfs:acl option to vfs_gpfs man page

Signed-off-by: Stefan Metzmacher 

commit 289255ce7379188177eaa5f4f8fa527cb909af24
Author: Björn Baumbach 
Date:   Thu Jun 14 14:15:44 2012 +0200

s3:vfs_gpfs: add "gpfs:acl" option

With "gpfs:acl=no" you can pass the acl calls to the next SMB_VFS module.

Based on a patch from Hans-Dieter Schuster 


Pair-Programmed-With: Stefan Metzmacher 

commit 442cb66c16d50e76725799aa74a8877207de88ec
Author: Volker Lendecke 
Date:   Tue Jun 5 11:28:44 2012 +0200

dbwrap: Remove an unnecessary ZERO_STRUCT

We assign the only struct member one line down

Signed-off-by: Stefan Metzmacher 

---

Summary of changes:
 docs-xml/manpages-3/vfs_gpfs.8.xml |   24 ++-
 lib/dbwrap/dbwrap_rbt.c|1 -
 selftest/flapping  |1 +
 source3/modules/vfs_gpfs.c |   81 
 4 files changed, 105 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/vfs_gpfs.8.xml 
b/docs-xml/manpages-3/vfs_gpfs.8.xml
index 3635143..526d86d 100644
--- a/docs-xml/manpages-3/vfs_gpfs.8.xml
+++ b/docs-xml/manpages-3/vfs_gpfs.8.xml
@@ -50,6 +50,8 @@
 
This module is stackable.
 
+   Since Samba 4.0 all options are per share options.
+
 
 
 
@@ -174,7 +176,7 @@


GPFS ACLs doesn't know about the 'APPEND' right.
-   This optionen lets Samba map the 'APPEND' right to 'WRITE'.
+   This option lets Samba map the 'APPEND' right to 'WRITE'.

 

@@ -190,6 +192,26 @@


 
+   gpfs:acl = [ yes | no ]
+   
+   
+   This option lets Samba use or ignore GPFS ACLs.
+   
+
+   
+   
+   yes(default) - use GPFS ACLs.
+   
+   
+   no - do not use GPFS ACLs and pass everything
+   to the next SMB_VFS module.
+   
+   
+   
+
+   
+   
+
gpfs:refuse_dacl_protected = [ yes | no ]


diff --git a/lib/dbwrap/dbwrap_rbt.c b/lib/dbwrap/dbwrap_rbt.c
index 3dca3ba..d512eac 100644
--- a/lib/dbwrap/dbwrap_rbt.c
+++ b/lib/dbwrap/dbwrap_rbt.c
@@ -382,7 +382,6 @@ static int db_rbt_traverse_internal(struct db_context *db,
return ret;
}
 
-   ZERO_STRUCT(rec_priv);
rec_priv.node = db_rbt2node(n);
/

[SCM] Samba Shared Repository - branch master updated

2012-06-15 Thread Günther Deschner
The branch, master has been updated
   via  3c94ba5 s3-winbindd: fix the build of idmap_ad modules.
  from  d7b0e9a s3-lib: Fix conversion of lib/events.c to modern tevent 
names

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


- Log -
commit 3c94ba500707ff171e09c000e451d72cdf4a8776
Author: Günther Deschner 
Date:   Thu Jun 14 12:55:55 2012 +0200

s3-winbindd: fix the build of idmap_ad modules.

Guenther

Autobuild-User(master): Günther Deschner 
Autobuild-Date(master): Fri Jun 15 18:16:11 CEST 2012 on sn-devel-104

---

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


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/wscript_build b/source3/winbindd/wscript_build
index d9b4d34..86d50ee 100644
--- a/source3/winbindd/wscript_build
+++ b/source3/winbindd/wscript_build
@@ -42,12 +42,13 @@ bld.SAMBA3_SUBSYSTEM('IDMAP_HASH',
 
 bld.SAMBA3_SUBSYSTEM('IDMAP_AD',
 source=IDMAP_AD_SRC,
-deps='ads',
+deps='ads nss_info',
 vars=locals(),
 enabled=bld.env.HAVE_LDAP)
 
 bld.SAMBA3_MODULE('idmap_ad',
  subsystem='idmap',
+ allow_undefined_symbols=True,
  source='',
  deps='IDMAP_AD',
  init_function='',


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-06-15 Thread Andrew Bartlett
The branch, master has been updated
   via  d7b0e9a s3-lib: Fix conversion of lib/events.c to modern tevent 
names
  from  1d9ff7d dbwrap: 
dbwrap_trans_store_uint32->dbwrap_trans_store_uint32_bystring

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


- Log -
commit d7b0e9a42a424de4b0409d3c55834e6118342f3b
Author: Andrew Bartlett 
Date:   Fri Jun 15 21:52:35 2012 +1000

s3-lib: Fix conversion of lib/events.c to modern tevent names

This corrects an error in 8e31d97c8b62d34aff5d52bfe46dbcc5805dae03.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Fri Jun 15 16:25:20 CEST 2012 on sn-devel-104

---

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


Changeset truncated at 500 lines:

diff --git a/source3/lib/events.c b/source3/lib/events.c
index 64ea3ad..72fd40e 100644
--- a/source3/lib/events.c
+++ b/source3/lib/events.c
@@ -456,7 +456,7 @@ struct tevent_context *s3_tevent_context_init(TALLOC_CTX 
*mem_ctx)
 }
 
 struct idle_event {
-   struct timed_event *te;
+   struct tevent_timer *te;
struct timeval interval;
char *name;
bool (*handler)(const struct timeval *now, void *private_data);
@@ -464,7 +464,7 @@ struct idle_event {
 };
 
 static void smbd_idle_event_handler(struct tevent_context *ctx,
-   struct timer_event *te,
+   struct tevent_timer *te,
struct timeval now,
void *private_data)
 {


-- 
Samba Shared Repository


[SCM] Samba Website Repository - branch master updated

2012-06-15 Thread Lars Müller
The branch, master has been updated
   via  0370f02 Add univention as vendor
  from  89fb278 Update Xtended Internet record

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


- Log -
commit 0370f02bb7c0a074aab34c84763c2853c3344dac
Author: Lars Müller 
Date:   Fri Jun 15 15:41:32 2012 +0200

Add univention as vendor

---

Summary of changes:
 vendors/index.html  |3 +++
 vendors/univention.html |   30 ++
 vendors/univention.png  |  Bin 0 -> 11569 bytes
 3 files changed, 33 insertions(+), 0 deletions(-)
 create mode 100644 vendors/univention.html
 create mode 100644 vendors/univention.png


Changeset truncated at 500 lines:

diff --git a/vendors/index.html b/vendors/index.html
index 17beda4..9206ef9 100755
--- a/vendors/index.html
+++ b/vendors/index.html
@@ -76,6 +76,9 @@ see the Samba Support page.
 
 
 
+
+
+
 
 
 
diff --git a/vendors/univention.html b/vendors/univention.html
new file mode 100644
index 000..2190662
--- /dev/null
+++ b/vendors/univention.html
@@ -0,0 +1,30 @@
+Univention
+
+http://www.univention.de/en/";>
+  
+
+
+Univention is a leading European provider of Open Source products for the
+cost-efficient operation and effective administration of IT infrastructures.
+At the heart of our offer is the Linux infrastructure solution Univention
+Corporate Server (UCS). UCS is a modern enterprise Linux distribution with an
+integrated Open Source solution for identity and infrastructure management,
+which makes efficient, centrally controlled administration possible even in
+challenging environments – both in companies and in the cloud.
+
+The core product UCS is complemented with, among other things, products
+building on it for the cross-platform administration of thin clients, an Open
+Source desktop for professional users and an integrated server and desktop
+virtualization solution. Thanks to the supplied connectors, the products are
+ideal for use with for example the Microsoft Active Directory, integrate
+perfectly in existing infrastructures and allow simple migration.
+
+An increasing number of software manufacturers, including the groupware
+manufacturers Open-Xchange, Zarafa and Kolab Systems, ECM manufacturers and
+suppliers of VolP solutions offer optimised packages for operation with UCS,
+which can be integrated in the UCS management system among other things. UCS
+is thus the Open Source integration platform for IT infrastructure operation
+and management.
+
+More information, a downloadable version and an online demo is available at
+the http://www.univention.de/en/";>univention web site.
diff --git a/vendors/univention.png b/vendors/univention.png
new file mode 100644
index 000..13e50d4
Binary files /dev/null and b/vendors/univention.png differ


-- 
Samba Website Repository


[SCM] Samba Shared Repository - branch master updated

2012-06-15 Thread Michael Adam
The branch, master has been updated
   via  1d9ff7d dbwrap: 
dbwrap_trans_store_uint32->dbwrap_trans_store_uint32_bystring
   via  64fec46 dbwrap: 
dbwrap_trans_store_int32->dbwrap_trans_store_int32_bystring
   via  07d6c25 dbwrap: 
dbwrap_trans_change_int32_atomic->dbwrap_trans_change_int32_atomic_bystring
   via  8b99d40 dbwrap: 
dbwrap_change_int32_atomic->dbwrap_change_int32_atomic_bystring
   via  9275d57 dbwrap: 
dbwrap_trans_change_uint32_atomic->dbwrap_trans_change_uint32_atomic_bystring
   via  37ad03f dbwrap: 
dbwrap_change_uint32_atomic->dbwrap_change_uint32_atomic_bystring
   via  8f94ecb dbwrap: dbwrap_store_uint32->dbwrap_store_uint32_bystring
   via  7f19a5a dbwrap: dbwrap_fetch_uint32->dbwrap_fetch_uint32_bystring
   via  749314f dbwrap: dbwrap_store_int32->dbwrap_store_int32_bystring
   via  737c0a5 dbwrap: dbwrap_fetch_int32->dbwrap_fetch_int32_bystring
  from  9afd4be s3-build: Do not write loadparm generated files into the 
build tree

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


- Log -
commit 1d9ff7d3bc111f83f8ae45277c0507c4306c0c01
Author: Volker Lendecke 
Date:   Fri Jun 15 09:51:21 2012 +0200

dbwrap: dbwrap_trans_store_uint32->dbwrap_trans_store_uint32_bystring

Signed-off-by: Michael Adam 

Autobuild-User(master): Michael Adam 
Autobuild-Date(master): Fri Jun 15 14:20:04 CEST 2012 on sn-devel-104

commit 64fec465c15fea77313643636d82d2c14115f434
Author: Volker Lendecke 
Date:   Fri Jun 15 09:48:20 2012 +0200

dbwrap: dbwrap_trans_store_int32->dbwrap_trans_store_int32_bystring

Signed-off-by: Michael Adam 

commit 07d6c25525ca3b0d3a4e179f1048818f78cccf9d
Author: Volker Lendecke 
Date:   Fri Jun 15 09:45:18 2012 +0200

dbwrap: 
dbwrap_trans_change_int32_atomic->dbwrap_trans_change_int32_atomic_bystring

Signed-off-by: Michael Adam 

commit 8b99d40520875ad89e14d9397cff902f8198fd25
Author: Volker Lendecke 
Date:   Fri Jun 15 09:43:13 2012 +0200

dbwrap: dbwrap_change_int32_atomic->dbwrap_change_int32_atomic_bystring

Signed-off-by: Michael Adam 

commit 9275d571d9d0bb4b7927245256aa4510b9e7c43d
Author: Volker Lendecke 
Date:   Fri Jun 15 09:20:25 2012 +0200

dbwrap: 
dbwrap_trans_change_uint32_atomic->dbwrap_trans_change_uint32_atomic_bystring

Signed-off-by: Michael Adam 

commit 37ad03f91d28c39533ece09384a12e63603c3e8a
Author: Volker Lendecke 
Date:   Fri Jun 15 09:18:17 2012 +0200

dbwrap: dbwrap_change_uint32_atomic->dbwrap_change_uint32_atomic_bystring

Signed-off-by: Michael Adam 

commit 8f94ecbb90f3efedc3e379853dd71369d53cb1f7
Author: Volker Lendecke 
Date:   Fri Jun 15 09:09:57 2012 +0200

dbwrap: dbwrap_store_uint32->dbwrap_store_uint32_bystring

Signed-off-by: Michael Adam 

commit 7f19a5ab52ac6ecb380a49ec14072d0fd501f9db
Author: Volker Lendecke 
Date:   Thu Jun 14 20:39:27 2012 +0200

dbwrap: dbwrap_fetch_uint32->dbwrap_fetch_uint32_bystring

Signed-off-by: Michael Adam 

commit 749314fcf99cef4a1a162d622e10b6eb8998938f
Author: Volker Lendecke 
Date:   Thu Jun 14 20:30:16 2012 +0200

dbwrap: dbwrap_store_int32->dbwrap_store_int32_bystring

Signed-off-by: Michael Adam 

commit 737c0a54731803c84f0f29d96dd40ac819aec3e8
Author: Volker Lendecke 
Date:   Thu Jun 14 20:26:28 2012 +0200

dbwrap: dbwrap_fetch_int32->dbwrap_fetch_int32_bystring

Signed-off-by: Michael Adam 

---

Summary of changes:
 lib/dbwrap/dbwrap.h |   54 +--
 lib/dbwrap/dbwrap_util.c|   54 +--
 source3/lib/sharesec.c  |   16 
 source3/passdb/account_pol.c|   11 +++---
 source3/passdb/pdb_tdb.c|   31 +
 source3/passdb/secrets.c|4 +-
 source3/registry/reg_backend_db.c   |9 +++--
 source3/torture/test_dbwrap_watch.c |2 +-
 source3/torture/test_idmap_tdb_common.c |6 ++-
 source3/torture/torture.c   |4 +-
 source3/utils/dbwrap_tool.c |8 ++--
 source3/utils/net_idmap.c   |6 ++-
 source3/utils/net_idmap_check.c |4 +-
 source3/utils/net_registry_check.c  |   11 +++---
 source3/winbindd/idmap_autorid.c|   17 +
 source3/winbindd/idmap_tdb.c|   25 --
 source3/winbindd/idmap_tdb_common.c |4 +-
 17 files changed, 146 insertions(+), 120 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/dbwrap/dbwrap.h b/lib/dbwrap/dbwrap.h
index 59e5af0..41bcf35 100644
--- a/lib/dbwrap/dbwrap.h
+++ b/lib/dbwrap/dbwrap.h
@@ -85,33 +85,39 @@ NTSTATUS dbwrap_store_bystring(struct db_context *db, const 
char *key,
 NTSTATUS dbwrap_fetch_bystring(struct db_context *db, TALLOC_CTX *mem_ctx,
   

[SCM] Samba Shared Repository - branch master updated

2012-06-15 Thread Andrew Bartlett
The branch, master has been updated
   via  9afd4be s3-build: Do not write loadparm generated files into the 
build tree
   via  8e31d97 s3-lib: Convert lib/events.c to modern tevent names
   via  bf3235f docs: document new server role values
   via  60b6348 s3-auth: rework default auth methods around the 
lp_server_role() parameter
   via  67bdf4f lib/param: Use server role = 'standalone server' to be 
consistant with member server
   via  11db5b1 lib/param: make security=domain and security=ads conflict 
with being a DC
   via  b8815dc lib/param: Create a seperate server role for "active 
directory domain controller"
   via  b9a75d8 s3-auth: Merge SEC_DOMAIN and SEC_ADS cases in creating the 
default auth module list
   via  5df459a s3-auth: Fix system info3 return to be just SID_NT_SYSTEM
   via  9b3cf96 s3-auth: Fix system token generation not to dereference 
pointer as an integer
   via  f0c5800 s3-auth: Give the SYSTEM token all privileges
  from  8cca7b0 s3:smb2_server: remember the request_time on an incoming 
request

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


- Log -
commit 9afd4be688429d7bb344087cb3eda876f18e19f9
Author: Andrew Bartlett 
Date:   Fri Jun 15 12:34:28 2012 +1000

s3-build: Do not write loadparm generated files into the build tree

We need to keep these files away from where waf might see them.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Fri Jun 15 11:10:14 CEST 2012 on sn-devel-104

commit 8e31d97c8b62d34aff5d52bfe46dbcc5805dae03
Author: Andrew Bartlett 
Date:   Mon Jun 11 14:53:20 2012 +1000

s3-lib: Convert lib/events.c to modern tevent names

commit bf3235f8c6159e238226bef59f39c46ecc6888d8
Author: Andrew Bartlett 
Date:   Mon Jun 11 11:40:17 2012 +1000

docs: document new server role values

commit 60b63482441deee2d6db523bd295caf21af187ad
Author: Andrew Bartlett 
Date:   Mon Jun 11 10:51:47 2012 +1000

s3-auth: rework default auth methods around the lp_server_role() parameter

To cover all the enum values, ROLE_ACTIVE_DIRECTORY_DOMAIN_CONTROLLER
is mapped to the samba4 auth module, and this is no longer required to
be specified in fileserver.conf.

Andrew Bartlett

commit 67bdf4fa11f097144a831b51c424bdac3618a927
Author: Andrew Bartlett 
Date:   Mon Jun 11 10:50:08 2012 +1000

lib/param: Use server role = 'standalone server' to be consistant with 
member server

standalne is left as an alias.

Andrew Bartlett

commit 11db5b1f3321b3d5b73bb16f4030111c9a35fbbe
Author: Andrew Bartlett 
Date:   Mon Jun 11 10:40:32 2012 +1000

lib/param: make security=domain and security=ads conflict with being a DC

This simplifies our supported configurations down to those that we test and 
expect
to work.  security=domain and domain logons = yes has never made much 
sense, and
security=ads and domain logons = yes was only ever used in early 
experiments for
our AD support using smbd.

The correct way to be an AD DC is to set "server role = active directory 
domain controller"

Andrew Bartlett

commit b8815dc23d36468cce9b615335ed62f119eb8f35
Author: Andrew Bartlett 
Date:   Sun Jun 10 22:08:20 2012 +1000

lib/param: Create a seperate server role for "active directory domain 
controller"

This will allow us to detect from the smb.conf if this is a Samba4 AD
DC which will allow smarter handling of (for example) accidentially
starting smbd rather than samba.

To cope with upgrades from existing Samba4 installs, 'domain
controller' is a synonym of 'active directory domain controller' and
new parameters 'classic primary domain controller' and 'classic backup
domain controller' are added.

Andrew Bartlett

commit b9a75d8438470065633c1ff69c653eaa799d5718
Author: Andrew Bartlett 
Date:   Sun Jun 10 16:05:58 2012 +1000

s3-auth: Merge SEC_DOMAIN and SEC_ADS cases in creating the default auth 
module list

commit 5df459aed7f9f85a9eb15a16b1ad5a8bbdd1df5a
Author: Andrew Bartlett 
Date:   Thu Jun 14 09:35:10 2012 +1000

s3-auth: Fix system info3 return to be just SID_NT_SYSTEM

The SID for the SYSTEM token should be a fixed value, and not the
administrator.  Note however that it will be replaced by the SID of
sec_initial_uid() by the create_local_token() code.  Fixing this
requires fixes the other parts of the code that cannot cope with a
token of just SID_NT_SYSTEM.

Andrew Bartlett

commit 9b3cf96fb042429eaf79ede426e406ea1fa32079
Author: Andrew Bartlett 
Date:   Thu Jun 14 09:30:37 2012 +1000

s3-auth: Fix system token generation not to dereference pointer as an 
integer

This continues on from commit caaebb455cf955f66c2f662c53998c480cb2d6c9
which is marked as being part of bug #8944, ldapsam:trusted and ipasam
and 

[SCM] Samba Shared Repository - branch master updated

2012-06-15 Thread Stefan Metzmacher
The branch, master has been updated
   via  8cca7b0 s3:smb2_server: remember the request_time on an incoming 
request
   via  d8b3687 s3:smbd: remember the request_time on an incoming request
   via  59733d9 heimdal:lib/hdb:  needs to be the first header
   via  8d3a291 auth.idl: mark confidential attributes as [noprint]
  from  b27f888 s3:vfs: change files_struct.fnum from int to uint64_t

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


- Log -
commit 8cca7b09ad349e8d549eb326cdd2362cf3843773
Author: Stefan Metzmacher 
Date:   Wed Apr 11 16:54:17 2012 +0200

s3:smb2_server: remember the request_time on an incoming request

metze

Autobuild-User(master): Stefan Metzmacher 
Autobuild-Date(master): Fri Jun 15 09:17:33 CEST 2012 on sn-devel-104

commit d8b3687fcbb2ac37bf93b23301da4bf4d79301f6
Author: Stefan Metzmacher 
Date:   Wed Apr 11 16:54:17 2012 +0200

s3:smbd: remember the request_time on an incoming request

metze

commit 59733d911bf9010c7356641d171667a09fc32afb
Author: Stefan Metzmacher 
Date:   Thu Jun 14 22:15:24 2012 +0200

heimdal:lib/hdb:  needs to be the first header

This should fix build problems on AIX.

metze

commit 8d3a2914d8dfae4b9e4e9537aea87748d5456bb4
Author: Stefan Metzmacher 
Date:   Thu Jun 14 17:52:23 2012 +0200

auth.idl: mark confidential attributes as [noprint]

We should allow NDR_PRINT_DEBUG() to log them.

TODO: we could add some more magic which logs it at level 100.

metze

---

Summary of changes:
 librpc/idl/auth.idl|8 
 source3/include/vfs.h  |2 ++
 source3/smbd/globals.h |2 ++
 source3/smbd/process.c |4 
 source3/smbd/smb2_glue.c   |1 +
 source3/smbd/smb2_server.c |2 ++
 source4/heimdal/lib/hdb/hdb_locl.h |4 ++--
 7 files changed, 17 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/auth.idl b/librpc/idl/auth.idl
index 2451d2b..b0494f9 100644
--- a/librpc/idl/auth.idl
+++ b/librpc/idl/auth.idl
@@ -83,8 +83,8 @@ interface auth
uint32 num_sids;
[size_is(num_sids)] dom_sid sids[*];
auth_user_info *info;
-   DATA_BLOB user_session_key;
-   DATA_BLOB lm_session_key;
+   [noprint] DATA_BLOB user_session_key;
+   [noprint] DATA_BLOB lm_session_key;
} auth_user_info_dc;
 
typedef [public] struct {
@@ -104,13 +104,13 @@ interface auth
 * Bottom line, it is not the same as the session keys in info3.
 */
 
-   DATA_BLOB session_key;
+   [noprint] DATA_BLOB session_key;
 
[value(NULL), ignore] cli_credentials *credentials;
} auth_session_info;
 
typedef [public] struct {
auth_session_info *session_info;
-   DATA_BLOB exported_gssapi_credentials;
+   [noprint] DATA_BLOB exported_gssapi_credentials;
} auth_session_info_transport;
 }
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 723eb6c..e6a9ef4 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -399,6 +399,8 @@ struct smb_request {
 * Request list for chained requests, we're part of it.
 */
struct smb_request **chain;
+
+   struct timeval request_time;
 };
 
 /*
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index a0d5be0..8113b8e 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -379,6 +379,8 @@ struct smbd_smb2_request {
bool cancelled;
bool compound_related;
 
+   struct timeval request_time;
+
/* fake smb1 request. */
struct smb_request *smb1req;
struct files_struct *compat_chain_fsp;
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 5e26826..9e1abb2 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -517,12 +517,16 @@ static bool init_smb_request(struct smb_request *req,
 uint32_t seqnum)
 {
size_t req_size = smb_len(inbuf) + 4;
+
/* Ensure we have at least smb_size bytes. */
if (req_size < smb_size) {
DEBUG(0,("init_smb_request: invalid request size %u\n",
(unsigned int)req_size ));
return false;
}
+
+   req->request_time = timeval_current();
+
req->cmd= CVAL(inbuf, smb_com);
req->flags2 = SVAL(inbuf, smb_flg2);
req->smbpid = SVAL(inbuf, smb_pid);
diff --git a/source3/smbd/smb2_glue.c b/source3/smbd/smb2_glue.c
index 360a73a..a71679f 100644
--- a/source3/smbd/smb2_glue.c
+++ b/source3/smbd/smb2_glue.c
@@ -36,6 +36,7 @@ struct smb_request *smbd_smb2_fake_smb_request(struct 
smbd_smb2