Build status as of Sun Jun 10 00:00:02 2007

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

--- /home/build/master/cache/broken_results.txt.old 2007-06-09 
00:01:16.0 +
+++ /home/build/master/cache/broken_results.txt 2007-06-10 00:01:30.0 
+
@@ -1,25 +1,25 @@
-Build status as of Sat Jun  9 00:00:01 2007
+Build status as of Sun Jun 10 00:00:02 2007
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
 build_farm   0  0  0 
-ccache   33 8  0 
+ccache   36 8  0 
 ctdb 0  0  0 
 distcc   2  0  0 
-ldb  33 3  0 
-libreplace   32 9  0 
-lorikeet-heimdal 29 24 0 
+ldb  35 3  0 
+libreplace   33 9  0 
+lorikeet-heimdal 31 17 0 
 pidl 20 4  0 
-ppp  13 0  0 
+ppp  15 0  0 
 python   0  0  0 
-rsync34 10 0 
+rsync36 10 0 
 samba0  0  0 
 samba-docs   0  0  0 
 samba-gtk4  4  0 
-samba4   32 19 4 
-samba_3_035 15 0 
-smb-build31 31 0 
-talloc   34 6  0 
-tdb  33 2  0 
+samba4   33 21 5 
+samba_3_036 16 0 
+smb-build33 33 0 
+talloc   36 8  0 
+tdb  35 2  0 
 


Rev 526: fixed valgrind error in http://samba.org/~tridge/ctdb

2007-06-09 Thread tridge

revno: 526
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Sun 2007-06-10 09:54:27 +1000
message:
  fixed valgrind error
modified:
  takeover/ctdb_takeover.c   
ctdb_takeover.c-20070525071636-a5n1ihghjtppy08r-2
=== modified file 'takeover/ctdb_takeover.c'
--- a/takeover/ctdb_takeover.c  2007-06-09 22:46:33 +
+++ b/takeover/ctdb_takeover.c  2007-06-09 23:54:27 +
@@ -437,6 +437,8 @@
int ret;
struct ctdb_public_ip ip;
 
+   ZERO_STRUCT(ip);
+
/* Work out which node will look after each public IP.
 * takeover_node cycles over the nodes and is incremented each time a 
 * node has been assigned to take over for another node.



Rev 525: - send tcp info to all connected nodes, not just vnnmap nodes in http://samba.org/~tridge/ctdb

2007-06-09 Thread tridge

revno: 525
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Sun 2007-06-10 08:46:33 +1000
message:
  - send tcp info to all connected nodes, not just vnnmap nodes
  - use a non-blocking freeze when banned
  - release all IPs when banned
modified:
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
  server/ctdb_daemon.c   ctdb_daemon.c-20070409200331-3el1kqgdb9m4ib0g-1
  server/ctdb_freeze.c   ctdb_freeze.c-20070512051503-935zdtyuqknqnhmo-1
  server/ctdb_monitor.c  
ctdb_monitor.c-20070518100625-8jf4ft1mjzmb22ck-1
  takeover/ctdb_takeover.c   
ctdb_takeover.c-20070525071636-a5n1ihghjtppy08r-2
=== modified file 'include/ctdb_private.h'
--- a/include/ctdb_private.h2007-06-07 08:07:38 +
+++ b/include/ctdb_private.h2007-06-09 22:46:33 +
@@ -1022,4 +1022,6 @@
   uint32_t destnode,
   struct ctdb_tunable *tunables);
 
+void ctdb_start_freeze(struct ctdb_context *ctdb);
+
 #endif

=== modified file 'server/ctdb_daemon.c'
--- a/server/ctdb_daemon.c  2007-06-07 12:06:19 +
+++ b/server/ctdb_daemon.c  2007-06-09 22:46:33 +
@@ -54,6 +54,12 @@
(ctdb->nodes[c->vnn]->flags&NODE_FLAGS_DISCONNECTED) 
| (c->flags & ~NODE_FLAGS_DISCONNECTED);
DEBUG(2,("Node flags for node %u are now 0x%x\n", c->vnn, 
ctdb->nodes[c->vnn]->flags));
+
+   /* make sure we don't hold any IPs when we shouldn't */
+   if (c->vnn == ctdb->vnn &&
+   (ctdb->nodes[c->vnn]->flags & 
(NODE_FLAGS_INACTIVE|NODE_FLAGS_BANNED))) {
+   ctdb_release_all_ips(ctdb);
+   }
 }
 
 /* called when the "startup" event script has finished */

=== modified file 'server/ctdb_freeze.c'
--- a/server/ctdb_freeze.c  2007-06-07 12:06:19 +
+++ b/server/ctdb_freeze.c  2007-06-09 22:46:33 +
@@ -182,6 +182,24 @@
 }
 
 /*
+  start the freeze process
+ */
+void ctdb_start_freeze(struct ctdb_context *ctdb)
+{
+   if (ctdb->freeze_mode == CTDB_FREEZE_FROZEN) {
+   /* we're already frozen */
+   return;
+   }
+
+   /* if there isn't a freeze lock child then create one */
+   if (!ctdb->freeze_handle) {
+   ctdb->freeze_handle = ctdb_freeze_lock(ctdb);
+   CTDB_NO_MEMORY_VOID(ctdb, ctdb->freeze_handle);
+   ctdb->freeze_mode = CTDB_FREEZE_PENDING;
+   }
+}
+
+/*
   freeze the databases
  */
 int32_t ctdb_control_freeze(struct ctdb_context *ctdb, struct ctdb_req_control 
*c, bool *async_reply)
@@ -193,12 +211,7 @@
return 0;
}
 
-   /* if there isn't a freeze lock child then create one */
-   if (!ctdb->freeze_handle) {
-   ctdb->freeze_handle = ctdb_freeze_lock(ctdb);
-   CTDB_NO_MEMORY(ctdb, ctdb->freeze_handle);
-   ctdb->freeze_mode = CTDB_FREEZE_PENDING;
-   }
+   ctdb_start_freeze(ctdb);
 
/* add ourselves to list of waiters */
w = talloc(ctdb->freeze_handle, struct ctdb_freeze_waiter);
@@ -220,17 +233,7 @@
  */
 bool ctdb_blocking_freeze(struct ctdb_context *ctdb)
 {
-   if (ctdb->freeze_mode == CTDB_FREEZE_FROZEN) {
-   /* we're already frozen */
-   return true;
-   }
-
-   /* if there isn't a freeze lock child then create one */
-   if (!ctdb->freeze_handle) {
-   ctdb->freeze_handle = ctdb_freeze_lock(ctdb);
-   CTDB_NO_MEMORY(ctdb, ctdb->freeze_handle);
-   ctdb->freeze_mode = CTDB_FREEZE_PENDING;
-   }
+   ctdb_start_freeze(ctdb);
 
/* block until frozen */
while (ctdb->freeze_mode == CTDB_FREEZE_PENDING) {

=== modified file 'server/ctdb_monitor.c'
--- a/server/ctdb_monitor.c 2007-06-09 11:58:50 +
+++ b/server/ctdb_monitor.c 2007-06-09 22:46:33 +
@@ -219,9 +219,8 @@
if ((node->flags & NODE_FLAGS_BANNED) && !(old_flags & 
NODE_FLAGS_BANNED)) {
/* make sure we are frozen */
DEBUG(0,("This node has been banned - forcing freeze and 
recovery\n"));
-   if (!ctdb_blocking_freeze(ctdb)) {
-   ctdb_fatal(ctdb, "Unable to freeze when banned");
-   }
+   ctdb_start_freeze(ctdb);
+   ctdb_release_all_ips(ctdb);
ctdb->recovery_mode = CTDB_RECOVERY_ACTIVE;
}


=== modified file 'takeover/ctdb_takeover.c'
--- a/takeover/ctdb_takeover.c  2007-06-09 11:47:06 +
+++ b/takeover/ctdb_takeover.c  2007-06-09 22:46:33 +
@@ -247,7 +247,7 @@
data.dptr = (uint8_t *)&t;
data.dsize = sizeof(t);
 
-   ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_VNNMAP, 
0, 
+   ctdb_daemon_send_control(ctdb, 
CTDB_BROA

svn commit: samba r23407 - in branches: SAMBA_3_0/source/utils SAMBA_3_0_25/source/utils SAMBA_3_0_26/source/utils

2007-06-09 Thread idra
Author: idra
Date: 2007-06-09 22:45:21 + (Sat, 09 Jun 2007)
New Revision: 23407

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

Log:

While verifying a bug I found out that for some reason
the code to add a machine was different then the one used
to add a user, the old code led to the machine SID not being
built out correctly allocationg a new RID out of the passdb
but instead by using the old algorithmic method.
This may easily end up in creating duplicated SID when the
RID counter get close to the values built by the algorithmic method.

Simo.


Modified:
   branches/SAMBA_3_0/source/utils/pdbedit.c
   branches/SAMBA_3_0_25/source/utils/pdbedit.c
   branches/SAMBA_3_0_26/source/utils/pdbedit.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/pdbedit.c
===
--- branches/SAMBA_3_0/source/utils/pdbedit.c   2007-06-09 19:29:35 UTC (rev 
23406)
+++ branches/SAMBA_3_0/source/utils/pdbedit.c   2007-06-09 22:45:21 UTC (rev 
23407)
@@ -624,28 +624,25 @@
fstrcpy(machineaccount, machinename);
fstrcat(machineaccount, "$");
 
-   if ((pwd = getpwnam_alloc(NULL, machineaccount))) {
+   if ( !(pwd = getpwnam_alloc( NULL, machineaccount )) ) {
+   DEBUG(0,("Cannot locate Unix account for %s\n", 
machineaccount));
+   return -1;
+   }
 
-   if ( (sam_pwent = samu_new( NULL )) == NULL ) {
-   fprintf(stderr, "Memory allocation error!\n");
-   TALLOC_FREE(pwd);
-   return -1;
-   }
+   if ( (sam_pwent = samu_new( NULL )) == NULL ) {
+   fprintf(stderr, "Memory allocation error!\n");
+   TALLOC_FREE(pwd);
+   return -1;
+   }
 
-   if ( !NT_STATUS_IS_OK(samu_set_unix(sam_pwent, pwd )) ) {
-   fprintf(stderr, "Could not init sam from pw\n");
-   TALLOC_FREE(pwd);
-   return -1;
-   }
-
+   if ( !NT_STATUS_IS_OK(samu_alloc_rid_unix(sam_pwent, pwd )) ) {
+   fprintf(stderr, "Could not init sam from pw\n");
TALLOC_FREE(pwd);
-   } else {
-   if ( (sam_pwent = samu_new( NULL )) == NULL ) {
-   fprintf(stderr, "Could not init sam from pw\n");
-   return -1;
-   }
+   return -1;
}
 
+   TALLOC_FREE(pwd);
+
pdb_set_plaintext_passwd (sam_pwent, machinename);
pdb_set_username (sam_pwent, machineaccount, PDB_CHANGED);  
pdb_set_acct_ctrl (sam_pwent, ACB_WSTRUST, PDB_CHANGED);

Modified: branches/SAMBA_3_0_25/source/utils/pdbedit.c
===
--- branches/SAMBA_3_0_25/source/utils/pdbedit.c2007-06-09 19:29:35 UTC 
(rev 23406)
+++ branches/SAMBA_3_0_25/source/utils/pdbedit.c2007-06-09 22:45:21 UTC 
(rev 23407)
@@ -624,28 +624,25 @@
fstrcpy(machineaccount, machinename);
fstrcat(machineaccount, "$");
 
-   if ((pwd = getpwnam_alloc(NULL, machineaccount))) {
+   if ( !(pwd = getpwnam_alloc( NULL, machineaccount )) ) {
+   DEBUG(0,("Cannot locate Unix account for %s\n", 
machineaccount));
+   return -1;
+   }
 
-   if ( (sam_pwent = samu_new( NULL )) == NULL ) {
-   fprintf(stderr, "Memory allocation error!\n");
-   TALLOC_FREE(pwd);
-   return -1;
-   }
+   if ( (sam_pwent = samu_new( NULL )) == NULL ) {
+   fprintf(stderr, "Memory allocation error!\n");
+   TALLOC_FREE(pwd);
+   return -1;
+   }
 
-   if ( !NT_STATUS_IS_OK(samu_set_unix(sam_pwent, pwd )) ) {
-   fprintf(stderr, "Could not init sam from pw\n");
-   TALLOC_FREE(pwd);
-   return -1;
-   }
-
+   if ( !NT_STATUS_IS_OK(samu_alloc_rid_unix(sam_pwent, pwd )) ) {
+   fprintf(stderr, "Could not init sam from pw\n");
TALLOC_FREE(pwd);
-   } else {
-   if ( (sam_pwent = samu_new( NULL )) == NULL ) {
-   fprintf(stderr, "Could not init sam from pw\n");
-   return -1;
-   }
+   return -1;
}
 
+   TALLOC_FREE(pwd);
+
pdb_set_plaintext_passwd (sam_pwent, machinename);
pdb_set_username (sam_pwent, machineaccount, PDB_CHANGED);  
pdb_set_acct_ctrl (sam_pwent, ACB_WSTRUST, PDB_CHANGED);

Modified: branches/SAMBA_3_0_26/source/utils/pdbedit.c
===
--- branches/SAMBA_3_0_26/source/utils/pdbedit.c2007-06-09 19:29:35 UTC 
(rev 23406)
+++ branches/SAMBA_3_0_26/source/utils/pdbedit.c2007-06-09 22:45:21 UTC 
(rev 23407)
@@ -

svn commit: samba r23406 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch SAMBA_3_0_26/source/nsswitch

2007-06-09 Thread idra
Author: idra
Date: 2007-06-09 19:29:35 + (Sat, 09 Jun 2007)
New Revision: 23406

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

Log:

Evn if not strictly currently necessary do check for correct
init also in idmap_nss and idmap_passdb for coherency and to
prevent errors in future if we change the init functions to
actually do something and not just return NT_STATUS_OK


Modified:
   branches/SAMBA_3_0/source/nsswitch/idmap_nss.c
   branches/SAMBA_3_0/source/nsswitch/idmap_passdb.c
   branches/SAMBA_3_0_25/source/nsswitch/idmap_nss.c
   branches/SAMBA_3_0_25/source/nsswitch/idmap_passdb.c
   branches/SAMBA_3_0_26/source/nsswitch/idmap_nss.c
   branches/SAMBA_3_0_26/source/nsswitch/idmap_passdb.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/idmap_nss.c
===
--- branches/SAMBA_3_0/source/nsswitch/idmap_nss.c  2007-06-09 19:25:54 UTC 
(rev 23405)
+++ branches/SAMBA_3_0/source/nsswitch/idmap_nss.c  2007-06-09 19:29:35 UTC 
(rev 23406)
@@ -45,6 +45,10 @@
TALLOC_CTX *ctx;
int i;
 
+   if (! dom->initialized) {
+   return NT_STATUS_UNSUCCESSFUL;
+   }
+
ctx = talloc_new(dom);
if ( ! ctx) {
DEBUG(0, ("Out of memory!\n"));
@@ -131,6 +135,10 @@
TALLOC_CTX *ctx;
int i;
 
+   if (! dom->initialized) {
+   return NT_STATUS_UNSUCCESSFUL;
+   }
+
ctx = talloc_new(dom);
if ( ! ctx) {
DEBUG(0, ("Out of memory!\n"));

Modified: branches/SAMBA_3_0/source/nsswitch/idmap_passdb.c
===
--- branches/SAMBA_3_0/source/nsswitch/idmap_passdb.c   2007-06-09 19:25:54 UTC 
(rev 23405)
+++ branches/SAMBA_3_0/source/nsswitch/idmap_passdb.c   2007-06-09 19:29:35 UTC 
(rev 23406)
@@ -43,6 +43,10 @@
 {
int i;
 
+   if (! dom->initialized) {
+   return NT_STATUS_UNSUCCESSFUL;
+   }
+
for (i = 0; ids[i]; i++) {
 
/* unmapped by default */
@@ -75,6 +79,10 @@
 {
int i;
 
+   if (! dom->initialized) {
+   return NT_STATUS_UNSUCCESSFUL;
+   }
+
for (i = 0; ids[i]; i++) {
enum lsa_SidType type;
union unid_t id;

Modified: branches/SAMBA_3_0_25/source/nsswitch/idmap_nss.c
===
--- branches/SAMBA_3_0_25/source/nsswitch/idmap_nss.c   2007-06-09 19:25:54 UTC 
(rev 23405)
+++ branches/SAMBA_3_0_25/source/nsswitch/idmap_nss.c   2007-06-09 19:29:35 UTC 
(rev 23406)
@@ -45,6 +45,10 @@
TALLOC_CTX *ctx;
int i;
 
+   if (! dom->initialized) {
+   return NT_STATUS_UNSUCCESSFUL;
+   }
+
ctx = talloc_new(dom);
if ( ! ctx) {
DEBUG(0, ("Out of memory!\n"));
@@ -131,6 +135,10 @@
TALLOC_CTX *ctx;
int i;
 
+   if (! dom->initialized) {
+   return NT_STATUS_UNSUCCESSFUL;
+   }
+
ctx = talloc_new(dom);
if ( ! ctx) {
DEBUG(0, ("Out of memory!\n"));

Modified: branches/SAMBA_3_0_25/source/nsswitch/idmap_passdb.c
===
--- branches/SAMBA_3_0_25/source/nsswitch/idmap_passdb.c2007-06-09 
19:25:54 UTC (rev 23405)
+++ branches/SAMBA_3_0_25/source/nsswitch/idmap_passdb.c2007-06-09 
19:29:35 UTC (rev 23406)
@@ -43,6 +43,10 @@
 {
int i;
 
+   if (! dom->initialized) {
+   return NT_STATUS_UNSUCCESSFUL;
+   }
+
for (i = 0; ids[i]; i++) {
 
/* unmapped by default */
@@ -75,6 +79,10 @@
 {
int i;
 
+   if (! dom->initialized) {
+   return NT_STATUS_UNSUCCESSFUL;
+   }
+
for (i = 0; ids[i]; i++) {
enum lsa_SidType type;
union unid_t id;

Modified: branches/SAMBA_3_0_26/source/nsswitch/idmap_nss.c
===
--- branches/SAMBA_3_0_26/source/nsswitch/idmap_nss.c   2007-06-09 19:25:54 UTC 
(rev 23405)
+++ branches/SAMBA_3_0_26/source/nsswitch/idmap_nss.c   2007-06-09 19:29:35 UTC 
(rev 23406)
@@ -45,6 +45,10 @@
TALLOC_CTX *ctx;
int i;
 
+   if (! dom->initialized) {
+   return NT_STATUS_UNSUCCESSFUL;
+   }
+
ctx = talloc_new(dom);
if ( ! ctx) {
DEBUG(0, ("Out of memory!\n"));
@@ -131,6 +135,10 @@
TALLOC_CTX *ctx;
int i;
 
+   if (! dom->initialized) {
+   return NT_STATUS_UNSUCCESSFUL;
+   }
+
ctx = talloc_new(dom);
if ( ! ctx) {
DEBUG(0, ("Out of memory!\n"));

Modified: branches/SAMBA_3_0_26/source/nsswitch/idmap_passdb.c
===
--- branches/SAMBA_3_0_26/source/nsswitch/idmap_passdb.c2007-06-09 
19:25:5

svn commit: samba r23405 - in branches/SAMBA_3_0_25/source/nsswitch: .

2007-06-09 Thread idra
Author: idra
Date: 2007-06-09 19:25:54 + (Sat, 09 Jun 2007)
New Revision: 23405

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

Log:

Fix typo (someone forgot to backport this from 3_0_26/3_0)


Modified:
   branches/SAMBA_3_0_25/source/nsswitch/idmap.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/nsswitch/idmap.c
===
--- branches/SAMBA_3_0_25/source/nsswitch/idmap.c   2007-06-09 18:18:24 UTC 
(rev 23404)
+++ branches/SAMBA_3_0_25/source/nsswitch/idmap.c   2007-06-09 19:25:54 UTC 
(rev 23405)
@@ -417,7 +417,7 @@
 
/* check the set_mapping function exists otherwise mark the 
module as readonly */
if ( ! dom->methods->set_mapping) {
-   DEBUG(5, ("Forcing to readonly, as ithis module can't 
store arbitrary mappings.\n"));
+   DEBUG(5, ("Forcing to readonly, as this module can't 
store arbitrary mappings.\n"));
dom->readonly = True;
}
 



svn commit: samba r23404 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch SAMBA_3_0_26/source/nsswitch

2007-06-09 Thread idra
Author: idra
Date: 2007-06-09 18:18:24 + (Sat, 09 Jun 2007)
New Revision: 23404

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

Log:

Fix wrong (and missing) action on error condition in ldap reply evaluation loop
Fixes one of the segfaults in bug #4667


Modified:
   branches/SAMBA_3_0/source/nsswitch/idmap_ldap.c
   branches/SAMBA_3_0_25/source/nsswitch/idmap_ldap.c
   branches/SAMBA_3_0_26/source/nsswitch/idmap_ldap.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/idmap_ldap.c
===
--- branches/SAMBA_3_0/source/nsswitch/idmap_ldap.c 2007-06-09 07:17:24 UTC 
(rev 23403)
+++ branches/SAMBA_3_0/source/nsswitch/idmap_ldap.c 2007-06-09 18:18:24 UTC 
(rev 23404)
@@ -965,7 +965,7 @@
}
if ( ! entry) {
DEBUG(2, ("ERROR: Unable to fetch ldap entries from 
results\n"));
-   continue;
+   break;
}
 
/* first check if the SID is present */
@@ -1180,6 +1180,10 @@
} else { /* following ones */
entry = 
ldap_next_entry(ctx->smbldap_state->ldap_struct, entry);
}
+   if ( ! entry) {
+   DEBUG(2, ("ERROR: Unable to fetch ldap entries from 
results\n"));
+   break;
+   }
 
/* first check if the SID is present */
sidstr = smbldap_talloc_single_attribute(

Modified: branches/SAMBA_3_0_25/source/nsswitch/idmap_ldap.c
===
--- branches/SAMBA_3_0_25/source/nsswitch/idmap_ldap.c  2007-06-09 07:17:24 UTC 
(rev 23403)
+++ branches/SAMBA_3_0_25/source/nsswitch/idmap_ldap.c  2007-06-09 18:18:24 UTC 
(rev 23404)
@@ -962,7 +962,7 @@
}
if ( ! entry) {
DEBUG(2, ("ERROR: Unable to fetch ldap entries from 
results\n"));
-   continue;
+   break;
}
 
/* first check if the SID is present */
@@ -1177,6 +1177,10 @@
} else { /* following ones */
entry = 
ldap_next_entry(ctx->smbldap_state->ldap_struct, entry);
}
+   if ( ! entry) {
+   DEBUG(2, ("ERROR: Unable to fetch ldap entries from 
results\n"));
+   break;
+   }
 
/* first check if the SID is present */
sidstr = smbldap_talloc_single_attribute(

Modified: branches/SAMBA_3_0_26/source/nsswitch/idmap_ldap.c
===
--- branches/SAMBA_3_0_26/source/nsswitch/idmap_ldap.c  2007-06-09 07:17:24 UTC 
(rev 23403)
+++ branches/SAMBA_3_0_26/source/nsswitch/idmap_ldap.c  2007-06-09 18:18:24 UTC 
(rev 23404)
@@ -962,7 +962,7 @@
}
if ( ! entry) {
DEBUG(2, ("ERROR: Unable to fetch ldap entries from 
results\n"));
-   continue;
+   break;
}
 
/* first check if the SID is present */
@@ -1177,6 +1177,10 @@
} else { /* following ones */
entry = 
ldap_next_entry(ctx->smbldap_state->ldap_struct, entry);
}
+   if ( ! entry) {
+   DEBUG(2, ("ERROR: Unable to fetch ldap entries from 
results\n"));
+   break;
+   }
 
/* first check if the SID is present */
sidstr = smbldap_talloc_single_attribute(



svn commit: lorikeet r739 - in trunk/heimdal/tests/can: .

2007-06-09 Thread lha
Author: lha
Date: 2007-06-09 14:48:14 + (Sat, 09 Jun 2007)
New Revision: 739

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

Log:
provide mor info why this failes
Modified:
   trunk/heimdal/tests/can/check-can.in
   trunk/heimdal/tests/can/test_can.in


Changeset:
Modified: trunk/heimdal/tests/can/check-can.in
===
--- trunk/heimdal/tests/can/check-can.in2007-06-09 10:26:24 UTC (rev 
738)
+++ trunk/heimdal/tests/can/check-can.in2007-06-09 14:48:14 UTC (rev 
739)
@@ -37,6 +37,12 @@
 srcdir="@srcdir@"
 objdir="@objdir@"
 
+echo "check can started"
+set -x
+
+# If there is no useful db support compile in, disable test
+../db/have-db || exit 77
+
 ./test_can TEST.H5L.SE heim-0.8 || exit 1
 ./test_can TEST.H5L.SE apple-10.4 || exit 1
 ./test_can HEIMDAL.CITI.UMICH.EDU mit-pkinit-20070607 || exit 1

Modified: trunk/heimdal/tests/can/test_can.in
===
--- trunk/heimdal/tests/can/test_can.in 2007-06-09 10:26:24 UTC (rev 738)
+++ trunk/heimdal/tests/can/test_can.in 2007-06-09 14:48:14 UTC (rev 739)
@@ -38,8 +38,8 @@
 objdir="@objdir@"
 EGREP="@EGREP@"
 
-# If there is no useful db support compile in, disable test
-../db/have-db || exit 77
+echo "test can started"
+set -x
 
 R=$1
 tst=$2



Rev 522: support up takeover in testing when root in http://samba.org/~tridge/ctdb

2007-06-09 Thread tridge

revno: 522
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Sat 2007-06-09 21:47:06 +1000
message:
  support up takeover in testing when root
modified:
  takeover/ctdb_takeover.c   
ctdb_takeover.c-20070525071636-a5n1ihghjtppy08r-2
  tests/events   events-20070601105359-jc8p0xp6iq7phful-1
  tests/start_daemons.sh 
start_daemons.sh-20070604074603-fbb8x90srun04xn0-1
=== modified file 'takeover/ctdb_takeover.c'
--- a/takeover/ctdb_takeover.c  2007-06-07 12:26:27 +
+++ b/takeover/ctdb_takeover.c  2007-06-09 11:47:06 +
@@ -65,7 +65,7 @@
 
ret = ctdb_sys_send_arp(&arp->sin, arp->ctdb->takeover.interface);
if (ret != 0) {
-   DEBUG(0,(__location__ "sending of arp failed (%s)\n", 
strerror(errno)));
+   DEBUG(0,(__location__ " sending of arp failed (%s)\n", 
strerror(errno)));
}
 
for (tcp=arp->tcp_list;tcp;tcp=tcp->next) {

=== modified file 'tests/events'
--- a/tests/events  2007-06-06 01:13:24 +
+++ b/tests/events  2007-06-09 11:47:06 +
@@ -15,15 +15,44 @@
;;

  takeip)
+   if [ $# != 3 ]; then
+  echo "must supply interface, IP and maskbits"
+  exit 1
+   fi
+   iface=$1
+   ip=$2
+   maskbits=$3
+
+   [ `id -u` = 0 ] && {
+   /sbin/ip addr add $ip/$maskbits dev $iface || {
+   echo "`/bin/date` Failed to add $ip/$maskbits on dev $iface"
+   exit 1
+   }
+   }
+   exit 0;
+   ;;
+
+
+ ##
+ # called when ctdbd wants to release an IP address
+ releaseip)
+   if [ $# != 3 ]; then
+  echo "`/bin/date` must supply interface, IP and maskbits"
+  exit 1
+   fi
+   iface=$1
+   ip=$2
+   maskbits=$3
+   [ `id -u` = 0 ] && {
+   /sbin/ip addr del $ip/$maskbits dev $iface || {
+   echo "`/bin/date` Failed to del $ip on dev $iface"
+   exit 1
+   }
+   }
echo "`date` ctdb takeip event for $1 $2 $3"
exit 0
;;
 
- releaseip)
-   echo "`date` ctdb releaseip event for $1 $2 $3"
-   exit 0
-   ;;
-
  recovered)
echo "`date` ctdb recovered event"
exit 0

=== modified file 'tests/start_daemons.sh'
--- a/tests/start_daemons.sh2007-06-04 09:53:19 +
+++ b/tests/start_daemons.sh2007-06-09 11:47:06 +
@@ -5,9 +5,14 @@
 
 killall -q ctdbd
 
+CTDB_OPTIONS="--reclock=rec.lock --nlist $NODES --event-script=tests/events 
--logfile=-  --dbdir=test.db"
+if [ `id -u` -eq 0 ]; then
+CTDB_OPTIONS="$CTDB_OPTIONS --public-addresses=tests/public_addresses 
--public-interface=lo"
+fi
+
 echo "Starting $NUMNODES ctdb daemons"
 for i in `seq 1 $NUMNODES`; do
-$VALGRIND bin/ctdbd --reclock=rec.lock --nlist $NODES 
--event-script=tests/events --logfile=- --socket=sock.$i --dbdir=test.db || 
exit 1
+$VALGRIND bin/ctdbd --socket=sock.$i $CTDB_OPTIONS || exit 1
 done
 ln -sf $PWD/sock.1 /tmp/ctdb.socket || exit 1
 



Rev 523: ignore arp on loopback in http://samba.org/~tridge/ctdb

2007-06-09 Thread tridge

revno: 523
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Sat 2007-06-09 21:57:47 +1000
message:
  ignore arp on loopback
modified:
  takeover/system.c  system.c-20070525071636-a5n1ihghjtppy08r-3
=== modified file 'takeover/system.c'
--- a/takeover/system.c 2007-06-06 03:45:12 +
+++ b/takeover/system.c 2007-06-09 11:57:47 +
@@ -66,9 +66,16 @@
DEBUG(0,(__location__ " ioctl failed\n"));
return -1;
}
+   if (ARPHRD_LOOPBACK == if_hwaddr.ifr_hwaddr.sa_family) {
+   DEBUG(3,("Ignoring loopback arp request\n"));
+   close(s);
+   return 0;
+   }
if (if_hwaddr.ifr_hwaddr.sa_family != AF_LOCAL) {
close(s);
-   DEBUG(0,(__location__ " not an ethernet address\n"));
+   errno = EINVAL;
+   DEBUG(0,(__location__ " not an ethernet address family 
(0x%x)\n",
+if_hwaddr.ifr_hwaddr.sa_family));
return -1;
}
 



Rev 524: propogate flag changes to all connected nodes in http://samba.org/~tridge/ctdb

2007-06-09 Thread tridge

revno: 524
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Sat 2007-06-09 21:58:50 +1000
message:
  propogate flag changes to all connected nodes
modified:
  include/ctdb.h ctdb.h-20061117234101-o3qt14umlg9en8z0-11
  server/ctdb_control.c  
ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1
  server/ctdb_monitor.c  
ctdb_monitor.c-20070518100625-8jf4ft1mjzmb22ck-1
  server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
  server/ctdb_server.c   ctdb.c-20061127094323-t50f58d65iaao5of-2
  server/ctdb_traverse.c 
ctdb_traverse.c-20070503021550-ztfs5rwx8jfm8qqx-1
=== modified file 'include/ctdb.h'
--- a/include/ctdb.h2007-06-07 06:34:33 +
+++ b/include/ctdb.h2007-06-09 11:58:50 +
@@ -93,6 +93,8 @@
 #define CTDB_BROADCAST_ALL0xF002
 /* send a broadcast to all nodes in the current vnn map */
 #define CTDB_BROADCAST_VNNMAP 0xF003
+/* send a broadcast to all connected nodes */
+#define CTDB_BROADCAST_CONNECTED 0xF004
 
 
 struct event_context;

=== modified file 'server/ctdb_control.c'
--- a/server/ctdb_control.c 2007-06-07 12:06:19 +
+++ b/server/ctdb_control.c 2007-06-09 11:58:50 +
@@ -433,12 +433,17 @@
struct ctdb_control_state *state;
size_t len;
 
-   if (((destnode == CTDB_BROADCAST_VNNMAP) || (destnode == 
CTDB_BROADCAST_VNNMAP)) && !(flags & CTDB_CTRL_FLAG_NOREPLY)) {
+   if (((destnode == CTDB_BROADCAST_VNNMAP) || 
+(destnode == CTDB_BROADCAST_ALL) ||
+(destnode == CTDB_BROADCAST_CONNECTED)) && 
+   !(flags & CTDB_CTRL_FLAG_NOREPLY)) {
DEBUG(0,("Attempt to broadcast control without NOREPLY\n"));
return -1;
}
 
-   if (destnode != CTDB_BROADCAST_VNNMAP && destnode != CTDB_BROADCAST_ALL 
&& 
+   if (destnode != CTDB_BROADCAST_VNNMAP && 
+   destnode != CTDB_BROADCAST_ALL && 
+   destnode != CTDB_BROADCAST_CONNECTED && 
(!ctdb_validate_vnn(ctdb, destnode) || 
 (ctdb->nodes[destnode]->flags & NODE_FLAGS_DISCONNECTED))) {
if (!(flags & CTDB_CTRL_FLAG_NOREPLY)) {

=== modified file 'server/ctdb_monitor.c'
--- a/server/ctdb_monitor.c 2007-06-07 12:06:19 +
+++ b/server/ctdb_monitor.c 2007-06-09 11:58:50 +
@@ -122,7 +122,7 @@
data.dsize = sizeof(c);
 
/* tell the other nodes that something has changed */
-   ctdb_daemon_send_message(ctdb, CTDB_BROADCAST_VNNMAP,
+   ctdb_daemon_send_message(ctdb, CTDB_BROADCAST_CONNECTED,
 CTDB_SRVID_NODE_FLAGS_CHANGED, data);
 
 }
@@ -213,7 +213,7 @@
data.dsize = sizeof(c);
 
/* tell the other nodes that something has changed */
-   ctdb_daemon_send_message(ctdb, CTDB_BROADCAST_VNNMAP,
+   ctdb_daemon_send_message(ctdb, CTDB_BROADCAST_CONNECTED,
 CTDB_SRVID_NODE_FLAGS_CHANGED, data);
 
if ((node->flags & NODE_FLAGS_BANNED) && !(old_flags & 
NODE_FLAGS_BANNED)) {

=== modified file 'server/ctdb_recoverd.c'
--- a/server/ctdb_recoverd.c2007-06-09 10:13:25 +
+++ b/server/ctdb_recoverd.c2007-06-09 11:58:50 +
@@ -392,7 +392,7 @@
data.dptr = (uint8_t *)&c;
data.dsize = sizeof(c);
 
-   ctdb_send_message(ctdb, CTDB_BROADCAST_VNNMAP,
+   ctdb_send_message(ctdb, CTDB_BROADCAST_CONNECTED,
  CTDB_SRVID_NODE_FLAGS_CHANGED, data);
 
}

=== modified file 'server/ctdb_server.c'
--- a/server/ctdb_server.c  2007-06-07 12:16:48 +
+++ b/server/ctdb_server.c  2007-06-09 11:58:50 +
@@ -390,7 +390,8 @@
 /*
   broadcast a packet to all nodes
 */
-static void ctdb_broadcast_packet_all(struct ctdb_context *ctdb, struct 
ctdb_req_header *hdr)
+static void ctdb_broadcast_packet_all(struct ctdb_context *ctdb, 
+ struct ctdb_req_header *hdr)
 {
int i;
for (i=0;inum_nodes;i++) {
@@ -402,7 +403,8 @@
 /*
   broadcast a packet to all nodes in the current vnnmap
 */
-static void ctdb_broadcast_packet_vnnmap(struct ctdb_context *ctdb, struct 
ctdb_req_header *hdr)
+static void ctdb_broadcast_packet_vnnmap(struct ctdb_context *ctdb, 
+struct ctdb_req_header *hdr)
 {
int i;
for (i=0;ivnn_map->size;i++) {
@@ -412,6 +414,21 @@
 }
 
 /*
+  broadcast a packet to all connected nodes
+*/
+static void ctdb_broadcast_packet_connected(struct ctdb_context *ctdb, 
+   struct ctdb_req_header *hdr)
+{
+   int i;
+   for (i=0;inum_nodes;i++) {
+   if (!(ctdb->nodes[i]->flags & NODE_FLAGS_DISCONNECTED)) {
+   hdr->destnode = ctdb->nodes[i]->vnn;
+   ctdb_

Rev 521: newer versions of ip need the mask on del in http://samba.org/~tridge/ctdb

2007-06-09 Thread tridge

revno: 521
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Sat 2007-06-09 21:46:42 +1000
message:
  newer versions of ip need the mask on del
modified:
  config/events.d/10.interface   10.interface-20070604050809-s21zslfirn07zjt8-1
=== modified file 'config/events.d/10.interface'
--- a/config/events.d/10.interface  2007-06-06 02:08:42 +
+++ b/config/events.d/10.interface  2007-06-09 11:46:42 +
@@ -56,7 +56,7 @@
iface=$1
ip=$2
maskbits=$3
-   /sbin/ip addr del $ip dev $iface || {
+   /sbin/ip addr del $ip/$maskbits dev $iface || {
 echo "`/bin/date` Failed to del $ip on dev $iface"
 exit 1
}



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

2007-06-09 Thread tridge

revno: 520
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Sat 2007-06-09 21:31:59 +1000
message:
  merge from ronnie
added:
  web/prerequisites.html 
prerequisites.html-20070609072440-316agucpmgyar8n9-1
modified:
  server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
  web/documentation.html 
documentation.html-20070609045837-x3vec3l27niwxtfg-1
  web/index.html ctdb.html-20070601052353-vgod9lfo4an4o83j-2

revno: 432.1.65
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Sat 2007-06-09 20:13:25 +1000
message:
  should be sufficient to unban nodes when we unbecome recmaster

revno: 432.1.64
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Sat 2007-06-09 20:11:51 +1000
message:
  unban all nodes when we release recmaster role or when we win an 
  election

revno: 432.1.63
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Sat 2007-06-09 19:49:28 +1000
message:
  remove rht unban code from when we take recmaster role.   we can not 
  send control broadcasts yet

revno: 432.1.62
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Sat 2007-06-09 19:42:41 +1000
message:
  add code to unban when we become/unbecome recmaster

revno: 432.1.61
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Sat 2007-06-09 17:45:24 +1000
message:
  capitalize some links

revno: 432.1.60
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Sat 2007-06-09 17:24:44 +1000
message:
  add a tiny prerequisites page stating that you need a cluster filesystem 
  first before you install CTDB

revno: 432.1.59
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Sat 2007-06-09 17:16:59 +1000
message:
  create a separate list of links for the manpages

revno: 432.1.58
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Sat 2007-06-09 17:15:26 +1000
message:
  replace the list of documentation links on the front page with a link to 
  the documentations page

revno: 432.1.57
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Sat 2007-06-09 15:38:17 +1000
message:
  merge from tridge

revno: 432.1.56
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Sat 2007-06-09 15:17:16 +1000
message:
  merge from tridge
=== added file 'web/prerequisites.html'
--- a/web/prerequisites.html1970-01-01 00:00:00 +
+++ b/web/prerequisites.html2007-06-09 07:24:44 +
@@ -0,0 +1,22 @@
+
+
+
+Prerequisites
+
+
+
+Prerequisites
+
+Before you can start using CTDB you must first install and configure a bunch 
of linux boxes.
+
+After that you need to install and configure a cluster filesystem and mount 
that cluster filesystem on all the linux boxes that will form your 
cluster.
+
+We have primarily used the GPFS filesystem for our testing but any cluster 
filesystem should work as long as it provides correct file locking.
+
+Other cluster filesystems
+While we primarily test with GPFS, CTDB should work with almost any other 
cluster filesystem as well.
+Please let us know your experiences in using other cluster filesystems.
+
+
+
+

=== modified file 'server/ctd

svn commit: lorikeet r738 - in trunk/fedora-ds: .

2007-06-09 Thread abartlet
Author: abartlet
Date: 2007-06-09 10:26:24 + (Sat, 09 Jun 2007)
New Revision: 738

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

Log:
This patch no longer required.

Andrew Bartlett

Removed:
   trunk/fedora-ds/bitwise.patch


Changeset:
Deleted: trunk/fedora-ds/bitwise.patch
===
--- trunk/fedora-ds/bitwise.patch   2007-06-09 05:00:50 UTC (rev 737)
+++ trunk/fedora-ds/bitwise.patch   2007-06-09 10:26:24 UTC (rev 738)
@@ -1,240 +0,0 @@
-Index: Makefile.am
-===
-RCS file: /cvs/dirsec/ldapserver/Makefile.am,v
-retrieving revision 1.35
-diff -u -r1.35 Makefile.am
 Makefile.am22 Mar 2007 15:16:26 -  1.35
-+++ Makefile.am5 Apr 2007 05:43:32 -
-@@ -99,7 +99,7 @@
-   libpassthru-plugin.la libpresence-plugin.la \
-   libpwdstorage-plugin.la libreferint-plugin.la libreplication-plugin.la \
-   libretrocl-plugin.la libroles-plugin.la libstatechange-plugin.la 
libsyntax-plugin.la \
--  libviews-plugin.la $(LIBPAM_PASSTHRU_PLUGIN) $(LIBDNA_PLUGIN)
-+  libviews-plugin.la libbitwise-plugin.la $(LIBPAM_PASSTHRU_PLUGIN) 
$(LIBDNA_PLUGIN)
- 
- nodist_property_DATA = ns-slapd.properties
- 
-@@ -601,6 +601,16 @@
- libcollation_plugin_la_LINK = $(CXXLINK)
- 
- #
-+# libbitwise-plugin
-+#
-+libbitwise_plugin_la_SOURCES = ldap/servers/plugins/bitwise/bitwise.c
-+
-+libbitwise_plugin_la_CPPFLAGS = @icu_inc@ $(PLUGIN_CPPFLAGS)
-+libbitwise_plugin_la_LIBADD = $(ICU_LINK) $(LIBCSTD) $(LIBCRUN)
-+libbitwise_plugin_la_LDFLAGS = -avoid-version
-+libbitwise_plugin_la_LINK = $(CXXLINK)
-+
-+#
- # libpam-passthru-plugin
- #
- libpam_passthru_plugin_la_SOURCES = 
ldap/servers/plugins/pam_passthru/pam_ptconfig.c \
 /dev/null  2007-03-27 12:12:45.566193334 +1000
-+++ ldap/servers/plugins/bitwise/bitwise.c 2007-04-04 12:09:32.0 
+1000
-@@ -0,0 +1,204 @@
-+/** BEGIN COPYRIGHT BLOCK
-+ * 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; version 2 of the License.
-+ * 
-+ * 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, write to the Free Software Foundation, Inc., 59 
Temple
-+ * Place, Suite 330, Boston, MA 02111-1307 USA.
-+ * 
-+ * In addition, as a special exception, Red Hat, Inc. gives You the additional
-+ * right to link the code of this Program with code not covered under the GNU
-+ * General Public License ("Non-GPL Code") and to distribute linked 
combinations
-+ * including the two, subject to the limitations in this paragraph. Non-GPL 
Code
-+ * permitted under this exception must only link to the code of this Program
-+ * through those well defined interfaces identified in the file named 
EXCEPTION
-+ * found in the source code files (the "Approved Interfaces"). The files of
-+ * Non-GPL Code may instantiate templates or use macros or inline functions 
from
-+ * the Approved Interfaces without causing the resulting work to be covered by
-+ * the GNU General Public License. Only Red Hat, Inc. may make changes or
-+ * additions to the list of Approved Interfaces. You must obey the GNU General
-+ * Public License in all respects for all of the Program code and other code 
used
-+ * in conjunction with the Program except the Non-GPL Code covered by this
-+ * exception. If you modify this file, you may extend this exception to your
-+ * version of the file, but you are not obligated to do so. If you do not 
wish to
-+ * provide this exception without modification, you must delete this exception
-+ * statement from your version and license this file solely under the GPL 
without
-+ * exception. 
-+ * 
-+ * 
-+ * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-+ * Copyright (C) 2005 Red Hat, Inc.
-+ * All rights reserved.
-+ * END COPYRIGHT BLOCK **/
-+
-+#ifdef HAVE_CONFIG_H
-+#  include 
-+#endif
-+
-+/* orfilter.c - implementation of ordering rule filter */
-+
-+#include  /* LDAP_UTF8INC */
-+#include  /* for debug macros */
-+#include  /* slapi_berval_cmp, SLAPI_BERVAL_EQ */
-+
-+#ifdef HPUX11
-+#include 
-+#endif /* HPUX11 */
-+
-+/* the match function needs the attribute type and value from the search
-+   filter - this is unfortunately not passed into the match fn, so we
-+   have to keep track of this
-+*/
-+struct bitwise_match_cb {
-+char *type; /* the attribute type from the filter ava */
-+struct berval *val; /* the value from the fi

svn commit: samba r23403 - in branches/SAMBA_4_0/source: . torture

2007-06-09 Thread kai
Author: kai
Date: 2007-06-09 07:17:24 + (Sat, 09 Jun 2007)
New Revision: 23403

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

Log:
Make nsstest build on Samba4.

For now, only build on Linux systems. If the build farm is happy with this,
I will gradually turn on this feature for other platforms, too.


Added:
   branches/SAMBA_4_0/source/torture/nsstest.h
   branches/SAMBA_4_0/source/torture/nsstest.m4
Modified:
   branches/SAMBA_4_0/source/configure.ac
   branches/SAMBA_4_0/source/torture/config.mk
   branches/SAMBA_4_0/source/torture/nsstest.c


Changeset:
Modified: branches/SAMBA_4_0/source/configure.ac
===
--- branches/SAMBA_4_0/source/configure.ac  2007-06-09 00:27:28 UTC (rev 
23402)
+++ branches/SAMBA_4_0/source/configure.ac  2007-06-09 07:17:24 UTC (rev 
23403)
@@ -25,6 +25,7 @@
 m4_include(lib/popt/samba.m4)
 m4_include(lib/charset/config.m4)
 m4_include(lib/socket/config.m4)
+m4_include(torture/nsstest.m4)
 
 #SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.0,
 # [samba_cv_internal_talloc=no],

Modified: branches/SAMBA_4_0/source/torture/config.mk
===
--- branches/SAMBA_4_0/source/torture/config.mk 2007-06-09 00:27:28 UTC (rev 
23402)
+++ branches/SAMBA_4_0/source/torture/config.mk 2007-06-09 07:17:24 UTC (rev 
23403)
@@ -358,6 +358,18 @@
 # End BINARY locktest
 #
 
+#
+# Start BINARY nsstest
+[BINARY::nsstest]
+INSTALLDIR = BINDIR
+OBJ_FILES = \
+   nsstest.o
+PRIVATE_DEPENDENCIES = \
+   LIBSAMBA-UTIL \
+   LIBREPLACE_EXT
+# End BINARY nsstest
+#
+
 GCOV_FLAGS = -ftest-coverage -fprofile-arcs
 GCOV_LIBS = -lgcov
 

Modified: branches/SAMBA_4_0/source/torture/nsstest.c
===
--- branches/SAMBA_4_0/source/torture/nsstest.c 2007-06-09 00:27:28 UTC (rev 
23402)
+++ branches/SAMBA_4_0/source/torture/nsstest.c 2007-06-09 07:17:24 UTC (rev 
23403)
@@ -20,6 +20,8 @@
 
 #include "includes.h"
 
+#include "torture/nsstest.h"
+
 static const char *so_path = "/lib/libnss_winbind.so";
 static const char *nss_name = "winbind";
 static int nss_errno;
@@ -35,13 +37,13 @@
snprintf(s,sizeof(s), "_nss_%s_%s", nss_name, name);
 
if (!h) {
-   h = sys_dlopen(so_path, RTLD_LAZY);
+   h = dlopen(so_path, RTLD_LAZY);
}
if (!h) {
printf("Can't open shared library %s\n", so_path);
exit(1);
}
-   res = sys_dlsym(h, s);
+   res = dlsym(h, s);
if (!res) {
printf("Can't find function %s\n", s);
return NULL;

Added: branches/SAMBA_4_0/source/torture/nsstest.h
===
--- branches/SAMBA_4_0/source/torture/nsstest.h 2007-06-09 00:27:28 UTC (rev 
23402)
+++ branches/SAMBA_4_0/source/torture/nsstest.h 2007-06-09 07:17:24 UTC (rev 
23403)
@@ -0,0 +1,116 @@
+/* 
+   Unix SMB/CIFS implementation.
+   nss includes for the nss tester
+   Copyright (C) Kai Blin 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 2 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, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifndef _NSSTEST_H
+#define _NSSTEST_H
+
+#include 
+#include 
+
+#ifdef HAVE_NSS_COMMON_H
+
+/* 
+ * Sun Solaris
+ */
+
+#include 
+#include 
+#include 
+
+typedef nss_status_t NSS_STATUS;
+
+#define NSS_STATUS_SUCCESS NSS_SUCCESS
+#define NSS_STATUS_NOTFOUNDNSS_NOTFOUND
+#define NSS_STATUS_UNAVAIL NSS_UNAVAIL
+#define NSS_STATUS_TRYAGAINNSS_TRYAGAIN
+
+#elif HAVE_NSS_H
+
+/*
+ * Linux (glibc)
+ */
+
+#include 
+typedef enum nss_status NSS_STATUS;
+
+#elif HAVE_NS_API_H
+
+/*
+ * SGI IRIX
+ */
+
+#ifdef DATUM
+#define _DATUM_DEFINED
+#endif
+
+#include 
+
+typedef enum
+{
+   NSS_STATUS_SUCCESS=NS_SUCCESS,
+   NSS_STATUS_NOTFOUND=NS_NOTFOUND,
+   NSS_STATUS_UNAVAIL=NS_UNAVAIL,
+   NSS_STATUS_TRYAGAIN=NS_TRYAGAIN
+} NSS_STATUS;
+
+#define NSD_MEM_STATIC 0
+#define NSD_MEM_VOLATILE 1
+#define NSD_MEM_DYNAMIC 2
+
+#elif defined(HPUX) && defined(HAVE_NSSWITCH_H)
+
+/* HP-UX 11 */
+
+#include 
+
+#define NSS_STATUS_SUCCESS