[SCM] Samba Shared Repository - branch master updated

2011-08-14 Thread Volker Lendecke
The branch, master has been updated
   via  1022c28 s3: Fix bug 8360
  from  d2d2e7a s3-passdb: Fix python  2.6 build errors in passdb python 
wrapper

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


- Log -
commit 1022c28e15acfc68aedc8b6853417d2f1f357f2a
Author: Volker Lendecke v...@samba.org
Date:   Thu Aug 11 16:52:22 2011 +0200

s3: Fix bug 8360

OS/2 sends an unexpected writex/readx chain

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Sun Aug 14 08:48:58 CEST 2011 on sn-devel-104

---

Summary of changes:
 source3/smbd/process.c |   23 ---
 1 files changed, 16 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index f542dcd..6d391df 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2025,15 +2025,24 @@ void chain_reply(struct smb_request *req)
SMB_PERFCOUNT_SET_MSGLEN_IN(req-pcd, smblen);
 
/*
-* Check if the client tries to fool us. The request so far uses the
-* space to the end of the byte buffer in the request just
-* processed. The chain_offset can't point into that area. If that was
-* the case, we could end up with an endless processing of the chain,
-* we would always handle the same request.
+* Check if the client tries to fool us. The chain offset
+* needs to point beyond the current request in the chain, it
+* needs to strictly grow. Otherwise we might be tricked into
+* an endless loop always processing the same request over and
+* over again. We used to assume that vwv and the byte buffer
+* array in a chain are always attached, but OS/2 the
+* WriteX/ReadX chain puts the ReadX vwv array right behind
+* the WriteX vwv chain. The WriteX bcc array is put behind
+* the ReadX vwv array. So now we check whether the chain
+* offset points strictly behind the previous vwv
+* array. req-buf points right after the vwv array of the
+* previous request. See
+* https://bugzilla.samba.org/show_bug.cgi?id=8360 for more
+* information.
 */
 
-   already_used = PTR_DIFF(req-buf+req-buflen, smb_base(req-inbuf));
-   if (chain_offset  already_used) {
+   already_used = PTR_DIFF(req-buf, smb_base(req-inbuf));
+   if (chain_offset = already_used) {
goto error;
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-08-14 Thread Jelmer Vernooij
The branch, master has been updated
   via  88ecf1a Use public pytalloc header file.
  from  1022c28 s3: Fix bug 8360

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


- Log -
commit 88ecf1a9b8032669e097cca448c0640d1453a234
Author: Jelmer Vernooij jel...@samba.org
Date:   Sun Aug 14 15:34:08 2011 +0200

Use public pytalloc header file.

Autobuild-User: Jelmer Vernooij jel...@samba.org
Autobuild-Date: Sun Aug 14 17:18:46 CEST 2011 on sn-devel-104

---

Summary of changes:
 source4/auth/gensec/pygensec.c|2 +-
 source4/lib/registry/pyregistry.c |2 +-
 source4/param/provision.c |2 +-
 source4/param/pyparam.c   |2 +-
 source4/param/pyparam_util.c  |2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/gensec/pygensec.c b/source4/auth/gensec/pygensec.c
index a088f9c..d7cbea6 100644
--- a/source4/auth/gensec/pygensec.c
+++ b/source4/auth/gensec/pygensec.c
@@ -23,7 +23,7 @@
 #include auth/credentials/pycredentials.h
 #include libcli/util/pyerrors.h
 #include scripting/python/modules.h
-#include lib/talloc/pytalloc.h
+#include pytalloc.h
 #include tevent.h
 #include librpc/rpc/pyrpc_util.h
 
diff --git a/source4/lib/registry/pyregistry.c 
b/source4/lib/registry/pyregistry.c
index 162c5ea..ff62279 100644
--- a/source4/lib/registry/pyregistry.c
+++ b/source4/lib/registry/pyregistry.c
@@ -22,7 +22,7 @@
 #include includes.h
 #include libcli/util/pyerrors.h
 #include lib/registry/registry.h
-#include lib/talloc/pytalloc.h
+#include pytalloc.h
 #include lib/events/events.h
 #include auth/credentials/pycredentials.h
 #include param/pyparam.h
diff --git a/source4/param/provision.c b/source4/param/provision.c
index 6663f26..55540d4 100644
--- a/source4/param/provision.c
+++ b/source4/param/provision.c
@@ -25,7 +25,7 @@
 #include librpc/ndr/libndr.h
 #include param/provision.h
 #include param/secrets.h
-#include lib/talloc/pytalloc.h
+#include pytalloc.h
 #include scripting/python/modules.h
 #include param/pyparam.h
 #include dynconfig/dynconfig.h
diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c
index f469261..663ed84 100644
--- a/source4/param/pyparam.c
+++ b/source4/param/pyparam.c
@@ -21,7 +21,7 @@
 #include includes.h
 #include param/param.h
 #include param/loadparm.h
-#include lib/talloc/pytalloc.h
+#include pytalloc.h
 #include dynconfig/dynconfig.h
 
 void initparam(void);
diff --git a/source4/param/pyparam_util.c b/source4/param/pyparam_util.c
index 969226f..874d783 100644
--- a/source4/param/pyparam_util.c
+++ b/source4/param/pyparam_util.c
@@ -22,7 +22,7 @@
 #include param/param.h
 #include param/pyparam.h
 #include param/loadparm.h
-#include lib/talloc/pytalloc.h
+#include pytalloc.h
 
 #define PyLoadparmContext_AsLoadparmContext(obj) pytalloc_get_type(obj, struct 
loadparm_context)
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-08-14 Thread Simo Sorce
The branch, master has been updated
   via  2e5fc83 s3-prefork: Do not use mmap/mremap/munmap directly
   via  039ddef util: add function to extend anonymous shared memory
   via  a171938 replace: Check if we have mremap() available
  from  88ecf1a Use public pytalloc header file.

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


- Log -
commit 2e5fc8335022df44a015817d4628a48e9195e311
Author: Simo Sorce i...@samba.org
Date:   Sun Aug 14 18:11:18 2011 -0400

s3-prefork: Do not use mmap/mremap/munmap directly

Use the wrappers in util.h as they deal with trying to do the best they can 
on
platfroms that do not support mmap extensions.

Autobuild-User: Simo Sorce i...@samba.org
Autobuild-Date: Mon Aug 15 04:13:51 CEST 2011 on sn-devel-104

commit 039ddef20900322760093a04881007dbb0897b50
Author: Simo Sorce i...@samba.org
Date:   Sun Aug 14 18:10:53 2011 -0400

util: add function to extend anonymous shared memory

commit a171938408adde0d787b9ff40a4cebeee66d747a
Author: Simo Sorce i...@samba.org
Date:   Sun Aug 14 18:05:27 2011 -0400

replace: Check if we have mremap() available

---

Summary of changes:
 lib/replace/libreplace.m4|7 
 lib/replace/test/shared_mremap.c |   48 
 lib/util/util.c  |   64 ++
 lib/util/util.h  |1 +
 source3/lib/server_prefork.c |   20 ++-
 5 files changed, 131 insertions(+), 9 deletions(-)
 create mode 100644 lib/replace/test/shared_mremap.c


Changeset truncated at 500 lines:

diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4
index 808d5d1..d644e50 100644
--- a/lib/replace/libreplace.m4
+++ b/lib/replace/libreplace.m4
@@ -98,6 +98,13 @@ if test x$libreplace_cv_HAVE_MMAP = xyes; then
 AC_DEFINE(HAVE_MMAP,1,[Whether mmap works])
 fi
 
+AC_CACHE_CHECK([for working mremap],libreplace_cv_HAVE_MREMAP,[
+AC_TRY_RUN([#include $libreplacedir/test/shared_mremap.c],
+   
libreplace_cv_HAVE_MREMAP=yes,libreplace_cv_HAVE_MREMAP=no,libreplace_cv_HAVE_MREMAP=cross)])
+if test x$libreplace_cv_HAVE_MREMAP = xyes; then
+AC_DEFINE(HAVE_MREMAP,1,[Whether mremap works])
+fi
+
 
 AC_CHECK_HEADERS(sys/syslog.h syslog.h)
 AC_CHECK_HEADERS(sys/time.h time.h)
diff --git a/lib/replace/test/shared_mremap.c b/lib/replace/test/shared_mremap.c
new file mode 100644
index 000..05032ad
--- /dev/null
+++ b/lib/replace/test/shared_mremap.c
@@ -0,0 +1,48 @@
+/* this tests whether we can use mremap */
+
+#if defined(HAVE_UNISTD_H)
+#include unistd.h
+#endif
+#include sys/mman.h
+#include sys/types.h
+#include sys/stat.h
+#include fcntl.h
+
+#define DATA conftest.mmap
+
+#ifndef MAP_FILE
+#define MAP_FILE 0
+#endif
+
+#ifndef MAP_FAILED
+#define MAP_FAILED (int *)-1
+#endif
+
+main()
+{
+   int *buf;
+   int fd;
+   int err = 1;
+
+   fd = open(DATA, O_RDWR|O_CREAT|O_TRUNC, 0666);
+   if (fd == -1) {
+   exit(1);
+   }
+
+   buf = (int *)mmap(NULL, 0x1000, PROT_READ | PROT_WRITE,
+ MAP_FILE | MAP_SHARED, fd, 0);
+   if (buf == MAP_FAILED) {
+   goto done;
+   }
+
+   buf = mremap(buf, 0x1000, 0x2000, MREMAP_MAYMOVE);
+   if (buf == MAP_FAILED) {
+   goto done;
+   }
+
+   err = 0;
+done:
+   close(fd);
+   unlink(DATA);
+   exit(err);
+}
diff --git a/lib/util/util.c b/lib/util/util.c
index 2d1d830..b700f37 100644
--- a/lib/util/util.c
+++ b/lib/util/util.c
@@ -1073,6 +1073,70 @@ void *anonymous_shared_allocate(size_t orig_bufsz)
return ptr;
 }
 
+void *anonymous_shared_resize(void *ptr, size_t new_size, bool maymove)
+{
+#ifdef HAVE_MREMAP
+   void *buf;
+   size_t pagesz = getpagesize();
+   size_t pagecnt;
+   size_t bufsz;
+   struct anonymous_shared_header *hdr;
+   int flags = 0;
+
+   if (ptr == NULL) {
+   errno = EINVAL;
+   return NULL;
+   }
+
+   hdr = (struct anonymous_shared_header *)ptr;
+   hdr--;
+   if (hdr-u.length  (new_size + sizeof(*hdr))) {
+   errno = EINVAL;
+   return NULL;
+   }
+
+   bufsz = new_size + sizeof(*hdr);
+
+   /* round up to full pages */
+   pagecnt = bufsz / pagesz;
+   if (bufsz % pagesz) {
+   pagecnt += 1;
+   }
+   bufsz = pagesz * pagecnt;
+
+   if (new_size = bufsz) {
+   /* integer wrap */
+   errno = ENOSPC;
+   return NULL;
+   }
+
+   if (bufsz = hdr-u.length) {
+   return ptr;
+   }
+
+   if (maymove) {
+   flags = MREMAP_MAYMOVE;
+   }
+
+   buf = mremap(hdr, hdr-u.length, bufsz, flags);
+
+   if (buf == MAP_FAILED) {
+   errno = ENOSPC;
+   

[SCM] CTDB repository - branch 1.2 updated - ctdb-1.9.1-469-g041a00d

2011-08-14 Thread Ronnie Sahlberg
The branch, 1.2 has been updated
   via  041a00da8bf50e32f96d33661bf954901ab0f4b8 (commit)
   via  6e6d286b5aaec5a532c288e5aa05d57cd7ef9253 (commit)
  from  71cbca93a2641facfc6e231c44fe6500f55e1905 (commit)

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


- Log -
commit 041a00da8bf50e32f96d33661bf954901ab0f4b8
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Mon Aug 15 10:27:49 2011 +1000

new version 1.2.33

commit 6e6d286b5aaec5a532c288e5aa05d57cd7ef9253
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Mon Aug 15 10:23:50 2011 +1000

Change the default for ip failover to be LCP2 and not DeterministicIPs

---

Summary of changes:
 packaging/RPM/ctdb.spec.in |9 -
 server/ctdb_tunables.c |4 ++--
 2 files changed, 10 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in
index f397c67..0bd3be6 100644
--- a/packaging/RPM/ctdb.spec.in
+++ b/packaging/RPM/ctdb.spec.in
@@ -3,7 +3,7 @@ Name: ctdb
 Summary: Clustered TDB
 Vendor: Samba Team
 Packager: Samba Team sa...@samba.org
-Version: 1.2.32
+Version: 1.2.33
 Release: 1GITHASH
 Epoch: 0
 License: GNU GPL version 3
@@ -145,6 +145,13 @@ development libraries for ctdb
 %{_libdir}/libctdb.a
 
 %changelog
+* Mon Aug 15 2011 : Version 1.2.33
+ - Activate LCP2 by default
+ - LVS change to make the persistence timer longer
+ - Eventscripts: weaken the TCP checking if we have just started S1024874
+ - I/O queue buffer bug fix
+ - Remove log messages S1026357, S1026492
+ - 10.interface  dont check orphaned interfaces
 * Fri Jul 29 2011 : Version 1.2.32
  - Add new LCP2 ip allocation algorithm
  - Two fixes for 'ctdb delip ...' CQ S1026664 CQ S10226179
diff --git a/server/ctdb_tunables.c b/server/ctdb_tunables.c
index bd7834d..9da3cc8 100644
--- a/server/ctdb_tunables.c
+++ b/server/ctdb_tunables.c
@@ -45,8 +45,8 @@ static const struct {
{ DatabaseMaxDead,  5,  offsetof(struct ctdb_tunable, 
database_max_dead) },
{ RerecoveryTimeout,   10,  offsetof(struct ctdb_tunable, 
rerecovery_timeout) },
{ EnableBans,   1,  offsetof(struct ctdb_tunable, 
enable_bans) },
-   { DeterministicIPs, 1,  offsetof(struct ctdb_tunable, 
deterministic_public_ips) },
-   { LCP2PublicIPs,0,  offsetof(struct ctdb_tunable, 
lcp2_public_ip_assignment) },
+   { DeterministicIPs, 0,  offsetof(struct ctdb_tunable, 
deterministic_public_ips) },
+   { LCP2PublicIPs,1,  offsetof(struct ctdb_tunable, 
lcp2_public_ip_assignment) },
{ ReclockPingPeriod,   60,  offsetof(struct ctdb_tunable,  
reclock_ping_period) },
{ NoIPFailback, 0,  offsetof(struct ctdb_tunable, 
no_ip_failback) },
{ DisableIPFailover,0,  offsetof(struct ctdb_tunable, 
disable_ip_failover) },


-- 
CTDB repository


[SCM] CTDB repository - branch master updated - ctdb-1.10-392-ga2c30d8

2011-08-14 Thread Ronnie Sahlberg
The branch, master has been updated
   via  a2c30d88348da47d1a733a16e4c7d83c3becb6df (commit)
   via  4e670d9bc1bdeb2abd7e846bc36e02f0aa0d7309 (commit)
   via  92f8e31f6995836b1668639a4dac2862efee269a (commit)
   via  0d17daab38d4086f922a8006d4c545133adca191 (commit)
   via  845fb0ba24cf9118470c58fae7103ab8322ce079 (commit)
   via  2e30a2bb4371a846c7a768affa15883211642d5c (commit)
   via  f9899b1b96056d23628356589c855cf2262e5152 (commit)
   via  06b322ad6eff8d4e691f8e014b7d85983b261147 (commit)
   via  0680437bf5f02aeaed6387370e58bbdba2c04f28 (commit)
   via  038916248a73d6a250108c9235c0c4f76dba8e0c (commit)
   via  fc62bf0975c6059ee467285565d0dc3b4daaf238 (commit)
   via  35942841229cc72ce363a7236aec708f1a33136b (commit)
   via  cd1442531ad079b11c60f46ee9d34f5104bef219 (commit)
   via  5f49537889a92c3cb68d9203912188bedf00ecd4 (commit)
   via  3e145ab1bb61ed2087ec5ce6183ee24802686ed3 (commit)
   via  380c9263eb37db5a250264316e250c2160908263 (commit)
   via  7b201c1087b1433cfbc95de76cb4205e484ccd6f (commit)
   via  fa93177442c65c2a4eb2d5d5dba0a0da1c486969 (commit)
   via  3402930319d462eab5525410f6a676952e120182 (commit)
   via  ab443c4d7d282f282792abc6a6ac224ab06abe30 (commit)
   via  f654739080b40b7ac1b7f998cacc689d3d4e3193 (commit)
   via  9b66057964756a6245bafb436eb6106fb6a2866e (commit)
   via  2036764bfd1a4571fcfcca22099c2b9a95a02c57 (commit)
   via  9600cc7a6b7b854fac1a5b080129e3df8fcbd84e (commit)
   via  bd39b91ad12fd05271a7fced0e6f9d8c4eba92e6 (commit)
  from  84ac667af408816e5508719b9fdb7c5e25408640 (commit)

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


- Log -
commit a2c30d88348da47d1a733a16e4c7d83c3becb6df
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Mon Aug 15 15:53:04 2011 +1000

Change the errors for 10.interface to clearly state ERROR: for error 
messages

Update the tests system to catch the new error strings generated by this 
change

commit 4e670d9bc1bdeb2abd7e846bc36e02f0aa0d7309
Merge: 0d17daab38d4086f922a8006d4c545133adca191 
92f8e31f6995836b1668639a4dac2862efee269a
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Mon Aug 15 15:43:15 2011 +1000

Merge remote branch 'martins/eventscript_tests'

commit 92f8e31f6995836b1668639a4dac2862efee269a
Author: Martin Schwenke mar...@meltin.net
Date:   Mon Aug 15 15:40:35 2011 +1000

Tests - exportfs stub needs to print out export options.

This is needed due to bd39b91ad12fd05271a7fced0e6f9d8c4eba92e6.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 0d17daab38d4086f922a8006d4c545133adca191
Merge: 845fb0ba24cf9118470c58fae7103ab8322ce079 
fc62bf0975c6059ee467285565d0dc3b4daaf238
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Mon Aug 15 15:27:50 2011 +1000

Merge remote branch 'martins/eventscript.10.interface'

commit 845fb0ba24cf9118470c58fae7103ab8322ce079
Merge: 2e30a2bb4371a846c7a768affa15883211642d5c 
bd39b91ad12fd05271a7fced0e6f9d8c4eba92e6
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Mon Aug 15 15:22:20 2011 +1000

Merge remote branch 'martins/60_nfs_regression'

commit 2e30a2bb4371a846c7a768affa15883211642d5c
Merge: f9899b1b96056d23628356589c855cf2262e5152 
3e145ab1bb61ed2087ec5ce6183ee24802686ed3
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Mon Aug 15 15:20:18 2011 +1000

Merge remote branch 'martins/eventscript.60.nfs.rpc'

commit f9899b1b96056d23628356589c855cf2262e5152
Merge: 06b322ad6eff8d4e691f8e014b7d85983b261147 
0680437bf5f02aeaed6387370e58bbdba2c04f28
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Mon Aug 15 15:16:06 2011 +1000

Merge remote branch 'martins/test_suite'

commit 06b322ad6eff8d4e691f8e014b7d85983b261147
Merge: 038916248a73d6a250108c9235c0c4f76dba8e0c 
2036764bfd1a4571fcfcca22099c2b9a95a02c57
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Mon Aug 15 15:15:12 2011 +1000

Merge remote branch 'martins/eventscript_tests'

commit 0680437bf5f02aeaed6387370e58bbdba2c04f28
Author: Martin Schwenke mar...@meltin.net
Date:   Mon Aug 15 13:53:39 2011 +1000

Tests - ctdb listvars test should allow alphanumericals in tunable names.

This matches the new LCP2PublicIPs tunable.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 038916248a73d6a250108c9235c0c4f76dba8e0c
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Mon Aug 15 10:23:50 2011 +1000

Change the default for ip failover to be LCP2 and not DeterministicIPs

commit fc62bf0975c6059ee467285565d0dc3b4daaf238
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Jul 5 17:21:57 2011 +1000

Eventscripts: 10.interfaces - make startup event actually mark interfaces 
up!

The startup event intends to mark interfaces up.  However, it doesn't
actually do that because $INTERFACES is empty.

This uses the