Rev 659: added some debug lines to help track down a problem in http://samba.org/~tridge/ctdb

2007-10-18 Thread tridge

revno: 659
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Thu 2007-10-18 16:27:36 +1000
message:
  added some debug lines to help track down a problem
modified:
  server/ctdb_recover.c  
ctdb_recover.c-20070503002147-admmfgt1oj6gexfo-1
  server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
=== modified file 'server/ctdb_recover.c'
--- a/server/ctdb_recover.c 2007-10-18 05:44:02 +
+++ b/server/ctdb_recover.c 2007-10-18 06:27:36 +
@@ -773,7 +773,7 @@
}
ctdb-recovery_lock_fd = open(ctdb-recovery_lock_file, O_RDWR|O_CREAT, 
0600);
if (ctdb-recovery_lock_fd == -1) {
-   DEBUG(0,(Unable to open %s - (%s)\n, 
+   DEBUG(0,(ctdb_recovery_lock: Unable to open %s - (%s)\n, 
 ctdb-recovery_lock_file, strerror(errno)));
return false;
}
@@ -789,6 +789,9 @@
if (fcntl(ctdb-recovery_lock_fd, F_SETLK, lock) != 0) {
close(ctdb-recovery_lock_fd);
ctdb-recovery_lock_fd = -1;
+   if (keep) {
+   DEBUG(0,(ctdb_recovery_lock: Failed to get recovery 
lock on '%s'\n, ctdb-recovery_lock_file));
+   }
return false;
}
 
@@ -797,5 +800,7 @@
ctdb-recovery_lock_fd = -1;
}
 
+   DEBUG(0,(ctdb_recovery_lock: Got recovery lock on '%s'\n, 
ctdb-recovery_lock_file));
+
return true;
 }

=== modified file 'server/ctdb_recoverd.c'
--- a/server/ctdb_recoverd.c2007-10-15 04:28:51 +
+++ b/server/ctdb_recoverd.c2007-10-18 06:27:36 +
@@ -806,6 +806,8 @@
uint32_t generation;
struct ctdb_dbid_map *dbmap;
 
+   DEBUG(0, (__location__  Starting do_recovery\n));
+
/* if recovery fails, force it again */
rec-need_recovery = true;
 
@@ -1511,6 +1513,8 @@
struct ctdb_all_public_ips *ips;
char c;
 
+   DEBUG(0,(monitor_cluster starting\n));
+
rec = talloc_zero(ctdb, struct ctdb_recoverd);
CTDB_NO_MEMORY_FATAL(ctdb, rec);
 



Re: svn commit: samba r25689 - in branches/SAMBA_4_0/source/torture/raw: .

2007-10-18 Thread Stefan (metze) Metzmacher
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[EMAIL PROTECTED] schrieb:
 Author: tridge
 Date: 2007-10-18 01:37:46 + (Thu, 18 Oct 2007)
 New Revision: 25689
 
 WebSVN: 
 http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25689
 
 Log:
 test with a non-zero size file

Hi Tridge,

wouldn't it be better to test with a zero file and with a non-zero one?
If there's a difference we should really test both.

metze

 
 Changeset:
 Modified: branches/SAMBA_4_0/source/torture/raw/oplock.c
 ===
 --- branches/SAMBA_4_0/source/torture/raw/oplock.c2007-10-17 18:26:40 UTC 
 (rev 25688)
 +++ branches/SAMBA_4_0/source/torture/raw/oplock.c2007-10-18 01:37:46 UTC 
 (rev 25689)
 @@ -1462,6 +1462,7 @@
   for (i=0;iARRAY_SIZE(hold_info);i++) {
   union smb_open io;
   NTSTATUS status;
 + char c = 1;
  
   io.generic.level = RAW_OPEN_NTCREATEX;
   io.ntcreatex.in.root_fid = 0;
 @@ -1493,6 +1494,12 @@
   return false;
   }
   hold_info[i].fnum = io.ntcreatex.out.file.fnum;
 +
 + /* make the file non-zero size */
 + if (smbcli_write(cli-tree, hold_info[i].fnum, 0, c, 0, 1) != 
 1) {
 + printf(Failed to write to file\n);
 + return false;
 + }
   }
  
   printf(Waiting for oplock events\n);
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFHFwSIm70gjA5TCD8RAjMmAJ9eRrGxez0aStpBQczwkoqUg39+DQCfVebd
KHLCo+AjH5wg9ScAHe7T1r8=
=RU1u
-END PGP SIGNATURE-


Re: svn commit: samba r25689 - in branches/SAMBA_4_0/source/torture/raw: .

2007-10-18 Thread tridge
Metze,

  wouldn't it be better to test with a zero file and with a non-zero one?
  If there's a difference we should really test both.

With current NFS v2/v3 servers and clients it will never work with a
zero length file, as the oplock break code gets called on read or
write, and the NFS client doesn't send any read or write requests for
zero length files.

With NFSv4 it can work with zero length files though, and you're right
that we could test with both when looking for correct interaction
between NFSv4 and CIFS.

Cheers, Tridge


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-66-gb474600

2007-10-18 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  b4746009735bf66b2578b884973c505b0363a79d (commit)
  from  315215e20e1e470c5077122a2e250ecb3d45ce9b (commit)

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


- Log -
commit b4746009735bf66b2578b884973c505b0363a79d
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Mon Jun 5 20:38:21 2006 +

r16050: Set the session key SystemLibraryDTC on ntlmssp binds. We only do 
INTEGRITY
and PRIVACY, so no other cases to take care of so far...

Andrew B., if you have time, could you take a look? This makes us survive 
the
RPC-SAMBA3SESSIONKEY test.

Volker
(cherry picked from commit 25cc1e7ff15675b70001d1cb8d8584880650dd2e)

---

Summary of changes:
 source/rpc_server/srv_pipe.c |   24 ++--
 1 files changed, 22 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/rpc_server/srv_pipe.c b/source/rpc_server/srv_pipe.c
index 72ce72f..c213ec5 100644
--- a/source/rpc_server/srv_pipe.c
+++ b/source/rpc_server/srv_pipe.c
@@ -45,6 +45,11 @@ static void free_pipe_ntlmssp_auth_data(struct 
pipe_auth_data *auth)
auth-a_u.auth_ntlmssp_state = NULL;
 }
 
+static DATA_BLOB generic_session_key(void)
+{
+   return data_blob(SystemLibraryDTC, 16);
+}
+
 /***
  Generate the next PDU to be returned from the data in p-rdata. 
  Handle NTLMSSP.
@@ -668,11 +673,13 @@ static BOOL pipe_ntlmssp_verify_final(pipes_struct *p, 
DATA_BLOB *p_resp_blob)
p-pipe_user.ut.gid = a-server_info-gid;

/*
-* Copy the session key from the ntlmssp state.
+* We're an authenticated bind over smbd, so the session key needs to
+* be set to SystemLibraryDTC. Weird, but this is what Windows
+* does. See the RPC-SAMBA3SESSIONKEY.
 */
 
data_blob_free(p-session_key);
-   p-session_key = data_blob(a-ntlmssp_state-session_key.data, 
a-ntlmssp_state-session_key.length);
+   p-session_key = generic_session_key();
if (!p-session_key.data) {
return False;
}
@@ -1351,8 +1358,21 @@ static BOOL pipe_schannel_auth_bind(pipes_struct *p, 
prs_struct *rpc_in_p,
 * JRA. Should we also copy the schannel session key into the pipe 
session key p-session_key
 * here ? We do that for NTLMSSP, but the session key is already set up 
from the vuser
 * struct of the person who opened the pipe. I need to test this 
further. JRA.
+*
+* VL. As we are mapping this to guest set the generic key
+* SystemLibraryDTC key here. It's a bit difficult to test against
+* W2k3, as it does not allow schannel binds against SAMR and LSA
+* anymore.
 */
 
+   data_blob_free(p-session_key);
+   p-session_key = generic_session_key();
+   if (p-session_key.data == NULL) {
+   DEBUG(0, (pipe_schannel_auth_bind: Could not alloc session
+  key\n));
+   return False;
+   }
+
init_rpc_hdr_auth(auth_info, RPC_SCHANNEL_AUTH_TYPE, 
pauth_info-auth_level, RPC_HDR_AUTH_LEN, 1);
if(!smb_io_rpc_hdr_auth(, auth_info, pout_auth, 0)) {
DEBUG(0,(pipe_schannel_auth_bind: marshalling of RPC_HDR_AUTH 
failed.\n));


-- 
Samba Shared Repository


Re: svn commit: samba r25689 - in branches/SAMBA_4_0/source/torture/raw: .

2007-10-18 Thread ronnie sahlberg
While most nfs clients (solaris,linux and bsd?) are careful and never
try to read beyond the end of file  based on the end-of-file field of
the GETATTR calls,

There are some nfs clients that are less careful (all versions of
HPUX and at least old versions of AIX) that always read a full nfs
page/block at a time.

This is perfectly ok in the nfs spec,   the server will just return
the partially requested data up to eof and have the eof flag set in
the read reply.

So if a file is reported as 5 bytes and the nfs blocksize is 8kb,
solaris, linux, bsd will do a read of only 5 bytes from offset 0
while hpux and (at least old versions of) aix will do a request to
read a full 8kb from offset.

in both cases the server will respond with 5 bytes of data and the eof flag set.


On 10/18/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Metze,

   wouldn't it be better to test with a zero file and with a non-zero one?
   If there's a difference we should really test both.

 With current NFS v2/v3 servers and clients it will never work with a
 zero length file, as the oplock break code gets called on read or
 write, and the NFS client doesn't send any read or write requests for
 zero length files.

 With NFSv4 it can work with zero length files though, and you're right
 that we could test with both when looking for correct interaction
 between NFSv4 and CIFS.

 Cheers, Tridge



svn commit: samba r25695 - in branches/SAMBA_4_0/source: heimdal_build lib/replace

2007-10-18 Thread metze
Author: metze
Date: 2007-10-18 08:34:19 + (Thu, 18 Oct 2007)
New Revision: 25695

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25695

Log:
[libreplace] fix the standalone build of libreplace

all configure results which are used in replace.h
or any system/*.h should be in the in the libreplace
*.m4 files!

metze
Modified:
   branches/SAMBA_4_0/source/heimdal_build/config.m4
   branches/SAMBA_4_0/source/lib/replace/libreplace.m4
   branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal_build/config.m4
===
--- branches/SAMBA_4_0/source/heimdal_build/config.m4   2007-10-18 05:47:11 UTC 
(rev 25694)
+++ branches/SAMBA_4_0/source/heimdal_build/config.m4   2007-10-18 08:34:19 UTC 
(rev 25695)
@@ -112,38 +112,6 @@
 #include sys/bswap.h
 #endif], 0)
 
-
-dnl AC_HAVE_TYPE(TYPE,INCLUDES)
-AC_DEFUN([AC_HAVE_TYPE], [
-AC_REQUIRE([AC_HEADER_STDC])
-cv=`echo $1 | sed 'y%./+- %__p__%'`
-AC_MSG_CHECKING(for $1)
-AC_CACHE_VAL([ac_cv_type_$cv],
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-AC_INCLUDES_DEFAULT
-$2]],
-[[$1 foo;]])],
-[eval ac_cv_type_$cv=yes],
-[eval ac_cv_type_$cv=no]))dnl
-ac_foo=`eval echo \\$ac_cv_type_$cv`
-AC_MSG_RESULT($ac_foo)
-if test $ac_foo = yes; then
-  ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- 
%ABCDEFGHIJKLMNOPQRSTUVWXYZ%'`
-if false; then
-   AC_CHECK_TYPES($1)
-fi
-  AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1'])
-fi
-])
-
-AC_HAVE_TYPE([sa_family_t],[#include sys/socket.h])
-AC_HAVE_TYPE([struct sockaddr], [#include sys/socket.h])
-AC_HAVE_TYPE([struct sockaddr_storage], [#include sys/socket.h])
-AC_HAVE_TYPE([struct addrinfo], [#include netdb.h])
-AC_HAVE_TYPE([struct ifaddrs], [#include ifaddrs.h])
-AC_HAVE_TYPE([socklen_t],[#include sys/socket.h])
-
-
 AC_DEFUN([AC_KRB_STRUCT_WINSIZE], [
 AC_MSG_CHECKING(for struct winsize)
 AC_CACHE_VAL(ac_cv_struct_winsize, [

Modified: branches/SAMBA_4_0/source/lib/replace/libreplace.m4
===
--- branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2007-10-18 05:47:11 UTC 
(rev 25694)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2007-10-18 08:34:19 UTC 
(rev 25695)
@@ -137,23 +137,20 @@
 AC_DEFINE(REPLACE_INET_NTOA,1,[Whether inet_ntoa should be replaced])
 fi
 
-dnl test for struct addrinfo
-AC_CACHE_CHECK([for struct addrinfo],samba_cv_HAVE_STRUCT_ADDRINFO,[
-AC_TRY_COMPILE([
+AC_HAVE_TYPE([socklen_t],[#include sys/socket.h])
+AC_HAVE_TYPE([sa_family_t],[#include sys/socket.h])
+AC_HAVE_TYPE([struct addrinfo], [#include netdb.h])
+AC_HAVE_TYPE([struct sockaddr], [#include sys/socket.h])
+AC_HAVE_TYPE([struct sockaddr_storage], [
+#include sys/socket.h
 #include sys/types.h
-#if STDC_HEADERS
-#include stdlib.h
-#include stddef.h
-#endif
+#include netinet/in.h
+])
+AC_HAVE_TYPE([struct sockaddr_in6], [
 #include sys/socket.h
-#include netdb.h],
-[
-struct addrinfo ai;
-],
-samba_cv_HAVE_STRUCT_ADDRINFO=yes,samba_cv_HAVE_STRUCT_ADDRINFO=no)])
-if test x$samba_cv_HAVE_STRUCT_ADDRINFO = xyes; then
-AC_DEFINE(HAVE_STRUCT_ADDRINFO,1,[Whether the system has struct addrinfo])
-fi
+#include sys/types.h
+#include netinet/in.h
+])
 
 dnl test for getaddrinfo/getnameinfo
 AC_CACHE_CHECK([for getaddrinfo],samba_cv_HAVE_GETADDRINFO,[
@@ -185,18 +182,6 @@
 AC_DEFINE(HAVE_GAI_STRERROR,1,[Whether the system has gai_strerror])
 fi
 
-
-dnl Provided by replace.c:
-AC_TRY_COMPILE([
-#include sys/types.h
-#if STDC_HEADERS
-#include stdlib.h
-#include stddef.h
-#endif
-#include sys/socket.h], 
-[socklen_t foo;],,
-[AC_DEFINE(socklen_t, int,[Socket length type])])
-
 AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror)
 AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename)
 AC_CHECK_FUNCS(waitpid strlcpy strlcat initgroups memmove strdup)

Modified: branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4
===
--- branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4  2007-10-18 
05:47:11 UTC (rev 25694)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4  2007-10-18 
08:34:19 UTC (rev 25695)
@@ -314,4 +314,25 @@
)
 ])
 
-
+dnl AC_HAVE_TYPE(TYPE,INCLUDES)
+AC_DEFUN([AC_HAVE_TYPE], [
+AC_REQUIRE([AC_HEADER_STDC])
+cv=`echo $1 | sed 'y%./+- %__p__%'`
+AC_MSG_CHECKING(for $1)
+AC_CACHE_VAL([ac_cv_type_$cv],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+AC_INCLUDES_DEFAULT
+$2]],
+[[$1 foo;]])],
+[eval ac_cv_type_$cv=yes],
+[eval ac_cv_type_$cv=no]))dnl
+ac_foo=`eval echo \\$ac_cv_type_$cv`
+AC_MSG_RESULT($ac_foo)
+if test $ac_foo = yes; then
+  ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- 
%ABCDEFGHIJKLMNOPQRSTUVWXYZ%'`
+if false; then
+   AC_CHECK_TYPES($1)
+fi
+  AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1'])
+fi
+])



[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-70-gd70ddad

2007-10-18 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  d70ddad2e8fc2f533fb9211223c172c25878254e (commit)
   via  f694df1919fe98c5efef36c867a2be6527efa6ed (commit)
  from  50d5eec508bd5b98b81825b4e20c06f698029fdf (commit)

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


- Log -
commit d70ddad2e8fc2f533fb9211223c172c25878254e
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Thu Oct 18 11:04:58 2007 +0200

don't skip some tests which samba3 passes (at least on my laptop)

metze

commit f694df1919fe98c5efef36c867a2be6527efa6ed
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Thu Oct 18 11:03:18 2007 +0200

make gdb_backtrace executable

metze

---

Summary of changes:
 source/script/tests/test_posix_s3.sh |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
 mode change 100644 = 100755 source/script/tests/gdb_backtrace


Changeset truncated at 500 lines:

diff --git a/source/script/tests/gdb_backtrace 
b/source/script/tests/gdb_backtrace
old mode 100644
new mode 100755
diff --git a/source/script/tests/test_posix_s3.sh 
b/source/script/tests/test_posix_s3.sh
index 11c4ed7..61205a5 100755
--- a/source/script/tests/test_posix_s3.sh
+++ b/source/script/tests/test_posix_s3.sh
@@ -49,11 +49,11 @@ fi
 
 tests=$base $raw $rpc $unix
 
-skipped=BASE-CHARSET BASE-DEFER_OPEN BASE-DELAYWRITE BASE-OPENATTR 
BASE-TCONDEV
+skipped=BASE-CHARSET BASE-DELAYWRITE BASE-TCONDEV
 skipped=$skipped RAW-ACLS RAW-COMPOSITE RAW-CONTEXT RAW-EAS
-skipped=$skipped RAW-IOCTL RAW-MUX
+skipped=$skipped RAW-IOCTL
 skipped=$skipped RAW-QFILEINFO RAW-QFSINFO RAW-SEARCH
-skipped=$skipped RAW-SFILEINFO RAW-STREAMS RAW-WRITE
+skipped=$skipped RAW-SFILEINFO RAW-STREAMS
 
 echo WARNING: Skipping tests $skipped
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-68-g50d5eec

2007-10-18 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  50d5eec508bd5b98b81825b4e20c06f698029fdf (commit)
   via  1eefa0264bb1a304a30ec4c7c6e2392c627ee6a3 (commit)
  from  b4746009735bf66b2578b884973c505b0363a79d (commit)

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


- Log -
commit 50d5eec508bd5b98b81825b4e20c06f698029fdf
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Thu Oct 18 10:55:59 2007 +0200

remove configure checks which are now in libreplace

metze

commit 1eefa0264bb1a304a30ec4c7c6e2392c627ee6a3
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Thu Oct 18 10:54:37 2007 +0200

[libreplace] fix the standalone build of libreplace

all configure results which are used in replace.h
or any system/*.h should be in the in the libreplace
*.m4 files!

metze

---

Summary of changes:
 source/configure.in |   62 ---
 source/lib/replace/libreplace.m4|   39 ++-
 source/lib/replace/libreplace_macros.m4 |   23 +++-
 3 files changed, 34 insertions(+), 90 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/configure.in b/source/configure.in
index d1a05d1..22989db 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -2939,40 +2939,6 @@ SMB_CHECK_SYSCONF(_SC_NPROCESSORS_ONLN)
 SMB_CHECK_SYSCONF(_SC_PAGESIZE)
 AC_CHECK_FUNCS(getpagesize)
 
-dnl test for socklen_t
-AC_CACHE_CHECK([for socklen_t],samba_cv_HAVE_SA_FAMILY_T,[
-AC_TRY_COMPILE([
-#include sys/types.h
-#include unistd.h
-#include sys/socket.h
-#include netinet/in.h
-#include arpa/inet.h
-],
-[
-socklen_t foo;
-],
-samba_cv_HAVE_SOCKLEN_T=yes,samba_cv_HAVE_SOCKLEN_T=no)])
-if test x$samba_cv_HAVE_SOCKLEN_T = xyes; then
-AC_DEFINE(HAVE_SOCKLEN_T,1,[Whether the system has socklen_t])
-fi
-
-dnl test for sa_family_t
-AC_CACHE_CHECK([for sa_family_t],samba_cv_HAVE_SA_FAMILY_T,[
-AC_TRY_COMPILE([
-#include sys/types.h
-#include unistd.h
-#include sys/socket.h
-#include netinet/in.h
-#include arpa/inet.h
-],
-[
-sa_family_t foo;
-],
-samba_cv_HAVE_SA_FAMILY_T=yes,samba_cv_HAVE_SA_FAMILY_T=no)])
-if test x$samba_cv_HAVE_SA_FAMILY_T = xyes; then
-AC_DEFINE(HAVE_SA_FAMILY_T,1,[Whether the system has sa_family_t])
-fi
-
 dnl test for getifaddrs and freeifaddrs
 AC_CACHE_CHECK([for getifaddrs and freeifaddrs],samba_cv_HAVE_GETIFADDRS,[
 AC_TRY_COMPILE([
@@ -3084,34 +3050,6 @@ if test x$samba_cv_HAVE_IPV6 = xyes; then
 AC_DEFINE(HAVE_IPV6,1,[Whether the system has IPv6 support])
 fi
 
-dnl test for struct sockaddr_storage
-AC_CACHE_CHECK([for struct 
sockaddr_storage],samba_cv_HAVE_STRUCT_SOCKADDR_STORAGE,[
-AC_TRY_COMPILE([
-#include sys/socket.h
-#include sys/types.h
-#include netinet/in.h],
-[
-struct sockaddr_storage sa_store;
-],
-samba_cv_HAVE_STRUCT_SOCKADDR_STORAGE=yes,samba_cv_HAVE_STRUCT_SOCKADDR_STORAGE=no)])
-if test x$samba_cv_HAVE_STRUCT_SOCKADDR_STORAGE = xyes; then
-AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE,1,[Whether the system has struct 
sockaddr_storage])
-fi
-
-dnl test for struct struct sockaddr_in6
-AC_CACHE_CHECK([for struct sockaddr_in6],samba_cv_HAVE_STRUCT_SOCKADDR_IN6,[
-AC_TRY_COMPILE([
-#include sys/socket.h
-#include sys/types.h
-#include netinet/in.h],
-[
-struct sockaddr_in6 sa6;
-],
-samba_cv_HAVE_STRUCT_SOCKADDR_IN6=yes,samba_cv_HAVE_STRUCT_SOCKADDR_IN6=no)])
-if test x$samba_cv_HAVE_STRUCT_SOCKADDR_IN6 = xyes; then
-AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6,1,[Whether the system has struct 
sockaddr_in6])
-fi
-
 
 # look for a method of setting the effective uid
 seteuid=no;
diff --git a/source/lib/replace/libreplace.m4 b/source/lib/replace/libreplace.m4
index 4bdbf3a..26b4c36 100644
--- a/source/lib/replace/libreplace.m4
+++ b/source/lib/replace/libreplace.m4
@@ -137,23 +137,20 @@ if test x$samba_cv_REPLACE_INET_NTOA = xyes; then
 AC_DEFINE(REPLACE_INET_NTOA,1,[Whether inet_ntoa should be replaced])
 fi
 
-dnl test for struct addrinfo
-AC_CACHE_CHECK([for struct addrinfo],samba_cv_HAVE_STRUCT_ADDRINFO,[
-AC_TRY_COMPILE([
+AC_HAVE_TYPE([socklen_t],[#include sys/socket.h])
+AC_HAVE_TYPE([sa_family_t],[#include sys/socket.h])
+AC_HAVE_TYPE([struct addrinfo], [#include netdb.h])
+AC_HAVE_TYPE([struct sockaddr], [#include sys/socket.h])
+AC_HAVE_TYPE([struct sockaddr_storage], [
+#include sys/socket.h
 #include sys/types.h
-#if STDC_HEADERS
-#include stdlib.h
-#include stddef.h
-#endif
+#include netinet/in.h
+])
+AC_HAVE_TYPE([struct sockaddr_in6], [
 #include sys/socket.h
-#include netdb.h],
-[
-struct addrinfo ai;
-],
-samba_cv_HAVE_STRUCT_ADDRINFO=yes,samba_cv_HAVE_STRUCT_ADDRINFO=no)])
-if test x$samba_cv_HAVE_STRUCT_ADDRINFO = xyes; then
-AC_DEFINE(HAVE_STRUCT_ADDRINFO,1,[Whether the system has struct addrinfo])
-fi
+#include sys/types.h
+#include netinet/in.h
+])
 
 

Re: svn commit: samba r25674 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3: .

2007-10-18 Thread Rafal Szczesniak
On Wed, Oct 17, 2007 at 08:26:55AM +, [EMAIL PROTECTED] wrote:
 Author: metze
 Date: 2007-10-17 08:26:55 + (Wed, 17 Oct 2007)
 New Revision: 25674
 
 WebSVN: 
 http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25674

[...]
 I've tested with midl to see how windows handles this situation
 and also the reverse case where the client sends NULL and
 the server reposnse with non-NULL.
 
 It appears that midl generated code just ignores this
 and only copies the result if both pointers are non-NULL.

Did midl ignore all cases but the one where both pointers were non-NULL
at the same time ? I'm not sure right now, but midl shouldn't have
problems with [in,out] pointer set to NULL on either in or out
direction (as long as it's not ref pointer).


cheers,
-- 
Rafal Szczesniak
Samba Team member  http://www.samba.org



signature.asc
Description: Digital signature


svn commit: samba r25696 - in branches/SAMBA_4_0/source/librpc/idl: .

2007-10-18 Thread gd
Author: gd
Date: 2007-10-18 09:44:25 + (Thu, 18 Oct 2007)
New Revision: 25696

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25696

Log:
Fix pipe name for dfs.

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/dfs.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/dfs.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/dfs.idl2007-10-18 08:34:19 UTC 
(rev 25695)
+++ branches/SAMBA_4_0/source/librpc/idl/dfs.idl2007-10-18 09:44:25 UTC 
(rev 25696)
@@ -8,7 +8,7 @@
   version(3.0),
   pointer_default(unique),
   helpstring(Settings for Microsoft Distributed File System),
-  endpoint(ncacn_np:[\\pipe\\dfs], ncacn_ip_tcp:, ncalrpc:)
+  endpoint(ncacn_np:[\\pipe\\netdfs], ncacn_ip_tcp:, ncalrpc:)
 ] interface netdfs
 {
/**/



Re: svn commit: samba r25674 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3: .

2007-10-18 Thread Stefan (metze) Metzmacher
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rafal Szczesniak schrieb:
 On Wed, Oct 17, 2007 at 08:26:55AM +, [EMAIL PROTECTED] wrote:
 Author: metze
 Date: 2007-10-17 08:26:55 + (Wed, 17 Oct 2007)
 New Revision: 25674

 WebSVN: 
 http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25674

 [...]
 I've tested with midl to see how windows handles this situation
 and also the reverse case where the client sends NULL and
 the server reposnse with non-NULL.

 It appears that midl generated code just ignores this
 and only copies the result if both pointers are non-NULL.
 
 Did midl ignore all cases but the one where both pointers were non-NULL
 at the same time ? I'm not sure right now, but midl shouldn't have
 problems with [in,out] pointer set to NULL on either in or out
 direction (as long as it's not ref pointer).

with this idl:

void fn01([in,out,unique] long *v);

the client application has this prototype available:

void fn01(long *v);

So if the client application passes NULL, it won't be able
to get the value if the server reponses with a non-NULL pointer.

If the client application passes non-NULL and the server reponses
with NULL, the client apps was no way to find out if the server,
returned NULL or just echoed back the value from the client.

And now the samba3 client stubs do the same.

metze
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFHFznvm70gjA5TCD8RAgciAKCs1HXvtmV887LP03+cviM+Wz++0QCfSiFM
hagOV2SUXh4UnMcItLxuZls=
=5s+A
-END PGP SIGNATURE-


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-71-g2972c97

2007-10-18 Thread Volker Lendecke
The branch, v3-2-test has been updated
   via  2972c97e5e676964585de930601f083c19080735 (commit)
  from  d70ddad2e8fc2f533fb9211223c172c25878254e (commit)

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


- Log -
commit 2972c97e5e676964585de930601f083c19080735
Author: Karolin Seeger [EMAIL PROTECTED]
Date:   Thu Oct 18 13:00:46 2007 +0200

Add net rap file user

---

Summary of changes:
 source/libsmb/clirap2.c |5 -
 source/utils/net_rap.c  |   24 ++--
 2 files changed, 22 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/clirap2.c b/source/libsmb/clirap2.c
index 2311300..b8fe31a 100644
--- a/source/libsmb/clirap2.c
+++ b/source/libsmb/clirap2.c
@@ -1021,7 +1021,10 @@ int cli_NetFileGetInfo(struct cli_state *cli, uint32 
file_id, void (*fn)(const c
 * False - failure
 *
 /
-int cli_NetFileEnum(struct cli_state *cli, char * user, char * base_path, void 
(*fn)(const char *, const char *, uint16, uint16, uint32))
+int cli_NetFileEnum(struct cli_state *cli, const char * user,
+   const char * base_path,
+   void (*fn)(const char *, const char *, uint16, uint16,
+  uint32))
 {
   char *rparam = NULL;
   char *rdata = NULL;
diff --git a/source/utils/net_rap.c b/source/utils/net_rap.c
index 74eda61..b4de374 100644
--- a/source/utils/net_rap.c
+++ b/source/utils/net_rap.c
@@ -108,11 +108,23 @@ static int rap_file_info(int argc, const char **argv)
 
 static int rap_file_user(int argc, const char **argv)
 {
+   struct cli_state *cli;
+   int ret;
+
if (argc == 0)
return net_rap_file_usage(argc, argv);
 
-   d_fprintf(stderr, net rap file user not implemented yet\n);
-   return -1;
+   if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, cli)))
+   return -1;
+
+   /* list open files */
+
+   d_printf(\nEnumerating open files on remote server:\n\n
+\nFileId  Opened byPerms  Locks  Path \n
+--  --  -   \n);
+   ret = cli_NetFileEnum(cli, argv[0], NULL, file_fn);
+   cli_shutdown(cli);
+   return ret;
 }
 
 int net_rap_file(int argc, const char **argv)
@@ -132,10 +144,10 @@ int net_rap_file(int argc, const char **argv)
 return -1;
 
/* list open files */
-   d_printf(
-\nEnumerating open files on remote server:\n\n\
-\nFileId  Opened byPerms  Locks  Path \n\
---  --  -   \n);
+
+   d_printf(\nEnumerating open files on remote server:\n\n
+\nFileId  Opened byPerms  Locks  Path \n
+--  --  -   \n);
ret = cli_NetFileEnum(cli, NULL, NULL, file_fn);
cli_shutdown(cli);
return ret;


-- 
Samba Shared Repository


svn commit: samba-docs r1193 - in trunk/manpages-3: .

2007-10-18 Thread kseeger
Author: kseeger
Date: 2007-10-18 11:55:09 + (Thu, 18 Oct 2007)
New Revision: 1193

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-docsrev=1193

Log:
Add comment about net rpc|rap file user (implemented now)
Karolin
Modified:
   trunk/manpages-3/net.8.xml


Changeset:
Modified: trunk/manpages-3/net.8.xml
===
--- trunk/manpages-3/net.8.xml  2007-10-17 13:20:22 UTC (rev 1192)
+++ trunk/manpages-3/net.8.xml  2007-10-18 11:55:09 UTC (rev 1193)
@@ -333,9 +333,13 @@
 /refsect3
 
 refsect3
-title[RAP|RPC] FILE USER/title
+title[RAP|RPC] FILE USER replaceableuser/replaceable/title
 
-not.implemented;
+para
+List files opened by specified replaceableuser/replaceable.
+Please note that commandnet rap file user/command does not work
+against Samba servers. 
+/para
 
 /refsect3
 



svn commit: samba-docs r1194 - in trunk/manpages-3: .

2007-10-18 Thread obnox
Author: obnox
Date: 2007-10-18 12:47:49 + (Thu, 18 Oct 2007)
New Revision: 1194

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-docsrev=1194

Log:
Add documentation for the net conf commands to the manpage.

Michael


Modified:
   trunk/manpages-3/net.8.xml


Changeset:
Modified: trunk/manpages-3/net.8.xml
===
--- trunk/manpages-3/net.8.xml  2007-10-18 11:55:09 UTC (rev 1193)
+++ trunk/manpages-3/net.8.xml  2007-10-18 12:47:49 UTC (rev 1194)
@@ -1355,6 +1355,148 @@
 /refsect2
 
 refsect2
+titleCONF/title
+
+paraStarting with version 3.2.0, a Samba server can be configured by data
+stored in registry. This configuration data can be edited with the new net
+conf commands.
+/para
+
+para
+The deployment of this configuration data can be activated in two levels from 
the
+emphasissmb.conf/emphasis file: Share definitions from registry are
+activated by setting parameterregistry shares/parameter to
+quoteyes/quote in the [global] section and global configuration options are
+activated by setting smbconfoption name=includeregistry/smbconfoption in
+the [global] section.
+See the citerefentryrefentrytitlesmb.conf/refentrytitle
+manvolnum5/manvolnum/citerefentry manpage for details.
+/para
+
+paraThe conf commands are:
+simplelist
+membernet conf list - Dump the complete configuration in smb.conf like
+format./member
+membernet conf import - Import configuration from file in smb.conf
+format./member
+membernet conf listshares - List the registry shares./member
+membernet conf drop - Delete the complete configuration from
+registry./member
+membernet conf showshare - Show the definition of a registry share./member
+membernet conf addshare - Create a new registry share./member
+membernet conf delshare - Delete a registry share./member
+membernet conf setparm - Store a parameter./member
+membernet conf getparm - Retrieve the value of a parameter./member
+membernet conf delparm - Delete a parameter./member
+/simplelist
+/para
+
+refsect3
+titleCONF LIST/title
+
+para
+Print the configuration data stored in the registry in a smb.conf-like format 
to
+standard output.
+/para
+/refsect3
+
+refsect3
+titleCONF IMPORT replaceable[--test|-T]/replaceable 
replaceablefilename/replaceable replaceable[section]/replaceable/title
+
+para
+This command imports configuration from a file in smb.conf format.
+If a section encountered in the input file is present in registry,
+its contents is replaced. Sections of registry configuration that have
+no counterpart in the input file are not affected. If you want to delete these,
+you will have to use the net conf drop or net conf delshare commands.
+Optionally, a section may be specified to restrict the effect of the
+import command to that specific section. A test mode is enabled by specifying
+the parameter -T on the commandline. In test mode, no changes are made to the
+registry, and the resulting configuration is printed to standard output 
instead.
+/para
+/refsect3
+
+refsect3
+titleCONF LISTSHARES/title
+
+para
+List the names of the shares defined in registry.
+/para
+/refsect3
+
+refsect3
+titleCONF DROP/title
+
+para
+Delete the complete configuration data from registry.
+/para
+/refsect3
+
+refsect3
+titleCONF SHOWSHARE replaceablesharename/replaceable/title
+
+para
+Show the definition of the share or section specified. It is valid to specify
+global as sharename to retrieve the global configuration options from
+registry.
+/para
+/refsect3
+
+refsect3
+titleCONF ADDSHARE replaceablesharename/replaceable 
replaceablepath/replaceable [replaceablewriteable={y|N}/replaceable 
[replaceableguest_ok={y|N}/replaceable 
[replaceablecomment/replaceable]]] /title
+
+paraCreate a new share definition in registry.
+The sharename and path have to be given. The share name may
+emphasisnot/emphasis be global. Optionally, values for the very
+common options writeable, guest ok and a comment may be specified.
+The same result may be obtained by a sequence of net conf setparm
+commands.
+/para
+/refsect3
+
+refsect3
+titleCONF DELSHARE replaceablesharename/replaceable/title
+
+para
+Delete a share definition from registry.
+/para
+/refsect3
+
+refsect3
+titleCONF SETPARM replaceablesection/replaceable 
replaceableparameter/replaceable replaceablevalue/replaceable/title
+
+para
+Store a parameter in registry. The section may be global or a sharename.
+The section is created if it does not exist yet.
+/para
+/refsect3
+
+refsect3
+titleCONF GETPARM replaceablesection/replaceable 
replaceableparameter/replaceable/title
+
+para
+Show a parameter stored in registry.
+/para
+/refsect3
+
+refsect3
+titleCONF DELPARM replaceablesection/replaceable 
replaceableparameter/replaceable/title
+
+para
+Delete a parameter stored in registry.
+/para
+/refsect3
+
+refsect3
+title/title
+
+para
+/para
+/refsect3
+
+/refsect2
+
+refsect2
 titleHELP [COMMAND]/title
 
 paraGives usage information for the specified 

svn commit: samba r25697 - in branches/SAMBA_4_0/source/build/smb_build: .

2007-10-18 Thread metze
Author: metze
Date: 2007-10-18 13:27:48 + (Thu, 18 Oct 2007)
New Revision: 25697

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25697

Log:
make *clean doesn't work after a svn up when some *.mk files were removed

the error is:
SAMBA_4_0/source make clean
make: *** No rule to make target `lib/ldb/samba/config.mk', needed by 
`Makefile'.  Stop.

the problem is:
Makefile: config.status $(MK_FILES)
./config.status

so now we let the MK_FILES variable empty for the *clean targets
if gnu make is detected, we should later test if this construct
is portable to other make implementations and remove the check for gnu make.

metze
Modified:
   branches/SAMBA_4_0/source/build/smb_build/env.pm
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/env.pm
===
--- branches/SAMBA_4_0/source/build/smb_build/env.pm2007-10-18 09:44:25 UTC 
(rev 25696)
+++ branches/SAMBA_4_0/source/build/smb_build/env.pm2007-10-18 13:27:48 UTC 
(rev 25697)
@@ -50,6 +50,7 @@
}

$self-{developer} = ($self-{config}-{developer} eq yes);
+   $self-{gnu_make} = ($self-{config}-{GNU_MAKE} eq yes);
$self-{automatic_deps} = ($self-{config}-{automatic_dependencies} eq 
yes);
 }
 

Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2007-10-18 
09:44:25 UTC (rev 25696)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2007-10-18 
13:27:48 UTC (rev 25697)
@@ -231,7 +231,23 @@
push (@tmp, $_);
}
 
+   if ($self-{gnu_make}) {
+   $self-output(
+ifneq (\$(MAKECMDGOALS),clean)
+ifneq (\$(MAKECMDGOALS),distclean)
+ifneq (\$(MAKECMDGOALS),realdistclean)
+);
+   }
+
$self-output(MK_FILES =  . array2oneperline([EMAIL PROTECTED]) . 
\n);
+
+   if ($self-{gnu_make}) {
+   $self-output(
+endif
+endif
+endif
+);
+   }
 }
 
 sub array2oneperline($)



[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-72-gea3173a

2007-10-18 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  ea3173a9457f9095a70d401abfd1af8c913211a0 (commit)
  from  2972c97e5e676964585de930601f083c19080735 (commit)

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


- Log -
commit ea3173a9457f9095a70d401abfd1af8c913211a0
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Thu Oct 18 16:52:26 2007 +0200

remove reference to removed code

see commit 9e5ad21e6793981a01f63f2de1c4d496ade0bb54

metze

---

Summary of changes:
 source/include/printing.h |4 
 1 files changed, 0 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/printing.h b/source/include/printing.h
index 4cd2ea6..2efc65d 100644
--- a/source/include/printing.h
+++ b/source/include/printing.h
@@ -72,10 +72,6 @@ extern struct printifcups_printif;
 extern struct printif  iprint_printif;
 #endif /* HAVE_IPRINT */
 
-#if defined(DEVELOPER) || defined(ENABLE_BUILD_FARM_HACKS)
-extern struct printif test_printif;
-#endif /* DEVELOPER||ENABLE_BUILD_FARM_HACKS */
-
 /* PRINT_MAX_JOBID is now defined in local.h */
 #define UNIX_JOB_START PRINT_MAX_JOBID
 #define NEXT_JOBID(j) ((j+1) % PRINT_MAX_JOBID  0 ? (j+1) % PRINT_MAX_JOBID : 
1)


-- 
Samba Shared Repository


svn commit: samba r25698 - in branches/SAMBA_4_0/source: lib/registry/tools rpc_server/lsa torture/winbind

2007-10-18 Thread metze
Author: metze
Date: 2007-10-18 19:25:58 + (Thu, 18 Oct 2007)
New Revision: 25698

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25698

Log:
ignore some generated files

metze
Modified:
   branches/SAMBA_4_0/source/lib/registry/tools/
   branches/SAMBA_4_0/source/rpc_server/lsa/
   branches/SAMBA_4_0/source/torture/winbind/


Changeset:

Property changes on: branches/SAMBA_4_0/source/lib/registry/tools
___
Name: svn:ignore
   - .sconsign
*.d

   + common.h
*.d



Property changes on: branches/SAMBA_4_0/source/rpc_server/lsa
___
Name: svn:ignore
   - .sconsign
*.d

   + proto.h
*.d



Property changes on: branches/SAMBA_4_0/source/torture/winbind
___
Name: svn:ignore
   + proto.h
*.d



svn commit: samba r25699 - in branches/SAMBA_4_0/source: librpc/idl torture/rpc

2007-10-18 Thread gd
Author: gd
Date: 2007-10-18 21:23:25 + (Thu, 18 Oct 2007)
New Revision: 25699

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25699

Log:
Add ForceReplication test.

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/frsapi.idl
   branches/SAMBA_4_0/source/torture/rpc/frsapi.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/frsapi.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/frsapi.idl 2007-10-18 19:25:58 UTC 
(rev 25698)
+++ branches/SAMBA_4_0/source/librpc/idl/frsapi.idl 2007-10-18 21:23:25 UTC 
(rev 25699)
@@ -94,8 +94,8 @@
/* Function 0x0a */
/* not supported before w2k3 sp2 */
WERROR frsapi_ForceReplication(
-   [in] uint32 unknown1,
-   [in] uint32 unknown2,
+   [in,unique] GUID *guid1,
+   [in,unique] GUID *guid2,
[in,unique] [charset(UTF16),string] uint16 *replica_set,
[in,unique] [charset(UTF16),string] uint16 *partner_name
);

Modified: branches/SAMBA_4_0/source/torture/rpc/frsapi.c
===
--- branches/SAMBA_4_0/source/torture/rpc/frsapi.c  2007-10-18 19:25:58 UTC 
(rev 25698)
+++ branches/SAMBA_4_0/source/torture/rpc/frsapi.c  2007-10-18 21:23:25 UTC 
(rev 25699)
@@ -24,6 +24,7 @@
 #include torture/rpc/rpc.h
 #include librpc/gen_ndr/ndr_frsapi_c.h
 #include torture/util.h
+#include param/param.h
 
 static bool test_GetDsPollingIntervalW(struct torture_context *tctx,
   struct dcerpc_pipe *p,
@@ -150,16 +151,17 @@
FRSAPI_REPLICA_SET_TYPE_DOMAIN,
FRSAPI_REPLICA_SET_TYPE_DFS };
int i;
+   bool ret = true;
 
if (!test_IsPathReplicated_err(tctx, p, NULL, 0,
   WERR_FRS_INVALID_SERVICE_PARAMETER)) {
-   return false;
+   ret = false;
}
 
for (i=0; iARRAY_SIZE(lvls); i++) {
if (!_test_IsPathReplicated(tctx, p, dcerpc_server_name(p),
lvls[i])) {
-   return false;
+   ret = false;
}
}
 
@@ -167,7 +169,7 @@
const char *path = talloc_asprintf(tctx, %s\\SYSVOL,
   dcerpc_server_name(p));
if (!_test_IsPathReplicated(tctx, p, path, lvls[i])) {
-   return false;
+   ret = false;
}
}
 
@@ -175,10 +177,33 @@
if (!_test_IsPathReplicated(tctx, p,
C:\\windows\\sysvol\\domain,
lvls[i])) {
-   return false;
+   ret = false;
}
}
 
+   return ret;
+}
+
+static bool test_ForceReplication(struct torture_context *tctx,
+ struct dcerpc_pipe *p)
+{
+   struct frsapi_ForceReplication r;
+
+   ZERO_STRUCT(r);
+
+   r.in.guid1 = NULL;
+   r.in.guid2 = NULL;
+   r.in.replica_set = talloc_asprintf(tctx, %s,
+  lp_realm(global_loadparm));
+   r.in.partner_name = dcerpc_server_name(p);
+
+   torture_assert_ntstatus_ok(tctx,
+   dcerpc_frsapi_ForceReplication(p, tctx, r),
+   ForceReplication failed);
+
+   torture_assert_werr_ok(tctx, r.out.result,
+  ForceReplication failed);
+
return true;
 }
 
@@ -197,5 +222,9 @@
test = torture_rpc_tcase_add_test(tcase, IsPathReplicated,
  test_IsPathReplicated);
 
+   test = torture_rpc_tcase_add_test(tcase, ForceReplication,
+ test_ForceReplication);
+
+
return suite;
 }



svn commit: samba r25703 - in branches/SAMBA_4_0/source/auth/credentials: .

2007-10-18 Thread abartlet
Author: abartlet
Date: 2007-10-19 05:41:32 + (Fri, 19 Oct 2007)
New Revision: 25703

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25703

Log:
Use less entropy by using the pointer value as a process-unique token.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/auth/credentials/credentials_krb5.c


Changeset:
Modified: branches/SAMBA_4_0/source/auth/credentials/credentials_krb5.c
===
--- branches/SAMBA_4_0/source/auth/credentials/credentials_krb5.c   
2007-10-19 05:40:00 UTC (rev 25702)
+++ branches/SAMBA_4_0/source/auth/credentials/credentials_krb5.c   
2007-10-19 05:41:32 UTC (rev 25703)
@@ -199,23 +199,15 @@
 static int cli_credentials_new_ccache(struct cli_credentials *cred, struct 
ccache_container **_ccc)
 {
krb5_error_code ret;
-   char *rand_string;
struct ccache_container *ccc = talloc(cred, struct ccache_container);
char *ccache_name;
if (!ccc) {
return ENOMEM;
}
 
-   rand_string = generate_random_str(NULL, 16);
-   if (!rand_string) {
-   talloc_free(ccc);
-   return ENOMEM;
-   }
+   ccache_name = talloc_asprintf(ccc, MEMORY:%p, 
+ ccc);
 
-   ccache_name = talloc_asprintf(ccc, MEMORY:%s, 
- rand_string);
-   talloc_free(rand_string);
-
if (!ccache_name) {
talloc_free(ccc);
return ENOMEM;



svn commit: samba r25701 - in branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .

2007-10-18 Thread abartlet
Author: abartlet
Date: 2007-10-19 05:39:08 + (Fri, 19 Oct 2007)
New Revision: 25701

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25701

Log:
Clarify comment

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/partition.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/partition.c
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/partition.c
2007-10-19 00:40:51 UTC (rev 25700)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/partition.c
2007-10-19 05:39:08 UTC (rev 25701)
@@ -238,7 +238,7 @@
}
}
 
-   /* Spray off search requests to all backends */
+   /* Spray off search requests the backend */
ret = ldb_next_request(backend, req);
if (ret != LDB_SUCCESS) {
return ret;



Rev 662: increase release number in http://samba.org/~tridge/ctdb

2007-10-18 Thread tridge

revno: 662
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Fri 2007-10-19 12:22:24 +1000
message:
  increase release number
modified:
  packaging/RPM/ctdb.specctdb.spec-20070527204758-biuh7znabuwan3zn-3
=== modified file 'packaging/RPM/ctdb.spec'
--- a/packaging/RPM/ctdb.spec   2007-10-16 10:14:04 +
+++ b/packaging/RPM/ctdb.spec   2007-10-19 02:22:24 +
@@ -5,7 +5,7 @@
 Packager: Samba Team [EMAIL PROTECTED]
 Name: ctdb
 Version: 1.0
-Release: 12
+Release: 13
 Epoch: 0
 License: GNU GPL version 3
 Group: System Environment/Daemons



Rev 660: remove a incorrectly added file in http://samba.org/~tridge/ctdb

2007-10-18 Thread tridge

revno: 660
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Fri 2007-10-19 09:30:55 +1000
message:
  remove a incorrectly added file
removed:
  lib/talloc/talloc.h.rejtalloc.h.rej-20070125040949-7t3f5zdl1q4z9hyv-53
=== removed file 'lib/talloc/talloc.h.rej'
--- a/lib/talloc/talloc.h.rej   2007-01-25 04:10:40 +
+++ b/lib/talloc/talloc.h.rej   1970-01-01 00:00:00 +
@@ -1,36 +0,0 @@
-***
-*** 80,106 
-  #define talloc_destroy(ctx) talloc_free(ctx)
-  #endif
-  
-- #ifndef PRINTF_ATTRIBUTE
-- #if (__GNUC__ = 3)
-- /** Use gcc attribute to check printf fns.  a1 is the 1-based index of
--  * the parameter containing the format, and a2 the index of the first
--  * argument. Note that some gcc 2.x versions don't handle this
--  * properly **/
-- #define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, 
a2)))
-- /* We need __typeof__ to make this type-safe. */
-- #define talloc_set_destructor(ptr, function)  \
--  do { \
--  int (*_talloc_destructor_fn)(typeof(ptr)) = (function); \
--  _talloc_set_destructor((ptr), _talloc_destructor_fn);\
--  } while(0)
-- #else
-- #define PRINTF_ATTRIBUTE(a1, a2)
-- #define talloc_set_destructor(ptr, function) \
--  _talloc_set_destructor((ptr), (int (*)(void *))(function))
-- #endif
-- #endif
-- 
-- 
-  /* The following definitions come from talloc.c  */
-  void *_talloc(const void *context, size_t size);
-  void _talloc_set_destructor(const void *ptr, int (*destructor)(void *));
 103,108 
-  #define talloc_destroy(ctx) talloc_free(ctx)
-  #endif
-  
-  /* The following definitions come from talloc.c  */
-  void *_talloc(const void *context, size_t size);
-  void _talloc_set_destructor(const void *ptr, int (*destructor)(void *));



[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-73-gf35a266

2007-10-18 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f (commit)
  from  ea3173a9457f9095a70d401abfd1af8c913211a0 (commit)

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


- Log -
commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Thu Oct 18 17:40:25 2007 -0700

RIP BOOL. Convert BOOL - bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.

---

Summary of changes:
 examples/VFS/shadow_copy_test.c  |2 +-
 examples/VFS/skel_opaque.c   |8 +-
 examples/VFS/skel_transparent.c  |8 +-
 source/auth/auth.c   |8 +-
 source/auth/auth_compat.c|8 +-
 source/auth/auth_domain.c|6 +-
 source/auth/auth_ntlmssp.c   |4 +-
 source/auth/auth_sam.c   |   10 +-
 source/auth/auth_server.c|   10 +-
 source/auth/auth_unix.c  |4 +-
 source/auth/auth_util.c  |   50 ++--
 source/auth/pampass.c|   24 +-
 source/auth/pass_check.c |8 +-
 source/auth/token_util.c |8 +-
 source/client/client.c   |   68 ++--
 source/client/clitar.c   |   38 +-
 source/client/smbctool.c |   64 ++--
 source/client/smbmount.c |   18 +-
 source/client/smbspool.c |2 +-
 source/groupdb/mapping.c |   18 +-
 source/groupdb/mapping.h |   16 +-
 source/groupdb/mapping_ldb.c |   24 +-
 source/groupdb/mapping_tdb.c |   26 +-
 source/include/ads_protos.h  |   12 +-
 source/include/adt_tree.h|8 +-
 source/include/asn_1.h   |2 +-
 source/include/auth.h|   10 +-
 source/include/client.h  |   20 +-
 source/include/ctdbd_conn.h  |2 +-
 source/include/debug.h   |6 +-
 source/include/idmap.h   |6 +-
 source/include/includes.h|   15 +-
 source/include/libmsrpc.h|   22 +-
 source/include/libmsrpc_internal.h   |6 +-
 source/include/libsmb_internal.h |   14 +-
 source/include/locking.h |4 +-
 source/include/mangle.h  |   12 +-
 source/include/messages.h|2 +-
 source/include/msdfs.h   |2 +-
 source/include/nameserv.h|   30 +-
 source/include/nt_printing.h |   12 +-
 source/include/nt_status.h   |2 +-
 source/include/ntdomain.h|   30 +-
 source/include/ntlmssp.h |6 +-
 source/include/ntquotas.h|2 +-
 source/include/packet.h  |4 +-
 source/include/passdb.h  |   34 +-
 source/include/popt_common.h |4 +-
 source/include/printing.h|4 +-
 source/include/privileges.h  |7 +-
 source/include/reg_objects.h |6 +-
 source/include/regfio.h  |2 +-
 source/include/rpc_misc.h|2 +-
 source/include/smb.h |   96 +++---
 source/include/smb_ldap.h|8 +-
 source/include/smbldap.h |8 +-
 source/include/smbprofile.h  |4 +-
 source/include/util_tdb.h|   21 +-
 source/include/vfs.h |9 +-
 source/intl/lang_tdb.c   |6 +-
 source/lib/account_pol.c |   18 +-
 source/lib/adt_tree.c|6 +-
 source/lib/afs.c |8 +-
 source/lib/afs_settoken.c|   10 +-
 source/lib/audit.c   |2 +-
 source/lib/bitmap.c  |6 +-
 source/lib/charcnv.c |   12 +-
 source/lib/conn_tdb.c|4 +-
 source/lib/ctdbd_conn.c  |4 +-
 source/lib/debug.c   |   42 ++--
 source/lib/dummysmbd.c   |2 +-
 source/lib/events.c  |   10 +-
 source/lib/file_id.c |2 +-
 source/lib/gencache.c|   22 +-
 source/lib/genrand.c |4 +-
 source/lib/iconv.c   |4 +-
 source/lib/messages.c|2 +-
 source/lib/module.c  |2 +-
 source/lib/ms_fnmatch.c  |6 +-
 source/lib/packet.c  |4 +-
 source/lib/popt_common.c |8 +-
 source/lib/privileges.c   

Build status as of Fri Oct 19 00:00:02 2007

2007-10-18 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-10-18 
00:01:05.0 +
+++ /home/build/master/cache/broken_results.txt 2007-10-19 00:01:03.0 
+
@@ -1,4 +1,4 @@
-Build status as of Thu Oct 18 00:00:02 2007
+Build status as of Fri Oct 19 00:00:02 2007
 
 Build counts:
 Tree Total  Broken Panic 
@@ -7,8 +7,8 @@
 ccache   28 11 0 
 ctdb 0  0  0 
 distcc   1  0  0 
-ldb  27 23 0 
-libreplace   27 21 0 
+ldb  28 25 0 
+libreplace   27 12 0 
 lorikeet-heimdal 21 14 0 
 pidl 15 2  0 
 ppp  8  7  0 
@@ -16,10 +16,10 @@
 rsync28 13 0 
 samba-docs   0  0  0 
 samba-gtk2  2  0 
-samba4   25 18 4 
+samba4   25 17 4 
 samba_3_20  0  0 
-samba_3_2_test 26 25 1 
+samba_3_2_test 26 19 1 
 smb-build27 27 0 
-talloc   28 19 0 
-tdb  28 21 0 
+talloc   28 22 0 
+tdb  28 23 0 
 


Rev 661: merge from ronnie in http://samba.org/~tridge/ctdb

2007-10-18 Thread tridge

revno: 661
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Fri 2007-10-19 09:39:07 +1000
message:
  merge from ronnie
modified:
  ib/ibw_ctdb_init.c 
ibw_ctdb_init.c-20070102171305-cn2z4k7ibx8141d5-1
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
  server/ctdb_server.c   ctdb.c-20061127094323-t50f58d65iaao5of-2
  tcp/tcp_init.c tcp_init.c-20061128004937-x70q1cu5xzg5g2tm-2

revno: 432.1.326
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Fri 2007-10-19 09:05:37 +1000
message:
  add  missing ) in the IB transport (which i dont compile for)
modified:
  ib/ibw_ctdb_init.c 
ibw_ctdb_init.c-20070102171305-cn2z4k7ibx8141d5-1

revno: 432.1.325
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Fri 2007-10-19 09:04:52 +1000
message:
  add a stub restart method for IB
modified:
  ib/ibw_ctdb_init.c 
ibw_ctdb_init.c-20070102171305-cn2z4k7ibx8141d5-1

revno: 432.1.324
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Fri 2007-10-19 08:58:30 +1000
message:
  add a new transport method so that when a node is marked as dead, we 
  shut down and restart the transport
  
  othervise, if we use the tcp transport the tcp connection might try to 
  retransmit the queued data during the time the node is unavailable.
  this together with the exponential backoff for tcp means that the tcp 
  connection quickly reaches the maximum backoff rto which is often 60 or 
  120 seconds.   this would mean that it could take up to 60/120 seconds 
  before the tcp layer detects that the connection is dead and it has to 
  be reestablished.
modified:
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
  server/ctdb_server.c   ctdb.c-20061127094323-t50f58d65iaao5of-2
  tcp/tcp_init.c 
tcp_init.c-20061128004937-x70q1cu5xzg5g2tm-2

revno: 432.1.323
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Thu 2007-10-18 16:54:00 +1000
message:
  set the flags explicitely isnstead of masking them in
modified:
  server/ctdb_server.c   ctdb.c-20061127094323-t50f58d65iaao5of-2

revno: 432.1.322
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Thu 2007-10-18 15:53:50 +1000
message:
  merge from tridge
modified:
  server/ctdb_recover.c  
ctdb_recover.c-20070503002147-admmfgt1oj6gexfo-1
=== modified file 'ib/ibw_ctdb_init.c'
--- a/ib/ibw_ctdb_init.c2007-07-10 05:46:05 +
+++ b/ib/ibw_ctdb_init.c2007-10-18 23:05:37 +
@@ -177,6 +177,12 @@
return rc;
 }
 
+static void ctdb_ibw_restart(struct ctdb_node *node)
+{
+   /* TODO: implement this method for IB */
+   DEBUG(0,(WARNING: method restart is not yet implemented for IB\n));
+}
+
 /*
  * transport packet allocator - allows transport to control memory for packets
  */
@@ -204,6 +210,7 @@
.queue_pkt = ctdb_ibw_queue_pkt,
.add_node = ctdb_ibw_add_node,
.allocate_pkt = ctdb_ibw_allocate_pkt,
+   .restart  = ctdb_ibw_restart,
 
 // .stop = ctdb_ibw_stop
 };

=== modified file 'include/ctdb_private.h'
--- a/include/ctdb_private.h2007-10-16 02:15:02 +
+++ b/include/ctdb_private.h2007-10-18 22:58:30 +
@@ -207,6 +207,7 @@
int (*queue_pkt)(struct ctdb_node *, uint8_t *data, uint32_t length);
void *(*allocate_pkt)(TALLOC_CTX *mem_ctx, size_t );
void (*shutdown)(struct ctdb_context *); /* shutdown transport */
+   void (*restart)(struct ctdb_node *); /* stop and restart the connection 
*/
 };
 
 /*

=== modified file 'server/ctdb_server.c'
--- a/server/ctdb_server.c  2007-10-10 00:45:22 +
+++ b/server/ctdb_server.c  2007-10-18 22:58:30 +
@@ -120,7 +120,7 @@
node-pnn = ctdb-num_nodes;
 
/* nodes start out disconnected and unhealthy */
-   node-flags |= 

svn commit: samba r25700 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3: .

2007-10-18 Thread jra
Author: jra
Date: 2007-10-19 00:40:51 + (Fri, 19 Oct 2007)
New Revision: 25700

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25700

Log:
Now BOOL no longer exists in Samba 3.2, use bool instead.
Jeremy.

Modified:
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm   
2007-10-18 21:23:25 UTC (rev 25699)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm   
2007-10-19 00:40:51 UTC (rev 25700)
@@ -84,7 +84,7 @@
 
my $op = NDR_.uc($fn-{NAME});
 
-   pidl static BOOL api_$fn-{NAME}(pipes_struct *p);
+   pidl static bool api_$fn-{NAME}(pipes_struct *p);
pidl {;
indent;
pidl const struct ndr_interface_call *call;;



Rev 654: increase release number in http://samba.org/~tridge/3_0-ctdb

2007-10-18 Thread tridge

revno: 654
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: s3-ctdb-tridge
timestamp: Fri 2007-10-19 12:22:49 +1000
message:
  increase release number
modified:
  packaging/RHEL4-CTDB/samba.spec samba.spec-20070530192107-og9sp62ho5xuaaer-4
=== modified file 'packaging/RHEL4-CTDB/samba.spec'
--- a/packaging/RHEL4-CTDB/samba.spec   2007-10-17 06:47:38 +
+++ b/packaging/RHEL4-CTDB/samba.spec   2007-10-19 02:22:49 +
@@ -6,7 +6,7 @@
 Packager: Samba Team [EMAIL PROTECTED]
 Name: samba
 Version:  3.0.25
-Release:  ctdb.5
+Release:  ctdb.6
 Epoch:0
 License: GNU GPL version 2
 Group: System Environment/Daemons



Rev 653: allow sync on close to be disabled, using syncops:onclose = no in http://samba.org/~tridge/3_0-ctdb

2007-10-18 Thread tridge

revno: 653
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: s3-ctdb-tridge
timestamp: Fri 2007-10-19 12:19:09 +1000
message:
  allow sync on close to be disabled, using syncops:onclose = no
modified:
  source/modules/vfs_syncops.c   vfs_syncops.c-20071016091912-7y95np83tib2zgxn-1
=== modified file 'source/modules/vfs_syncops.c'
--- a/source/modules/vfs_syncops.c  2007-10-16 10:24:59 +
+++ b/source/modules/vfs_syncops.c  2007-10-19 02:19:09 +
@@ -33,6 +33,8 @@
   operations safely.  
  */
 
+static bool sync_onclose;
+
 /*
   given a filename, find the parent directory
  */
@@ -153,7 +155,7 @@
 /* close needs to be handled specially */
 static int syncops_close(vfs_handle_struct *handle, files_struct *fsp, int fd)
 {
-   if (fsp-can_write) {
+   if (fsp-can_write  sync_onclose) {
/* ideally we'd only do this if we have written some
 data, but there is no flag for that in fsp yet. */
fsync(fd);
@@ -190,5 +192,7 @@
if (!NT_STATUS_IS_OK(ret))
return ret;
 
+   sync_onclose = lp_parm_bool(-1, syncops, onclose, True);
+   
return ret;
 }



svn commit: samba r25702 - in branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .

2007-10-18 Thread abartlet
Author: abartlet
Date: 2007-10-19 05:40:00 + (Fri, 19 Oct 2007)
New Revision: 25702

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25702

Log:
Clarify comments and make this module more strict on objectclasses.
This is becoming the schema module...

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/objectclass.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/objectclass.c
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/objectclass.c  
2007-10-19 05:39:08 UTC (rev 25701)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/objectclass.c  
2007-10-19 05:40:00 UTC (rev 25702)
@@ -217,16 +217,14 @@
 * the bottom here */
} while (parent_class);
 
-   /* This shouldn't happen, and would break MMC, but we can't
-* afford to loose objectClasses.  Perhaps there was no 'top',
-* or some other schema error? 
-*
-* Detecting schema errors is the job of the schema module, so
-* at this layer we just try not to loose data
-*/
-   DLIST_CONCATENATE(sorted, unsorted, struct class_list *);
-
-   *sorted_out = sorted;
+   if (unsorted) {
+   /* This shouldn't happen, and would break MMC, but we can't
+* afford to loose objectClasses.  Perhaps there was no 'top',
+* or some other schema error? 
+*/
+   ldb_asprintf_errstring(module-ldb, objectclass %s is not a 
valid objectClass in objectClass chain, unsorted-objectclass);
+   return LDB_ERR_OBJECT_CLASS_VIOLATION;
+   }
return LDB_SUCCESS;
 }
 
@@ -397,6 +395,7 @@
case LDB_FLAG_MOD_DELETE:
/* Delete everything?  Probably totally illigal, but hey! */
if (objectclass_element-num_values == 0) {
+   
return ldb_next_request(module, req);
}
break;
@@ -474,6 +473,10 @@
}
}
 
+   /* This isn't the default branch of the switch, but a 'in any
+* other case'.  When a delete isn't for all objectClasses for
+* example
+*/
{
struct ldb_handle *h;
struct oc_context *ac;