[SCM] Samba Shared Repository - branch master updated

2012-09-23 Thread Volker Lendecke
The branch, master has been updated
   via  13c2878 s3-pylibsmb: Use Py_RETURN_NONE
  from  0991aed torture: More torture_assert() calls in rpc.lsa

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


- Log -
commit 13c28787ad22454ddd19e06ae680b8d5abb986c0
Author: Volker Lendecke 
Date:   Sun Sep 23 18:50:22 2012 -0700

s3-pylibsmb: Use Py_RETURN_NONE

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Mon Sep 24 08:09:53 CEST 2012 on sn-devel-104

---

Summary of changes:
 source3/libsmb/pylibsmb.c |   13 -
 1 files changed, 4 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c
index e357d0f..900d052 100644
--- a/source3/libsmb/pylibsmb.c
+++ b/source3/libsmb/pylibsmb.c
@@ -544,9 +544,7 @@ static PyObject *py_cli_get_oplock_break(struct 
py_cli_state *self,
 
return result;
}
-
-   Py_INCREF(Py_None);
-   return Py_None;
+   Py_RETURN_NONE;
 }
 
 static void py_cli_state_dealloc(struct py_cli_state *self)
@@ -628,8 +626,7 @@ static PyObject *py_cli_close(struct py_cli_state *self, 
PyObject *args)
PyErr_SetNTSTATUS(status);
return NULL;
}
-   Py_INCREF(Py_None);
-   return Py_None;
+   Py_RETURN_NONE;
 }
 
 static PyObject *py_cli_write(struct py_cli_state *self, PyObject *args,
@@ -733,8 +730,7 @@ static PyObject *py_cli_ftruncate(struct py_cli_state 
*self, PyObject *args,
PyErr_SetNTSTATUS(status);
return NULL;
}
-   Py_INCREF(Py_None);
-   return Py_None;
+   Py_RETURN_NONE;
 }
 
 static PyObject *py_cli_delete_on_close(struct py_cli_state *self,
@@ -765,8 +761,7 @@ static PyObject *py_cli_delete_on_close(struct py_cli_state 
*self,
PyErr_SetNTSTATUS(status);
return NULL;
}
-   Py_INCREF(Py_None);
-   return Py_None;
+   Py_RETURN_NONE;
 }
 
 static PyObject *py_cli_list(struct py_cli_state *self,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-09-23 Thread Andrew Bartlett
The branch, master has been updated
   via  0991aed torture: More torture_assert() calls in rpc.lsa
   via  a807a63 torture: use torture_assert rather than return false in 
rpc.lsa
   via  f0908c1 torture: tidy up rpc.lsa OpenPolicy2 test to more clearly 
use torture_fail()
   via  00b1267 build: Add missing dep on tdb_compat
   via  2e51c38 lib/replace: Look for special flags needed for c99
   via  0727ad7 lib/replace: Improve mkstemp test in autoconf and waf
  from  f767059 s3:winbindd fix a compiler warning

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


- Log -
commit 0991aed60c47ecbcb0d08368375f6ae2847c8f59
Author: Andrew Bartlett 
Date:   Mon Sep 24 09:20:59 2012 +1000

torture: More torture_assert() calls in rpc.lsa

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Mon Sep 24 05:27:46 CEST 2012 on sn-devel-104

commit a807a63f3d1d692d80d640f23ccb9bdbc7b6676f
Author: Andrew Bartlett 
Date:   Mon Sep 24 08:59:10 2012 +1000

torture: use torture_assert rather than return false in rpc.lsa

This will help ensure we always generate correct subunit failures.

Andrew Bartlett

commit f0908c1dc604b304a788261784a39d08cfb48760
Author: Andrew Bartlett 
Date:   Mon Sep 24 08:40:05 2012 +1000

torture: tidy up rpc.lsa OpenPolicy2 test to more clearly use torture_fail()

commit 00b12674685798f300e04d6d2e62f1cfa435c982
Author: Andrew Bartlett 
Date:   Mon Sep 24 07:06:53 2012 +1000

build: Add missing dep on tdb_compat

commit 2e51c386beff808e74c8c1f360a6f4db30fe74b5
Author: Andrew Bartlett 
Date:   Mon Sep 24 06:45:05 2012 +1000

lib/replace: Look for special flags needed for c99

This is normally handled by the waf core, but for HP-UX we currently fail.

The autoconf code hard-codes a case for HP-UX, but I want to try testing
it using a generic system first.

Andrew Bartlett

commit 0727ad73212ff3cfe7e78249504b0209e082d7c4
Author: Andrew Bartlett 
Date:   Mon Sep 24 06:03:31 2012 +1000

lib/replace: Improve mkstemp test in autoconf and waf

On the Sernet-solaris8 host, this test passed in the autoconf build,
then failed in the recursive waf build.  This newer test should probe
the behaviour more closely, by checking we get two distinct, secure
files.

Andrew Bartlett

---

Summary of changes:
 lib/replace/libreplace.m4 |   21 +++-
 lib/replace/wscript   |   27 -
 source4/ntvfs/posix/wscript_build |2 +-
 source4/torture/rpc/lsa.c |  241 +
 4 files changed, 126 insertions(+), 165 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4
index d298b92..796069c 100644
--- a/lib/replace/libreplace.m4
+++ b/lib/replace/libreplace.m4
@@ -212,12 +212,27 @@ AC_TRY_RUN([#include 
 #include 
 main() { 
   struct stat st;
-  char tpl[20]="/tmp/test.XX"; 
-  int fd = mkstemp(tpl); 
-  if (fd == -1) exit(1);
+  char tpl[20]="/tmp/test.XX";
+  char tpl2[20]="/tmp/test.XX";
+  int fd = mkstemp(tpl);
+  int fd2 = mkstemp(tpl2);
+  if (fd == -1) {
+if (fd2 != -1) {
+unlink(tpl2);
+}
+exit(1);
+  }
+  if (fd2 == -1) exit(1);
   unlink(tpl);
+  unlink(tpl2);
   if (fstat(fd, &st) != 0) exit(1);
   if ((st.st_mode & 0777) != 0600) exit(1);
+  if (strcmp(tpl, "/tmp/test.XX") == 0) {
+exit(1);
+  }
+  if (strcmp(tpl, tpl2) == 0) {
+exit(1);
+  }
   exit(0);
 }],
 libreplace_cv_HAVE_SECURE_MKSTEMP=yes,
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 2f632e1..d5b2631 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -43,6 +43,16 @@ def configure(conf):
 conf.DEFINE('_XOPEN_SOURCE', 600, add_to_cflags=True)
 conf.DEFINE('_BSD_TYPES', 1, add_to_cflags=True)
 
+# Try to find the right extra flags for C99 initialisers
+for f in ["", "-AC99", "-qlanglvl=extc99", "-qlanglvl=stdc99", "-c99"]:
+if conf.CHECK_CFLAGS([f], '''
+struct foo {int x;char y;};
+struct foo bar = { .y = 'X', .x = 1 };
+'''):
+if f != "":
+conf.ADD_CFLAGS(f)
+break
+
 conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
 conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
 conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
@@ -399,11 +409,26 @@ removeea setea
 conf.CHECK_CODE('''
 struct stat st;
 char tpl[20]="/tmp/test.XX";
+char tpl2[20]="/tmp/test.XX";
 int fd = mkstemp(tpl);
-if (fd == -1) exit(1);
+int fd2 = mkstemp(tpl2);
+if (fd == -1) {
+  

autobuild: intermittent test failure detected

2012-09-23 Thread autobuild
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2012-09-24-0432/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2012-09-24-0432/samba3.stderr
   http://git.samba.org/autobuild.flakey/2012-09-24-0432/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2012-09-24-0432/samba.stderr
   http://git.samba.org/autobuild.flakey/2012-09-24-0432/samba.stdout
  
The top commit at the time of the failure was:

commit f767059911460c0944d5e9289148a0776aeb97e5
Author: Christian Ambach 
Date:   Sat Sep 22 20:44:41 2012 -0700

s3:winbindd fix a compiler warning

about type potentially being used uninitialized

Autobuild-User(master): Christian Ambach 
Autobuild-Date(master): Mon Sep 24 03:49:53 CEST 2012 on sn-devel-104


[SCM] Samba Shared Repository - branch master updated

2012-09-23 Thread Christian Ambach
The branch, master has been updated
   via  f767059 s3:winbindd fix a compiler warning
   via  9f589ea s3:printing only do printing_subsystem_update when printing 
is enabled
  from  5f97363 s4:dns_server - introduce the wildcard binding feature

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


- Log -
commit f767059911460c0944d5e9289148a0776aeb97e5
Author: Christian Ambach 
Date:   Sat Sep 22 20:44:41 2012 -0700

s3:winbindd fix a compiler warning

about type potentially being used uninitialized

Autobuild-User(master): Christian Ambach 
Autobuild-Date(master): Mon Sep 24 03:49:53 CEST 2012 on sn-devel-104

commit 9f589ea4066099ed50e7f2323f572b3a8c98c60e
Author: Christian Ambach 
Date:   Sun Sep 23 08:39:49 2012 +0200

s3:printing only do printing_subsystem_update when printing is enabled

no point in calling this if printing was disabled and no spoolss service 
was started
this hurts CTDB clusters as the smbds on the cluster nodes will fight for 
the single record in the TDB

This fixes Bug 9197 - Disabling printing still makes smbd create and access 
printer_list.tdb

---

Summary of changes:
 source3/smbd/server.c|5 -
 source3/winbindd/winbindd_sids_to_xids.c |2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index d53b19a..15762d8 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -1529,7 +1529,10 @@ extern void build_options(bool screen);
 
/* do a printer update now that all messaging has been set up,
 * before we allow clients to start connecting */
-   printing_subsystem_update(ev_ctx, msg_ctx, false);
+   if (!lp__disable_spoolss() &&
+   (rpc_spoolss_daemon() != RPC_DAEMON_DISABLED)) {
+   printing_subsystem_update(ev_ctx, msg_ctx, false);
+   }
 
TALLOC_FREE(frame);
/* make sure we always have a valid stackframe */
diff --git a/source3/winbindd/winbindd_sids_to_xids.c 
b/source3/winbindd/winbindd_sids_to_xids.c
index ad02189..f500f24 100644
--- a/source3/winbindd/winbindd_sids_to_xids.c
+++ b/source3/winbindd/winbindd_sids_to_xids.c
@@ -239,7 +239,7 @@ NTSTATUS winbindd_sids_to_xids_recv(struct tevent_req *req,
num_non_cached = 0;
 
for (i=0; inum_sids; i++) {
-   char type;
+   char type = '\0';
uint32_t unix_id = UINT32_MAX;
bool found = true;
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-09-23 Thread Kai Blin
The branch, master has been updated
   via  5f97363 s4:dns_server - introduce the wildcard binding feature
  from  9e6070b s3-pylibsmb: Add get_oplock_break

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


- Log -
commit 5f973631b6baecf5f026d07dded9da15650e
Author: Matthias Dieter Wallnöfer 
Date:   Sun Aug 12 18:08:20 2012 +0200

s4:dns_server - introduce the wildcard binding feature

We need the wildcard binding feature otherwise we might get bound to a
private interface in case of multiple interfaces and no "interfaces"
parameter in smb.conf.

Code taken from source4/ldap_server/ldap_server.c

Signed-off-by: Kai Blin 

Autobuild-User(master): Kai Blin 
Autobuild-Date(master): Sun Sep 23 23:44:03 CEST 2012 on sn-devel-104

---

Summary of changes:
 source4/dns_server/dns_server.c |   38 --
 1 files changed, 28 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dns_server/dns_server.c b/source4/dns_server/dns_server.c
index c88ea83..dbdc300 100644
--- a/source4/dns_server/dns_server.c
+++ b/source4/dns_server/dns_server.c
@@ -669,13 +669,29 @@ static NTSTATUS dns_startup_interfaces(struct dns_server 
*dns, struct loadparm_c
return NT_STATUS_INTERNAL_ERROR;
}
 
-   num_interfaces = iface_list_count(ifaces);
+   if (ifaces != NULL) {
+   num_interfaces = iface_list_count(ifaces);
 
-   for (i=0; ilp_ctx, &ifaces);
+   if (lpcfg_interfaces(task->lp_ctx) && 
lpcfg_bind_interfaces_only(task->lp_ctx)) {
+   load_interface_list(task, task->lp_ctx, &ifaces);
 
-   if (iface_list_count(ifaces) == 0) {
-   task_server_terminate(task, "dns: no network interfaces 
configured", false);
-   return;
+   if (iface_list_count(ifaces) == 0) {
+   task_server_terminate(task, "dns: no network interfaces 
configured", false);
+   return;
+   }
}
 
task_server_set_title(task, "task[dns]");


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-09-23 Thread Volker Lendecke
The branch, master has been updated
   via  9e6070b s3-pylibsmb: Add get_oplock_break
   via  ff68408 s3-pylibsmb: Factor out py_tevent_cond_signal
   via  d0a0fb3 s3-pylibsmb: Reduce the number of warnings
   via  7305660 s3: Convert cli_oplock_break_waiter to smbXcli
   via  982ddc4 s3: Add "readdir" to pylibsmb
   via  a272635 s3: Fix some nonempty line endings
   via  e0fdeda s3-pylibsmb: move py_tevent_req_wait_exc up in the file
   via  9475205 s3-pylibsmb: Factor out py_tevent_cond_wait
  from  8e5f30c build: Remove unused define UNIXWARE

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


- Log -
commit 9e6070b5fcc17f0e866367c4d3f4dfcb95be6c46
Author: Volker Lendecke 
Date:   Sat Sep 22 10:45:32 2012 -0700

s3-pylibsmb: Add get_oplock_break

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Sun Sep 23 18:01:28 CEST 2012 on sn-devel-104

commit ff6840815d6e6252aa3fa27a4f04d992ab912d14
Author: Volker Lendecke 
Date:   Sat Sep 22 10:40:06 2012 -0700

s3-pylibsmb: Factor out py_tevent_cond_signal

commit d0a0fb32929e26ea9dd30cb3e2cacff03f68b9d2
Author: Volker Lendecke 
Date:   Sat Sep 22 10:38:46 2012 -0700

s3-pylibsmb: Reduce the number of warnings

commit 7305660c1139fc1d2dc40fb3324855ec7381eac5
Author: Volker Lendecke 
Date:   Sat Sep 22 18:57:47 2012 +0200

s3: Convert cli_oplock_break_waiter to smbXcli

commit 982ddc478551c3eb11a6d01acaea22fb60743d2a
Author: Volker Lendecke 
Date:   Mon Aug 20 14:38:42 2012 +0200

s3: Add "readdir" to pylibsmb

commit a272635b792a806f589cd5a6a3a345cdc855b4be
Author: Volker Lendecke 
Date:   Tue Sep 18 16:19:07 2012 -0700

s3: Fix some nonempty line endings

commit e0fdeda86cfc75cfe2bdd7dffeef7fc9e173c8aa
Author: Christian Ambach 
Date:   Sun Sep 16 11:39:26 2012 -0700

s3-pylibsmb: move py_tevent_req_wait_exc up in the file

this is needed to be able to use it in other functions and
spares the prototype

Pair-Programmed-With: Volker Lendecke 

commit 947520521ed3da2f0787e17a9fe906024fdee7e3
Author: Volker Lendecke 
Date:   Fri Sep 21 12:05:04 2012 -0700

s3-pylibsmb: Factor out py_tevent_cond_wait

---

Summary of changes:
 source3/libsmb/clioplock.c |   31 +++--
 source3/libsmb/pylibsmb.c  |  317 +---
 2 files changed, 291 insertions(+), 57 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clioplock.c b/source3/libsmb/clioplock.c
index 0b3ca2c..d9ab414 100644
--- a/source3/libsmb/clioplock.c
+++ b/source3/libsmb/clioplock.c
@@ -1,18 +1,18 @@
-/* 
+/*
Unix SMB/CIFS implementation.
SMB client oplock functions
Copyright (C) Andrew Tridgell 2001
-   
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-   
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
-   
+
You should have received a copy of the GNU General Public License
along with this program.  If not, see .
 */
@@ -47,7 +47,8 @@ struct tevent_req 
*cli_smb_oplock_break_waiter_send(TALLOC_CTX *mem_ctx,
 * Create a fake SMB request that we will never send out. This is only
 * used to be set into the pending queue with the right mid.
 */
-   subreq = cli_smb_req_create(mem_ctx, ev, cli, 0, 0, 0, NULL, 0, NULL);
+   subreq = smb1cli_req_create(mem_ctx, ev, cli->conn, 0, 0, 0, 0, 0, 0,
+   0, NULL, NULL, 0, NULL, 0, NULL);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
@@ -67,19 +68,31 @@ static void cli_smb_oplock_break_waiter_done(struct 
tevent_req *subreq)
subreq, struct tevent_req);
struct cli_smb_oplock_break_waiter_state *state = tevent_req_data(
req, struct cli_smb_oplock_break_waiter_state);
+   struct iovec *iov;
uint8_t wct;
uint16_t *vwv;
-   uint32_t num_bytes;
-   uint8_t *bytes;
NTSTATUS status;
 
-   status = cli_smb_recv(subreq, state, NULL, 8, &wct, &vwv,
- &num_bytes, &bytes);
+   status = smb1cli_req_recv(subreq, state,
+ &iov, /* piov */
+ NULL, /* phdr */
+ &wct,
+ &vwv,
+ NULL, /* pvwv_offset */
+ NULL, /* 

autobuild: intermittent test failure detected

2012-09-23 Thread autobuild
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2012-09-23-1628/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2012-09-23-1628/samba3.stderr
   http://git.samba.org/autobuild.flakey/2012-09-23-1628/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2012-09-23-1628/samba.stderr
   http://git.samba.org/autobuild.flakey/2012-09-23-1628/samba.stdout
  
The top commit at the time of the failure was:

commit 8e5f30c830c23d8223c38e34669f069e44fee64b
Author: Andrew Bartlett 
Date:   Sun Sep 23 14:37:24 2012 +1000

build: Remove unused define UNIXWARE

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Sun Sep 23 08:33:02 CEST 2012 on sn-devel-104