svn commit: samba r25893 - in branches/SAMBA_4_0/source/lib: ldb/ldb_tdb tdb/common tdb/tools

2007-11-06 Thread jra
Author: jra
Date: 2007-11-07 07:13:44 + (Wed, 07 Nov 2007)
New Revision: 25893

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25893

Log:
Fix ldb, tdb builds (and one warning).
Jeremy.

Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb.h
   branches/SAMBA_4_0/source/lib/tdb/common/io.c
   branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb.h
===
--- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb.h 2007-11-07 06:59:02 UTC 
(rev 25892)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb.h 2007-11-07 07:13:44 UTC 
(rev 25893)
@@ -1,6 +1,8 @@
 #if (_SAMBA_BUILD_ == 3)
 #include "tdb/include/tdb.h"
 #else
+#include "replace.h"
+#include "system/wait.h"
 #include "tdb.h"
 #endif
 

Modified: branches/SAMBA_4_0/source/lib/tdb/common/io.c
===
--- branches/SAMBA_4_0/source/lib/tdb/common/io.c   2007-11-07 06:59:02 UTC 
(rev 25892)
+++ branches/SAMBA_4_0/source/lib/tdb/common/io.c   2007-11-07 07:13:44 UTC 
(rev 25893)
@@ -96,7 +96,7 @@
 "%d of %d bytes at %d, trying once more\n",
 (int)written, len, off));
errno = ENOSPC;
-   written = pwrite(tdb->fd, (void *)((char *)buf+written),
+   written = pwrite(tdb->fd, (const void *)((const char 
*)buf+written),
 len-written,
 off+written);
}

Modified: branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c
===
--- branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c2007-11-07 
06:59:02 UTC (rev 25892)
+++ branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c2007-11-07 
07:13:44 UTC (rev 25893)
@@ -3,10 +3,10 @@
 */
 
 #include "replace.h"
-#include "tdb.h"
 #include "system/time.h"
 #include "system/wait.h"
 #include "system/filesys.h"
+#include "tdb.h"
 
 #ifdef HAVE_GETOPT_H
 #include 



[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-220-gc14db81

2007-11-06 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  c14db81be5212dfa6fbcf8bfdcf725d7db3376ca (commit)
  from  ecc2555197860ae56726724ec824fc149d2d831c (commit)

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


- Log -
commit c14db81be5212dfa6fbcf8bfdcf725d7db3376ca
Author: Jeremy Allison <[EMAIL PROTECTED]>
Date:   Tue Nov 6 23:13:11 2007 -0800

Fix tdbtorture build.
Jeremy.

---

Summary of changes:
 source/lib/tdb/tools/tdbtorture.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/tdb/tools/tdbtorture.c 
b/source/lib/tdb/tools/tdbtorture.c
index ca71c73..9265cf0 100644
--- a/source/lib/tdb/tools/tdbtorture.c
+++ b/source/lib/tdb/tools/tdbtorture.c
@@ -3,10 +3,10 @@
 */
 
 #include "replace.h"
-#include "tdb.h"
 #include "system/time.h"
 #include "system/wait.h"
 #include "system/filesys.h"
+#include "tdb.h"
 
 #ifdef HAVE_GETOPT_H
 #include 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-219-gecc2555

2007-11-06 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  ecc2555197860ae56726724ec824fc149d2d831c (commit)
  from  ab11c0055761e97ba32a8c3ec4fa6f8763a262cd (commit)

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


- Log -
commit ecc2555197860ae56726724ec824fc149d2d831c
Author: Jeremy Allison <[EMAIL PROTECTED]>
Date:   Tue Nov 6 23:09:31 2007 -0800

Fix const warning.
Jeremy.

---

Summary of changes:
 source/lib/tdb/common/io.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/tdb/common/io.c b/source/lib/tdb/common/io.c
index c963e66..8ab0768 100644
--- a/source/lib/tdb/common/io.c
+++ b/source/lib/tdb/common/io.c
@@ -96,7 +96,7 @@ static int tdb_write(struct tdb_context *tdb, tdb_off_t off,
 "%d of %d bytes at %d, trying once more\n",
 (int)written, len, off));
errno = ENOSPC;
-   written = pwrite(tdb->fd, (void *)((char *)buf+written),
+   written = pwrite(tdb->fd, (const void *)((const char 
*)buf+written),
 len-written,
 off+written);
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-0-test updated - initial-v3-0-unstable-14-g3480b42

2007-11-06 Thread Jeremy Allison
The branch, v3-0-test has been updated
   via  3480b42be1adc7c2876a77e8260049447338c3ff (commit)
  from  c3fbfc37b578b8107be1f585cf6e3e2d001f7ab1 (commit)

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


- Log -
commit 3480b42be1adc7c2876a77e8260049447338c3ff
Author: Jeremy Allison <[EMAIL PROTECTED]>
Date:   Tue Nov 6 21:48:01 2007 -0800

Fix bug where tdb lock call interrupted with
an alarm sig would not terminate and could lead
to runaway smbd processes.
Thanks to Dave Daugherty @ Centrify for pointing
this out to us.
Jeremy.

---

Summary of changes:
 source/lib/replace/replace.h |4 
 source/lib/replace/system/wait.h |4 
 source/lib/util_tdb.c|2 ++
 source/tdb/common/lock.c |   12 
 source/tdb/common/tdb_private.h  |2 ++
 source/tdb/include/tdb.h |2 ++
 6 files changed, 26 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/replace/replace.h b/source/lib/replace/replace.h
index b96356a..c298b36 100644
--- a/source/lib/replace/replace.h
+++ b/source/lib/replace/replace.h
@@ -79,6 +79,10 @@
 #include 
 #endif
 
+#if !defined(HAVE_VOLATILE)
+#define volatile
+#endif
+
 /**
   this is a warning hack. The idea is to use this everywhere that we
   get the "discarding const" warning from gcc. That doesn't actually
diff --git a/source/lib/replace/system/wait.h b/source/lib/replace/system/wait.h
index 179ef07..074675d 100644
--- a/source/lib/replace/system/wait.h
+++ b/source/lib/replace/system/wait.h
@@ -44,4 +44,8 @@
 #define SA_RESETHAND SA_ONESHOT
 #endif
 
+#if !defined(HAVE_SIG_ATOMIC_T_TYPE)
+typedef int sig_atomic_t;
+#endif
+
 #endif
diff --git a/source/lib/util_tdb.c b/source/lib/util_tdb.c
index a1b5bf5..48e34e0 100644
--- a/source/lib/util_tdb.c
+++ b/source/lib/util_tdb.c
@@ -68,6 +68,7 @@ static int tdb_chainlock_with_timeout_internal( TDB_CONTEXT 
*tdb, TDB_DATA key,
 
if (timeout) {
CatchSignal(SIGALRM, SIGNAL_CAST gotalarm_sig);
+   tdb_setalarm_sigptr(tdb, &gotalarm);
alarm(timeout);
}
 
@@ -78,6 +79,7 @@ static int tdb_chainlock_with_timeout_internal( TDB_CONTEXT 
*tdb, TDB_DATA key,
 
if (timeout) {
alarm(0);
+   tdb_setalarm_sigptr(tdb, NULL);
CatchSignal(SIGALRM, SIGNAL_CAST SIG_IGN);
if (gotalarm) {
DEBUG(0,("tdb_chainlock_with_timeout_internal: alarm 
(%u) timed out for key %s in tdb %s\n",
diff --git a/source/tdb/common/lock.c b/source/tdb/common/lock.c
index 8a96437..3bc0a9c 100644
--- a/source/tdb/common/lock.c
+++ b/source/tdb/common/lock.c
@@ -28,6 +28,11 @@
 
 #include "tdb_private.h"
 
+void tdb_setalarm_sigptr(struct tdb_context *tdb, volatile sig_atomic_t *ptr)
+{
+   tdb->interrupt_sig_ptr = ptr;
+}
+
 /* a byte range locking function - return 0 on success
this functions locks/unlocks 1 byte at the specified offset.
 
@@ -59,6 +64,13 @@ int tdb_brlock(struct tdb_context *tdb, tdb_off_t offset,
 
do {
ret = fcntl(tdb->fd,lck_type,&fl);
+
+   /* Check for a sigalarm break. */
+   if (ret == -1 && errno == EINTR &&
+   tdb->interrupt_sig_ptr &&
+   *tdb->interrupt_sig_ptr) {
+   break;
+   }
} while (ret == -1 && errno == EINTR);
 
if (ret == -1) {
diff --git a/source/tdb/common/tdb_private.h b/source/tdb/common/tdb_private.h
index 10bc6da..8442242 100644
--- a/source/tdb/common/tdb_private.h
+++ b/source/tdb/common/tdb_private.h
@@ -29,6 +29,7 @@
 #include "system/time.h"
 #include "system/shmem.h"
 #include "system/select.h"
+#include "system/wait.h"
 #include "tdb.h"
 
 #ifndef u32
@@ -170,6 +171,7 @@ struct tdb_context {
struct tdb_transaction *transaction;
int page_size;
int max_dead_records;
+   volatile sig_atomic_t *interrupt_sig_ptr;
 };
 
 
diff --git a/source/tdb/include/tdb.h b/source/tdb/include/tdb.h
index 51bf709..3bd30b8 100644
--- a/source/tdb/include/tdb.h
+++ b/source/tdb/include/tdb.h
@@ -138,6 +138,8 @@ int tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key);
 int tdb_chainlock_read(struct tdb_context *tdb, TDB_DATA key);
 int tdb_chainunlock_read(struct tdb_context *tdb, TDB_DATA key);
 
+void tdb_setalarm_sigptr(struct tdb_context *tdb, volatile sig_atomic_t 
*sigptr);
+
 /* Debug functions. Not used in production. */
 void tdb_dump_all(struct tdb_context *tdb);
 int tdb_printfreelist(struct tdb_context *tdb);


-- 
Samba Shared Repository


svn commit: samba r25892 - in branches/SAMBA_4_0/source/lib: replace replace/system tdb/common tdb/include tdb/tools

2007-11-06 Thread jra
Author: jra
Date: 2007-11-07 06:59:02 + (Wed, 07 Nov 2007)
New Revision: 25892

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25892

Log:
Keep the tdb code in sync between 3.2.x and 4.0.
Add in the alarm fix to allow locks to exit on
alarm signal.
Sync up the changes in tools.
Jeremy.

Modified:
   branches/SAMBA_4_0/source/lib/replace/replace.h
   branches/SAMBA_4_0/source/lib/replace/system/wait.h
   branches/SAMBA_4_0/source/lib/tdb/common/io.c
   branches/SAMBA_4_0/source/lib/tdb/common/lock.c
   branches/SAMBA_4_0/source/lib/tdb/common/tdb_private.h
   branches/SAMBA_4_0/source/lib/tdb/include/tdb.h
   branches/SAMBA_4_0/source/lib/tdb/tools/tdbbackup.c
   branches/SAMBA_4_0/source/lib/tdb/tools/tdbdump.c
   branches/SAMBA_4_0/source/lib/tdb/tools/tdbtool.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/replace.h
===
--- branches/SAMBA_4_0/source/lib/replace/replace.h 2007-11-07 05:35:16 UTC 
(rev 25891)
+++ branches/SAMBA_4_0/source/lib/replace/replace.h 2007-11-07 06:59:02 UTC 
(rev 25892)
@@ -452,6 +452,10 @@
 #define MAX(a,b) ((a)>(b)?(a):(b))
 #endif
 
+#if !defined(HAVE_VOLATILE)
+#define volatile
+#endif
+
 /**
   this is a warning hack. The idea is to use this everywhere that we
   get the "discarding const" warning from gcc. That doesn't actually

Modified: branches/SAMBA_4_0/source/lib/replace/system/wait.h
===
--- branches/SAMBA_4_0/source/lib/replace/system/wait.h 2007-11-07 05:35:16 UTC 
(rev 25891)
+++ branches/SAMBA_4_0/source/lib/replace/system/wait.h 2007-11-07 06:59:02 UTC 
(rev 25892)
@@ -48,4 +48,8 @@
 #define SA_RESETHAND SA_ONESHOT
 #endif
 
+#if !defined(HAVE_SIG_ATOMIC_T_TYPE)
+typedef int sig_atomic_t;
 #endif
+
+#endif

Modified: branches/SAMBA_4_0/source/lib/tdb/common/io.c
===
--- branches/SAMBA_4_0/source/lib/tdb/common/io.c   2007-11-07 05:35:16 UTC 
(rev 25891)
+++ branches/SAMBA_4_0/source/lib/tdb/common/io.c   2007-11-07 06:59:02 UTC 
(rev 25892)
@@ -94,7 +94,7 @@
/* try once more */
TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_write: wrote only "
 "%d of %d bytes at %d, trying once more\n",
-written, len, off));
+(int)written, len, off));
errno = ENOSPC;
written = pwrite(tdb->fd, (void *)((char *)buf+written),
 len-written,
@@ -274,11 +274,13 @@
return -1;
} else if (written == -1) {
TDB_LOG((tdb, TDB_DEBUG_FATAL, "expand_file write of "
-   "%d bytes failed (%s)\n", n, strerror(errno)));
+"%d bytes failed (%s)\n", (int)n,
+strerror(errno)));
return -1;
} else if (written != n) {
TDB_LOG((tdb, TDB_DEBUG_WARNING, "expand_file: wrote "
-   "only %d of %d bytes - retrying\n", written,n));
+"only %d of %d bytes - retrying\n", 
(int)written,
+(int)n));
}
addition -= written;
size += written;

Modified: branches/SAMBA_4_0/source/lib/tdb/common/lock.c
===
--- branches/SAMBA_4_0/source/lib/tdb/common/lock.c 2007-11-07 05:35:16 UTC 
(rev 25891)
+++ branches/SAMBA_4_0/source/lib/tdb/common/lock.c 2007-11-07 06:59:02 UTC 
(rev 25892)
@@ -29,6 +29,11 @@
 
 #define TDB_MARK_LOCK 0x8000
 
+void tdb_setalarm_sigptr(struct tdb_context *tdb, volatile sig_atomic_t *ptr)
+{
+   tdb->interrupt_sig_ptr = ptr;
+}
+
 /* a byte range locking function - return 0 on success
this functions locks/unlocks 1 byte at the specified offset.
 
@@ -60,6 +65,13 @@
 
do {
ret = fcntl(tdb->fd,lck_type,&fl);
+
+   /* Check for a sigalarm break. */
+   if (ret == -1 && errno == EINTR &&
+   tdb->interrupt_sig_ptr &&
+   *tdb->interrupt_sig_ptr) {
+   break;
+   }
} while (ret == -1 && errno == EINTR);
 
if (ret == -1) {

Modified: branches/SAMBA_4_0/source/lib/tdb/common/tdb_private.h
===
--- branches/SAMBA_4_0/source/lib/tdb/common/tdb_private.h  2007-11-07 
05:35:16 UTC (rev 25891)
+++ branches/SAMBA_4_0/source/lib/tdb/common/tdb_private.h  2007-11-07 
06:59:02 UTC (rev 25892)
@@ -28,6 +28,7 @@
 #include "system/time.h"
 #include "system/shmem.h"
 #include "system/select.h"
+#inc

[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-218-gab11c00

2007-11-06 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  ab11c0055761e97ba32a8c3ec4fa6f8763a262cd (commit)
   via  ef8da1698371c95495add53df81a978df709c88d (commit)
  from  47640fb20e42f226e7ea104076fd52547bfe1abb (commit)

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


- Log -
commit ab11c0055761e97ba32a8c3ec4fa6f8763a262cd
Author: Jeremy Allison <[EMAIL PROTECTED]>
Date:   Tue Nov 6 22:57:35 2007 -0800

Keep the tdb code in sync with Samba4.

Mainly this is the svn changes :


r23238 | tridge | 2007-05-30 01:15:49 -0700 (Wed, 30 May 2007) | 6 lines

merged transaction lock changes from ctdb

this ensures that having the global lock also implies the transaction
lock


r22832 | tridge | 2007-05-13 18:00:06 -0700 (Sun, 13 May 2007) | 3 lines

merged the latest tdb changes from ctdb to Samba4

Jeremy.

commit ef8da1698371c95495add53df81a978df709c88d
Author: Jeremy Allison <[EMAIL PROTECTED]>
Date:   Tue Nov 6 21:47:57 2007 -0800

Fix bug where tdb lock call interrupted with
an alarm sig would not terminate and could lead
to runaway smbd processes.
Thanks to Dave Daugherty @ Centrify for pointing
this out to us.
Jeremy.

---

Summary of changes:
 source/lib/replace/replace.h|4 +
 source/lib/replace/system/wait.h|4 +
 source/lib/tdb/Makefile.in  |   55 +
 source/lib/tdb/common/lock.c|  159 ---
 source/lib/tdb/common/tdb.c |   33 ++--
 source/lib/tdb/common/tdb_private.h |5 +
 source/lib/tdb/common/transaction.c |9 +-
 source/lib/tdb/common/traverse.c|   14 +--
 source/lib/tdb/configure.ac |4 +
 source/lib/tdb/include/tdb.h|   11 +++
 source/lib/tdb/libtdb.m4|   12 ++-
 source/lib/tdb/tdb.pc.in|2 +-
 source/lib/tdb/tools/tdbbackup.c|1 +
 source/lib/tdb/tools/tdbdump.c  |1 +
 source/lib/tdb/tools/tdbtest.c  |2 +-
 source/lib/tdb/tools/tdbtool.c  |1 +
 source/lib/tdb/tools/tdbtorture.c   |2 +-
 source/lib/util_tdb.c   |2 +
 18 files changed, 267 insertions(+), 54 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/replace/replace.h b/source/lib/replace/replace.h
index e42d5ff..55ed2e9 100644
--- a/source/lib/replace/replace.h
+++ b/source/lib/replace/replace.h
@@ -452,6 +452,10 @@ typedef int bool;
 #define MAX(a,b) ((a)>(b)?(a):(b))
 #endif
 
+#if !defined(HAVE_VOLATILE)
+#define volatile
+#endif
+
 /**
   this is a warning hack. The idea is to use this everywhere that we
   get the "discarding const" warning from gcc. That doesn't actually
diff --git a/source/lib/replace/system/wait.h b/source/lib/replace/system/wait.h
index de94cf0..5784b1a 100644
--- a/source/lib/replace/system/wait.h
+++ b/source/lib/replace/system/wait.h
@@ -48,4 +48,8 @@
 #define SA_RESETHAND SA_ONESHOT
 #endif
 
+#if !defined(HAVE_SIG_ATOMIC_T_TYPE)
+typedef int sig_atomic_t;
+#endif
+
 #endif
diff --git a/source/lib/tdb/Makefile.in b/source/lib/tdb/Makefile.in
index b2f42ea..e1ecbb3 100644
--- a/source/lib/tdb/Makefile.in
+++ b/source/lib/tdb/Makefile.in
@@ -12,10 +12,15 @@ libdir = @libdir@
 VPATH = @srcdir@:@libreplacedir@
 srcdir = @srcdir@
 builddir = @builddir@
-CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/include -Iinclude [EMAIL PROTECTED]@
+CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/include -Iinclude 
 CFLAGS = $(CPPFLAGS) @CFLAGS@
 LDFLAGS = @LDFLAGS@
 EXEEXT = @EXEEXT@
+SHLD_FLAGS = @SHLD_FLAGS@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PICFLAG = @PICFLAG@
+SONAMEFLAG = @SONAMEFLAG@
+SHLIBEXT = @SHLIBEXT@
 
 .PHONY: test
 
@@ -23,11 +28,14 @@ PROGS = bin/tdbtool$(EXEEXT) bin/tdbdump$(EXEEXT) 
bin/tdbbackup$(EXEEXT)
 PROGS_NOINSTALL = bin/tdbtest$(EXEEXT) bin/tdbtorture$(EXEEXT)
 ALL_PROGS = $(PROGS) $(PROGS_NOINSTALL)
 
-TDB_OBJ = @TDBOBJ@ @LIBREPLACEOBJ@
+TDB_OBJ = @TDB_OBJ@ @LIBREPLACEOBJ@
 
 DIRS = bin common tools
 
-all: showflags dirs $(PROGS)
+SONAME = libtdb.$(SHLIBEXT).1
+SOLIB = libtdb.$(SHLIBEXT).$(PACKAGE_VERSION)
+
+all: showflags dirs $(PROGS) $(SOLIB) libtdb.a
 
 showflags:
@echo 'tdb will be compiled with flags:'
@@ -36,39 +44,53 @@ showflags:
@echo '  LDFLAGS = $(LDFLAGS)'
@echo '  LIBS = $(LIBS)'
 
+.SUFFIXES: .c .o
+
 .c.o:
@echo Compiling $*.c
@mkdir -p `dirname [EMAIL PROTECTED]
-   @$(CC) $(CFLAGS) -c $< -o $@
+   @$(CC) $(PICFLAG) $(CFLAGS) -c $< -o $@
 
 dirs:
@mkdir -p $(DIRS)
 
 install: all
-   mkdir -p $(bindir)
-   mkdir -p $(includedir)
-   mkdir -p $(libdir) 
-   mkdir -p $(libdir)/pkgconfig
-   cp $(PROGS) $(bindir)
-   cp $(srcdir)/inclu

svn commit: samba r25891 - in branches/SAMBA_4_0: source/dsdb/samdb/ldb_modules source/setup testprogs/ejs

2007-11-06 Thread abartlet
Author: abartlet
Date: 2007-11-07 05:35:16 + (Wed, 07 Nov 2007)
New Revision: 25891

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25891

Log:
Test that we get the correct return value when we attempt to reference
invalid entries with a linked attribute.

Make Samba4 pass that test, by fixing a silly bug in the
linked_attributes module.  (By passing down the 'original' request
structure, tdb would override our handle, and therefore we would never
be called for the 'wait', which collects the errors).

Fix up the provision templates to handle the newly required
referential integrity.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/linked_attributes.c
   branches/SAMBA_4_0/source/setup/provision_users.ldif
   branches/SAMBA_4_0/testprogs/ejs/ldap.js


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/linked_attributes.c
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/linked_attributes.c
2007-11-07 02:45:17 UTC (rev 25890)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/linked_attributes.c
2007-11-07 05:35:16 UTC (rev 25891)
@@ -243,7 +243,7 @@
ac->num_requests++;

/* Run the original request */
-   ret = ldb_next_request(module, req);
+   ret = ldb_next_request(module, ac->down_req[0]);
if (ret != LDB_SUCCESS) {
return ret;
}
@@ -323,7 +323,7 @@
ac->num_requests++;

/* Run the original request */
-   ret = ldb_next_request(module, req);
+   ret = ldb_next_request(module, ac->down_req[0]);
if (ret != LDB_SUCCESS) {
return ret;
}

Modified: branches/SAMBA_4_0/source/setup/provision_users.ldif
===
--- branches/SAMBA_4_0/source/setup/provision_users.ldif2007-11-07 
02:45:17 UTC (rev 25890)
+++ branches/SAMBA_4_0/source/setup/provision_users.ldif2007-11-07 
05:35:16 UTC (rev 25891)
@@ -20,6 +20,127 @@
 sAMAccountName: Guest
 isCriticalSystemObject: TRUE
 
+dn: CN=Enterprise Admins,CN=Users,${DOMAINDN}
+objectClass: top
+objectClass: group
+cn: Enterprise Admins
+description: Designated administrators of the enterprise
+member: CN=Administrator,CN=Users,${DOMAINDN}
+objectSid: ${DOMAINSID}-519
+adminCount: 1
+sAMAccountName: Enterprise Admins
+isCriticalSystemObject: TRUE
+
+dn: CN=krbtgt,CN=Users,${DOMAINDN}
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: user
+cn: krbtgt
+description: Key Distribution Center Service Account
+showInAdvancedViewOnly: TRUE
+userAccountControl: 514
+objectSid: ${DOMAINSID}-502
+adminCount: 1
+accountExpires: 9223372036854775807
+sAMAccountName: krbtgt
+sAMAccountType: 805306368
+servicePrincipalName: kadmin/changepw
+isCriticalSystemObject: TRUE
+sambaPassword:: ${KRBTGTPASS_B64}
+
+dn: CN=Domain Computers,CN=Users,${DOMAINDN}
+objectClass: top
+objectClass: group
+cn: Domain Computers
+description: All workstations and servers joined to the domain
+objectSid: ${DOMAINSID}-515
+sAMAccountName: Domain Computers
+isCriticalSystemObject: TRUE
+
+dn: CN=Domain Controllers,CN=Users,${DOMAINDN}
+objectClass: top
+objectClass: group
+cn: Domain Controllers
+description: All domain controllers in the domain
+objectSid: ${DOMAINSID}-516
+adminCount: 1
+sAMAccountName: Domain Controllers
+isCriticalSystemObject: TRUE
+
+dn: CN=Schema Admins,CN=Users,${DOMAINDN}
+objectClass: top
+objectClass: group
+cn: Schema Admins
+description: Designated administrators of the schema
+member: CN=Administrator,CN=Users,${DOMAINDN}
+objectSid: ${DOMAINSID}-518
+adminCount: 1
+sAMAccountName: Schema Admins
+isCriticalSystemObject: TRUE
+
+dn: CN=Cert Publishers,CN=Users,${DOMAINDN}
+objectClass: top
+objectClass: group
+cn: Cert Publishers
+description: Members of this group are permitted to publish certificates to 
the Active Directory
+groupType: 2147483652
+sAMAccountType: 536870912
+objectSid: ${DOMAINSID}-517
+sAMAccountName: Cert Publishers
+isCriticalSystemObject: TRUE
+
+dn: CN=Domain Admins,CN=Users,${DOMAINDN}
+objectClass: top
+objectClass: group
+cn: Domain Admins
+description: Designated administrators of the domain
+member: CN=Administrator,CN=Users,${DOMAINDN}
+objectSid: ${DOMAINSID}-512
+adminCount: 1
+sAMAccountName: Domain Admins
+isCriticalSystemObject: TRUE
+
+dn: CN=Domain Users,CN=Users,${DOMAINDN}
+objectClass: top
+objectClass: group
+cn: Domain Users
+description: All domain users
+objectSid: ${DOMAINSID}-513
+sAMAccountName: Domain Users
+isCriticalSystemObject: TRUE
+
+dn: CN=Domain Guests,CN=Users,${DOMAINDN}
+objectClass: top
+objectClass: group
+cn: Domain Guests
+description: All domain guests
+objectSid: ${DOMAINSID}-514
+sAMAccountName: Domain Guests
+isCriticalSystemObject: TRUE
+
+dn: CN=Group Policy Creator Owners,CN=Users,${DOMAINDN}
+objectClass: top

svn commit: samba r25890 - in branches/4.0-python: . source source/nbt_server source/selftest/env source/setup

2007-11-06 Thread jelmer
Author: jelmer
Date: 2007-11-07 02:45:17 + (Wed, 07 Nov 2007)
New Revision: 25890

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25890

Log:
Fix unresolved symbol errors for python ldb module.
Modified:
   branches/4.0-python/
   branches/4.0-python/source/main.mk
   branches/4.0-python/source/nbt_server/config.mk
   branches/4.0-python/source/selftest/env/Samba4.pm
   branches/4.0-python/source/setup/provision


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/main.mk
===
--- branches/4.0-python/source/main.mk  2007-11-07 02:45:08 UTC (rev 25889)
+++ branches/4.0-python/source/main.mk  2007-11-07 02:45:17 UTC (rev 25890)
@@ -41,7 +41,7 @@
 headers: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
 manpages: $(MANPAGES)
 all: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules
-everything: all libraries headers
+everything: all libraries headers pythonmods
 
 # 'make testsuite' creates all binaries which are
 # needed by samba3's 'make test' and the build-farm

Modified: branches/4.0-python/source/nbt_server/config.mk
===
--- branches/4.0-python/source/nbt_server/config.mk 2007-11-07 02:45:08 UTC 
(rev 25889)
+++ branches/4.0-python/source/nbt_server/config.mk 2007-11-07 02:45:17 UTC 
(rev 25890)
@@ -16,6 +16,7 @@
 # Start MODULE ldb_wins_ldb
 [MODULE::ldb_wins_ldb]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 INIT_FUNCTION = wins_ldb_module_init
 OBJ_FILES = \
wins/wins_ldb.o

Modified: branches/4.0-python/source/selftest/env/Samba4.pm
===
--- branches/4.0-python/source/selftest/env/Samba4.pm   2007-11-07 02:45:08 UTC 
(rev 25889)
+++ branches/4.0-python/source/selftest/env/Samba4.pm   2007-11-07 02:45:17 UTC 
(rev 25890)
@@ -498,9 +498,7 @@
pid directory = $piddir
ncalrpc dir = $ncalrpcdir
lock dir = $lockdir
-   setup directory = $self->{setupdir}
modules dir = $self->{bindir}/modules
-   js include = $srcdir/scripting/libjs
winbindd socket directory = $winbindd_socket_dir
 winbind separator = /
name resolve order = bcast
@@ -614,12 +612,13 @@
(system("($self->{bindir}/testparm $configuration -v --suppress-prompt 
--parameter-name=\"netbios name\" --section-name=global 2> /dev/null | grep -i 
\"^$netbiosname\" ) >/dev/null 2>&1") == 0) or die("Failed to create a valid 
smb.conf configuration!");
 
my @provision_options = ();
+   push (@provision_options, 
"LDB_MODULES_PATH=\"$self->{bindir}/modules/ldb\"");
push (@provision_options, "NSS_WRAPPER_PASSWD=\"$nsswrap_passwd\"");
push (@provision_options, "NSS_WRAPPER_GROUP=\"$nsswrap_group\"");
-   push (@provision_options, $ENV{PYTHON} or "python");
-   push (@provision_options, "$self->{bindir}/smbscript");
+   push (@provision_options, ($ENV{PYTHON} or "python"));
push (@provision_options, "$self->{setupdir}/provision");
push (@provision_options, split(' ', $configuration));
+   push (@provision_options, "--setupdir=$self->{setupdir}");
push (@provision_options, "--host-name=$netbiosname");
push (@provision_options, "--host-ip=$ifaceipv4");
push (@provision_options, "--quiet=True");

Modified: branches/4.0-python/source/setup/provision
===
--- branches/4.0-python/source/setup/provision  2007-11-07 02:45:08 UTC (rev 
25889)
+++ branches/4.0-python/source/setup/provision  2007-11-07 02:45:17 UTC (rev 
25890)
@@ -26,6 +26,8 @@
 parser.add_option_group(options.VersionOptions(parser))
 credopts = options.CredentialsOptions(parser)
 parser.add_option_group(credopts)
+parser.add_option("--setupdir", type="string", metavar="DIR", 
+   help="directory with setup files")
 parser.add_option("--realm", type="string", metavar="REALM", help="set realm")
 parser.add_option("--domain", type="string", metavar="DOMAIN",
  help="set domain")
@@ -142,9 +144,9 @@
 message("Provisioning for %s in realm %s" % (subobj.domain, subobj.realm))
 message("Using administrator password: %s" % subobj.adminpass)
 
-# FIXME: Use $(datadir)/setup when already installed
-
-setup_dir = "setup"
+setup_dir = opts.setupdir
+if setup_dir is None:
+   setup_dir = "setup"
 if opts.ldap_base:
provision_ldapbase(setup_dir, subobj, message, paths)
message("Please install the LDIF located in %s, %s and  into your LDAP 
server, and re-run with --ldap-backend=ldap://my.ldap.server"; % 
(paths.ldap_basedn_ldif, paths.ldap_config_basedn_ldif, 
paths.ldap_schema_basedn_ldif))

svn commit: samba r25889 - in branches/4.0-python: . source/dsdb/samdb/ldb_modules source/lib/ldb/include source/lib/replace source/lib/tdb source/selftest source/selftest/env

2007-11-06 Thread jelmer
Author: jelmer
Date: 2007-11-07 02:45:08 + (Wed, 07 Nov 2007)
New Revision: 25889

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25889

Log:
Merge upstream.
Modified:
   branches/4.0-python/
   branches/4.0-python/.bzrignore
   branches/4.0-python/source/dsdb/samdb/ldb_modules/config.mk
   branches/4.0-python/source/lib/ldb/include/ldb_private.h
   branches/4.0-python/source/lib/replace/libreplace_ld.m4
   branches/4.0-python/source/lib/tdb/Makefile.in
   branches/4.0-python/source/selftest/env/Samba4.pm
   branches/4.0-python/source/selftest/samba4_tests.sh
   branches/4.0-python/source/selftest/selftest.pl


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:ancestry:v3-trunk0
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/.bzrignore
===
--- branches/4.0-python/.bzrignore  2007-11-07 01:45:06 UTC (rev 25888)
+++ branches/4.0-python/.bzrignore  2007-11-07 02:45:08 UTC (rev 25889)
@@ -218,3 +218,4 @@
 source/lib/ldb/tdbtest.ldb
 *.po
 libtdb.so.*
+libtalloc.so.*

Modified: branches/4.0-python/source/dsdb/samdb/ldb_modules/config.mk
===
--- branches/4.0-python/source/dsdb/samdb/ldb_modules/config.mk 2007-11-07 
01:45:06 UTC (rev 25888)
+++ branches/4.0-python/source/dsdb/samdb/ldb_modules/config.mk 2007-11-07 
02:45:08 UTC (rev 25889)
@@ -2,6 +2,7 @@
 # Start MODULE ldb_objectguid
 [MODULE::ldb_objectguid]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR NDR_MISC
 INIT_FUNCTION = objectguid_module_init
 OBJ_FILES = \
@@ -13,6 +14,7 @@
 # Start MODULE ldb_repl_mata_data
 [MODULE::ldb_repl_meta_data]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC LIBNDR NDR_MISC NDR_DRSUAPI NDR_DRSBLOBS
 INIT_FUNCTION = repl_meta_data_module_init
 OBJ_FILES = \
@@ -24,6 +26,7 @@
 # Start MODULE ldb_dsdb_cache
 [MODULE::ldb_dsdb_cache]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
 INIT_FUNCTION = dsdb_cache_module_init
 OBJ_FILES = \
@@ -35,6 +38,7 @@
 # Start MODULE ldb_schema_fsmo
 [MODULE::ldb_schema_fsmo]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
 INIT_FUNCTION = schema_fsmo_module_init
 OBJ_FILES = \
@@ -46,6 +50,7 @@
 # Start MODULE ldb_naming_fsmo
 [MODULE::ldb_naming_fsmo]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
 INIT_FUNCTION = naming_fsmo_module_init
 OBJ_FILES = \
@@ -57,6 +62,7 @@
 # Start MODULE ldb_pdc_fsmo
 [MODULE::ldb_pdc_fsmo]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
 INIT_FUNCTION = pdc_fsmo_module_init
 OBJ_FILES = \
@@ -68,6 +74,7 @@
 # Start MODULE ldb_samldb
 [MODULE::ldb_samldb]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC
 INIT_FUNCTION = samldb_module_init
 OBJ_FILES = \
@@ -80,6 +87,7 @@
 # Start MODULE ldb_samba3sam
 [MODULE::ldb_samba3sam]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 INIT_FUNCTION = ldb_samba3sam_module_init
 PRIVATE_DEPENDENCIES = LIBTALLOC ldb_map SMBPASSWD NSS_WRAPPER
 OBJ_FILES = \
@@ -92,8 +100,9 @@
 # Start MODULE ldb_entryUUID
 [MODULE::ldb_entryUUID]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 INIT_FUNCTION = ldb_entryUUID_module_init
-PRIVATE_DEPENDENCIES = LIBTALLOC
+PRIVATE_DEPENDENCIES = LIBTALLOC 
 ENABLE = YES
 OBJ_FILES = \
entryUUID.o
@@ -118,6 +127,7 @@
 [MODULE::ldb_rootdse]
 SUBSYSTEM = LIBLDB
 PRIVATE_DEPENDENCIES = LIBTALLOC
+OUTPUT_TYPE = SHARED_LIBRARY
 INIT_FUNCTION = rootdse_module_init
 OBJ_FILES = \
rootdse.o
@@ -129,6 +139,7 @@
 # Start MODULE ldb_password_hash
 [MODULE::ldb_password_hash]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 INIT_FUNCTION = password_hash_module_init
 OBJ_FILES = password_hash.o
 PRIVATE_DEPENDENCIES = HEIMDAL_HDB_KEYS LIBTALLOC HEIMDAL_KRB5
@@ -140,6 +151,7 @@
 # Start MODULE ldb_local_password
 [MODULE::ldb_local_password]
 PRIVATE_DEPENDENCIES = LIBTALLOC
+OUTPUT_TYPE = SHARED_LIBRARY
 SUBSYSTEM = LIBLDB
 INIT_FUNCTION = local_password_module_init
 OBJ_FILES = local_password.o
@@ -151,6 +163,7 @@
 # Start MODULE ldb_kludge_acl
 [MODULE::ldb_kludge_acl]
 PRIVATE_DEPENDENCIES = LIBTALLOC LIBSECURITY
+OUTPUT_TYPE = SHARED_LIBRARY
 SUBSYSTEM = LIBLDB
 INIT_FUNCTION = ldb_kludge_acl_init
 OBJ_FILES = \
@@ -163,6 +176,7 @@
 # Start MODULE ldb_extended_dn
 [MODULE::ldb_extended_dn]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC
 INIT_FUNCTION = ldb_extended_dn_init
 OBJ_FILES = \
@@ -175,6 +189,7 @@
 # Start MODULE ldb_show_deleted
 [MODULE::ldb_show_deleted]
 SUBSYSTEM = LIBLDB

svn commit: samba r25888 - in branches/SAMBA_4_0: . source/lib/tdb

2007-11-06 Thread jelmer
Author: jelmer
Date: 2007-11-07 01:45:06 + (Wed, 07 Nov 2007)
New Revision: 25888

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25888

Log:
Attempt to fix standalone tdb build.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/tdb/Makefile.in


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/tdb/Makefile.in
===
--- branches/SAMBA_4_0/source/lib/tdb/Makefile.in   2007-11-07 01:32:25 UTC 
(rev 25887)
+++ branches/SAMBA_4_0/source/lib/tdb/Makefile.in   2007-11-07 01:45:06 UTC 
(rev 25888)
@@ -76,19 +76,21 @@
 $(SOLIB): $(TDB_OBJ)
$(CC) $(SHLD_FLAGS) $(SONAMEFLAG)$(SONAME) -o $@ $^
 
-bin/tdbtest$(EXEEXT): tools/tdbtest.o $(SOLIB)
+TDB_LIB = libtdb.a
+
+bin/tdbtest$(EXEEXT): tools/tdbtest.o $(TDB_LIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb 
-lgdbm
 
-bin/tdbtool$(EXEEXT): tools/tdbtool.o $(SOLIB)
+bin/tdbtool$(EXEEXT): tools/tdbtool.o $(TDB_LIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb
 
-bin/tdbtorture$(EXEEXT): tools/tdbtorture.o $(SOLIB)
+bin/tdbtorture$(EXEEXT): tools/tdbtorture.o $(TDB_LIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. 
-ltdb
 
-bin/tdbdump$(EXEEXT): tools/tdbdump.o $(SOLIB)
+bin/tdbdump$(EXEEXT): tools/tdbdump.o $(TDB_LIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbdump tools/tdbdump.o -L. -ltdb
 
-bin/tdbbackup$(EXEEXT): tools/tdbbackup.o $(SOLIB)
+bin/tdbbackup$(EXEEXT): tools/tdbbackup.o $(TDB_LIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb
 
 test: bin/tdbtorture$(EXEEXT)
@@ -99,7 +101,7 @@
 clean:
rm -f $(ALL_PROGS) *.o *.a common/*.o tools/*.o tdb.pc
rm -f test.db test.tdb torture.tdb test.gdbm
-   rm -f $(SONAME) $(SOLIB)
+   rm -f $(SONAME) $(SOLIB) libtdb.a
 
 distclean: clean
rm -f *~ */*~



svn commit: samba r25887 - in branches/SAMBA_4_0: . source/dsdb/samdb/ldb_modules source/lib/ldb/include source/selftest source/selftest/env

2007-11-06 Thread jelmer
Author: jelmer
Date: 2007-11-07 01:32:25 + (Wed, 07 Nov 2007)
New Revision: 25887

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25887

Log:
Build Samba-specific ldb modules as dso's.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/.bzrignore
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk
   branches/SAMBA_4_0/source/lib/ldb/include/ldb_private.h
   branches/SAMBA_4_0/source/selftest/env/Samba4.pm
   branches/SAMBA_4_0/source/selftest/samba4_tests.sh
   branches/SAMBA_4_0/source/selftest/selftest.pl


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/.bzrignore
===
--- branches/SAMBA_4_0/.bzrignore   2007-11-07 01:32:17 UTC (rev 25886)
+++ branches/SAMBA_4_0/.bzrignore   2007-11-07 01:32:25 UTC (rev 25887)
@@ -206,3 +206,4 @@
 source/lib/ldb/tdbtest.ldb
 *.po
 libtdb.so.*
+libtalloc.so.*

Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk  2007-11-07 
01:32:17 UTC (rev 25886)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk  2007-11-07 
01:32:25 UTC (rev 25887)
@@ -2,6 +2,7 @@
 # Start MODULE ldb_objectguid
 [MODULE::ldb_objectguid]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR NDR_MISC
 INIT_FUNCTION = objectguid_module_init
 OBJ_FILES = \
@@ -13,6 +14,7 @@
 # Start MODULE ldb_repl_mata_data
 [MODULE::ldb_repl_meta_data]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC LIBNDR NDR_MISC NDR_DRSUAPI NDR_DRSBLOBS
 INIT_FUNCTION = repl_meta_data_module_init
 OBJ_FILES = \
@@ -24,6 +26,7 @@
 # Start MODULE ldb_dsdb_cache
 [MODULE::ldb_dsdb_cache]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
 INIT_FUNCTION = dsdb_cache_module_init
 OBJ_FILES = \
@@ -35,6 +38,7 @@
 # Start MODULE ldb_schema_fsmo
 [MODULE::ldb_schema_fsmo]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
 INIT_FUNCTION = schema_fsmo_module_init
 OBJ_FILES = \
@@ -46,6 +50,7 @@
 # Start MODULE ldb_naming_fsmo
 [MODULE::ldb_naming_fsmo]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
 INIT_FUNCTION = naming_fsmo_module_init
 OBJ_FILES = \
@@ -57,6 +62,7 @@
 # Start MODULE ldb_pdc_fsmo
 [MODULE::ldb_pdc_fsmo]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
 INIT_FUNCTION = pdc_fsmo_module_init
 OBJ_FILES = \
@@ -68,6 +74,7 @@
 # Start MODULE ldb_samldb
 [MODULE::ldb_samldb]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC
 INIT_FUNCTION = samldb_module_init
 OBJ_FILES = \
@@ -80,6 +87,7 @@
 # Start MODULE ldb_samba3sam
 [MODULE::ldb_samba3sam]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 INIT_FUNCTION = ldb_samba3sam_module_init
 PRIVATE_DEPENDENCIES = LIBTALLOC ldb_map SMBPASSWD NSS_WRAPPER
 OBJ_FILES = \
@@ -92,8 +100,9 @@
 # Start MODULE ldb_entryUUID
 [MODULE::ldb_entryUUID]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 INIT_FUNCTION = ldb_entryUUID_module_init
-PRIVATE_DEPENDENCIES = LIBTALLOC
+PRIVATE_DEPENDENCIES = LIBTALLOC 
 ENABLE = YES
 OBJ_FILES = \
entryUUID.o
@@ -118,6 +127,7 @@
 [MODULE::ldb_rootdse]
 SUBSYSTEM = LIBLDB
 PRIVATE_DEPENDENCIES = LIBTALLOC
+OUTPUT_TYPE = SHARED_LIBRARY
 INIT_FUNCTION = rootdse_module_init
 OBJ_FILES = \
rootdse.o
@@ -129,6 +139,7 @@
 # Start MODULE ldb_password_hash
 [MODULE::ldb_password_hash]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 INIT_FUNCTION = password_hash_module_init
 OBJ_FILES = password_hash.o
 PRIVATE_DEPENDENCIES = HEIMDAL_HDB_KEYS LIBTALLOC HEIMDAL_KRB5
@@ -140,6 +151,7 @@
 # Start MODULE ldb_local_password
 [MODULE::ldb_local_password]
 PRIVATE_DEPENDENCIES = LIBTALLOC
+OUTPUT_TYPE = SHARED_LIBRARY
 SUBSYSTEM = LIBLDB
 INIT_FUNCTION = local_password_module_init
 OBJ_FILES = local_password.o
@@ -151,6 +163,7 @@
 # Start MODULE ldb_kludge_acl
 [MODULE::ldb_kludge_acl]
 PRIVATE_DEPENDENCIES = LIBTALLOC LIBSECURITY
+OUTPUT_TYPE = SHARED_LIBRARY
 SUBSYSTEM = LIBLDB
 INIT_FUNCTION = ldb_kludge_acl_init
 OBJ_FILES = \
@@ -163,6 +176,7 @@
 # Start MODULE ldb_extended_dn
 [MODULE::ldb_extended_dn]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC
 INIT_FUNCTION = ldb_extended_dn_init
 OBJ_FILES = \
@@ -175,6 +189,7 @@
 # Start MODULE ldb_show_deleted
 [MODULE::ldb_show_deleted]
 SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC
 INIT_FUNCTION = ldb_show_deleted_init
 OBJ_FILES = \
@@ -187,6 +202,7 @@
 # Start MODULE ldb_partition

svn commit: samba r25886 - in branches/SAMBA_4_0: . source/lib/replace

2007-11-06 Thread jelmer
Author: jelmer
Date: 2007-11-07 01:32:17 + (Wed, 07 Nov 2007)
New Revision: 25886

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25886

Log:
Try to fix building dso's on hpux with gcc
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4
===
--- branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4  2007-11-06 
23:13:55 UTC (rev 25885)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4  2007-11-07 
01:32:17 UTC (rev 25886)
@@ -98,7 +98,11 @@
SHLD_FLAGS="-Wl,-G,-bexpall,-bbigtoc"
;;
*hpux*)
-   SHLD_FLAGS="-b -Wl,-B,symbolic,-b,-z"
+   if test "${GCC}" = "yes"; then
+   SHLD_FLAGS="-shared"
+   else
+   SHLD_FLAGS="-b"
+   fi
;;
*darwin*)
SHLD_FLAGS="-dynamiclib"



Build status as of Wed Nov 7 00:00:02 2007

2007-11-06 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-11-06 
00:00:48.0 +
+++ /home/build/master/cache/broken_results.txt 2007-11-07 00:00:51.0 
+
@@ -1,4 +1,4 @@
-Build status as of Tue Nov  6 00:00:02 2007
+Build status as of Wed Nov  7 00:00:02 2007
 
 Build counts:
 Tree Total  Broken Panic 
@@ -7,7 +7,7 @@
 ccache   27 9  0 
 ctdb 0  0  0 
 distcc   1  0  0 
-ldb  28 17 0 
+ldb  28 15 0 
 libreplace   27 10 0 
 lorikeet-heimdal 22 12 0 
 pidl 16 3  0 
@@ -16,10 +16,10 @@
 rsync28 13 0 
 samba-docs   0  0  0 
 samba-gtk2  2  0 
-samba4   26 17 5 
+samba4   26 18 0 
 samba_3_20  0  0 
-samba_3_2_test 27 28 0 
+samba_3_2_test 28 20 0 
 smb-build27 27 0 
-talloc   28 2  0 
-tdb  28 3  0 
+talloc   28 8  0 
+tdb  28 27 0 
 


svn commit: samba r25885 - in branches/4.0-python: . source source/auth source/build/m4 source/build/smb_build source/dsdb/samdb/ldb_modules source/heimdal_build source/lib source/lib/ldb source/lib/l

2007-11-06 Thread jelmer
Author: jelmer
Date: 2007-11-06 23:13:55 + (Tue, 06 Nov 2007)
New Revision: 25885

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25885

Log:
Merge upstream.
Added:
   branches/4.0-python/source/lib/ldb/tests/sample_module.c
   branches/4.0-python/source/lib/ldb/tests/test-soloading.sh
   branches/4.0-python/source/lib/nss_wrapper/
   branches/4.0-python/source/lib/nss_wrapper/config.m4
   branches/4.0-python/source/lib/nss_wrapper/config.mk
   branches/4.0-python/source/lib/nss_wrapper/nss_wrapper.c
   branches/4.0-python/source/lib/nss_wrapper/nss_wrapper.h
   branches/4.0-python/source/lib/nss_wrapper/nss_wrapper.pl
   branches/4.0-python/source/lib/replace/libreplace_ld.m4
Modified:
   branches/4.0-python/
   branches/4.0-python/.bzrignore
   branches/4.0-python/source/auth/config.mk
   branches/4.0-python/source/build/m4/check_ld.m4
   branches/4.0-python/source/build/smb_build/input.pm
   branches/4.0-python/source/configure.ac
   branches/4.0-python/source/configure.developer
   branches/4.0-python/source/dsdb/samdb/ldb_modules/config.mk
   branches/4.0-python/source/headermap.txt
   branches/4.0-python/source/heimdal_build/config.m4
   branches/4.0-python/source/lib/basic.mk
   branches/4.0-python/source/lib/ldb/Makefile.in
   branches/4.0-python/source/lib/ldb/common/ldb.c
   branches/4.0-python/source/lib/ldb/common/ldb_modules.c
   branches/4.0-python/source/lib/ldb/common/ldb_msg.c
   branches/4.0-python/source/lib/ldb/configure.ac
   branches/4.0-python/source/lib/ldb/tools/cmdline.c
   branches/4.0-python/source/lib/ldb/tools/cmdline.h
   branches/4.0-python/source/lib/replace/dlfcn.c
   branches/4.0-python/source/lib/replace/dlfcn.m4
   branches/4.0-python/source/lib/replace/libreplace.m4
   branches/4.0-python/source/lib/replace/libreplace_macros.m4
   branches/4.0-python/source/lib/replace/system/config.m4
   branches/4.0-python/source/lib/replace/system/passwd.h
   branches/4.0-python/source/lib/talloc/Makefile.in
   branches/4.0-python/source/lib/talloc/configure.ac
   branches/4.0-python/source/lib/tdb/Makefile.in
   branches/4.0-python/source/lib/tdb/configure.ac
   branches/4.0-python/source/librpc/idl/dfs.idl
   branches/4.0-python/source/ntvfs/unixuid/config.mk
   branches/4.0-python/source/rpc_server/config.mk
   branches/4.0-python/source/selftest/env/Samba4.pm
   branches/4.0-python/source/torture/rpc/dfs.c


Changeset:
Sorry, the patch is too large (3536 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25885


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-216-g47640fb

2007-11-06 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  47640fb20e42f226e7ea104076fd52547bfe1abb (commit)
  from  9dd18bb534bca6b5de6cad9580b48681b36c0832 (commit)

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


- Log -
commit 47640fb20e42f226e7ea104076fd52547bfe1abb
Author: Jeremy Allison <[EMAIL PROTECTED]>
Date:   Tue Nov 6 14:12:38 2007 -0800

Ensure we don't use massive writes in pipe mode.
Jeremy.

---

Summary of changes:
 source/libsmb/clireadwrite.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/clireadwrite.c b/source/libsmb/clireadwrite.c
index 0c79da9..d77875b 100644
--- a/source/libsmb/clireadwrite.c
+++ b/source/libsmb/clireadwrite.c
@@ -402,11 +402,12 @@ ssize_t cli_write(struct cli_state *cli,
mpx = 1;
}
 
-if (!client_is_signing_on(cli) &&
+if (write_mode == 0 &&
+   !client_is_signing_on(cli) &&
(cli->posix_capabilities & CIFS_UNIX_LARGE_WRITE_CAP) &&
(cli->capabilities & CAP_LARGE_FILES)) {
/* Only do massive writes if we can do them direct
-* with no signing. */
+* with no signing - not on a pipe. */
writesize = CLI_SAMBA_MAX_POSIX_LARGE_WRITEX_SIZE;
} else if (cli->capabilities & CAP_LARGE_READX) {
if (cli->is_samba) {


-- 
Samba Shared Repository


svn commit: samba r25884 - in branches/SAMBA_4_0: . source/lib/talloc source/lib/tdb

2007-11-06 Thread jelmer
Author: jelmer
Date: 2007-11-06 19:53:33 + (Tue, 06 Nov 2007)
New Revision: 25884

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25884

Log:
Specify shldflags first, as required by some compilers.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/talloc/Makefile.in
   branches/SAMBA_4_0/source/lib/tdb/Makefile.in


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/talloc/Makefile.in
===
--- branches/SAMBA_4_0/source/lib/talloc/Makefile.in2007-11-06 19:42:56 UTC 
(rev 25883)
+++ branches/SAMBA_4_0/source/lib/talloc/Makefile.in2007-11-06 19:53:33 UTC 
(rev 25884)
@@ -45,7 +45,7 @@
@-ranlib $@
 
 $(SOLIB): $(LIBOBJ)
-   $(CC) $(SONAMEFLAG)$(SONAME) $(SHLD_FLAGS) -o $@ $^
+   $(CC) $(SHLD_FLAGS) $(SONAMEFLAG)$(SONAME) -o $@ $^
 
 install: all 
${INSTALLCMD} -d $(DESTDIR)$(libdir)

Modified: branches/SAMBA_4_0/source/lib/tdb/Makefile.in
===
--- branches/SAMBA_4_0/source/lib/tdb/Makefile.in   2007-11-06 19:42:56 UTC 
(rev 25883)
+++ branches/SAMBA_4_0/source/lib/tdb/Makefile.in   2007-11-06 19:53:33 UTC 
(rev 25884)
@@ -74,7 +74,7 @@
ln -s $< $@
 
 $(SOLIB): $(TDB_OBJ)
-   $(CC) $(SONAMEFLAG)$(SONAME) $(SHLD_FLAGS) -o $@ $^
+   $(CC) $(SHLD_FLAGS) $(SONAMEFLAG)$(SONAME) -o $@ $^
 
 bin/tdbtest$(EXEEXT): tools/tdbtest.o $(SOLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb 
-lgdbm



svn commit: samba r25883 - in branches/SAMBA_4_0: . source/lib/tdb

2007-11-06 Thread jelmer
Author: jelmer
Date: 2007-11-06 19:42:56 + (Tue, 06 Nov 2007)
New Revision: 25883

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25883

Log:
Fix tdb dependency.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/tdb/Makefile.in


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/tdb/Makefile.in
===
--- branches/SAMBA_4_0/source/lib/tdb/Makefile.in   2007-11-06 19:24:12 UTC 
(rev 25882)
+++ branches/SAMBA_4_0/source/lib/tdb/Makefile.in   2007-11-06 19:42:56 UTC 
(rev 25883)
@@ -70,22 +70,25 @@
 libtdb.(SHLIBEXT): $(SOLIB)
ln -s $< $@
 
+$(SONAME): $(SOLIB)
+   ln -s $< $@
+
 $(SOLIB): $(TDB_OBJ)
$(CC) $(SONAMEFLAG)$(SONAME) $(SHLD_FLAGS) -o $@ $^
 
-bin/tdbtest$(EXEEXT): tools/tdbtest.o libtdb.$(SHLIBEXT)
+bin/tdbtest$(EXEEXT): tools/tdbtest.o $(SOLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb 
-lgdbm
 
-bin/tdbtool$(EXEEXT): tools/tdbtool.o libtdb.$(SHLIBEXT)
+bin/tdbtool$(EXEEXT): tools/tdbtool.o $(SOLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb
 
-bin/tdbtorture$(EXEEXT): tools/tdbtorture.o libtdb.$(SHLIBEXT)
+bin/tdbtorture$(EXEEXT): tools/tdbtorture.o $(SOLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. 
-ltdb
 
-bin/tdbdump$(EXEEXT): tools/tdbdump.o libtdb.$(SHLIBEXT)
+bin/tdbdump$(EXEEXT): tools/tdbdump.o $(SOLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbdump tools/tdbdump.o -L. -ltdb
 
-bin/tdbbackup$(EXEEXT): tools/tdbbackup.o libtdb.$(SHLIBEXT)
+bin/tdbbackup$(EXEEXT): tools/tdbbackup.o $(SOLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb
 
 test: bin/tdbtorture$(EXEEXT)
@@ -96,6 +99,7 @@
 clean:
rm -f $(ALL_PROGS) *.o *.a common/*.o tools/*.o tdb.pc
rm -f test.db test.tdb torture.tdb test.gdbm
+   rm -f $(SONAME) $(SOLIB)
 
 distclean: clean
rm -f *~ */*~



svn commit: samba r25882 - in branches/SAMBA_4_0: . source/lib/talloc

2007-11-06 Thread jelmer
Author: jelmer
Date: 2007-11-06 19:24:12 + (Tue, 06 Nov 2007)
New Revision: 25882

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25882

Log:
Build shared library of talloc as well.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/talloc/Makefile.in
   branches/SAMBA_4_0/source/lib/talloc/configure.ac


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/talloc/Makefile.in
===
--- branches/SAMBA_4_0/source/lib/talloc/Makefile.in2007-11-06 18:58:19 UTC 
(rev 25881)
+++ branches/SAMBA_4_0/source/lib/talloc/Makefile.in2007-11-06 19:24:12 UTC 
(rev 25882)
@@ -14,13 +14,24 @@
 CC = @CC@
 CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H= -I. [EMAIL PROTECTED]@
 EXTRA_TARGETS = @DOC_TARGET@
+PICFLAG = @PICFLAG@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+SHLIBEXT = @SHLIBEXT@
+SHLD_FLAGS = @SHLD_FLAGS@
+SONAMEFLAG = @SONAMEFLAG@
 
 .SUFFIXES: .c .o .3 .3.xml .xml .html
 
 LIBOBJ = @TALLOC_OBJ@ @LIBREPLACEOBJ@
 
-all: showflags libtalloc.a testsuite $(EXTRA_TARGETS)
+SOLIB = libtalloc.$(SHLIBEXT).$(PACKAGE_VERSION)
+SONAME = libtalloc.$(SHLIBEXT).1
 
+.c.o:
+   $(CC) $(PICFLAG) -o $@ -c $< $(CFLAGS)
+
+all: showflags libtalloc.a $(SOLIB) testsuite $(EXTRA_TARGETS)
+
 showflags:
@echo 'talloc will be compiled with flags:'
@echo '  CFLAGS = $(CFLAGS)'
@@ -33,10 +44,14 @@
ar -rv $@ $(LIBOBJ)
@-ranlib $@
 
+$(SOLIB): $(LIBOBJ)
+   $(CC) $(SONAMEFLAG)$(SONAME) $(SHLD_FLAGS) -o $@ $^
+
 install: all 
${INSTALLCMD} -d $(DESTDIR)$(libdir)
${INSTALLCMD} -d $(DESTDIR)$(libdir)/pkgconfig
${INSTALLCMD} -m 755 libtalloc.a $(DESTDIR)$(libdir)
+   ${INSTALLCMD} -m 755 $(SOLIB) $(DESTDIR)$(libdir)
${INSTALLCMD} -d $(DESTDIR)${includedir}
${INSTALLCMD} -m 644 $(srcdir)/talloc.h $(DESTDIR)$(includedir)
${INSTALLCMD} -m 644 talloc.pc $(DESTDIR)$(libdir)/pkgconfig
@@ -52,7 +67,7 @@
-test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ 
http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
 
 clean:
-   rm -f *~ $(LIBOBJ) libtalloc.a testsuite testsuite.o *.gc?? talloc.3 
talloc.3.html
+   rm -f *~ $(LIBOBJ) $(SOLIB) libtalloc.a testsuite testsuite.o *.gc?? 
talloc.3 talloc.3.html
 
 test: testsuite
./testsuite

Modified: branches/SAMBA_4_0/source/lib/talloc/configure.ac
===
--- branches/SAMBA_4_0/source/lib/talloc/configure.ac   2007-11-06 18:58:19 UTC 
(rev 25881)
+++ branches/SAMBA_4_0/source/lib/talloc/configure.ac   2007-11-06 19:24:12 UTC 
(rev 25882)
@@ -15,4 +15,9 @@
 fi
 AC_SUBST(DOC_TARGET)
 
+AC_LD_PICFLAG
+AC_LD_SHLIBEXT
+AC_LD_SONAMEFLAG
+AC_LD_SHLDFLAGS
+
 AC_OUTPUT(Makefile talloc.pc)



svn commit: samba r25881 - in branches/SAMBA_4_0: . source/lib/tdb

2007-11-06 Thread jelmer
Author: jelmer
Date: 2007-11-06 18:58:19 + (Tue, 06 Nov 2007)
New Revision: 25881

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25881

Log:
Add ability to build .so of tdb.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/.bzrignore
   branches/SAMBA_4_0/source/lib/tdb/Makefile.in
   branches/SAMBA_4_0/source/lib/tdb/configure.ac


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/.bzrignore
===
--- branches/SAMBA_4_0/.bzrignore   2007-11-06 18:25:34 UTC (rev 25880)
+++ branches/SAMBA_4_0/.bzrignore   2007-11-06 18:58:19 UTC (rev 25881)
@@ -205,3 +205,4 @@
 source/lib/ldb/tdbtest.ldb
 source/lib/ldb/tdbtest.ldb
 *.po
+libtdb.so.*

Modified: branches/SAMBA_4_0/source/lib/tdb/Makefile.in
===
--- branches/SAMBA_4_0/source/lib/tdb/Makefile.in   2007-11-06 18:25:34 UTC 
(rev 25880)
+++ branches/SAMBA_4_0/source/lib/tdb/Makefile.in   2007-11-06 18:58:19 UTC 
(rev 25881)
@@ -16,6 +16,11 @@
 CFLAGS = $(CPPFLAGS) @CFLAGS@
 LDFLAGS = @LDFLAGS@
 EXEEXT = @EXEEXT@
+SHLD_FLAGS = @SHLD_FLAGS@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PICFLAG = @PICFLAG@
+SONAMEFLAG = @SONAMEFLAG@
+SHLIBEXT = @SHLIBEXT@
 
 .PHONY: test
 
@@ -27,8 +32,11 @@
 
 DIRS = bin common tools
 
-all: showflags dirs $(PROGS)
+SONAME = libtdb.$(SHLIBEXT).1
+SOLIB = libtdb.$(SHLIBEXT).$(PACKAGE_VERSION)
 
+all: showflags dirs $(PROGS) $(SOLIB) libtdb.a
+
 showflags:
@echo 'tdb will be compiled with flags:'
@echo '  CFLAGS = $(CFLAGS)'
@@ -36,10 +44,12 @@
@echo '  LDFLAGS = $(LDFLAGS)'
@echo '  LIBS = $(LIBS)'
 
+.SUFFIXES: .c .o
+
 .c.o:
@echo Compiling $*.c
@mkdir -p `dirname [EMAIL PROTECTED]
-   @$(CC) $(CFLAGS) -c $< -o $@
+   @$(CC) $(PICFLAG) $(CFLAGS) -c $< -o $@
 
 dirs:
@mkdir -p $(DIRS)
@@ -52,23 +62,30 @@
cp $(PROGS) $(DESTDIR)$(bindir)
cp $(srcdir)/include/tdb.h $(DESTDIR)$(includedir)
cp tdb.pc $(DESTDIR)$(libdir)/pkgconfig
+   cp libtdb.a $(SOLIB) $(DESTDIR)$(libdir)
 
 libtdb.a: $(TDB_OBJ)
ar -rv libtdb.a $(TDB_OBJ)
 
-bin/tdbtest$(EXEEXT): tools/tdbtest.o libtdb.a
+libtdb.(SHLIBEXT): $(SOLIB)
+   ln -s $< $@
+
+$(SOLIB): $(TDB_OBJ)
+   $(CC) $(SONAMEFLAG)$(SONAME) $(SHLD_FLAGS) -o $@ $^
+
+bin/tdbtest$(EXEEXT): tools/tdbtest.o libtdb.$(SHLIBEXT)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb 
-lgdbm
 
-bin/tdbtool$(EXEEXT): tools/tdbtool.o libtdb.a
+bin/tdbtool$(EXEEXT): tools/tdbtool.o libtdb.$(SHLIBEXT)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb
 
-bin/tdbtorture$(EXEEXT): tools/tdbtorture.o libtdb.a
+bin/tdbtorture$(EXEEXT): tools/tdbtorture.o libtdb.$(SHLIBEXT)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. 
-ltdb
 
-bin/tdbdump$(EXEEXT): tools/tdbdump.o libtdb.a
+bin/tdbdump$(EXEEXT): tools/tdbdump.o libtdb.$(SHLIBEXT)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbdump tools/tdbdump.o -L. -ltdb
 
-bin/tdbbackup$(EXEEXT): tools/tdbbackup.o libtdb.a
+bin/tdbbackup$(EXEEXT): tools/tdbbackup.o libtdb.$(SHLIBEXT)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb
 
 test: bin/tdbtorture$(EXEEXT)

Modified: branches/SAMBA_4_0/source/lib/tdb/configure.ac
===
--- branches/SAMBA_4_0/source/lib/tdb/configure.ac  2007-11-06 18:25:34 UTC 
(rev 25880)
+++ branches/SAMBA_4_0/source/lib/tdb/configure.ac  2007-11-06 18:58:19 UTC 
(rev 25881)
@@ -6,5 +6,9 @@
 AC_CONFIG_SRCDIR([common/tdb.c])
 AC_CONFIG_HEADER(include/config.h)
 AC_LIBREPLACE_ALL_CHECKS
+AC_LD_SONAMEFLAG
+AC_LD_PICFLAG
+AC_LD_SHLDFLAGS
+AC_LD_SHLIBEXT
 m4_include(libtdb.m4)
 AC_OUTPUT(Makefile tdb.pc)



[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-215-g9dd18bb

2007-11-06 Thread Michael Adam
The branch, v3-2-test has been updated
   via  9dd18bb534bca6b5de6cad9580b48681b36c0832 (commit)
   via  c61b4222d30288add216fac4da3cfaa537f5cd01 (commit)
   via  6f961a23de745aba5dcd4585b731e651b8cbeef4 (commit)
  from  7b582af2107bed3b864bb408b5c9bcce4b8e4c72 (commit)

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


- Log -
commit 9dd18bb534bca6b5de6cad9580b48681b36c0832
Author: Michael Adam <[EMAIL PROTECTED]>
Date:   Fri Oct 26 19:50:55 2007 +0200

Move some access check functions that are not posix-acl specific
to a new source file of their own.

Michael

commit c61b4222d30288add216fac4da3cfaa537f5cd01
Author: Michael Adam <[EMAIL PROTECTED]>
Date:   Thu Oct 25 13:32:56 2007 +0200

Don't repeat fast-pathing...

Michael

commit 6f961a23de745aba5dcd4585b731e651b8cbeef4
Author: Michael Adam <[EMAIL PROTECTED]>
Date:   Sat Oct 20 02:17:07 2007 +0200

This is a proposed patch for Bug #5023.

The three can_* access check functions in smbd/posix_acls.c that are used in
smbd/open.c and smbd/nttrans.c explicitly called 
check_posix_acl_group_access()

This lead to errors with nfsv4 acls (ZFS and GPFS).

This changes the can_* functions to get the nt_acl via VFS layer and call
se_access_check on that. It also removes check_posix_acl_group_access()
which has no more callers.

NOTE: The can_* functions should really not be in smbd/posix_acls.c but
in a separate file (I propose smbd/access.c).

Michael

---

Summary of changes:
 source/Makefile.in|1 +
 source/smbd/file_access.c |  239 
 source/smbd/posix_acls.c  |  442 -
 3 files changed, 240 insertions(+), 442 deletions(-)
 create mode 100644 source/smbd/file_access.c


Changeset truncated at 500 lines:

diff --git a/source/Makefile.in b/source/Makefile.in
index baa1828..ef3a0c9 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -542,6 +542,7 @@ SMBD_OBJ_SRV = smbd/files.o smbd/chgpasswd.o 
smbd/connection.o \
   smbd/quotas.o smbd/ntquotas.o $(AFS_OBJ) smbd/msdfs.o \
   $(AFS_SETTOKEN_OBJ) smbd/aio.o smbd/statvfs.o \
   smbd/dmapi.o \
+  smbd/file_access.o \
   $(MANGLE_OBJ) @VFS_STATIC@
 
 SMBD_OBJ_BASE = $(PARAM_WITHOUT_REG_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \
diff --git a/source/smbd/file_access.c b/source/smbd/file_access.c
new file mode 100644
index 000..189fcbb
--- /dev/null
+++ b/source/smbd/file_access.c
@@ -0,0 +1,239 @@
+/*
+   Unix SMB/CIFS implementation.
+   Check access to files based on security descriptors.
+   Copyright (C) Jeremy Allison 2005-2006.
+   Copyright (C) Michael Adam 2007.
+
+   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 .
+*/
+
+#include "includes.h"
+
+extern struct current_user current_user;
+
+#undef  DBGC_CLASS
+#define DBGC_CLASS DBGC_ACLS
+
+/
+ Helper function that gets a security descriptor by connection and
+ file name.
+ NOTE: This is transitional, in the sense that SMB_VFS_GET_NT_ACL really
+ should *not* get a files_struct pointer but a connection_struct ptr
+ (automatic by the vfs handle) and the file name and _use_ that!
+/
+static NTSTATUS conn_get_nt_acl(TALLOC_CTX *mem_ctx,
+   struct connection_struct *conn,
+   const char *fname,
+   SMB_STRUCT_STAT *psbuf,
+   struct security_descriptor **psd)
+{
+   NTSTATUS status;
+   struct files_struct *fsp = NULL;
+   struct security_descriptor *secdesc = NULL;
+   size_t secdesc_size;
+
+   if (!VALID_STAT(*psbuf)) {
+   if (SMB_VFS_STAT(conn, fname, psbuf) != 0) {
+   return map_nt_error_from_unix(errno);
+   }
+   }
+
+   /* fake a files_struct ptr: */
+
+   status = open_file_stat(conn, NULL, fname, psbuf, &fsp);
+   /* Perhaps it is a directory */
+   if (NT_STATUS_EQUAL(status, NT_STATUS_FILE_IS_A_DIRECTORY)) {
+   status = o

svn commit: samba r25880 - in branches/SAMBA_4_0: . source/lib/ldb source/lib/replace

2007-11-06 Thread jelmer
Author: jelmer
Date: 2007-11-06 18:25:34 + (Tue, 06 Nov 2007)
New Revision: 25880

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25880

Log:
Try to get some more flags right.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/ldb/Makefile.in
   branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/ldb/Makefile.in
===
--- branches/SAMBA_4_0/source/lib/ldb/Makefile.in   2007-11-06 16:42:11 UTC 
(rev 25879)
+++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in   2007-11-06 18:25:34 UTC 
(rev 25880)
@@ -97,7 +97,7 @@
 STATICLIB = lib/libldb.a
 
 $(SOLIB): $(OBJS)
-   $(CC) $(SHLD_FLAGS) $(SONAMEFLAG)$(SONAME) -o $@ $^ @LDFLAGS@ @LIBS@ 
$(TALLOC_LIBS) $(TDB_LIBS)
+   $(CC) $(SHLD_FLAGS) $(SONAMEFLAG)$(SONAME) -o $@ $^ $(LDFLAGS) $(LIBS) 
$(TALLOC_LIBS) $(TDB_LIBS)
 
 all: showflags dirs $(OBJS) $(STATICLIB) $(SOLIB) $(BINS) $(EXAMPLES) manpages
 
@@ -124,7 +124,7 @@
@-ranlib $@
 
 lib/libnss_ldb.$(SHLIBEXT).2: $(NSS_OBJ) $(LIBS) bin/libldb.a
-   $(CC) $(SHLD_FLAGS) -Wl,-soname,libnss_ldb.$(SHLIBEXT).2 -o 
lib/libnss_ldb.$(SHLIBEXT).2 $(NSS_OBJ) $(OBJS) $(LIB_FLAGS)
+   $(CC) $(SHLD_FLAGS) $(SONAMEFLAG)libnss_ldb.$(SHLIBEXT).2 -o 
lib/libnss_ldb.$(SHLIBEXT).2 $(NSS_OBJ) $(OBJS) $(LIB_FLAGS)
 
 sample_module.$(SHLIBEXT): tests/sample_module.o 
$(CC) $(SHLD_FLAGS) $(LIBS) $(LDFLAGS) -o $@ tests/sample_module.o 

Modified: branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4
===
--- branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4  2007-11-06 
16:42:11 UTC (rev 25879)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4  2007-11-06 
18:25:34 UTC (rev 25880)
@@ -8,7 +8,7 @@
hpux* )
  LD_EXPORT_DYNAMIC="-Wl,-E"
  ;;
-   * )
+   *)
  LD_EXPORT_DYNAMIC=""
  ;;
  esac
@@ -101,7 +101,7 @@
SHLD_FLAGS="-b -Wl,-B,symbolic,-b,-z"
;;
*darwin*)
-   SHLD_FLAGS="-bundle -flat_namespace -undefined suppress"
+   SHLD_FLAGS="-dynamiclib"
;;
esac
 
@@ -150,7 +150,7 @@
SONAMEFLAG="-Wl,-soname,"
;;
*irix*)
-   SONAMEFLAG="-soname "
+   SONAMEFLAG="-Wl,-soname,"
;;
*hpux*)
SONAMEFLAG="-Wl,+h "
@@ -162,7 +162,7 @@
SONAMEFLAG="-Wl,-soname,"
;;
*darwin*)
-   SONAMEFLAG="-Wl,-soname,"
+   SONAMEFLAG="-install_name "
;;
esac
 ])



[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-212-g7b582af

2007-11-06 Thread Michael Adam
The branch, v3-2-test has been updated
   via  7b582af2107bed3b864bb408b5c9bcce4b8e4c72 (commit)
  from  760f24f10cbea7ce22acd0772fb5b125f718d129 (commit)

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


- Log -
commit 7b582af2107bed3b864bb408b5c9bcce4b8e4c72
Author: Michael Adam <[EMAIL PROTECTED]>
Date:   Tue Nov 6 06:31:24 2007 +0100

Add a const.

Michael

---

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


Changeset truncated at 500 lines:

diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c
index 7f03d7e..6422bad 100644
--- a/source/smbd/posix_acls.c
+++ b/source/smbd/posix_acls.c
@@ -662,7 +662,7 @@ static int map_acl_perms_to_permset(connection_struct 
*conn, mode_t mode, SMB_AC
  Function to create owner and group SIDs from a SMB_STRUCT_STAT.
 /
 
-static void create_file_sids(SMB_STRUCT_STAT *psbuf, DOM_SID *powner_sid, 
DOM_SID *pgroup_sid)
+static void create_file_sids(const SMB_STRUCT_STAT *psbuf, DOM_SID 
*powner_sid, DOM_SID *pgroup_sid)
 {
uid_to_sid( powner_sid, psbuf->st_uid );
gid_to_sid( pgroup_sid, psbuf->st_gid );


-- 
Samba Shared Repository


svn commit: samba r25879 - in branches/SAMBA_4_0: . source/lib/ldb

2007-11-06 Thread jelmer
Author: jelmer
Date: 2007-11-06 16:42:11 + (Tue, 06 Nov 2007)
New Revision: 25879

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25879

Log:
Don't use shared library for command-line utilities for now - breaks the 
testsuite, and there is no portable equivalent of LD_LIBRARY_PATH.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/ldb/Makefile.in


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/ldb/Makefile.in
===
--- branches/SAMBA_4_0/source/lib/ldb/Makefile.in   2007-11-06 16:27:58 UTC 
(rev 25878)
+++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in   2007-11-06 16:42:11 UTC 
(rev 25879)
@@ -48,7 +48,9 @@
$(POPT_CFLAGS) $(TALLOC_CFLAGS) $(TDB_CFLAGS) \
-DLIBDIR=\"$(libdir)\" -DSHLIBEXT=\"$(SHLIBEXT)\" -DUSE_MMAP=1 @CFLAGS@
 
-LIB_FLAGS=$(LDFLAGS) -Llib $(SOLIB) $(LIBS) $(POPT_LIBS) $(TALLOC_LIBS) \
+LDB_LIB = $(STATICLIB)
+
+LIB_FLAGS=$(LDFLAGS) -Llib $(LDB_LIB) $(LIBS) $(POPT_LIBS) $(TALLOC_LIBS) \
  $(TDB_LIBS) $(LDAP_LIBS) $(LIBDL)
 
 LDB_TDB_DIR=ldb_tdb
@@ -73,16 +75,12 @@
 
 NSSDIR=nssldb
 NSS_OBJ= $(NSSDIR)/ldb-nss.o $(NSSDIR)/ldb-pwd.o $(NSSDIR)/ldb-grp.o
-NSS_LIB = lib/libnss_ldb.so.2
+NSS_LIB = lib/libnss_ldb.$(SHLIBEXT).2
 
 OBJS = $(MODULES_OBJ) $(COMMON_OBJ) $(LDB_TDB_OBJ) $(TDB_OBJ) $(TALLOC_OBJ) 
$(POPT_OBJ) $(LDB_MAP_OBJ) @LIBREPLACEOBJ@ $(EXTRA_OBJ) 
 
-LDB_LIB = lib/libldb.a
-
 BINS = bin/ldbadd bin/ldbsearch bin/ldbdel bin/ldbmodify bin/ldbedit 
bin/ldbrename bin/ldbtest bin/oLschema2ldif
 
-LIBS = $(SOLIB)
-
 EXAMPLES = examples/ldbreader examples/ldifreader
 
 DIRS = lib bin common ldb_tdb ldb_ldap ldb_sqlite3 modules tools examples
@@ -94,13 +92,14 @@
 nssdir:
@mkdir -p $(NSSDIR)
 
-SONAME = libldb.so.0
-SOLIB = lib/libldb.so.0.9.0
+SONAME = libldb.$(SHLIBEXT).0
+SOLIB = lib/libldb.$(SHLIBEXT).0.9.0
+STATICLIB = lib/libldb.a
 
 $(SOLIB): $(OBJS)
$(CC) $(SHLD_FLAGS) $(SONAMEFLAG)$(SONAME) -o $@ $^ @LDFLAGS@ @LIBS@ 
$(TALLOC_LIBS) $(TDB_LIBS)
 
-all: showflags dirs $(OBJS) $(LDB_LIB) $(SOLIB) $(BINS) $(EXAMPLES) manpages
+all: showflags dirs $(OBJS) $(STATICLIB) $(SOLIB) $(BINS) $(EXAMPLES) manpages
 
 showflags:
@echo 'ldb will be compiled with flags:'
@@ -124,8 +123,8 @@
ar -rv $@ $(OBJS)
@-ranlib $@
 
-lib/libnss_ldb.so.2: $(NSS_OBJ) $(LIBS) bin/libldb.a
-   $(CC) $(SHLD_FLAGS) -Wl,-soname,libnss_ldb.so.2 -o lib/libnss_ldb.so.2 
$(NSS_OBJ) $(OBJS) $(LIB_FLAGS)
+lib/libnss_ldb.$(SHLIBEXT).2: $(NSS_OBJ) $(LIBS) bin/libldb.a
+   $(CC) $(SHLD_FLAGS) -Wl,-soname,libnss_ldb.$(SHLIBEXT).2 -o 
lib/libnss_ldb.$(SHLIBEXT).2 $(NSS_OBJ) $(OBJS) $(LIB_FLAGS)
 
 sample_module.$(SHLIBEXT): tests/sample_module.o 
$(CC) $(SHLD_FLAGS) $(LIBS) $(LDFLAGS) -o $@ tests/sample_module.o 
@@ -170,7 +169,7 @@
 
 clean:
rm -f *.o */*.o *.gcov */*.gc?? tdbtest.ldb*
-   rm -f $(BINS) $(TDB_OBJ) $(TALLOC_OBJ) $(LDB_LIB) $(NSS_LIB)
+   rm -f $(BINS) $(TDB_OBJ) $(TALLOC_OBJ) $(STATICLIB) $(NSS_LIB) $(SOLIB)
rm -f man/*.1 man/*.3 man/*.html
rm -f $(EXAMPLES)
rm -rf apidocs/
@@ -202,7 +201,7 @@
 install: all
mkdir -p $(DESTDIR)$(includedir) $(DESTDIR)$(libdir)/pkgconfig 
$(DESTDIR)$(libdir) $(bindir)
cp $(srcdir)/include/ldb.h $(srcdir)/include/ldb_errors.h 
$(DESTDIR)$(includedir)
-   cp $(LDB_LIB) $(SOLIB) $(DESTDIR)$(libdir)
+   cp $(STATICLIB) $(SOLIB) $(DESTDIR)$(libdir)
cp $(BINS) $(DESTDIR)$(bindir)
cp ldb.pc $(DESTDIR)$(libdir)/pkgconfig
$(srcdir)/docs/installdocs.sh $(DESTDIR)$(mandir)



svn commit: samba r25878 - in branches/SAMBA_4_0: . source/build/m4

2007-11-06 Thread jelmer
Author: jelmer
Date: 2007-11-06 16:27:58 + (Tue, 06 Nov 2007)
New Revision: 25878

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25878

Log:
Fix syntax error.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/build/m4/check_ld.m4


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/build/m4/check_ld.m4
===
--- branches/SAMBA_4_0/source/build/m4/check_ld.m4  2007-11-06 16:23:18 UTC 
(rev 25877)
+++ branches/SAMBA_4_0/source/build/m4/check_ld.m4  2007-11-06 16:27:58 UTC 
(rev 25878)
@@ -78,8 +78,6 @@
;;
*hpux*)
# Use special PIC flags for the native HP-UX compiler.
-   if test $ac_cv_prog_cc_Ae = yes; then
-   fi
BLDSHARED="true" # I hope this is correct
if test "$host_cpu" = "ia64"; then
LDFLAGS="$LDFLAGS 
-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32"



svn commit: samba r25877 - in branches/SAMBA_4_0: . source/build/m4 source/lib/ldb source/lib/replace

2007-11-06 Thread jelmer
Author: jelmer
Date: 2007-11-06 16:23:18 + (Tue, 06 Nov 2007)
New Revision: 25877

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25877

Log:
Add libreplace macro for soname flags.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/build/m4/check_ld.m4
   branches/SAMBA_4_0/source/lib/ldb/Makefile.in
   branches/SAMBA_4_0/source/lib/ldb/configure.ac
   branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/build/m4/check_ld.m4
===
--- branches/SAMBA_4_0/source/build/m4/check_ld.m4  2007-11-06 16:13:02 UTC 
(rev 25876)
+++ branches/SAMBA_4_0/source/build/m4/check_ld.m4  2007-11-06 16:23:18 UTC 
(rev 25877)
@@ -19,7 +19,6 @@
 AC_SUBST(LDFLAGS)
 AC_SUBST(SHLD)
 AC_SUBST(SHLD_UNDEF_FLAGS)
-AC_SUBST(SONAMEFLAG)
 
 # Assume non-shared by default and override below
 # these are the defaults, good for lots of systems
@@ -28,7 +27,6 @@
 BLDSHARED="false"
 LD="${CC}"
 SHLD="${CC}"
-SONAMEFLAG=""
 PICFLAG=""
 
 # allow for --with-hostld=gcc
@@ -50,13 +48,10 @@
BLDSHARED="true"
SHLD_UNDEF_FLAGS="-Wl,--allow-shlib-undefined"
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-   SONAMEFLAG="-Wl,-soname="
;;
*solaris*)
BLDSHARED="true"
-   SONAMEFLAG="-h "
if test "${GCC}" = "yes"; then
-   SONAMEFLAG="-Wl,-soname="
if test "${ac_cv_prog_gnu_ld}" = "yes"; then
LDFLAGS="$LDFLAGS -Wl,-E"
fi
@@ -64,21 +59,17 @@
;;
*sunos*)
BLDSHARED="true"
-   SONAMEFLAG="-Wl,-h,"
;;
*netbsd* | *freebsd* | *dragonfly* )  
BLDSHARED="true"
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-   SONAMEFLAG="-Wl,-soname,"
;;
*openbsd*)
BLDSHARED="true"
LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
-   SONAMEFLAG="-Wl,-soname,"
;;
*irix*)
BLDSHARED="true"
-   SONAMEFLAG="-soname "
SHLD="${PROG_LD}"
;;
*aix*)
@@ -88,8 +79,6 @@
*hpux*)
# Use special PIC flags for the native HP-UX compiler.
if test $ac_cv_prog_cc_Ae = yes; then
-   SONAMEFLAG="-Wl,+h "
-   elif test "${GCC}" = "yes"; then
fi
BLDSHARED="true" # I hope this is correct
if test "$host_cpu" = "ia64"; then
@@ -100,11 +89,9 @@
;;
*osf*)
BLDSHARED="true"
-   SONAMEFLAG="-Wl,-soname,"
;;
*unixware*)
BLDSHARED="true"
-   SONAMEFLAG="-Wl,-soname,"
;;
*darwin*)
BLDSHARED="true"
@@ -129,6 +116,7 @@
 AC_LD_EXPORT_DYNAMIC
 AC_LD_SHLDFLAGS
 AC_LD_SHLIBEXT
+AC_LD_SONAMEFLAG
 
 AC_ARG_ENABLE(shared,
 [  --disable-sharedDisable testing for building shared libraries],

Modified: branches/SAMBA_4_0/source/lib/ldb/Makefile.in
===
--- branches/SAMBA_4_0/source/lib/ldb/Makefile.in   2007-11-06 16:13:02 UTC 
(rev 25876)
+++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in   2007-11-06 16:23:18 UTC 
(rev 25877)
@@ -35,6 +35,7 @@
 LIBDL = @LIBDL@
 
 SHLIBEXT = @SHLIBEXT@
+SONAMEFLAG = @SONAMEFLAG@
 
 LD_EXPORT_DYNAMIC = @LD_EXPORT_DYNAMIC@
 SHLD_FLAGS = @SHLD_FLAGS@
@@ -47,7 +48,7 @@
$(POPT_CFLAGS) $(TALLOC_CFLAGS) $(TDB_CFLAGS) \
-DLIBDIR=\"$(libdir)\" -DSHLIBEXT=\"$(SHLIBEXT)\" -DUSE_MMAP=1 @CFLAGS@
 
-LIB_FLAGS=$(LDFLAGS) -Llib -lldb $(LIBS) $(POPT_LIBS) $(TALLOC_LIBS) \
+LIB_FLAGS=$(LDFLAGS) -Llib $(SOLIB) $(LIBS) $(POPT_LIBS) $(TALLOC_LIBS) \
  $(TDB_LIBS) $(LDAP_LIBS) $(LIBDL)
 
 LDB_TDB_DIR=ldb_tdb
@@ -80,7 +81,7 @@
 
 BINS = bin/ldbadd bin/ldbsearch bin/ldbdel bin/ldbmodify bin/ldbedit 
bin/ldbrename bin/ldbtest bin/oLschema2ldif
 
-LIBS = $(LDB_LIB)
+LIBS = $(SOLIB)
 
 EXAMPLES = examples/ldbreader examples/ldifreader
 
@@ -93,8 +94,14 @@
 nssdir:
@mkdir -p $(NSSDIR)
 
-all: showflags dirs $(OBJS) $(LDB_LIB) $(BINS) $(EXAMPLES) manpages
+SONAME = libldb.so.0
+SOLIB = lib/libldb.so.0.9.0
 
+$(SOLIB): $(OBJS)
+   $(CC) $(SHLD_FLAGS) $(SONAMEFLAG)$(SONAME) -o $@ $^ @LDFLAGS@ @LIBS@ 
$(TALLOC_LIBS) $(TDB_LIBS)
+
+all: showflags dirs $(OBJS) $(LDB_LIB) $(SOLIB) $(BINS) $(EXAMPLES) manpages
+
 showflags:
@echo 'ldb will be compiled with flags:'
@echo '  CFLAGS = $(CFLAGS)'
@@ -105,6 +112,11 @@

svn commit: samba r25876 - in branches/SAMBA_4_0: . source/build/m4

2007-11-06 Thread jelmer
Author: jelmer
Date: 2007-11-06 16:13:02 + (Tue, 06 Nov 2007)
New Revision: 25876

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25876

Log:
Attempt to build shard libs everywhere again.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/build/m4/check_ld.m4


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/build/m4/check_ld.m4
===
--- branches/SAMBA_4_0/source/build/m4/check_ld.m4  2007-11-06 14:51:42 UTC 
(rev 25875)
+++ branches/SAMBA_4_0/source/build/m4/check_ld.m4  2007-11-06 16:13:02 UTC 
(rev 25876)
@@ -72,30 +72,26 @@
SONAMEFLAG="-Wl,-soname,"
;;
*openbsd*)
-   # disabled because us4 fails to link libtorture.so
-   BLDSHARED="false"
+   BLDSHARED="true"
LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
SONAMEFLAG="-Wl,-soname,"
;;
*irix*)
-   # disabled because us4 fails to link libtorture.so
-   BLDSHARED="false"
+   BLDSHARED="true"
SONAMEFLAG="-soname "
SHLD="${PROG_LD}"
;;
*aix*)
-   # disabled because us4 fails to link libtorture.so
-   BLDSHARED="false"
+   BLDSHARED="true"
LDFLAGS="$LDFLAGS -Wl,-brtl,-bexpall,-bbigtoc"
;;
*hpux*)
# Use special PIC flags for the native HP-UX compiler.
if test $ac_cv_prog_cc_Ae = yes; then
-   BLDSHARED="true"
SONAMEFLAG="-Wl,+h "
elif test "${GCC}" = "yes"; then
-   BLDSHARED="true" # I hope this is correct
fi
+   BLDSHARED="true" # I hope this is correct
if test "$host_cpu" = "ia64"; then
LDFLAGS="$LDFLAGS 
-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32"
else
@@ -103,8 +99,7 @@
fi
;;
*osf*)
-   # disabled because tru64 fails to link libtorture.so
-   BLDSHARED="false"
+   BLDSHARED="true"
SONAMEFLAG="-Wl,-soname,"
;;
*unixware*)



svn commit: samba r25875 - in branches/SAMBA_4_0: . source/lib/replace

2007-11-06 Thread jelmer
Author: jelmer
Date: 2007-11-06 14:51:42 + (Tue, 06 Nov 2007)
New Revision: 25875

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25875

Log:
Try to fix the build on some HPUX machines.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4
===
--- branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4  2007-11-06 
12:39:47 UTC (rev 25874)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4  2007-11-06 
14:51:42 UTC (rev 25875)
@@ -98,9 +98,7 @@
SHLD_FLAGS="-Wl,-G,-bexpall,-bbigtoc"
;;
*hpux*)
-   if test $ac_cv_prog_cc_Ae = yes; then
-   SHLD_FLAGS="-b -Wl,-B,symbolic,-b,-z"
-   fi
+   SHLD_FLAGS="-b -Wl,-B,symbolic,-b,-z"
;;
*darwin*)
SHLD_FLAGS="-bundle -flat_namespace -undefined suppress"



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

2007-11-06 Thread kseeger
Author: kseeger
Date: 2007-11-06 13:43:19 + (Tue, 06 Nov 2007)
New Revision: 1204

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=1204

Log:
Fix some typos
Modified:
   trunk/manpages-3/net.8.xml


Changeset:
Modified: trunk/manpages-3/net.8.xml
===
--- trunk/manpages-3/net.8.xml  2007-11-02 22:45:37 UTC (rev 1203)
+++ trunk/manpages-3/net.8.xml  2007-11-06 13:43:19 UTC (rev 1204)
@@ -161,7 +161,7 @@
 
 TIME SYSTEM
 
-Displays the time on the remote server in a format ready for 
/bin/date
+Displays the time on the remote server in a format ready for 
/bin/date.
 
 
 
@@ -620,7 +620,7 @@
 GROUPMAP
 
 Manage the mappings between Windows group SIDs and UNIX groups.
-Parameters take the for "parameter=value".  Common options include:
+Common options include:
 
 
 unixgroup - Name of the UNIX group
@@ -658,7 +658,7 @@
 
 GROUPMAP MODIFY
 
-Update en existing group entry
+Update en existing group entry.
 
 
 
@@ -671,7 +671,7 @@
 
 GROUPMAP LIST
 
-List existing group mapping entries
+List existing group mapping entries.
 
 net groupmap list [verbose] [ntgroup=string] [sid=SID]
 
@@ -1134,7 +1134,7 @@
 SAM POLICY LIST
 
 
-List the avilable account policies.
+List the available account policies.
 
 
 
@@ -1192,7 +1192,7 @@
 IDMAP SECRET |ALLOC 
 
 
-Store a secret for the sepcified domain, used primarily for domains
+Store a secret for the specified domain, used primarily for domains
 that use idmap_ldap as a backend. In this case the secret is used
 as the password for the user DN used to bind to the ldap server.
 
@@ -1203,12 +1203,12 @@
 USERSHARE
 
 Starting with version 3.0.23, a Samba server now supports the ability for
-non-root users to add user define shares to be exported using the "net 
usershare"
+non-root users to add user defined shares to be exported using the "net 
usershare"
 commands.
 
 
 
-To set this up, first set up your smb.conf by adding to the [global] section :
+To set this up, first set up your smb.conf by adding to the [global] section:
 
 usershare path = /usr/local/samba/lib/usershares
 
@@ -1251,7 +1251,7 @@
 
 
 "path" specifies the absolute pathname on the system to be exported.
-Restrictions may be put on this, see the global smb.conf parameters :
+Restrictions may be put on this, see the global smb.conf parameters:
 "usershare owner only", "usershare prefix allow list", and
 "usershare prefix deny list".
 
@@ -1265,7 +1265,7 @@
 specifies which users have read and write access to the entire share.
 Note that guest connections are not allowed unless the smb.conf parameter
 "usershare allow guests" has been set. The definition of a user
-defined share acl is : "user:permission", where user is a valid
+defined share acl is: "user:permission", where user is a valid
 username on the system and permission can be "F", "R", or "D".
 "F" stands for "full permissions", ie. read and write permissions.
 "D" stands for "deny" for a user, ie. prevent this user from accessing
@@ -1321,7 +1321,7 @@
 
 
 
-The information given about a share looks like :
+The information given about a share looks like:
 
 [foobar]
 path=/home/jeremy



svn commit: samba r25874 - in branches/SAMBA_4_0/source/heimdal_build: .

2007-11-06 Thread metze
Author: metze
Date: 2007-11-06 12:39:47 + (Tue, 06 Nov 2007)
New Revision: 25874

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25874

Log:
force specific versions for LEX and YACC.

We often have problems with old yacc and bison versions
and it seem the combination of LAX and YACC also matters.

So we now list all supported version combinations explicit.
flex-2.5.33:bison-2.3 only for now.

metze
Modified:
   branches/SAMBA_4_0/source/heimdal_build/config.m4


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal_build/config.m4
===
--- branches/SAMBA_4_0/source/heimdal_build/config.m4   2007-11-06 12:34:50 UTC 
(rev 25873)
+++ branches/SAMBA_4_0/source/heimdal_build/config.m4   2007-11-06 12:39:47 UTC 
(rev 25874)
@@ -180,9 +180,57 @@
 SMB_ENABLE(asn1_compile, NO)
 SMB_ENABLE(compile_et, NO)
 
+#
+# We need bison -y and flex in new versions
+# Otherwise we get random runtime failures
+#
+LEX_YACC_COMBINATIONS=""
+LEX_YACC_COMBINATIONS="$LEX_YACC_COMBINATIONS flex-2.5.33:bison-2.3"
+
 AC_PROG_LEX
+LEX_BASENAME=`basename "$LEX"`
+if test x"$LEX_BASENAME" = x"flex"; then
+   # "flex 2.5.33"
+   FLEX_VERSION=`$LEX --version | cut -d ' ' -f2`
+   AC_MSG_CHECKING(flex version)
+   AC_MSG_RESULT($FLEX_VERSION)
+   FLEX_MAJOR=`echo $FLEX_VERSION | cut -d '.' -f1`
+   FLEX_MINOR=`echo $FLEX_VERSION | cut -d '.' -f2`
+   FLEX_RELEASE=`echo $FLEX_VERSION | cut -d '.' -f3`
+
+   LEX_VERSION="flex-$FLEX_MAJOR.$FLEX_MINOR.$FLEX_RELEASE"
+fi
+
 AC_PROG_YACC
+YACC_BASENAME=`basename "$YACC"`
+if test x"$YACC_BASENAME" = x"bison -y"; then
+   # bison (GNU Bison) 2.3
+   BISON_VERSION=`$YACC --version | head -1 | cut -d ' ' -f4`
+   AC_MSG_CHECKING(bison version)
+   AC_MSG_RESULT($BISON_VERSION)
+   BISON_MAJOR=`echo $BISON_VERSION | cut -d '.' -f1`
+   BISON_MINOR=`echo $BISON_VERSION | cut -d '.' -f2`
 
+   YACC_VERSION="bison-$BISON_MAJOR.$BISON_MINOR"
+fi
+
+AC_MSG_CHECKING(working LEX YACC combination)
+LEX_YACC="no"
+if test x"$LEX_VERSION" != x"" -a x"$YACC_VERSION" != x""; then
+   V="$LEX_VERSION:$YACC_VERSION"
+   for C in $LEX_YACC_COMBINATIONS; do
+   if test x"$V" = x"$C"; then
+   LEX_YACC=$V
+   break;
+   fi
+   done
+fi
+if test x"$LEX_YACC" = x"no"; then
+   LEX=false
+   YACC=false
+fi
+AC_MSG_RESULT($LEX_YACC)
+
 # Portions of heimdal kerberos are unpacked into source/heimdal
 # of the samba source tree.  
 



svn commit: samba r25873 - in branches/SAMBA_4_0/source/lib/nss_wrapper: .

2007-11-06 Thread metze
Author: metze
Date: 2007-11-06 12:34:50 + (Tue, 06 Nov 2007)
New Revision: 25873

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25873

Log:
nss_wrapper: hopefully a better fix for the solaris get*ent_r functions

metze
Modified:
   branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c
===
--- branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c 2007-11-06 
12:15:19 UTC (rev 25872)
+++ branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c 2007-11-06 
12:34:50 UTC (rev 25873)
@@ -906,7 +906,21 @@
struct passwd *pw;
 
if (!nwrap_enabled()) {
+#ifdef SOLARIS_GETPWENT_R
+   pw = real_getpwent_r(pwdst, buf, buflen);
+   if (!pw) {
+   if (errno == 0) {
+   return ENOENT;
+   }
+   return errno;
+   }
+   if (pwdstp) {
+   *pwdstp = pw;
+   }
+   return 0;
+#else
return real_getpwent_r(pwdst, buf, buflen, pwdstp);
+#endif
}
 
pw = nwrap_getpwent();
@@ -1078,7 +1092,21 @@
struct group *gr;
 
if (!nwrap_enabled()) {
+#ifdef SOLARIS_GETGRENT_R
+   gr = real_getgrent_r(grdst, buf, buflen);
+   if (!gr) {
+   if (errno == 0) {
+   return ENOENT;
+   }
+   return errno;
+   }
+   if (grdstp) {
+   *grdstp = gr;
+   }
+   return 0;
+#else
return real_getgrent_r(grdst, buf, buflen, grdstp);
+#endif
}
 
gr = nwrap_getgrent();



svn commit: samba r25872 - in branches/SAMBA_4_0/source/lib/nss_wrapper: .

2007-11-06 Thread metze
Author: metze
Date: 2007-11-06 12:15:19 + (Tue, 06 Nov 2007)
New Revision: 25872

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25872

Log:
nss_wrapper: revert solaris get*ent_r() functions

This was the wrong approach, as in future lib/replace
should hide this special solaris stuff.

metze
Modified:
   branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c
===
--- branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c 2007-11-06 
12:11:35 UTC (rev 25871)
+++ branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c 2007-11-06 
12:15:19 UTC (rev 25872)
@@ -900,36 +900,6 @@
return pw;
 }
 
-#ifdef SOLARIS_GETPWENT_R
-_PUBLIC_ struct passwd *nwrap_getpwent_r(struct passwd *pwdst,
-char *buf,
-int buflen)
-{
-   struct passwd *pw;
-   struct passwd *pwdstp = NULL;
-   int ret;
-
-   if (!nwrap_enabled()) {
-   return real_getpwent_r(pwdst, buf, buflen);
-   }
-
-   pw = nwrap_getpwent();
-   if (!pw) {
-   if (errno == 0) {
-   errno = ENOENT;
-   }
-   return NULL;
-   }
-
-   ret = nwrap_pw_copy_r(pw, pwdst, buf, buflen, &pwdstp);
-   if (ret != 0) {
-   errno = ret;
-   return NULL;
-   }
-
-   return pwdstp;
-}
-#else
 _PUBLIC_ int nwrap_getpwent_r(struct passwd *pwdst, char *buf,
  size_t buflen, struct passwd **pwdstp)
 {
@@ -949,7 +919,6 @@
 
return nwrap_pw_copy_r(pw, pwdst, buf, buflen, pwdstp);
 }
-#endif
 
 _PUBLIC_ void nwrap_endpwent(void)
 {
@@ -1103,36 +1072,6 @@
return gr;
 }
 
-#ifdef SOLARIS_GETGRENT_R
-_PUBLIC_ struct group *nwrap_getgrent_r(struct group *grdst,
-   char *buf,
-   int buflen)
-{
-   struct group *gr;
-   struct group *grdstp = NULL;
-   int ret;
-
-   if (!nwrap_enabled()) {
-   return real_getgrent_r(grdst, buf, buflen);
-   }
-
-   gr = nwrap_getgrent();
-   if (!gr) {
-   if (errno == 0) {
-   errno = ENOENT;
-   }
-   return NULL;
-   }
-
-   ret = nwrap_gr_copy_r(gr, grdst, buf, buflen, &grdstp);
-   if (ret != 0) {
-   errno = ret;
-   return NULL;
-   }
-
-   return grdstp;
-}
-#else
 _PUBLIC_ int nwrap_getgrent_r(struct group *grdst, char *buf,
  size_t buflen, struct group **grdstp)
 {
@@ -1152,7 +1091,6 @@
 
return nwrap_gr_copy_r(gr, grdst, buf, buflen, grdstp);
 }
-#endif
 
 _PUBLIC_ void nwrap_endgrent(void)
 {



svn commit: samba r25871 - in branches/SAMBA_4_0/source/lib/nss_wrapper: .

2007-11-06 Thread metze
Author: metze
Date: 2007-11-06 12:11:35 + (Tue, 06 Nov 2007)
New Revision: 25871

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25871

Log:
nss_wrapper: set the destination pointer in the get*_r functions

metze
Modified:
   branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c
===
--- branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c 2007-11-06 
10:40:07 UTC (rev 25870)
+++ branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c 2007-11-06 
12:11:35 UTC (rev 25871)
@@ -535,7 +535,7 @@
 }
 
 static int nwrap_pw_copy_r(const struct passwd *src, struct passwd *dst,
-  char *buf, size_t buflen, struct passwd **destp)
+  char *buf, size_t buflen, struct passwd **dstp)
 {
char *first;
char *last;
@@ -567,6 +567,10 @@
ofs = PTR_DIFF(src->pw_shell, first);
dst->pw_shell = buf + ofs;
 
+   if (dstp) {
+   *dstp = dst;
+   }
+
return 0;
 }
 
@@ -719,7 +723,7 @@
 }
 
 static int nwrap_gr_copy_r(const struct group *src, struct group *dst,
-  char *buf, size_t buflen, struct group **destp)
+  char *buf, size_t buflen, struct group **dstp)
 {
char *first;
char **lastm;
@@ -759,6 +763,10 @@
dst->gr_mem[i] = buf + ofs;
}
 
+   if (dstp) {
+   *dstp = dst;
+   }
+
return 0;
 }
 



svn commit: samba r25870 - in branches/SAMBA_4_0/source/lib/replace: .

2007-11-06 Thread metze
Author: metze
Date: 2007-11-06 10:40:07 + (Tue, 06 Nov 2007)
New Revision: 25870

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25870

Log:
libreplace: AC_VERIFY_C_PROTOTYPE() needs AC_LANG_SOURCE() to bring in 
confdefs.h

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


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4
===
--- branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4  2007-11-06 
09:33:23 UTC (rev 25869)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4  2007-11-06 
10:40:07 UTC (rev 25870)
@@ -291,14 +291,14 @@
 dnl 
AC_VERIFY_C_PROTOTYPE(prototype,functionbody,[IF-TRUE].[IF-FALSE],[extraheaders])
 AC_DEFUN(AC_VERIFY_C_PROTOTYPE,
 [AC_CACHE_CHECK([for prototype $1], AS_TR_SH([ac_cv_c_prototype_$1]),
-   AC_COMPILE_IFELSE([
+   AC_COMPILE_IFELSE([AC_LANG_SOURCE([
AC_INCLUDES_DEFAULT
$5
$1
{
$2
}
-   ],[
+   ])],[
AS_TR_SH([ac_cv_c_prototype_$1])=yes
],[
AS_TR_SH([ac_cv_c_prototype_$1])=no



svn commit: samba r25869 - in branches/SAMBA_4_0/source/selftest/env: .

2007-11-06 Thread metze
Author: metze
Date: 2007-11-06 09:33:23 + (Tue, 06 Nov 2007)
New Revision: 25869

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25869

Log:
selftest: strip newline from `whoami` output, hopefully fix provision on mac os 
10

metze
Modified:
   branches/SAMBA_4_0/source/selftest/env/Samba4.pm


Changeset:
Modified: branches/SAMBA_4_0/source/selftest/env/Samba4.pm
===
--- branches/SAMBA_4_0/source/selftest/env/Samba4.pm2007-11-06 09:26:42 UTC 
(rev 25868)
+++ branches/SAMBA_4_0/source/selftest/env/Samba4.pm2007-11-06 09:33:23 UTC 
(rev 25869)
@@ -451,6 +451,7 @@
my $dnsname = "samba.example.com";
my $basedn = "dc=samba,dc=example,dc=com";
my $unix_name = ($ENV{USER} or $ENV{LOGNAME} or `whoami`);
+   chomp $unix_name;
my $unix_uid = $>;
my $unix_gids_str = $);
my @unix_gids = split(" ", $unix_gids_str);



svn commit: samba r25868 - in branches/SAMBA_4_0/source/lib/nss_wrapper: .

2007-11-06 Thread metze
Author: metze
Date: 2007-11-06 09:26:42 + (Tue, 06 Nov 2007)
New Revision: 25868

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25868

Log:
nss_wrapper: add solaris versions of getpwent_r and getgrent_r

metze
Modified:
   branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c
===
--- branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c 2007-11-06 
09:15:11 UTC (rev 25867)
+++ branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c 2007-11-06 
09:26:42 UTC (rev 25868)
@@ -892,6 +892,36 @@
return pw;
 }
 
+#ifdef SOLARIS_GETPWENT_R
+_PUBLIC_ struct passwd *nwrap_getpwent_r(struct passwd *pwdst,
+char *buf,
+int buflen)
+{
+   struct passwd *pw;
+   struct passwd *pwdstp = NULL;
+   int ret;
+
+   if (!nwrap_enabled()) {
+   return real_getpwent_r(pwdst, buf, buflen);
+   }
+
+   pw = nwrap_getpwent();
+   if (!pw) {
+   if (errno == 0) {
+   errno = ENOENT;
+   }
+   return NULL;
+   }
+
+   ret = nwrap_pw_copy_r(pw, pwdst, buf, buflen, &pwdstp);
+   if (ret != 0) {
+   errno = ret;
+   return NULL;
+   }
+
+   return pwdstp;
+}
+#else
 _PUBLIC_ int nwrap_getpwent_r(struct passwd *pwdst, char *buf,
  size_t buflen, struct passwd **pwdstp)
 {
@@ -911,6 +941,7 @@
 
return nwrap_pw_copy_r(pw, pwdst, buf, buflen, pwdstp);
 }
+#endif
 
 _PUBLIC_ void nwrap_endpwent(void)
 {
@@ -1064,6 +1095,36 @@
return gr;
 }
 
+#ifdef SOLARIS_GETGRENT_R
+_PUBLIC_ struct group *nwrap_getgrent_r(struct group *grdst,
+   char *buf,
+   int buflen)
+{
+   struct group *gr;
+   struct group *grdstp = NULL;
+   int ret;
+
+   if (!nwrap_enabled()) {
+   return real_getgrent_r(grdst, buf, buflen);
+   }
+
+   gr = nwrap_getgrent();
+   if (!gr) {
+   if (errno == 0) {
+   errno = ENOENT;
+   }
+   return NULL;
+   }
+
+   ret = nwrap_gr_copy_r(gr, grdst, buf, buflen, &grdstp);
+   if (ret != 0) {
+   errno = ret;
+   return NULL;
+   }
+
+   return grdstp;
+}
+#else
 _PUBLIC_ int nwrap_getgrent_r(struct group *grdst, char *buf,
  size_t buflen, struct group **grdstp)
 {
@@ -1083,6 +1144,7 @@
 
return nwrap_gr_copy_r(gr, grdst, buf, buflen, grdstp);
 }
+#endif
 
 _PUBLIC_ void nwrap_endgrent(void)
 {



svn commit: samba r25867 - in branches/SAMBA_4_0/source/lib/replace/system: .

2007-11-06 Thread metze
Author: metze
Date: 2007-11-06 09:15:11 + (Tue, 06 Nov 2007)
New Revision: 25867

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25867

Log:
libreplace: solaris has different prototypes for getpwent_r and getgrent_r

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/system/config.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/system/config.m4
===
--- branches/SAMBA_4_0/source/lib/replace/system/config.m4  2007-11-06 
08:06:50 UTC (rev 25866)
+++ branches/SAMBA_4_0/source/lib/replace/system/config.m4  2007-11-06 
09:15:11 UTC (rev 25867)
@@ -19,7 +19,39 @@
 # passwd
 AC_CHECK_HEADERS(grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h 
sys/security.h)
 AC_CHECK_FUNCS(getpwnam_r getpwuid_r getpwent_r)
+AC_HAVE_DECL(getpwent_r, [
+   #include 
+   #include 
+   ])
+AC_VERIFY_C_PROTOTYPE([struct passwd *getpwent_r(struct passwd *src, char 
*buf, int buflen)],
+   [
+   #ifndef HAVE_GETPWENT_R_DECL
+   #error missing getpwent_r prototype
+   #endif
+   return NULL;
+   ],[
+   AC_DEFINE(SOLARIS_GETPWENT_R, 1, [getpwent_r solaris function 
prototype])
+   ],[],[
+   #include 
+   #include 
+   ])
 AC_CHECK_FUNCS(getgrnam_r getgrgid_r getgrent_r)
+AC_HAVE_DECL(getgrent_r, [
+   #include 
+   #include 
+   ])
+AC_VERIFY_C_PROTOTYPE([struct group *getgrent_r(struct group *src, char *buf, 
int buflen)],
+   [
+   #ifndef HAVE_GETGRENT_R_DECL
+   #error missing getgrent_r prototype
+   #endif
+   return NULL;
+   ],[
+   AC_DEFINE(SOLARIS_GETGRENT_R, 1, [getgrent_r solaris function 
prototype])
+   ],[],[
+   #include 
+   #include 
+   ])
 
 # locale
 AC_CHECK_HEADERS(ctype.h locale.h)



[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-211-g760f24f

2007-11-06 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  760f24f10cbea7ce22acd0772fb5b125f718d129 (commit)
   via  20ec1f472566bbc570fa138cce5dbd0407aef530 (commit)
   via  4d02b1344b76c6147944188161f73ad3917b8abc (commit)
   via  57bea8cd02cb7964bbb64ba26b83c372f0e12b94 (commit)
   via  0ec16729299887b4a80a7e24fbd1750632276691 (commit)
   via  9f862e9faf0fa9cddfcc2f87d9f247082718b3e0 (commit)
   via  322cf8002bab1e449616d9fcea0bd4c9535cfe6a (commit)
   via  63b7690335360a073dc1ae111f740a7934f1a92f (commit)
   via  48c70f604071fcf7c0887fe0136bdc2dda4c8ff4 (commit)
   via  4904af51cdccd4e52d2805bd62f39276447c4646 (commit)
   via  809fee4bef66eb8b8687f88257c0d6f77d3b4063 (commit)
  from  e1fcd851ab38165eb0e959cdc02ff067614f8b28 (commit)

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


- Log -
commit 760f24f10cbea7ce22acd0772fb5b125f718d129
Author: metze <[EMAIL PROTECTED]>
Date:   Tue Nov 6 07:01:17 2007 +

libreplace: we should only have one location where we check for required 
functions

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/[EMAIL 
PROTECTED] 0c0555d6-39d7-0310-84fc-f1cc0bd64818

commit 20ec1f472566bbc570fa138cce5dbd0407aef530
Author: metze <[EMAIL PROTECTED]>
Date:   Tue Nov 6 06:54:49 2007 +

libreplace: we need include  before nss_wrapper.h

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/[EMAIL 
PROTECTED] 0c0555d6-39d7-0310-84fc-f1cc0bd64818

commit 4d02b1344b76c6147944188161f73ad3917b8abc
Author: jelmer <[EMAIL PROTECTED]>
Date:   Tue Nov 6 04:59:50 2007 +

Fix export dynamic for HPUX.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/[EMAIL 
PROTECTED] 0c0555d6-39d7-0310-84fc-f1cc0bd64818

commit 57bea8cd02cb7964bbb64ba26b83c372f0e12b94
Author: jelmer <[EMAIL PROTECTED]>
Date:   Tue Nov 6 04:26:57 2007 +

Remove flag that causes problems on some hosts.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/[EMAIL 
PROTECTED] 0c0555d6-39d7-0310-84fc-f1cc0bd64818

commit 0ec16729299887b4a80a7e24fbd1750632276691
Author: jelmer <[EMAIL PROTECTED]>
Date:   Tue Nov 6 04:26:52 2007 +

Wrap native HPUX functions in dl implementation.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/[EMAIL 
PROTECTED] 0c0555d6-39d7-0310-84fc-f1cc0bd64818

commit 9f862e9faf0fa9cddfcc2f87d9f247082718b3e0
Author: jelmer <[EMAIL PROTECTED]>
Date:   Tue Nov 6 03:43:50 2007 +

Check for HPUX dl functions.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/[EMAIL 
PROTECTED] 0c0555d6-39d7-0310-84fc-f1cc0bd64818

commit 322cf8002bab1e449616d9fcea0bd4c9535cfe6a
Author: jelmer <[EMAIL PROTECTED]>
Date:   Tue Nov 6 02:35:46 2007 +

Move SHLIBEXT determination into a test as well.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/[EMAIL 
PROTECTED] 0c0555d6-39d7-0310-84fc-f1cc0bd64818

commit 63b7690335360a073dc1ae111f740a7934f1a92f
Author: jelmer <[EMAIL PROTECTED]>
Date:   Tue Nov 6 02:17:05 2007 +

Move system-specific ldflags checks to libreplace so they can be used by 
ldb.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/[EMAIL 
PROTECTED] 0c0555d6-39d7-0310-84fc-f1cc0bd64818

commit 48c70f604071fcf7c0887fe0136bdc2dda4c8ff4
Author: jelmer <[EMAIL PROTECTED]>
Date:   Tue Nov 6 02:16:55 2007 +

Add macro for picflag.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/[EMAIL 
PROTECTED] 0c0555d6-39d7-0310-84fc-f1cc0bd64818

commit 4904af51cdccd4e52d2805bd62f39276447c4646
Author: jelmer <[EMAIL PROTECTED]>
Date:   Tue Nov 6 01:05:19 2007 +

Add configure test for -Wl,--export-dynamic.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/[EMAIL 
PROTECTED] 0c0555d6-39d7-0310-84fc-f1cc0bd64818

commit 809fee4bef66eb8b8687f88257c0d6f77d3b4063
Author: metze <[EMAIL PROTECTED]>
Date:   Mon Nov 5 15:45:08 2007 +

libreplace: include nss_wrapper.h if NSS_WRAPPER is defined

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/[EMAIL 
PROTECTED] 0c0555d6-39d7-0310-84fc-f1cc0bd64818

---

Summary of changes:
 source/lib/replace/dlfcn.c  |   16 
 source/lib/replace/dlfcn.m4 |5 ++
 source/lib/replace/libreplace.m4|6 +-
 source/lib/replace/libreplace_ld.m4 |  129 +++
 source/lib/replace/system/passwd.h  |   10 +++
 5 files changed, 162 insertions(+), 4 deletions(-)
 create mode 100644 source/lib/replace/libreplace_ld.m4


Changeset truncated at 500 lines:

diff --git a/source/lib/replace/dlfcn.c b/source/lib/replace/dlfcn.c
index 464..4284884 100644
--- a/source/lib/replace/dlfcn.c
+++ b/source/lib/replace/dlfcn.c
@@ -23,6 +23,9 @@
 */
 
 #include "replace.h"
+#

svn commit: samba r25866 - in branches/SAMBA_4_0/source/lib/nss_wrapper: .

2007-11-06 Thread metze
Author: metze
Date: 2007-11-06 08:06:50 + (Tue, 06 Nov 2007)
New Revision: 25866

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25866

Log:
nss_wrapper: not all systems have get*_r calls

metze
Modified:
   branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c
===
--- branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c 2007-11-06 
07:26:12 UTC (rev 25865)
+++ branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c 2007-11-06 
08:06:50 UTC (rev 25866)
@@ -48,6 +48,26 @@
 #define _PUBLIC_
 #endif
 
+/* not all systems have _r functions... */
+#ifndef HAVE_GETPWNAM_R
+#define getpwnam_r(name, pwdst, buf, buflen, pwdstp)   ENOSYS
+#endif
+#ifndef HAVE_GETPWUID_R
+#define getpwuid_r(uid, pwdst, buf, buflen, pwdstp)ENOSYS
+#endif
+#ifndef HAVE_GETPWENT_R
+#define getpwent_r(pwdst, buf, buflen, pwdstp) ENOSYS
+#endif
+#ifndef HAVE_GETGRNAM_R
+#define getgrnam_r(name, grdst, buf, buflen, grdstp)   ENOSYS
+#endif
+#ifndef HAVE_GETGRUID_R
+#define getgrgid_r(uid, grdst, buf, buflen, grdstp)ENOSYS
+#endif
+#ifndef HAVE_GETGRENT_R
+#define getgrent_r(grdst, buf, buflen, grdstp) ENOSYS
+#endif
+
 /* LD_PRELOAD doesn't work yet, so REWRITE_CALLS is all we support
  * for now */
 #define REWRITE_CALLS