svn commit: samba r17513 - in branches/SAMBA_4_0/source/dsdb/samdb: .
Author: idra Date: 2006-08-13 07:32:05 + (Sun, 13 Aug 2006) New Revision: 17513 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17513 Log: ldb_set_errstring is an ldb private string, samdb uses DEBUG() statements Modified: branches/SAMBA_4_0/source/dsdb/samdb/samdb.c Changeset: Modified: branches/SAMBA_4_0/source/dsdb/samdb/samdb.c === --- branches/SAMBA_4_0/source/dsdb/samdb/samdb.c2006-08-13 00:22:52 UTC (rev 17512) +++ branches/SAMBA_4_0/source/dsdb/samdb/samdb.c2006-08-13 07:32:05 UTC (rev 17513) @@ -27,7 +27,6 @@ #include librpc/gen_ndr/ndr_misc.h #include librpc/gen_ndr/ndr_security.h #include lib/ldb/include/ldb.h -#include lib/ldb/include/ldb_private.h #include lib/ldb/include/ldb_errors.h #include libcli/security/security.h #include auth/credentials/credentials.h @@ -690,7 +689,7 @@ return ret; } if (res-count != 1) { - ldb_set_errstring(ldb, talloc_asprintf(ldb, samdb_copy_template: ERROR: template '%s' matched %d records, expected 1\n, filter, + DEBUG(1, (samdb_copy_template: ERROR: template '%s' matched %d records, expected 1\n, filter, res-count)); talloc_free(res); return LDB_ERR_OPERATIONS_ERROR; @@ -720,7 +719,7 @@ ret = samdb_find_or_add_value(ldb, msg, el-name, (char *)el-values[j].data); if (ret) { - ldb_set_errstring(ldb, talloc_asprintf(ldb, Adding objectClass %s failed.\n, el-values[j].data)); + DEBUG(1, ( Adding objectClass %s failed.\n, el-values[j].data)); talloc_free(res); return ret; } @@ -728,7 +727,7 @@ ret = samdb_find_or_add_attribute(ldb, msg, el-name, (char *)el-values[j].data); if (ret) { - ldb_set_errstring(ldb, talloc_asprintf(ldb, Adding attribute %s failed.\n, el-name)); + DEBUG(1, (Adding attribute %s failed.\n, el-name)); talloc_free(res); return ret; }
svn commit: samba r17514 - 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 lib/ldb/modules nb
Author: idra Date: 2006-08-13 07:33:57 + (Sun, 13 Aug 2006) New Revision: 17514 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17514 Log: Simplify the way to set ldb errors and add another helper function to set them. Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/extended_dn.c branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/kludge_acl.c branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/local_password.c branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/partition.c branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/proxy.c branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/rootdse.c branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c branches/SAMBA_4_0/source/lib/ldb/common/ldb.c branches/SAMBA_4_0/source/lib/ldb/common/ldb_debug.c branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c 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_search.c branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb.c branches/SAMBA_4_0/source/lib/ldb/modules/asq.c branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map.c branches/SAMBA_4_0/source/lib/ldb/modules/objectclass.c branches/SAMBA_4_0/source/lib/ldb/modules/operational.c branches/SAMBA_4_0/source/lib/ldb/modules/paged_results.c branches/SAMBA_4_0/source/lib/ldb/modules/sort.c branches/SAMBA_4_0/source/nbt_server/wins/wins_ldb.c Changeset: Sorry, the patch is too large (1738 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17514
svn commit: samba r17515 - in branches/SAMBA_4_0/source/lib/ldb/samba: .
Author: idra Date: 2006-08-13 07:57:42 + (Sun, 13 Aug 2006) New Revision: 17515 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17515 Log: Fix warnings Modified: branches/SAMBA_4_0/source/lib/ldb/samba/ldif_handlers.c Changeset: Modified: branches/SAMBA_4_0/source/lib/ldb/samba/ldif_handlers.c === --- branches/SAMBA_4_0/source/lib/ldb/samba/ldif_handlers.c 2006-08-13 07:33:57 UTC (rev 17514) +++ branches/SAMBA_4_0/source/lib/ldb/samba/ldif_handlers.c 2006-08-13 07:57:42 UTC (rev 17515) @@ -300,16 +300,16 @@ dn1 = ldb_dn_explode(mem_ctx, (char *)in-data); if (dn1 == NULL) { - oc1 = talloc_strndup(mem_ctx, in-data, in-length); + oc1 = talloc_strndup(mem_ctx, (char *)in-data, in-length); } else if (dn1-comp_num = 1 strcasecmp(dn1-components[0].name, cn) == 0) { - oc1 = talloc_strndup(mem_ctx, dn1-components[0].value.data, + oc1 = talloc_strndup(mem_ctx, (char *)dn1-components[0].value.data, dn1-components[0].value.length); } else { return -1; } oc1 = ldb_casefold(ldb, mem_ctx, oc1); - out-data = oc1; + out-data = (void *)oc1; out-length = strlen(oc1); return 0; } @@ -323,9 +323,9 @@ dn1 = ldb_dn_explode(mem_ctx, (char *)v1-data); if (dn1 == NULL) { - oc1 = talloc_strndup(mem_ctx, v1-data, v1-length); + oc1 = talloc_strndup(mem_ctx, (char *)v1-data, v1-length); } else if (dn1-comp_num = 1 strcasecmp(dn1-components[0].name, cn) == 0) { - oc1 = talloc_strndup(mem_ctx, dn1-components[0].value.data, + oc1 = talloc_strndup(mem_ctx, (char *)dn1-components[0].value.data, dn1-components[0].value.length); } else { oc1 = NULL; @@ -333,9 +333,9 @@ dn2 = ldb_dn_explode(mem_ctx, (char *)v2-data); if (dn2 == NULL) { - oc2 = talloc_strndup(mem_ctx, v2-data, v2-length); + oc2 = talloc_strndup(mem_ctx, (char *)v2-data, v2-length); } else if (dn2-comp_num = 2 strcasecmp(dn2-components[0].name, cn) == 0) { - oc2 = talloc_strndup(mem_ctx, dn2-components[0].value.data, + oc2 = talloc_strndup(mem_ctx, (char *)dn2-components[0].value.data, dn2-components[0].value.length); } else { oc2 = NULL;
svn commit: samba r17516 - in branches/SAMBA_4_0/source: auth/credentials auth/gensec dsdb/samdb dsdb/samdb/ldb_modules kdc ldap_server lib/ldb/common lib/ldb/include lib/ldb/ldb_ildap lib/ldb/ldb_tdb
Author: idra Date: 2006-08-13 08:00:36 + (Sun, 13 Aug 2006) New Revision: 17516 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17516 Log: Change helper function names to make more clear what they are meant to do Modified: branches/SAMBA_4_0/source/auth/credentials/credentials_files.c branches/SAMBA_4_0/source/auth/gensec/schannel_state.c branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/proxy.c branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samba3sam.c branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c branches/SAMBA_4_0/source/dsdb/samdb/samdb.c branches/SAMBA_4_0/source/kdc/hdb-ldb.c branches/SAMBA_4_0/source/kdc/pac-glue.c branches/SAMBA_4_0/source/ldap_server/ldap_server.c branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c branches/SAMBA_4_0/source/lib/ldb/include/ldb.h branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_cache.c branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb.c branches/SAMBA_4_0/source/lib/registry/reg_backend_ldb.c branches/SAMBA_4_0/source/libnet/libnet_join.c branches/SAMBA_4_0/source/nbt_server/wins/winsdb.c branches/SAMBA_4_0/source/param/share_ldb.c branches/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c branches/SAMBA_4_0/source/rpc_server/samr/dcesrv_samr.c branches/SAMBA_4_0/source/torture/ldap/schema.c branches/SAMBA_4_0/source/wrepl_server/wrepl_server.c Changeset: Sorry, the patch is too large (951 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17516
svn commit: samba r17517 - in branches/SAMBA_4_0/source/torture: .
Author: abartlet Date: 2006-08-13 10:20:21 + (Sun, 13 Aug 2006) New Revision: 17517 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17517 Log: Fix declaration after statement, which breaks the build on older GCC. Andrew Bartlett Modified: branches/SAMBA_4_0/source/torture/misc.c Changeset: Modified: branches/SAMBA_4_0/source/torture/misc.c === --- branches/SAMBA_4_0/source/torture/misc.c2006-08-13 08:00:36 UTC (rev 17516) +++ branches/SAMBA_4_0/source/torture/misc.c2006-08-13 10:20:21 UTC (rev 17517) @@ -439,14 +439,14 @@ */ int init_benchrw_params(TALLOC_CTX *mem_ctx,struct params *lpar) { + char **unc_list = NULL; + int num_unc_names = 0, conn_index=0, empty_lines=0; + const char *p; lpar-retry = lp_parm_int(-1, torture, retry,3); lpar-blocksize = lp_parm_int(-1, torture, blocksize,65535); lpar-writeblocks = lp_parm_int(-1, torture, writeblocks,15); lpar-writeratio = lp_parm_int(-1, torture, writeratio,5); lpar-workgroup = lp_workgroup(); - char **unc_list = NULL; - int num_unc_names = 0, conn_index=0, empty_lines=0; - const char *p; p = lp_parm_string(-1, torture, unclist); if (p) {
svn commit: samba r17518 - in branches/SOC/mkhl/ldb-map/modules: .
Author: mkhl Date: 2006-08-13 10:21:37 + (Sun, 13 Aug 2006) New Revision: 17518 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17518 Log: The license change in r17512 was not valid, revert it. The license change in r16505 was valid, stick to that. Martin Modified: branches/SOC/mkhl/ldb-map/modules/ldb_map.c branches/SOC/mkhl/ldb-map/modules/ldb_map_inbound.c branches/SOC/mkhl/ldb-map/modules/ldb_map_outbound.c Changeset: Modified: branches/SOC/mkhl/ldb-map/modules/ldb_map.c === --- branches/SOC/mkhl/ldb-map/modules/ldb_map.c 2006-08-13 10:20:21 UTC (rev 17517) +++ branches/SOC/mkhl/ldb-map/modules/ldb_map.c 2006-08-13 10:21:37 UTC (rev 17518) @@ -4,23 +4,23 @@ Copyright (C) Jelmer Vernooij 2005 Copyright (C) Martin Kuehl [EMAIL PROTECTED] 2006 - ** NOTE! The following LGPL license applies to the ldb - ** library. This does NOT imply that all of Samba is released - ** under the LGPL + * NOTICE: this module is NOT released under the GNU LGPL license as + * other ldb code. This module is release under the GNU GPL v2 or + * later license. + + 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 library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, + 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + 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. */ /* Modified: branches/SOC/mkhl/ldb-map/modules/ldb_map_inbound.c === --- branches/SOC/mkhl/ldb-map/modules/ldb_map_inbound.c 2006-08-13 10:20:21 UTC (rev 17517) +++ branches/SOC/mkhl/ldb-map/modules/ldb_map_inbound.c 2006-08-13 10:21:37 UTC (rev 17518) @@ -15,7 +15,7 @@ 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 + 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 Modified: branches/SOC/mkhl/ldb-map/modules/ldb_map_outbound.c === --- branches/SOC/mkhl/ldb-map/modules/ldb_map_outbound.c2006-08-13 10:20:21 UTC (rev 17517) +++ branches/SOC/mkhl/ldb-map/modules/ldb_map_outbound.c2006-08-13 10:21:37 UTC (rev 17518) @@ -15,7 +15,7 @@ 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 + 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
svn commit: samba r17519 - in branches/SOC/mkhl: ldb-map/common ldb-map/include ldb-map/ldb_ildap ldb-map/ldb_ldap ldb-map/ldb_sqlite3 ldb-map/ldb_tdb ldb-map/modules ldb-map/samba samdb-map samdb-map
Author: mkhl Date: 2006-08-13 11:00:56 + (Sun, 13 Aug 2006) New Revision: 17519 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17519 Log: Merge from mainline, r17518 Modified: branches/SOC/mkhl/ldb-map/common/ldb.c branches/SOC/mkhl/ldb-map/common/ldb_debug.c branches/SOC/mkhl/ldb-map/common/ldb_modules.c branches/SOC/mkhl/ldb-map/common/ldb_msg.c branches/SOC/mkhl/ldb-map/include/ldb.h branches/SOC/mkhl/ldb-map/include/ldb_private.h branches/SOC/mkhl/ldb-map/ldb_ildap/ldb_ildap.c branches/SOC/mkhl/ldb-map/ldb_ldap/ldb_ldap.c branches/SOC/mkhl/ldb-map/ldb_sqlite3/ldb_sqlite3.c branches/SOC/mkhl/ldb-map/ldb_tdb/ldb_cache.c branches/SOC/mkhl/ldb-map/ldb_tdb/ldb_search.c branches/SOC/mkhl/ldb-map/ldb_tdb/ldb_tdb.c branches/SOC/mkhl/ldb-map/modules/asq.c branches/SOC/mkhl/ldb-map/modules/objectclass.c branches/SOC/mkhl/ldb-map/modules/operational.c branches/SOC/mkhl/ldb-map/modules/paged_results.c branches/SOC/mkhl/ldb-map/modules/sort.c branches/SOC/mkhl/ldb-map/samba/ldif_handlers.c branches/SOC/mkhl/samdb-map/ldb_modules/extended_dn.c branches/SOC/mkhl/samdb-map/ldb_modules/kludge_acl.c branches/SOC/mkhl/samdb-map/ldb_modules/local_password.c branches/SOC/mkhl/samdb-map/ldb_modules/partition.c branches/SOC/mkhl/samdb-map/ldb_modules/password_hash.c branches/SOC/mkhl/samdb-map/ldb_modules/proxy.c branches/SOC/mkhl/samdb-map/ldb_modules/rootdse.c branches/SOC/mkhl/samdb-map/ldb_modules/samba3sam.c branches/SOC/mkhl/samdb-map/ldb_modules/samldb.c branches/SOC/mkhl/samdb-map/samdb.c Changeset: Sorry, the patch is too large (2149 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17519
svn commit: samba r17520 - in branches/SAMBA_4_0/source/ntvfs/posix: .
Author: abartlet Date: 2006-08-13 11:55:13 + (Sun, 13 Aug 2006) New Revision: 17520 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17520 Log: If the blkid library fails, I don't see any reason to return more of an error than if we don't have it. We might not be on a volume that can store/return such a GUID. (Try to fix one of the build farm failures). Andrew Bartlett Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_fsinfo.c Changeset: Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_fsinfo.c === --- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_fsinfo.c 2006-08-13 11:00:56 UTC (rev 17519) +++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_fsinfo.c 2006-08-13 11:55:13 UTC (rev 17520) @@ -39,19 +39,22 @@ devname = blkid_devno_to_devname(st-st_dev); if (!devname) { - return NT_STATUS_DEVICE_CONFIGURATION_ERROR; + ZERO_STRUCTP(uuid); + return NT_STATUS_OK; } uuid_value = blkid_get_tag_value(NULL, UUID, devname); free(devname); if (!uuid_value) { - return NT_STATUS_DEVICE_CONFIGURATION_ERROR; + ZERO_STRUCTP(uuid); + return NT_STATUS_OK; } status = GUID_from_string(uuid_value, uuid); free(uuid_value); if (!NT_STATUS_IS_OK(status)) { - return NT_STATUS_DEVICE_CONFIGURATION_ERROR; + ZERO_STRUCTP(uuid); + return NT_STATUS_OK; } return NT_STATUS_OK; #else
svn commit: samba r17521 - in branches/SOC/mkhl/ldb-map/modules: .
Author: mkhl Date: 2006-08-13 11:57:34 + (Sun, 13 Aug 2006) New Revision: 17521 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17521 Log: Use `ldb_msg_find_attr_as_dn' where appropriate. Martin Modified: branches/SOC/mkhl/ldb-map/modules/ldb_map.c Changeset: Modified: branches/SOC/mkhl/ldb-map/modules/ldb_map.c === --- branches/SOC/mkhl/ldb-map/modules/ldb_map.c 2006-08-13 11:55:13 UTC (rev 17520) +++ branches/SOC/mkhl/ldb-map/modules/ldb_map.c 2006-08-13 11:57:34 UTC (rev 17521) @@ -1195,8 +1195,8 @@ } msg = res-msgs[0]; - data-local_base_dn = ldb_dn_explode(data, ldb_msg_find_string(msg, MAP_DN_FROM, NULL)); - data-remote_base_dn = ldb_dn_explode(data, ldb_msg_find_string(msg, MAP_DN_TO, NULL)); + data-local_base_dn = ldb_msg_find_attr_as_dn(data, msg, MAP_DN_FROM); + data-remote_base_dn = ldb_msg_find_attr_as_dn(data, msg, MAP_DN_TO); talloc_free(res); return LDB_SUCCESS;
svn commit: samba r17522 - in branches/SAMBA_4_0/source/torture: .
Author: abartlet Date: 2006-08-13 12:34:41 + (Sun, 13 Aug 2006) New Revision: 17522 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17522 Log: Fix another declaration after statement. Andrew Bartlett Modified: branches/SAMBA_4_0/source/torture/misc.c Changeset: Modified: branches/SAMBA_4_0/source/torture/misc.c === --- branches/SAMBA_4_0/source/torture/misc.c2006-08-13 11:57:34 UTC (rev 17521) +++ branches/SAMBA_4_0/source/torture/misc.c2006-08-13 12:34:41 UTC (rev 17522) @@ -614,6 +614,7 @@ struct benchrw_state *state) { union smb_open *open_parms; + uint8_t *writedata; NT_STATUS_NOT_OK_RETURN(req-status); @@ -633,7 +634,6 @@ open_parms-openx.in.timeout = 0; open_parms-openx.in.fname = state-fname; - uint8_t *writedata; writedata = talloc_size(state-mem_ctx,state-lp_params-blocksize); NT_STATUS_HAVE_NO_MEMORY(writedata); generate_random_buffer(writedata,state-lp_params-blocksize);
svn commit: samba r17523 - in branches/SAMBA_4_0/source/librpc/idl: .
Author: abartlet Date: 2006-08-13 12:42:25 + (Sun, 13 Aug 2006) New Revision: 17523 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17523 Log: FIXME is a macro (I think) on some platforms (AIX), and this caused pain. Andrew Bartlett Modified: branches/SAMBA_4_0/source/librpc/idl/dcom.idl Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/dcom.idl === --- branches/SAMBA_4_0/source/librpc/idl/dcom.idl 2006-08-13 12:34:41 UTC (rev 17522) +++ branches/SAMBA_4_0/source/librpc/idl/dcom.idl 2006-08-13 12:42:25 UTC (rev 17523) @@ -220,16 +220,16 @@ typedef struct { uint16 vartype; - uint16 FIXME; + uint16 unknown /* FIXME */; } VARIANT; typedef struct { - uint16 FIXME; + uint16 unknown /* FIXME */; } DISPPARAMS; /* Exception ? */ typedef struct { - uint16 FIXME; + uint16 unknown /* FIXME */; } EXCEPINFO; /*/
svn commit: samba r17524 - in branches/SAMBA_4_0/source/lib/socket: .
Author: abartlet Date: 2006-08-13 22:57:05 + (Sun, 13 Aug 2006) New Revision: 17524 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17524 Log: Lets see if we can try and get the socket_wapper includes to be pre-processed last, and get AIX and some other hosts to pass make test again (I think the macros were being over-overridden). Andrew Bartlett Modified: branches/SAMBA_4_0/source/lib/socket/socket_ipv4.c Changeset: Modified: branches/SAMBA_4_0/source/lib/socket/socket_ipv4.c === --- branches/SAMBA_4_0/source/lib/socket/socket_ipv4.c 2006-08-13 12:42:25 UTC (rev 17523) +++ branches/SAMBA_4_0/source/lib/socket/socket_ipv4.c 2006-08-13 22:57:05 UTC (rev 17524) @@ -22,9 +22,9 @@ */ #include includes.h -#include system/network.h #include system/filesys.h #include lib/socket/socket.h +#include system/network.h static NTSTATUS ipv4_init(struct socket_context *sock) {
svn commit: samba r17525 - in branches/SAMBA_4_0: source/dsdb/samdb/ldb_modules source/lib/ldb source/lib/ldb/modules testdata/samba3 testprogs/ejs
Author: abartlet Date: 2006-08-13 23:58:04 + (Sun, 13 Aug 2006) New Revision: 17525 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17525 Log: This is a merge from the Google Summer of Code 2006 project by Martin K?\195?\188hl [EMAIL PROTECTED]. Martin took over the work done last year by Jelmer, in last year's SoC. This was a substanital task, as the the ldb modules API changed significantly during the past year, with the addition of async calls. This changeset reimplements and enables the ldb_map ldb module and adapts the example module and test case, both named samba3sam, to the implementation. The ldb_map module supports splitting an ldb database into two parts (called the local and remote part) and storing the data in one of them (the remote database) in a different format while the other acts as a fallback. This allows ldb to e.g. store to and load data from a remote LDAP server and present it according to the Samba4 schema while still allowing the LDAP to present and modify its data separately. A complex example of this is the samba3sam module (by Jelmer Vernooij), which maps data between the samba3 and samba4 schemas. A simpler example is given by the entryUUID module (by Andrew Bartlett), which handles some of the differences between AD and OpenLDAP in operational attributes. It principally maps objectGUID, to and from entryUUID elements. This is also an example of a module that doesn't use the local backend as fallback storage. This merge also splits the ldb_map.c file into smaller, more manageable parts. Added: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/entryUUID.c branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_inbound.c branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_private.h Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samba3sam.c branches/SAMBA_4_0/source/lib/ldb/config.mk branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map.c branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map.h branches/SAMBA_4_0/testdata/samba3/samba3.ldif branches/SAMBA_4_0/testprogs/ejs/samba3sam Changeset: Sorry, the patch is too large (5280 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17525
Build status as of Mon Aug 14 00:00:01 2006
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2006-08-13 00:00:23.0 + +++ /home/build/master/cache/broken_results.txt 2006-08-14 00:00:27.0 + @@ -1,4 +1,4 @@ -Build status as of Sun Aug 13 00:00:02 2006 +Build status as of Mon Aug 14 00:00:01 2006 Build counts: Tree Total Broken Panic @@ -7,12 +7,12 @@ distcc 23 2 0 lorikeet-heimdal 0 0 0 ppp 12 0 0 -rsync26 1 0 +rsync27 2 0 samba0 0 0 samba-docs 0 0 0 -samba4 35 21 2 +samba4 35 18 3 samba_3_031 5 0 -smb-build19 19 0 -talloc 13 4 0 -tdb 21 6 0 +smb-build20 20 0 +talloc 14 4 0 +tdb 22 8 0
svn commit: samba r17526 - in branches/SAMBA_4_0/source: dsdb/samdb/ldb_modules lib/ldb/modules setup
Author: abartlet Date: 2006-08-14 00:59:57 + (Mon, 14 Aug 2006) New Revision: 17526 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17526 Log: Move timestamp generation into the objectGUID module. It probably needs to be renamed (operation_add?). This allows me to match the behaviour and substitute with the entryUUID module for remote LDAP connections. Andrew Bartlett Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/objectguid.c branches/SAMBA_4_0/source/lib/ldb/modules/operational.c branches/SAMBA_4_0/source/setup/provision branches/SAMBA_4_0/source/setup/provision_partitions.ldif Changeset: Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/objectguid.c === --- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/objectguid.c 2006-08-13 23:58:04 UTC (rev 17525) +++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/objectguid.c 2006-08-14 00:59:57 UTC (rev 17526) @@ -50,6 +50,35 @@ return NULL; } +/* + add a time element to a record +*/ +static int add_time_element(struct ldb_message *msg, const char *attr, time_t t) +{ + struct ldb_message_element *el; + char *s; + + if (ldb_msg_find_element(msg, attr) != NULL) { + return 0; + } + + s = ldb_timestring(msg, t); + if (s == NULL) { + return -1; + } + + if (ldb_msg_add_string(msg, attr, s) != 0) { + return -1; + } + + el = ldb_msg_find_element(msg, attr); + /* always set as replace. This works because on add ops, the flag + is ignored */ + el-flags = LDB_FLAG_MOD_REPLACE; + + return 0; +} + /* add_record: add objectGUID attribute */ static int objectguid_add(struct ldb_module *module, struct ldb_request *req) { @@ -60,6 +89,7 @@ struct GUID guid; NTSTATUS nt_status; int ret; + time_t t = time(NULL); ldb_debug(module-ldb, LDB_DEBUG_TRACE, objectguid_add_record\n); @@ -82,6 +112,7 @@ /* we have to copy the message as the caller might have it as a const */ down_req-op.add.message = msg = ldb_msg_copy_shallow(down_req, req-op.add.message); if (msg == NULL) { + talloc_free(down_req); return LDB_ERR_OPERATIONS_ERROR; } @@ -91,14 +122,22 @@ nt_status = ndr_push_struct_blob(v, msg, guid, (ndr_push_flags_fn_t)ndr_push_GUID); if (!NT_STATUS_IS_OK(nt_status)) { - return -1; + talloc_free(down_req); + return LDB_ERR_OPERATIONS_ERROR; } ret = ldb_msg_add_value(msg, objectGUID, v); if (ret) { + talloc_free(down_req); return ret; } + if (add_time_element(msg, whenCreated, t) != 0 || + add_time_element(msg, whenChanged, t) != 0) { + talloc_free(down_req); + return LDB_ERR_OPERATIONS_ERROR; + } + ldb_set_timeout_from_prev_req(module-ldb, req, down_req); /* go on with the call chain */ @@ -113,6 +152,54 @@ return ret; } +/* modify_record: update timestamps */ +static int objectguid_modify(struct ldb_module *module, struct ldb_request *req) +{ + struct ldb_request *down_req; + struct ldb_message *msg; + int ret; + time_t t = time(NULL); + + ldb_debug(module-ldb, LDB_DEBUG_TRACE, objectguid_add_record\n); + + /* do not manipulate our control entries */ + if (ldb_dn_is_special(req-op.add.message-dn)) { + return ldb_next_request(module, req); + } + + down_req = talloc(req, struct ldb_request); + if (down_req == NULL) { + return LDB_ERR_OPERATIONS_ERROR; + } + + *down_req = *req; + + /* we have to copy the message as the caller might have it as a const */ + down_req-op.mod.message = msg = ldb_msg_copy_shallow(down_req, req-op.mod.message); + if (msg == NULL) { + talloc_free(down_req); + return LDB_ERR_OPERATIONS_ERROR; + } + + if (add_time_element(msg, whenChanged, t) != 0) { + talloc_free(down_req); + return LDB_ERR_OPERATIONS_ERROR; + } + + ldb_set_timeout_from_prev_req(module-ldb, req, down_req); + + /* go on with the call chain */ + ret = ldb_next_request(module, down_req); + + /* do not free down_req as the call results may be linked to it, +* it will be freed when the upper level request get freed */ + if (ret == LDB_SUCCESS) { + req-handle = down_req-handle; + } + + return ret; +} + static const struct ldb_module_ops objectguid_ops = { .name = objectguid, .add = objectguid_add, Modified: branches/SAMBA_4_0/source/lib/ldb/modules/operational.c
svn commit: samba r17527 - in branches/SAMBA_4_0/source/script/tests: .
Author: abartlet Date: 2006-08-14 01:14:32 + (Mon, 14 Aug 2006) New Revision: 17527 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17527 Log: Don't duplicate the entire test setup just to allow testing of the new ldb-backed shares configuration. Andrew Bartlett Modified: branches/SAMBA_4_0/source/script/tests/mktestsetup.sh branches/SAMBA_4_0/source/script/tests/mktestsetup.sh.share_ldb Changeset: Modified: branches/SAMBA_4_0/source/script/tests/mktestsetup.sh === --- branches/SAMBA_4_0/source/script/tests/mktestsetup.sh 2006-08-14 00:59:57 UTC (rev 17526) +++ branches/SAMBA_4_0/source/script/tests/mktestsetup.sh 2006-08-14 01:14:32 UTC (rev 17527) @@ -12,6 +12,10 @@ TLS_ENABLED=false fi +if test -z $SHARE_BACKEND; then + SHARE_BACKEND=classic +fi + DOMAIN=SAMBADOMAIN USERNAME=administrator REALM=SAMBA.EXAMPLE.COM @@ -69,6 +73,7 @@ pid directory = $PIDDIR ncalrpc dir = $NCALRPCDIR lock dir = $LOCKDIR + share backend = $SHARE_BACKEND setup directory = $SRCDIR/setup js include = $SRCDIR/scripting/libjs winbindd socket directory = $WINBINDD_SOCKET_DIR @@ -99,6 +104,85 @@ cifs:share = tmp EOF +## Override default srahes_config.ldb file +rm -f $PRIVATEDIR/share.ldb +cat $PRIVATEDIR/share.ldifEOF +### Shares basedn +dn: @INDEXLIST [EMAIL PROTECTED]: name + +dn: @ATTRIBUTES +cn: CASE_INSENSITIVE +dc: CASE_INSENSITIVE +name: CASE_INSENSITIVE +dn: CASE_INSENSITIVE +objectClass: CASE_INSENSITIVE + +dn: CN=Shares +objectClass: top +objectClass: organizationalUnit +cn: Shares + +### Default IPC$ Share +dn: CN=IPC$,CN=Shares +objectClass: top +objectClass: share +cn: IPC$ +name: IPC$ +type: IPC +path: /tmp +comment: Remote IPC +max-connections: -1 +available: True +readonly: True +browseable: False +ntvfs-handler: default + +### Default ADMIN$ Share +dn: CN=ADMIN$,CN=Shares +objectClass: top +objectClass: share +cn: ADMIN$ +name: ADMIN$ +type: DISK +path: /tmp +comment: Remote Admin +max-connections: -1 +available: True +readonly: True +browseable: False +ntvfs-handler: default + +dn: CN=tmp,CN=Shares +objectClass: top +objectClass: share +cn: tmp +name: tmp +type: DISK +path: $TMPDIR +comment: Temp Dir for Tests +readonly: False +ntvfs-handler: posix +posix-sharedelay: 10 +posix-eadb: $LOCKDIR/eadb.tdb + +dn: CN=cifs,CN=Shares +objectClass: top +objectClass: share +cn: cifs +name: cifs +type: DISK +readonly: False +ntvfs-handler: cifs +cifs-server: $SERVER +cifs-user: $USERNAME +cifs-password: $PASSWORD +cifs-domain: $DOMAIN +cifs-share: tmp +EOF + +$srcdir/bin/ldbadd -H $PRIVATEDIR/share.ldb $PRIVATEDIR/share.ldif /dev/null || exit 1 + cat $KRB5_CONFIGEOF [libdefaults] default_realm = SAMBA.EXAMPLE.COM Modified: branches/SAMBA_4_0/source/script/tests/mktestsetup.sh.share_ldb === --- branches/SAMBA_4_0/source/script/tests/mktestsetup.sh.share_ldb 2006-08-14 00:59:57 UTC (rev 17526) +++ branches/SAMBA_4_0/source/script/tests/mktestsetup.sh.share_ldb 2006-08-14 01:14:32 UTC (rev 17527) @@ -1,211 +1,5 @@ #!/bin/sh -if [ $# -lt 1 ] -then - echo $0 PREFIX - exit 1 -fi +SHARE_BACKEND=ldb -PREFIX=$1 - -if test -z $TLS_ENABLED; then - TLS_ENABLED=false -fi - -DOMAIN=SAMBADOMAIN -USERNAME=administrator -REALM=SAMBA.EXAMPLE.COM -PASSWORD=penguin -SRCDIR=`pwd` -ROOT=$USER -SERVER=localhost -NETBIOSNAME=localtest -if test -z $ROOT; then -ROOT=$LOGNAME -fi -if test -z $ROOT; then -ROOT=`whoami` -fi - -oldpwd=`pwd` -srcdir=`dirname $0`/../.. -mkdir -p $PREFIX || exit $? -cd $PREFIX -PREFIX_ABS=`pwd` -export PREFIX_ABS -cd $oldpwd - -TEST_DATA_PREFIX=$PREFIX_ABS -export TEST_DATA_PREFIX - -TMPDIR=$PREFIX_ABS/tmp -ETCDIR=$PREFIX_ABS/etc -PIDDIR=$PREFIX_ABS/pid -CONFFILE=$ETCDIR/smb.conf -KRB5_CONFIG=$ETCDIR/krb5.conf -PRIVATEDIR=$PREFIX_ABS/private -NCALRPCDIR=$PREFIX_ABS/ncalrpc -LOCKDIR=$PREFIX_ABS/lockdir -TLSDIR=$PRIVATEDIR/tls -WINBINDD_SOCKET_DIR=$PREFIX_ABS/winbind_socket -CONFIGURATION=--configfile=$CONFFILE -export CONFIGURATION -export CONFFILE - -rm -rf $PREFIX/* -mkdir -p $PRIVATEDIR $ETCDIR $PIDDIR $NCALRPCDIR $LOCKDIR $TMPDIR $TLSDIR - -cat $CONFFILEEOF -[global] - netbios name = $NETBIOSNAME -netbios aliases = $SERVER - workgroup = $DOMAIN - realm = $REALM - private dir = $PRIVATEDIR - pid directory = $PIDDIR - ncalrpc dir = $NCALRPCDIR - lock dir = $LOCKDIR - setup directory = $SRCDIR/setup - js include = $SRCDIR/scripting/libjs - share backend = ldb -winbindd socket directory = $WINBINDD_SOCKET_DIR - name resolve order = bcast - interfaces = 127.0.0.1/8 - tls enabled = $TLS_ENABLED - panic action = $SRCDIR/script/gdb_backtrace %PID% %PROG% - wins support = yes - server role = pdc -
svn commit: samba r17528 - in branches/SAMBA_4_0/source/setup: .
Author: abartlet Date: 2006-08-14 01:48:32 + (Mon, 14 Aug 2006) New Revision: 17528 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17528 Log: This is an additional item of schema we require. Where is the script we used to create this schema file in the first place? Andrew Bartlett Modified: branches/SAMBA_4_0/source/setup/schema.ldif Changeset: Modified: branches/SAMBA_4_0/source/setup/schema.ldif === --- branches/SAMBA_4_0/source/setup/schema.ldif 2006-08-14 01:14:32 UTC (rev 17527) +++ branches/SAMBA_4_0/source/setup/schema.ldif 2006-08-14 01:48:32 UTC (rev 17528) @@ -126,6 +126,26 @@ attributeID: 1.2.840.113556.1.4.121 attributeSyntax: 2.5.5.17 + +dn: CN=Foreign-Identifier,CN=Schema,CN=Configuration,${BASEDN} +objectClass: top +objectClass: attributeSchema +cn: Foreign-Identifier +instanceType: 4 +attributeID: 1.2.840.113556.1.4.356 +attributeSyntax: 2.5.5.10 +isSingleValued: TRUE +showInAdvancedViewOnly: TRUE +adminDisplayName: Foreign-Identifier +adminDescription: Foreign-Identifier +oMSyntax: 4 +searchFlags: 0 +lDAPDisplayName: foreignIdentifier +name: Foreign-Identifier +schemaIDGUID: 3e97891e-8c01-11d0-afda-00c04fd930c9 +systemOnly: FALSE +systemFlags: 16 + dn: CN=msDS-KeyVersionNumber,CN=Schema,CN=Configuration,${BASEDN} cn: msDS-KeyVersionNumber name: msDS-KeyVersionNumber @@ -8039,6 +8059,7 @@ objectClasses: ( 2.5.6.4 NAME 'organization' SUP top STRUCTURAL MUST ( o ) MAY ( x121Address $ userPassword $ telexNumber $ teletexTerminalIdentifier $ telephoneNumber $ street $ st $ seeAlso $ searchGuide $ registeredAddress $ preferredDeliveryMethod $ postalCode $ postalAddress $ postOfficeBox $ physicalDeliveryOfficeName $ l $ internationalISDNNumber $ facsimileTelephoneNumber $ destinationIndicator $ businessCategory ) ) objectClasses: ( 1.2.840.113556.1.5.234 NAME 'msDS-AzAdminManager' SUP top STRUCTURAL MAY ( msDS-AzMinorVersion $ msDS-AzMajorVersion $ msDS-AzApplicationData $ msDS-AzGenerateAudits $ msDS-AzScriptTimeout $ msDS-AzScriptEngineCacheMax $ msDS-AzDomainTimeout $ description ) ) objectClasses: ( 1.2.840.113556.1.5.6 NAME 'securityPrincipal' SUP top AUXILIARY MUST ( sAMAccountName $ objectSid ) MAY ( supplementalCredentials $ sIDHistory $ securityIdentifier $ sAMAccountType $ rid $ tokenGroupsNoGCAcceptable $ tokenGroupsGlobalAndUniversal $ tokenGroups $ nTSecurityDescriptor $ msDS-KeyVersionNumber $ altSecurityIdentities $ accountNameHistory ) ) +objectClasses: ( 1.2.840.113556.1.5.76 NAME 'foreignSecurityPrincipal' SUP top STRUCTURAL MUST (objectSid ) MAY (foreignIdentifier ) ) objectClasses: ( 1.2.840.113556.1.5.7000.49 NAME 'applicationSettings' SUP top ABSTRACT MAY ( notificationList $ msDS-Settings $ applicationName ) ) objectClasses: ( 1.2.840.113556.1.3.13 NAME 'classSchema' SUP top STRUCTURAL MUST ( subClassOf $ schemaIDGUID $ objectClassCategory $ governsID $ defaultObjectCategory $ cn ) MAY ( systemPossSuperiors $ systemOnly $ systemMustContain $ systemMayContain $ systemAuxiliaryClass $ schemaFlagsEx $ rDNAttID $ possSuperiors $ mustContain $ msDs-Schema-Extensions $ msDS-IntId $ mayContain $ lDAPDisplayName $ isDefunct $ defaultSecurityDescriptor $ defaultHidingValue $ classDisplayName $ auxiliaryClass ) ) objectClasses: ( 1.2.840.113556.1.5.9 NAME 'user' SUP organizationalPerson STRUCTURAL MAY ( pager $ o $ mobile $ manager $ mail $ initials $ homePhone $ businessCategory $ userCertificate $ userWorkstations $ userSharedFolderOther $ userSharedFolder $ userPrincipalName $ userParameters $ userAccountControl $ unicodePwd $ terminalServer $ servicePrincipalName $ scriptPath $ pwdLastSet $ profilePath $ primaryGroupID $ preferredOU $ otherLoginWorkstations $ operatorCount $ ntPwdHistory $ networkAddress $ msRASSavedFramedRoute $ msRASSavedFramedIPAddress $ msRASSavedCallbackNumber $ msRADIUSServiceType $ msRADIUSFramedRoute $ msRADIUSFramedIPAddress $ msRADIUSCallbackNumber $ msNPSavedCallingStationID $ msNPCallingStationID $ msNPAllowDialin $ mSMQSignCertificatesMig $ mSMQSignCertificates $ mSMQDigestsMig $ mSMQDigests $ msIIS-FTPRoot $ msIIS-FTPDir $ msDS-User-Account-Control-Computed $ msDS-Site-Affinity $ mS-DS-CreatorSID $ msDS-Cached-Membership-Time-Stamp $ msDS-Cached-Membership $ msDRM-IdentityCertificate $ msCOM-UserPartitionSetLink $ maxStorage $ logonWorkstation $ logonHours $ logonCount $ lockoutTime $ localeID $ lmPwdHistory $ lastLogonTimestamp $ lastLogon $ lastLogoff $ homeDrive $ homeDirectory $ groupsToIgnore $ groupPriority $ groupMembershipSAM $ dynamicLDAPServer $ desktopProfile $ defaultClassStore $ dBCSPwd $ controlAccessRights $ codePage $ badPwdCount $ badPasswordTime $ adminCount $ aCSPolicyName $ accountExpires $ x500uniqueIdentifier $ userSMIMECertificate $ userPKCS12 $ uid $ secretary $ roomNumber $ preferredLanguage $ photo $ labeledURI $ jpegPhoto $ homePostalAddress $ givenName $
svn commit: samba r17529 - in branches/SAMBA_4_0/source: dsdb/samdb dsdb/samdb/ldb_modules rpc_server/lsa
Author: abartlet Date: 2006-08-14 02:50:18 + (Mon, 14 Aug 2006) New Revision: 17529 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17529 Log: Simo doesn't like the use of the internal ldb_errstring in functions not used purely as ldb module helper functions. This now passes these strings back as explicit parameters. Andrew Bartlett Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c branches/SAMBA_4_0/source/dsdb/samdb/samdb.c branches/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c Changeset: Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c === --- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c 2006-08-14 01:48:32 UTC (rev 17528) +++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c 2006-08-14 02:50:18 UTC (rev 17529) @@ -435,6 +435,7 @@ struct ldb_message *msg2; struct ldb_dn_component *rdn; TALLOC_CTX *mem_ctx = talloc_new(msg); + char *errstr; if (!mem_ctx) { return LDB_ERR_OPERATIONS_ERROR; } @@ -447,8 +448,11 @@ return LDB_ERR_OPERATIONS_ERROR; } - ret = samdb_copy_template(module-ldb, msg2, ((CN=TemplateGroup)(objectclass=groupTemplate))); + ret = samdb_copy_template(module-ldb, msg2, + ((CN=TemplateGroup)(objectclass=groupTemplate)), + errstr); if (ret != 0) { + talloc_free(mem_ctx); return ret; } @@ -494,6 +498,7 @@ struct ldb_message *msg2; struct ldb_dn_component *rdn; TALLOC_CTX *mem_ctx = talloc_new(msg); + char *errstr; if (!mem_ctx) { return LDB_ERR_OPERATIONS_ERROR; } @@ -508,9 +513,14 @@ if (samdb_find_attribute(module-ldb, msg, objectclass, computer) != NULL) { - ret = samdb_copy_template(module-ldb, msg2, ((CN=TemplateComputer)(objectclass=userTemplate))); + ret = samdb_copy_template(module-ldb, msg2, + ((CN=TemplateComputer)(objectclass=userTemplate)), + errstr); if (ret) { - ldb_debug(module-ldb, LDB_DEBUG_WARNING, samldb_fill_user_or_computer_object: Error copying computer template!\n); + ldb_asprintf_errstring(module-ldb, + samldb_fill_user_or_computer_object: + Error copying computer template: %s, + errstr); talloc_free(mem_ctx); return ret; } @@ -528,9 +538,13 @@ } } else { - ret = samdb_copy_template(module-ldb, msg2, ((CN=TemplateUser)(objectclass=userTemplate))); + ret = samdb_copy_template(module-ldb, msg2, + ((CN=TemplateUser)(objectclass=userTemplate)), + errstr); if (ret) { - ldb_debug(module-ldb, LDB_DEBUG_WARNING, samldb_fill_user_or_computer_object: Error copying user template!\n); + ldb_asprintf_errstring(module-ldb, + samldb_fill_user_or_computer_object: Error copying user template: %s\n, + errstr); talloc_free(mem_ctx); return ret; } @@ -581,7 +595,7 @@ } static int samldb_fill_foreignSecurityPrincipal_object(struct ldb_module *module, const struct ldb_message *msg, - struct ldb_message **ret_msg) + struct ldb_message **ret_msg) { struct ldb_message *msg2; struct ldb_dn_component *rdn; @@ -589,6 +603,7 @@ struct dom_sid *sid; const char *dom_attrs[] = { name, NULL }; struct ldb_message **dom_msgs; + char *errstr; int ret; TALLOC_CTX *mem_ctx = talloc_new(msg); @@ -604,9 +619,14 @@ return LDB_ERR_OPERATIONS_ERROR; } - ret = samdb_copy_template(module-ldb, msg2, ((CN=TemplateForeignSecurityPrincipal)(objectclass=foreignSecurityPrincipalTemplate))); + ret = samdb_copy_template(module-ldb, msg2, + ((CN=TemplateForeignSecurityPrincipal)(objectclass=foreignSecurityPrincipalTemplate)), + errstr); if (ret != 0) { - ldb_debug(module-ldb, LDB_DEBUG_WARNING, samldb_fill_foreignSecurityPrincipal_object: Error copying template!\n); +
svn commit: samba r17530 - in branches/SAMBA_4_0/source/dsdb/samdb: .
Author: abartlet Date: 2006-08-14 03:28:25 + (Mon, 14 Aug 2006) New Revision: 17530 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=17530 Log: Watching the build farm mails carefully pays off... This was another declaration before statement bug, in my just-committed code.. Andrew Bartlett Modified: branches/SAMBA_4_0/source/dsdb/samdb/samdb.c Changeset: Modified: branches/SAMBA_4_0/source/dsdb/samdb/samdb.c === --- branches/SAMBA_4_0/source/dsdb/samdb/samdb.c2006-08-14 02:50:18 UTC (rev 17529) +++ branches/SAMBA_4_0/source/dsdb/samdb/samdb.c2006-08-14 03:28:25 UTC (rev 17530) @@ -680,11 +680,10 @@ struct ldb_result *res; struct ldb_message *t; int ret, i, j; - - *errstring = NULL; - struct ldb_dn *basedn = ldb_dn_explode(ldb, cn=Templates); + *errstring = NULL; + /* pull the template record */ ret = ldb_search(ldb, basedn, LDB_SCOPE_SUBTREE, filter, NULL, res); talloc_free(basedn);