svn commit: samba r16077 - in branches/tmp/jpeach-xmetrics/source: . profile profile/pmda

2006-06-07 Thread jpeach
Author: jpeach
Date: 2006-06-07 06:44:32 + (Wed, 07 Jun 2006)
New Revision: 16077

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

Log:
Refactor the PCP autoconf macro. This removes some ancient cruft and
provides a correct fallback when PCP is not installed, or when it is
not a suitable version.

Separate the xmetrics build into its own #define. This means that you can
have profiling without xmetrics, and you can have xmetrics without PCP.

Require PCP 2.5. This lets us depend on the pmdaCache API and means we
don't need to worry about IRIX optional symbols.

Integrate PMDA more tightly. Use wrapped system calls even though this
means we have to drag in gobs of unused library code.

Remove done items from the TODO list.

Modified:
   branches/tmp/jpeach-xmetrics/source/Makefile.in
   branches/tmp/jpeach-xmetrics/source/aclocal.m4
   branches/tmp/jpeach-xmetrics/source/configure.in
   branches/tmp/jpeach-xmetrics/source/profile/TODO
   branches/tmp/jpeach-xmetrics/source/profile/pmda/samba.c
   branches/tmp/jpeach-xmetrics/source/profile/xmetrics_allocator.c
   branches/tmp/jpeach-xmetrics/source/profile/xmetrics_utils.c


Changeset:
Sorry, the patch is too large (942 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16077


svn commit: samba r16078 - branches/SAMBA_3_0/source/param trunk/source/param

2006-06-07 Thread jerry
Author: jerry
Date: 2006-06-07 12:01:54 + (Wed, 07 Jun 2006)
New Revision: 16078

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

Log:
Patch from Aleksey Fedoseev [EMAIL PROTECTED] to correctly
set the type of 'acl compatibility from string to integer
after the changes in r14207.


Modified:
   branches/SAMBA_3_0/source/param/loadparm.c
   trunk/source/param/loadparm.c


Changeset:
Modified: branches/SAMBA_3_0/source/param/loadparm.c
===
--- branches/SAMBA_3_0/source/param/loadparm.c  2006-06-07 06:44:32 UTC (rev 
16077)
+++ branches/SAMBA_3_0/source/param/loadparm.c  2006-06-07 12:01:54 UTC (rev 
16078)
@@ -234,7 +234,7 @@
int ldap_ssl;
char *szLdapSuffix;
char *szLdapAdminDn;
-   char *szAclCompat;
+   int iAclCompat;
char *szCupsServer;
char *szIPrintServer;
int ldap_passwd_sync; 
@@ -967,7 +967,7 @@
{disable netbios, P_BOOL, P_GLOBAL, Globals.bDisableNetbios, NULL, 
NULL, FLAG_ADVANCED}, 
{reset on zero vc, P_BOOL, P_GLOBAL, Globals.bResetOnZeroVC, NULL, 
NULL, FLAG_ADVANCED}, 
 
-   {acl compatibility, P_STRING, P_GLOBAL, Globals.szAclCompat, NULL,  
enum_acl_compat_vals, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, 
+   {acl compatibility, P_ENUM, P_GLOBAL, Globals.iAclCompat, NULL,  
enum_acl_compat_vals, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, 
{defer sharing violations, P_BOOL, P_GLOBAL, 
Globals.bDeferSharingViolations, NULL, NULL, FLAG_ADVANCED | FLAG_GLOBAL},
{ea support, P_BOOL, P_LOCAL, sDefault.bEASupport, NULL, NULL, 
FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, 
{nt acl support, P_BOOL, P_LOCAL, sDefault.bNTAclSupport, NULL, 
NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, 
@@ -1822,7 +1822,7 @@
 FN_GLOBAL_CONST_STRING(lp_template_homedir, Globals.szTemplateHomedir)
 FN_GLOBAL_CONST_STRING(lp_template_shell, Globals.szTemplateShell)
 FN_GLOBAL_CONST_STRING(lp_winbind_separator, Globals.szWinbindSeparator)
-FN_GLOBAL_INTEGER(lp_acl_compatibility, Globals.szAclCompat)
+FN_GLOBAL_INTEGER(lp_acl_compatibility, Globals.iAclCompat)
 FN_GLOBAL_BOOL(lp_winbind_enum_users, Globals.bWinbindEnumUsers)
 FN_GLOBAL_BOOL(lp_winbind_enum_groups, Globals.bWinbindEnumGroups)
 FN_GLOBAL_BOOL(lp_winbind_use_default_domain, 
Globals.bWinbindUseDefaultDomain)

Modified: trunk/source/param/loadparm.c
===
--- trunk/source/param/loadparm.c   2006-06-07 06:44:32 UTC (rev 16077)
+++ trunk/source/param/loadparm.c   2006-06-07 12:01:54 UTC (rev 16078)
@@ -234,7 +234,7 @@
int ldap_ssl;
char *szLdapSuffix;
char *szLdapAdminDn;
-   char *szAclCompat;
+   int iAclCompat;
char *szCupsServer;
char *szIPrintServer;
int ldap_passwd_sync; 
@@ -967,7 +967,7 @@
{disable netbios, P_BOOL, P_GLOBAL, Globals.bDisableNetbios, NULL, 
NULL, FLAG_ADVANCED}, 
{reset on zero vc, P_BOOL, P_GLOBAL, Globals.bResetOnZeroVC, NULL, 
NULL, FLAG_ADVANCED}, 
 
-   {acl compatibility, P_STRING, P_GLOBAL, Globals.szAclCompat, NULL,  
enum_acl_compat_vals, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, 
+   {acl compatibility, P_ENUM, P_GLOBAL, Globals.iAclCompat, NULL,  
enum_acl_compat_vals, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, 
{defer sharing violations, P_BOOL, P_GLOBAL, 
Globals.bDeferSharingViolations, NULL, NULL, FLAG_ADVANCED | FLAG_GLOBAL},
{ea support, P_BOOL, P_LOCAL, sDefault.bEASupport, NULL, NULL, 
FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, 
{nt acl support, P_BOOL, P_LOCAL, sDefault.bNTAclSupport, NULL, 
NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, 
@@ -1822,7 +1822,7 @@
 FN_GLOBAL_CONST_STRING(lp_template_homedir, Globals.szTemplateHomedir)
 FN_GLOBAL_CONST_STRING(lp_template_shell, Globals.szTemplateShell)
 FN_GLOBAL_CONST_STRING(lp_winbind_separator, Globals.szWinbindSeparator)
-FN_GLOBAL_INTEGER(lp_acl_compatibility, Globals.szAclCompat)
+FN_GLOBAL_INTEGER(lp_acl_compatibility, Globals.iAclCompat)
 FN_GLOBAL_BOOL(lp_winbind_enum_users, Globals.bWinbindEnumUsers)
 FN_GLOBAL_BOOL(lp_winbind_enum_groups, Globals.bWinbindEnumGroups)
 FN_GLOBAL_BOOL(lp_winbind_use_default_domain, 
Globals.bWinbindUseDefaultDomain)



svn commit: samba r16079 - branches/SAMBA_3_0/source/param trunk/source/param

2006-06-07 Thread jerry
Author: jerry
Date: 2006-06-07 12:35:16 + (Wed, 07 Jun 2006)
New Revision: 16079

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

Log:
How embarassing. :-(  Broke the build.  

I will *always* compile before checking in...
I will *always* compile before checking in...
I will *always* compile before checking in...
I will *always* compile before checking in...
I will *always* compile before checking in...

Modified:
   branches/SAMBA_3_0/source/param/loadparm.c
   trunk/source/param/loadparm.c


Changeset:
Modified: branches/SAMBA_3_0/source/param/loadparm.c
===
--- branches/SAMBA_3_0/source/param/loadparm.c  2006-06-07 12:01:54 UTC (rev 
16078)
+++ branches/SAMBA_3_0/source/param/loadparm.c  2006-06-07 12:35:16 UTC (rev 
16079)
@@ -1611,7 +1611,6 @@
string_set(Globals.szTemplateShell, /bin/false);
string_set(Globals.szTemplateHomedir, /home/%D/%U);
string_set(Globals.szWinbindSeparator, \\);
-   string_set(Globals.szAclCompat, );
string_set(Globals.szCupsServer, );
string_set(Globals.szIPrintServer, );
 

Modified: trunk/source/param/loadparm.c
===
--- trunk/source/param/loadparm.c   2006-06-07 12:01:54 UTC (rev 16078)
+++ trunk/source/param/loadparm.c   2006-06-07 12:35:16 UTC (rev 16079)
@@ -1611,7 +1611,6 @@
string_set(Globals.szTemplateShell, /bin/false);
string_set(Globals.szTemplateHomedir, /home/%D/%U);
string_set(Globals.szWinbindSeparator, \\);
-   string_set(Globals.szAclCompat, );
string_set(Globals.szCupsServer, );
string_set(Globals.szIPrintServer, );
 



svn commit: samba r16080 - branches/SAMBA_3_0/source/nsswitch trunk/source/nsswitch

2006-06-07 Thread gd
Author: gd
Date: 2006-06-07 13:06:49 + (Wed, 07 Jun 2006)
New Revision: 16080

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

Log:
Re-add accidentially excluded in-forest domain trusts (fixes bug #3823).

Guenther

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c
   trunk/source/nsswitch/winbindd_ads.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c   2006-06-07 12:35:16 UTC 
(rev 16079)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c   2006-06-07 13:06:49 UTC 
(rev 16080)
@@ -1042,7 +1042,7 @@
struct ds_domain_trust  *domains = NULL;
int count = 0;
int i;
-   uint32  flags = DS_DOMAIN_DIRECT_OUTBOUND;
+   uint32  flags = DS_DOMAIN_IN_FOREST | 
DS_DOMAIN_DIRECT_OUTBOUND;
struct rpc_pipe_client *cli;
 
DEBUG(3,(ads: trusted_domains\n));

Modified: trunk/source/nsswitch/winbindd_ads.c
===
--- trunk/source/nsswitch/winbindd_ads.c2006-06-07 12:35:16 UTC (rev 
16079)
+++ trunk/source/nsswitch/winbindd_ads.c2006-06-07 13:06:49 UTC (rev 
16080)
@@ -1042,7 +1042,7 @@
struct ds_domain_trust  *domains = NULL;
int count = 0;
int i;
-   uint32  flags = DS_DOMAIN_DIRECT_OUTBOUND;
+   uint32  flags = DS_DOMAIN_IN_FOREST | 
DS_DOMAIN_DIRECT_OUTBOUND;
struct rpc_pipe_client *cli;
 
DEBUG(3,(ads: trusted_domains\n));



svn commit: samba r16081 - in branches/tmp/vl-messaging/source: . include lib nmbd nsswitch param printing

2006-06-07 Thread jmcd
Author: jmcd
Date: 2006-06-07 14:45:07 + (Wed, 07 Jun 2006)
New Revision: 16081

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

Log:
Work from Aleksey Fedoseev to add separate messaging types


Added:
   branches/tmp/vl-messaging/source/lib/messages_dgram.c
   branches/tmp/vl-messaging/source/lib/messages_socket.c
   branches/tmp/vl-messaging/source/lib/messages_stream.c
   branches/tmp/vl-messaging/source/lib/messages_tdb.c
Modified:
   branches/tmp/vl-messaging/source/Makefile.in
   branches/tmp/vl-messaging/source/configure.in
   branches/tmp/vl-messaging/source/include/messages.h
   branches/tmp/vl-messaging/source/include/smb.h
   branches/tmp/vl-messaging/source/lib/messages.c
   branches/tmp/vl-messaging/source/lib/util.c
   branches/tmp/vl-messaging/source/lib/util_sock.c
   branches/tmp/vl-messaging/source/nmbd/nmbd.c
   branches/tmp/vl-messaging/source/nmbd/nmbd_packets.c
   branches/tmp/vl-messaging/source/nsswitch/winbindd.c
   branches/tmp/vl-messaging/source/nsswitch/winbindd_dual.c
   branches/tmp/vl-messaging/source/param/loadparm.c
   branches/tmp/vl-messaging/source/printing/printing.c


Changeset:
Sorry, the patch is too large (2529 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16081


svn commit: samba r16082 - in branches/SAMBA_4_0/source/setup: .

2006-06-07 Thread abartlet
Author: abartlet
Date: 2006-06-07 20:43:50 + (Wed, 07 Jun 2006)
New Revision: 16082

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

Log:
Index objectCategory like objectClass, as it is searched on a lot.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/setup/provision_init.ldif


Changeset:
Modified: branches/SAMBA_4_0/source/setup/provision_init.ldif
===
--- branches/SAMBA_4_0/source/setup/provision_init.ldif 2006-06-07 14:45:07 UTC 
(rev 16081)
+++ branches/SAMBA_4_0/source/setup/provision_init.ldif 2006-06-07 20:43:50 UTC 
(rev 16082)
@@ -3,6 +3,7 @@
 @IDXATTR: sAMAccountName
 @IDXATTR: objectSid
 @IDXATTR: objectClass
[EMAIL PROTECTED]: objectCategory
 @IDXATTR: member
 @IDXATTR: unixID
 @IDXATTR: unixName



svn commit: samba r16083 - in branches/SAMBA_4_0/source: dsdb/samdb/ldb_modules lib/ldb/common lib/ldb/include lib/ldb/ldb_ildap lib/ldb/ldb_ldap lib/ldb/ldb_sqlite3 lib/ldb/ldb_tdb

2006-06-07 Thread abartlet
Author: abartlet
Date: 2006-06-07 21:03:38 + (Wed, 07 Jun 2006)
New Revision: 16083

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

Log:
Make it possible to initialise a backend module, without it setting up
the whole ldb structure.

Because the sequence number was a fn pointer on the main ldb context,
turn it into a full request (currently sync).

Andrew Bartlett


Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/rootdse.c
   branches/SAMBA_4_0/source/lib/ldb/common/ldb.c
   branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c
   branches/SAMBA_4_0/source/lib/ldb/include/ldb.h
   branches/SAMBA_4_0/source/lib/ldb/include/ldb_private.h
   branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c
   branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c
   branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
   branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/rootdse.c
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/rootdse.c  2006-06-07 
20:43:50 UTC (rev 16082)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/rootdse.c  2006-06-07 
21:03:38 UTC (rev 16083)
@@ -102,10 +102,13 @@
}
 
if (do_attribute(attrs, highestCommittedUSN)) {
-   if (module-ldb-sequence_number != NULL  
-   ldb_msg_add_fmt(msg, highestCommittedUSN, 
-   %llu, 
module-ldb-sequence_number(module-ldb)) != 0) {
-   goto failed;
+   uint64_t seq_num;
+   int ret = ldb_sequence_number(module-ldb, seq_num);
+   if (ret == LDB_SUCCESS) {
+   if (ldb_msg_add_fmt(msg, highestCommittedUSN, 
+   %llu, seq_num) != 0) {
+   goto failed;
+   }
}
}


Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb.c
===
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb.c  2006-06-07 20:43:50 UTC 
(rev 16082)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb.c  2006-06-07 21:03:38 UTC 
(rev 16083)
@@ -91,16 +91,20 @@
 }
 
 /* 
- connect to a database. The URL can either be one of the following forms
+   Return the ldb module form of a database. The URL can either be one of the 
following forms
ldb://path
ldapi://path
 
flags is made up of LDB_FLG_*
 
the options are passed uninterpreted to the backend, and are
-   backend specific
+   backend specific.
+
+  This allows modules to get at only the backend module, for example where a 
module 
+  may wish to direct certain requests at a particular backend.
 */
-int ldb_connect(struct ldb_context *ldb, const char *url, unsigned int flags, 
const char *options[])
+int ldb_connect_backend(struct ldb_context *ldb, const char *url, unsigned int 
flags, const char *options[],
+   struct ldb_module **backend_module)
 {
int ret;
char *backend;
@@ -128,13 +132,35 @@
return LDB_ERR_OTHER;
}
 
-   ret = fn(ldb, url, flags, options);
+   ret = fn(ldb, url, flags, options, backend_module);
 
if (ret != LDB_SUCCESS) {
ldb_debug(ldb, LDB_DEBUG_ERROR, Failed to connect to '%s'\n, 
url);
return ret;
}
+   return ret;
+}
 
+
+/* 
+ connect to a database. The URL can either be one of the following forms
+   ldb://path
+   ldapi://path
+
+   flags is made up of LDB_FLG_*
+
+   the options are passed uninterpreted to the backend, and are
+   backend specific
+*/
+int ldb_connect(struct ldb_context *ldb, const char *url, unsigned int flags, 
const char *options[])
+{
+   int ret;
+
+   ret = ldb_connect_backend(ldb, url, flags, options, ldb-modules);
+   if (ret != LDB_SUCCESS) {
+   return ret;
+   }
+
if (ldb_load_modules(ldb, options) != LDB_SUCCESS) {
ldb_debug(ldb, LDB_DEBUG_FATAL, Unable to load modules for 
'%s'\n, url);
return LDB_ERR_OTHER;
@@ -395,6 +421,10 @@
FIRST_OP(ldb, rename);
ret = module-ops-rename(module, req);
break;
+   case LDB_SEQUENCE_NUMBER:
+   FIRST_OP(ldb, sequence_number);
+   ret = module-ops-sequence_number(module, req);
+   break;
default:
FIRST_OP(ldb, request);
ret = module-ops-request(module, req);
@@ -655,7 +685,39 @@
 }
 
 
+/*
+  rename a record in the database
+*/
+int ldb_sequence_number(struct ldb_context *ldb, uint64_t *seq_num)
+{
+   struct ldb_request *req;
+   int ret;
 
+   req = talloc(ldb, struct ldb_request);
+   if (req == NULL) {
+   ldb_set_errstring(ldb, talloc_strdup(ldb, Out of 

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

2006-06-07 Thread abartlet
Author: abartlet
Date: 2006-06-07 22:03:06 + (Wed, 07 Jun 2006)
New Revision: 16084

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

Log:
Add private prototype for new ldb_connect_backend() function.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/lib/ldb/include/ldb_private.h


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/include/ldb_private.h
===
--- branches/SAMBA_4_0/source/lib/ldb/include/ldb_private.h 2006-06-07 
21:03:38 UTC (rev 16083)
+++ branches/SAMBA_4_0/source/lib/ldb/include/ldb_private.h 2006-06-07 
22:03:06 UTC (rev 16084)
@@ -130,6 +130,11 @@
 */
 #define ldb_oom(ldb) ldb_debug_set(ldb, LDB_DEBUG_FATAL, ldb out of memory at 
%s:%d\n, __FILE__, __LINE__)
 
+/* The following definitions come from lib/ldb/common/ldb.c  */
+
+int ldb_connect_backend(struct ldb_context *ldb, const char *url, unsigned int 
flags, const char *options[],
+   struct ldb_module **backend_module);
+
 /* The following definitions come from lib/ldb/common/ldb_modules.c  */
 
 int ldb_load_modules(struct ldb_context *ldb, const char *options[]);



Build status as of Thu Jun 8 00:00:02 2006

2006-06-07 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2006-06-07 
00:00:42.0 +
+++ /home/build/master/cache/broken_results.txt 2006-06-08 00:00:23.0 
+
@@ -1,18 +1,18 @@
-Build status as of Wed Jun  7 00:00:02 2006
+Build status as of Thu Jun  8 00:00:02 2006
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
-ccache   36 5  0 
+ccache   35 5  0 
 distcc   37 5  0 
-lorikeet-heimdal 2  2  0 
+lorikeet-heimdal 1  1  0 
 ppp  19 0  0 
 rsync40 1  0 
 samba5  1  0 
 samba-docs   0  0  0 
-samba4   45 29 4 
-samba_3_043 16 0 
+samba4   45 31 5 
+samba_3_042 15 0 
 smb-build31 0  0 
-talloc   25 13 0 
+talloc   22 11 0 
 tdb  37 4  0 
 


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

2006-06-07 Thread abartlet
Author: abartlet
Date: 2006-06-08 00:58:57 + (Thu, 08 Jun 2006)
New Revision: 16085

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

Log:
Set the error string if we fail to find a valid op to execute.  Helps
in chasing down bugs :-)

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/lib/ldb/common/ldb.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb.c
===
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb.c  2006-06-07 22:03:06 UTC 
(rev 16084)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb.c  2006-06-08 00:58:57 UTC 
(rev 16085)
@@ -189,9 +189,13 @@
 }
 
 #define FIRST_OP(ldb, op) do { \
-   module = ldb-modules; \
+   module = ldb-modules;  \
while (module  module-ops-op == NULL) module = module-next; \
-   if (module == NULL) return LDB_ERR_OPERATIONS_ERROR; \
+   if (module == NULL) {   \
+   ldb_set_errstring(ldb, \
+ talloc_asprintf(ldb, unable to find module 
or backend to handle operation:  #op)); \
+   return LDB_ERR_OPERATIONS_ERROR;\
+   } \
 } while (0)
 
 /*



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

2006-06-07 Thread abartlet
Author: abartlet
Date: 2006-06-08 01:00:46 + (Thu, 08 Jun 2006)
New Revision: 16086

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

Log:
Ensure we can never dereference NULL pointers, and that describe what
these two DN comparison functions do.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c
===
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c   2006-06-08 00:58:57 UTC 
(rev 16085)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c   2006-06-08 01:00:46 UTC 
(rev 16086)
@@ -478,23 +478,25 @@
return NULL;
 }
 
-/* compare DNs using casefolding compare functions */
+/* Determine if dn is below base, in the ldap tree.  Used for
+ * evaluating a subtree search.
+ * 0 if they match, otherwise non-zero
+ */
 
 int ldb_dn_compare_base(struct ldb_context *ldb,
-  const struct ldb_dn *base,
-  const struct ldb_dn *dn)
+   const struct ldb_dn *base,
+   const struct ldb_dn *dn)
 {
int ret;
int n0, n1;
 
+   if (base == NULL || base-comp_num == 0) return 0;
+   if (dn == NULL || dn-comp_num == 0) return -1;
+
if (base-comp_num  dn-comp_num) {
return (dn-comp_num - base-comp_num);
}
 
-   if (base == NULL || base-comp_num == 0) return 0;
-   if (dn == NULL || dn-comp_num == 0) return -1;
-   if (base-comp_num  dn-comp_num) return -1;
-
/* if the number of components doesn't match they differ */
n0 = base-comp_num - 1;
n1 = dn-comp_num - 1;
@@ -522,6 +524,11 @@
return 0;
 }
 
+/* compare DNs using casefolding compare functions.  
+
+   If they match, then return 0
+ */
+
 int ldb_dn_compare(struct ldb_context *ldb,
   const struct ldb_dn *edn0,
   const struct ldb_dn *edn1)



svn commit: samba r16087 - in branches/SAMBA_4_0/source/lib/ldb: ldb_ildap ldb_ldap ldb_sqlite3 ldb_tdb

2006-06-07 Thread abartlet
Author: abartlet
Date: 2006-06-08 01:02:14 + (Thu, 08 Jun 2006)
New Revision: 16087

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

Log:
Fix silly cut-and-paste typo that cost me much of my afternoon...

This only affects my new partitions module, which I will post soon,
but should be fixed anyway.

Andrew Bartlett


Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c
   branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c
   branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
   branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c
===
--- branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c 2006-06-08 
01:00:46 UTC (rev 16086)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c 2006-06-08 
01:02:14 UTC (rev 16087)
@@ -833,7 +833,7 @@
return -1;
}
(*module)-ldb = ldb;
-   (*module)-prev = ldb-modules-next = NULL;
+   (*module)-prev = (*module)-next = NULL;
(*module)-private_data = ildb;
(*module)-ops = ildb_ops;
 
@@ -869,9 +869,6 @@
return 0;
 
 failed:
-   if (ldb-modules) {
-   ldb-modules-private_data = NULL;
-   }
talloc_free(ildb);
return -1;
 }

Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c
===
--- branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c   2006-06-08 
01:00:46 UTC (rev 16086)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c   2006-06-08 
01:02:14 UTC (rev 16087)
@@ -811,7 +811,7 @@
return -1;
}
(*module)-ldb = ldb;
-   (*module)-prev = ldb-modules-next = NULL;
+   (*module)-prev = (*module)-next = NULL;
(*module)-private_data = lldb;
(*module)-ops = lldb_ops;
 

Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
===
--- branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c 2006-06-08 
01:00:46 UTC (rev 16086)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c 2006-06-08 
01:02:14 UTC (rev 16087)
@@ -2106,7 +2106,7 @@
goto failed;
}
(*module)-ldb = ldb;
-   (*module)-prev = ldb-modules-next = NULL;
+   (*module)-prev = (*module)-next = NULL;
(*module)-private_data = lsqlite3;
(*module)-ops = lsqlite3_ops;
 

Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb.c
===
--- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb.c 2006-06-08 01:00:46 UTC 
(rev 16086)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb.c 2006-06-08 01:02:14 UTC 
(rev 16087)
@@ -1028,7 +1028,7 @@
return -1;
}
(*module)-ldb = ldb;
-   (*module)-prev = ldb-modules-next = NULL;
+   (*module)-prev = (*module)-next = NULL;
(*module)-private_data = ltdb;
(*module)-ops = ltdb_ops;
 



svn commit: samba r16088 - in trunk/examples/VFS: .

2006-06-07 Thread jpeach
Author: jpeach
Date: 2006-06-08 02:09:31 + (Thu, 08 Jun 2006)
New Revision: 16088

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

Log:
Update skel_transparent to VFS interface version 17.

Modified:
   trunk/examples/VFS/skel_transparent.c


Changeset:
Modified: trunk/examples/VFS/skel_transparent.c
===
--- trunk/examples/VFS/skel_transparent.c   2006-06-08 01:02:14 UTC (rev 
16087)
+++ trunk/examples/VFS/skel_transparent.c   2006-06-08 02:09:31 UTC (rev 
16088)
@@ -37,32 +37,32 @@
  * --metze
  */
 
-static int skel_connect(vfs_handle_struct *handle, connection_struct *conn, 
const char *service, const char *user)
+static int skel_connect(vfs_handle_struct *handle,  const char *service, const 
char *user)
 {
-   return SMB_VFS_NEXT_CONNECT(handle, conn, service, user);
+   return SMB_VFS_NEXT_CONNECT(handle, service, user);
 }
 
-static void skel_disconnect(vfs_handle_struct *handle, connection_struct *conn)
+static void skel_disconnect(vfs_handle_struct *handle)
 {
-   SMB_VFS_NEXT_DISCONNECT(handle, conn);
+   SMB_VFS_NEXT_DISCONNECT(handle);
 }
 
-static SMB_BIG_UINT skel_disk_free(vfs_handle_struct *handle, 
connection_struct *conn, const char *path,
+static SMB_BIG_UINT skel_disk_free(vfs_handle_struct *handle,  const char 
*path,
BOOL small_query, SMB_BIG_UINT *bsize,
SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
 {
-   return SMB_VFS_NEXT_DISK_FREE(handle, conn, path, small_query, bsize, 
+   return SMB_VFS_NEXT_DISK_FREE(handle, path, small_query, bsize, 
 dfree, dsize);
 }
 
-static int skel_get_quota(vfs_handle_struct *handle, connection_struct *conn, 
enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dq)
+static int skel_get_quota(vfs_handle_struct *handle,  enum SMB_QUOTA_TYPE 
qtype, unid_t id, SMB_DISK_QUOTA *dq)
 {
-   return SMB_VFS_NEXT_GET_QUOTA(handle, conn, qtype, id, dq);
+   return SMB_VFS_NEXT_GET_QUOTA(handle, qtype, id, dq);
 }
 
-static int skel_set_quota(vfs_handle_struct *handle, connection_struct *conn, 
enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dq)
+static int skel_set_quota(vfs_handle_struct *handle,  enum SMB_QUOTA_TYPE 
qtype, unid_t id, SMB_DISK_QUOTA *dq)
 {
-   return SMB_VFS_NEXT_SET_QUOTA(handle, conn, qtype, id, dq);
+   return SMB_VFS_NEXT_SET_QUOTA(handle, qtype, id, dq);
 }
 
 static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct 
*fsp, SHADOW_COPY_DATA *shadow_copy_data, BOOL labels)
@@ -70,54 +70,54 @@
return SMB_VFS_NEXT_GET_SHADOW_COPY_DATA(handle, fsp, shadow_copy_data, 
labels);
 }
 
-static int skel_statvfs(struct vfs_handle_struct *handle, struct 
connection_struct *conn, const char *path, struct vfs_statvfs_struct *statbuf)
+static int skel_statvfs(struct vfs_handle_struct *handle, const char *path, 
struct vfs_statvfs_struct *statbuf)
 {
-   return SMB_VFS_NEXT_STATVFS(handle, conn, path, statbuf);
+   return SMB_VFS_NEXT_STATVFS(handle, path, statbuf);
 }
 
-static SMB_STRUCT_DIR *skel_opendir(vfs_handle_struct *handle, 
connection_struct *conn, const char *fname, const char *mask, uint32 attr)
+static SMB_STRUCT_DIR *skel_opendir(vfs_handle_struct *handle,  const char 
*fname, const char *mask, uint32 attr)
 {
-   return SMB_VFS_NEXT_OPENDIR(handle, conn, fname, mask, attr);
+   return SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
 }
 
-static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle, 
connection_struct *conn, SMB_STRUCT_DIR *dirp)
+static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle,  
SMB_STRUCT_DIR *dirp)
 {
-   return SMB_VFS_NEXT_READDIR(handle, conn, dirp);
+   return SMB_VFS_NEXT_READDIR(handle, dirp);
 }
 
-static void skel_seekdir(vfs_handle_struct *handle, connection_struct *conn, 
SMB_STRUCT_DIR *dirp, long offset)
+static void skel_seekdir(vfs_handle_struct *handle,  SMB_STRUCT_DIR *dirp, 
long offset)
 {
-   return SMB_VFS_NEXT_SEEKDIR(handle, conn, dirp, offset);
+   return SMB_VFS_NEXT_SEEKDIR(handle, dirp, offset);
 }
 
-static long skel_telldir(vfs_handle_struct *handle, connection_struct *conn, 
SMB_STRUCT_DIR *dirp)
+static long skel_telldir(vfs_handle_struct *handle,  SMB_STRUCT_DIR *dirp)
 {
-   return SMB_VFS_NEXT_TELLDIR(handle, conn, dirp);
+   return SMB_VFS_NEXT_TELLDIR(handle, dirp);
 }
 
-static void skel_rewinddir(vfs_handle_struct *handle, connection_struct *conn, 
SMB_STRUCT_DIR *dirp)
+static void skel_rewinddir(vfs_handle_struct *handle,  SMB_STRUCT_DIR *dirp)
 {
-   return SMB_VFS_NEXT_REWINDDIR(handle, conn, dirp);
+   return SMB_VFS_NEXT_REWINDDIR(handle, dirp);
 }
 
-static int skel_mkdir(vfs_handle_struct *handle, connection_struct *conn, 
const char *path, mode_t mode)
+static int skel_mkdir(vfs_handle_struct *handle,  const char *path, mode_t 
mode)
 {
-   return 

svn commit: samba r16090 - in branches/SAMBA_4_0/source/lib/ldb: ldb_sqlite3 modules

2006-06-07 Thread tpot
Author: tpot
Date: 2006-06-08 03:57:57 + (Thu, 08 Jun 2006)
New Revision: 16090

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

Log:
Fix standalone build after the rename of enum ldb_request_type in 
r15944.

Hey idra I think a better rename would be to keep the LDB_REQ suffix 
here to remain consistent with the other enums (e.g ldb_reply_type, 
ldb_async_wait_type and ldb_async_state).

Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
   branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map.c
   branches/SAMBA_4_0/source/lib/ldb/modules/schema.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
===
--- branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c 2006-06-08 
03:35:39 UTC (rev 16089)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c 2006-06-08 
03:57:57 UTC (rev 16090)
@@ -1990,7 +1990,7 @@

switch (req-operation) {
 
-   case LDB_REQ_SEARCH:
+   case LDB_SEARCH:
return lsql_search_bytree(module,
  req-op.search.base,
  req-op.search.scope, 
@@ -1998,21 +1998,21 @@
  req-op.search.attrs, 
  req-op.search.res);
 
-   case LDB_REQ_ADD:
+   case LDB_ADD:
return lsql_add(module, req-op.add.message);
 
-   case LDB_REQ_MODIFY:
+   case LDB_MODIFY:
return lsql_modify(module, req-op.mod.message);
 
-   case LDB_REQ_DELETE:
+   case LDB_DELETE:
return lsql_delete(module, req-op.del.dn);
 
-   case LDB_REQ_RENAME:
+   case LDB_RENAME:
return lsql_rename(module,
req-op.rename.olddn,
req-op.rename.newdn);
 
-   case LDB_ASYNC_SEARCH:
+   case LDB_SEARCH:
return lsql_search_async(module,
req-op.search.base,
req-op.search.scope, 
@@ -2022,28 +2022,28 @@
req-async.callback,
req-async.handle);
 /*
-   case LDB_ASYNC_ADD:
+   case LDB_ADD:
return lsql_add_async(module,
req-op.add.message,
req-async.context,
req-async.callback,
req-async.handle);
 
-   case LDB_ASYNC_MODIFY:
+   case LDB_MODIFY:
return lsql_modify_async(module,
req-op.mod.message,
req-async.context,
req-async.callback,
req-async.handle);
 */
-   case LDB_ASYNC_DELETE:
+   case LDB_DELETE:
return lsql_delete_async(module,
req-op.del.dn,
req-async.context,
req-async.callback,
req-async.handle);
 
-   case LDB_ASYNC_RENAME:
+   case LDB_RENAME:
return lsql_rename_async(module,
req-op.rename.olddn,
req-op.rename.newdn,

Modified: branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map.c
===
--- branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map.c 2006-06-08 03:35:39 UTC 
(rev 16089)
+++ branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map.c 2006-06-08 03:57:57 UTC 
(rev 16090)
@@ -812,7 +812,7 @@
new_base = map_local_dn(module, module, base);
 
memset((char *)(new_req), 0, sizeof(new_req));
-   new_req.operation = LDB_REQ_SEARCH;
+   new_req.operation = LDB_SEARCH;
new_req.op.search.base = new_base;
new_req.op.search.scope = scope;
new_req.op.search.tree = new_tree;
@@ -857,7 +857,7 @@

/* Merge with additional data from fallback database */
memset((char *)(mergereq), 0, sizeof(mergereq)); /* zero off 
the request structure */
-   mergereq.operation = LDB_REQ_SEARCH;
+   mergereq.operation = LDB_SEARCH;
mergereq.op.search.base = merged-dn;
mergereq.op.search.scope = LDB_SCOPE_BASE;
mergereq.op.search.tree = ldb_parse_tree(module, );
@@ -1266,10 +1266,10 @@
fb_ret = ldb_next_request(module, req);
if (fb_ret == -1) {
ldb_msg_add_string(fb, isMapped, TRUE);
-   req-operation = LDB_REQ_ADD;
+