svn commit: samba r10236 - in branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3: .
Author: idra Date: 2005-09-15 07:23:15 + (Thu, 15 Sep 2005) New Revision: 10236 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10236 Log: fix (C) note Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.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 2005-09-15 00:08:04 UTC (rev 10235) +++ branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c 2005-09-15 07:23:15 UTC (rev 10236) @@ -2,6 +2,7 @@ ldb database library Copyright (C) Derrell Lipman 2005 + Copyright (C) Simo Sorce 2005 ** NOTE! The following LGPL license applies to the ldb ** library. This does NOT imply that all of Samba is released
svn commit: samba r10237 - in branches/SAMBA_4_0/source/ldap_server: .
Author: metze Date: 2005-09-15 09:55:16 + (Thu, 15 Sep 2005) New Revision: 10237 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10237 Log: fix parameter, how have I missed this...? metze Modified: branches/SAMBA_4_0/source/ldap_server/ldap_server.c Changeset: Modified: branches/SAMBA_4_0/source/ldap_server/ldap_server.c === --- branches/SAMBA_4_0/source/ldap_server/ldap_server.c 2005-09-15 07:23:15 UTC (rev 10236) +++ branches/SAMBA_4_0/source/ldap_server/ldap_server.c 2005-09-15 09:55:16 UTC (rev 10237) @@ -365,7 +365,7 @@ conn-tls = tls_init_server(ldapsrv_service-tls_params, c-socket, c-event.fde, NULL, port != 389); if (!conn-tls) { - ldapsrv_terminate_connection(c, ldapsrv_accept: tls_init_server() failed); + ldapsrv_terminate_connection(conn, ldapsrv_accept: tls_init_server() failed); return; }
svn commit: samba r10238 - in branches/SAMBA_4_0/source/librpc/idl: .
Author: tpot Date: 2005-09-15 10:20:08 + (Thu, 15 Sep 2005) New Revision: 10238 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10238 Log: Add a entry for sec_info to treat it as a uint32 for now. Modified: branches/SAMBA_4_0/source/librpc/idl/winreg.cnf Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/winreg.cnf === --- branches/SAMBA_4_0/source/librpc/idl/winreg.cnf 2005-09-15 09:55:16 UTC (rev 10237) +++ branches/SAMBA_4_0/source/librpc/idl/winreg.cnf 2005-09-15 10:20:08 UTC (rev 10238) @@ -1 +1,3 @@ IMPORT security_secinfooffset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_GetKeySecurity_sec_info, NULL); + +INFO_KEY OpenKey.Ke \ No newline at end of file
svn commit: samba r10239 - branches/SAMBA_3_0/source/modules trunk/source/modules
Author: vlendec Date: 2005-09-15 11:02:03 + (Thu, 15 Sep 2005) New Revision: 10239 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10239 Log: Fix cutpaste error Modified: branches/SAMBA_3_0/source/modules/vfs_full_audit.c trunk/source/modules/vfs_full_audit.c Changeset: Modified: branches/SAMBA_3_0/source/modules/vfs_full_audit.c === --- branches/SAMBA_3_0/source/modules/vfs_full_audit.c 2005-09-15 10:20:08 UTC (rev 10238) +++ branches/SAMBA_3_0/source/modules/vfs_full_audit.c 2005-09-15 11:02:03 UTC (rev 10239) @@ -888,7 +888,7 @@ result = SMB_VFS_NEXT_TELLDIR(handle, conn, dirp); - do_log(SMB_VFS_OP_OPENDIR, True, handle, ); + do_log(SMB_VFS_OP_TELLDIR, True, handle, ); return result; } Modified: trunk/source/modules/vfs_full_audit.c === --- trunk/source/modules/vfs_full_audit.c 2005-09-15 10:20:08 UTC (rev 10238) +++ trunk/source/modules/vfs_full_audit.c 2005-09-15 11:02:03 UTC (rev 10239) @@ -888,7 +888,7 @@ result = SMB_VFS_NEXT_TELLDIR(handle, conn, dirp); - do_log(SMB_VFS_OP_OPENDIR, True, handle, ); + do_log(SMB_VFS_OP_TELLDIR, True, handle, ); return result; }
svn commit: samba r10240 - in trunk/source: include rpc_parse rpc_server
Author: jerry Date: 2005-09-15 16:30:09 + (Thu, 15 Sep 2005) New Revision: 10240 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10240 Log: * Windows XP Configuration Manager doesn't quite like the PnP_GetDeviceRegProperty() reply yet, but getting closer. Modified: trunk/source/include/rpc_ntsvcs.h trunk/source/rpc_parse/parse_ntsvcs.c trunk/source/rpc_parse/parse_reg.c trunk/source/rpc_server/srv_ntsvcs.c trunk/source/rpc_server/srv_ntsvcs_nt.c Changeset: Sorry, the patch is too large (257 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10240
svn commit: samba r10241 - in trunk/source/rpc_client: .
Author: jra Date: 2005-09-15 17:28:38 + (Thu, 15 Sep 2005) New Revision: 10241 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10241 Log: Inspired by bug #1447 - make sure we check creds at the correct time as this can disrupt the chain if we don't. Jeremy. Modified: trunk/source/rpc_client/cli_netlogon.c Changeset: Modified: trunk/source/rpc_client/cli_netlogon.c === --- trunk/source/rpc_client/cli_netlogon.c 2005-09-15 16:30:09 UTC (rev 10240) +++ trunk/source/rpc_client/cli_netlogon.c 2005-09-15 17:28:38 UTC (rev 10241) @@ -611,8 +611,8 @@ result = r.status; - if (!NT_STATUS_IS_ERR(result)) { - /* Check returned credentials. */ + if (r.buffer_creds) { + /* Check returned credentials if present. */ if (!creds_client_check(cli-dc, r.srv_creds.challenge)) { DEBUG(0,(rpccli_netlogon_sam_logon: credentials chain check failed\n)); return NT_STATUS_ACCESS_DENIED; @@ -724,8 +724,8 @@ result = r.status; - if (!NT_STATUS_IS_ERR(result)) { - /* Check returned credentials. */ + if (r.buffer_creds) { + /* Check returned credentials if present. */ if (!creds_client_check(cli-dc, r.srv_creds.challenge)) { DEBUG(0,(rpccli_netlogon_sam_network_logon: credentials chain check failed\n)); return NT_STATUS_ACCESS_DENIED; @@ -774,12 +774,10 @@ DEBUG(0,(cli_net_srv_pwset: %s\n, nt_errstr(result))); } - if (!NT_STATUS_IS_ERR(result)) { - /* Check returned credentials. */ - if (!creds_client_check(cli-dc, r.srv_cred.challenge)) { - DEBUG(0,(rpccli_net_srv_pwset: credentials chain check failed\n)); - return NT_STATUS_ACCESS_DENIED; - } + /* Always check returned credentials. */ + if (!creds_client_check(cli-dc, r.srv_cred.challenge)) { + DEBUG(0,(rpccli_net_srv_pwset: credentials chain check failed\n)); + return NT_STATUS_ACCESS_DENIED; } return result;
svn commit: samba r10242 - in trunk/source/auth: .
Author: jerry Date: 2005-09-15 18:34:06 + (Thu, 15 Sep 2005) New Revision: 10242 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10242 Log: ognore generated *.po files Modified: trunk/source/auth/ Changeset: Property changes on: trunk/source/auth ___ Name: svn:ignore + *.po
svn commit: samba r10243 - branches/SAMBA_3_0/source/rpc_parse trunk/source/rpc_parse
Author: jerry Date: 2005-09-15 18:35:26 + (Thu, 15 Sep 2005) New Revision: 10243 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10243 Log: fix net rpc shutdown (missing alignments and sending an invalid UNISTR4 for this request) Modified: branches/SAMBA_3_0/source/rpc_parse/parse_reg.c branches/SAMBA_3_0/source/rpc_parse/parse_shutdown.c trunk/source/rpc_parse/parse_reg.c trunk/source/rpc_parse/parse_shutdown.c Changeset: Modified: branches/SAMBA_3_0/source/rpc_parse/parse_reg.c === --- branches/SAMBA_3_0/source/rpc_parse/parse_reg.c 2005-09-15 18:34:06 UTC (rev 10242) +++ branches/SAMBA_3_0/source/rpc_parse/parse_reg.c 2005-09-15 18:35:26 UTC (rev 10243) @@ -1484,8 +1484,10 @@ q_u-server = TALLOC_P( get_talloc_ctx(), uint16 ); *q_u-server = 0x1; - q_u-message = TALLOC_P( get_talloc_ctx(), UNISTR4 ); - init_unistr4( q_u-message, msg, UNI_FLAGS_NONE ); + if ( msg *msg ) { + q_u-message = TALLOC_P( get_talloc_ctx(), UNISTR4 ); + init_unistr4( q_u-message, msg, UNI_FLAGS_NONE ); + } q_u-timeout = timeout; @@ -1535,6 +1537,8 @@ if (!prs_pointer(server, ps, depth, (void**)q_u-server, sizeof(uint16), (PRS_POINTER_CAST)prs_uint16)) return False; + if (!prs_align(ps)) + return False; if (!prs_pointer(message, ps, depth, (void**)q_u-message, sizeof(UNISTR4), (PRS_POINTER_CAST)prs_unistr4)) return False; @@ -1593,6 +1597,8 @@ if (!prs_pointer(server, ps, depth, (void**)q_u-server, sizeof(uint16), (PRS_POINTER_CAST)prs_uint16)) return False; + if (!prs_align(ps)) + return False; if (!prs_pointer(message, ps, depth, (void**)q_u-message, sizeof(UNISTR4), (PRS_POINTER_CAST)prs_unistr4)) return False; @@ -1666,6 +1672,8 @@ if (!prs_pointer(server, ps, depth, (void**)q_u-server, sizeof(uint16), (PRS_POINTER_CAST)prs_uint16)) return False; + if (!prs_align(ps)) + return False; return True; } Modified: branches/SAMBA_3_0/source/rpc_parse/parse_shutdown.c === --- branches/SAMBA_3_0/source/rpc_parse/parse_shutdown.c2005-09-15 18:34:06 UTC (rev 10242) +++ branches/SAMBA_3_0/source/rpc_parse/parse_shutdown.c2005-09-15 18:35:26 UTC (rev 10243) @@ -34,8 +34,10 @@ q_s-server = TALLOC_P( get_talloc_ctx(), uint16 ); *q_s-server = 0x1; - q_s-message = TALLOC_P( get_talloc_ctx(), UNISTR4 ); - init_unistr4( q_s-message, msg, UNI_FLAGS_NONE ); + if ( msg *msg ) { + q_s-message = TALLOC_P( get_talloc_ctx(), UNISTR4 ); + init_unistr4( q_s-message, msg, UNI_FLAGS_NONE ); + } q_s-timeout = timeout; @@ -84,6 +86,8 @@ if (!prs_pointer(server, ps, depth, (void**)q_s-server, sizeof(uint16), (PRS_POINTER_CAST)prs_uint16)) return False; + if (!prs_align(ps)) + return False; if (!prs_pointer(message, ps, depth, (void**)q_s-message, sizeof(UNISTR4), (PRS_POINTER_CAST)prs_unistr4)) return False; @@ -99,7 +103,6 @@ if (!prs_uint8(reboot , ps, depth, (q_s-reboot))) return False; - return True; } @@ -142,6 +145,8 @@ if (!prs_pointer(server, ps, depth, (void**)q_s-server, sizeof(uint16), (PRS_POINTER_CAST)prs_uint16)) return False; + if (!prs_align(ps)) + return False; if (!prs_pointer(message, ps, depth, (void**)q_s-message, sizeof(UNISTR4), (PRS_POINTER_CAST)prs_unistr4)) return False; @@ -214,6 +219,8 @@ if (!prs_pointer(server, ps, depth, (void**)q_s-server, sizeof(uint16), (PRS_POINTER_CAST)prs_uint16)) return False; + if (!prs_align(ps)) + return False; return True; } Modified: trunk/source/rpc_parse/parse_reg.c === --- trunk/source/rpc_parse/parse_reg.c 2005-09-15 18:34:06 UTC (rev 10242) +++ trunk/source/rpc_parse/parse_reg.c 2005-09-15 18:35:26 UTC (rev 10243) @@ -1484,8 +1484,10 @@ q_u-server = TALLOC_P( get_talloc_ctx(), uint16 ); *q_u-server = 0x1; - q_u-message = TALLOC_P( get_talloc_ctx(), UNISTR4 ); - init_unistr4( q_u-message, msg, UNI_FLAGS_NONE ); + if ( msg *msg ) { + q_u-message = TALLOC_P( get_talloc_ctx(), UNISTR4 ); + init_unistr4( q_u-message, msg, UNI_FLAGS_NONE ); + } q_u-timeout = timeout; @@ -1535,6 +1537,8 @@ if (!prs_pointer(server, ps, depth, (void**)q_u-server, sizeof(uint16), (PRS_POINTER_CAST)prs_uint16)) return False; + if
svn commit: samba-web r809 - in trunk/patches: .
Author: jerry Date: 2005-09-15 18:38:19 + (Thu, 15 Sep 2005) New Revision: 809 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-webrev=809 Log: add net rpc shutdown fix to list Added: trunk/patches/net_rpc_shutdown_v1.patch Modified: trunk/patches/index.html Changeset: Modified: trunk/patches/index.html === --- trunk/patches/index.html2005-09-08 15:37:24 UTC (rev 808) +++ trunk/patches/index.html2005-09-15 18:38:19 UTC (rev 809) @@ -73,6 +73,10 @@ tda href=/samba/patches/usrmgr_groups_v1.patchUsrmgr.exe and Groups/a/td tdEnsure accounts with the SeAddUsersPrivilege can modify domain and local group attributes./td /tr + tr +tda href=/samba/patches/net_rpc_shutdown_v1.patchnet rpc shutdown/a/td +tdFix a regression in quot;net rpc shutdownquot;/td + /tr /tbody /table Added: trunk/patches/net_rpc_shutdown_v1.patch === --- trunk/patches/net_rpc_shutdown_v1.patch 2005-09-08 15:37:24 UTC (rev 808) +++ trunk/patches/net_rpc_shutdown_v1.patch 2005-09-15 18:38:19 UTC (rev 809) @@ -0,0 +1,82 @@ +diff -urBbN --exclude-from=diff.excludes samba-3.0.20-orig/source/rpc_parse/parse_reg.c samba-3.0.20-new/source/rpc_parse/parse_reg.c +--- samba-3.0.20-orig/source/rpc_parse/parse_reg.c 2005-07-28 08:19:48.0 -0500 samba-3.0.20-new/source/rpc_parse/parse_reg.c 2005-09-15 13:35:30.0 -0500 +@@ -1485,8 +1485,10 @@ + q_u-server = TALLOC_P( get_talloc_ctx(), uint16 ); + *q_u-server = 0x1; + ++ if ( msg *msg ) { + q_u-message = TALLOC_P( get_talloc_ctx(), UNISTR4 ); + init_unistr4( q_u-message, msg, UNI_FLAGS_NONE ); ++ } + + q_u-timeout = timeout; + +@@ -1536,6 +1538,8 @@ + + if (!prs_pointer(server, ps, depth, (void**)q_u-server, sizeof(uint16), (PRS_POINTER_CAST)prs_uint16)) + return False; ++ if (!prs_align(ps)) ++ return False; + + if (!prs_pointer(message, ps, depth, (void**)q_u-message, sizeof(UNISTR4), (PRS_POINTER_CAST)prs_unistr4)) + return False; +@@ -1594,6 +1598,8 @@ + + if (!prs_pointer(server, ps, depth, (void**)q_u-server, sizeof(uint16), (PRS_POINTER_CAST)prs_uint16)) + return False; ++ if (!prs_align(ps)) ++ return False; + + if (!prs_pointer(message, ps, depth, (void**)q_u-message, sizeof(UNISTR4), (PRS_POINTER_CAST)prs_unistr4)) + return False; +@@ -1667,6 +1673,8 @@ + + if (!prs_pointer(server, ps, depth, (void**)q_u-server, sizeof(uint16), (PRS_POINTER_CAST)prs_uint16)) + return False; ++ if (!prs_align(ps)) ++ return False; + + return True; + } +diff -urBbN --exclude-from=diff.excludes samba-3.0.20-orig/source/rpc_parse/parse_shutdown.c samba-3.0.20-new/source/rpc_parse/parse_shutdown.c +--- samba-3.0.20-orig/source/rpc_parse/parse_shutdown.c2005-04-18 11:38:20.0 -0500 samba-3.0.20-new/source/rpc_parse/parse_shutdown.c 2005-09-15 13:35:30.0 -0500 +@@ -34,8 +34,10 @@ + q_s-server = TALLOC_P( get_talloc_ctx(), uint16 ); + *q_s-server = 0x1; + ++ if ( msg *msg ) { + q_s-message = TALLOC_P( get_talloc_ctx(), UNISTR4 ); + init_unistr4( q_s-message, msg, UNI_FLAGS_NONE ); ++ } + + q_s-timeout = timeout; + +@@ -84,6 +86,8 @@ + + if (!prs_pointer(server, ps, depth, (void**)q_s-server, sizeof(uint16), (PRS_POINTER_CAST)prs_uint16)) + return False; ++ if (!prs_align(ps)) ++ return False; + + if (!prs_pointer(message, ps, depth, (void**)q_s-message, sizeof(UNISTR4), (PRS_POINTER_CAST)prs_unistr4)) + return False; +@@ -142,6 +145,8 @@ + + if (!prs_pointer(server, ps, depth, (void**)q_s-server, sizeof(uint16), (PRS_POINTER_CAST)prs_uint16)) + return False; ++ if (!prs_align(ps)) ++ return False; + + if (!prs_pointer(message, ps, depth, (void**)q_s-message, sizeof(UNISTR4), (PRS_POINTER_CAST)prs_unistr4)) + return False; +@@ -214,6 +219,8 @@ + + if (!prs_pointer(server, ps, depth, (void**)q_s-server, sizeof(uint16), (PRS_POINTER_CAST)prs_uint16)) + return False; ++ if (!prs_align(ps)) ++ return False; + + return True; + }
svn commit: samba r10244 - in trunk/source: libsmb rpc_parse rpc_server
Author: jra Date: 2005-09-15 18:50:44 + (Thu, 15 Sep 2005) New Revision: 10244 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10244 Log: Ensure we set the cred buffer correctly and always return creds. Jeremy. Modified: trunk/source/libsmb/credentials.c trunk/source/rpc_parse/parse_net.c trunk/source/rpc_server/srv_netlog_nt.c Changeset: Modified: trunk/source/libsmb/credentials.c === --- trunk/source/libsmb/credentials.c 2005-09-15 18:35:26 UTC (rev 10243) +++ trunk/source/libsmb/credentials.c 2005-09-15 18:50:44 UTC (rev 10244) @@ -168,11 +168,16 @@ leave that to reseed below. / -BOOL creds_server_step(struct dcinfo *dc, const DOM_CRED *received_cred) +BOOL creds_server_step(struct dcinfo *dc, const DOM_CRED *received_cred, DOM_CRED *cred_out) { dc-sequence = received_cred-timestamp.time; creds_step(dc); + + /* Create the outgoing credentials */ + cred_out-timestamp.time = dc-sequence + 1; + cred_out-challenge = dc-srv_chal; + return creds_server_check(dc, received_cred-challenge); } @@ -199,15 +204,12 @@ */ / - Replace current seed chal and return authenticator cred. + Replace current seed chal. / -void creds_reseed_server(struct dcinfo *dc, DOM_CRED *cred_out) +void creds_reseed_server(struct dcinfo *dc) { creds_reseed(dc); - - cred_out-timestamp.time = dc-sequence + 1; - cred_out-challenge = dc-srv_chal; } / Modified: trunk/source/rpc_parse/parse_net.c === --- trunk/source/rpc_parse/parse_net.c 2005-09-15 18:35:26 UTC (rev 10243) +++ trunk/source/rpc_parse/parse_net.c 2005-09-15 18:50:44 UTC (rev 10244) @@ -1724,8 +1724,10 @@ if(!prs_uint32(buffer_creds, ps, depth, r_l-buffer_creds)) /* undocumented buffer pointer */ return False; - if(!smb_io_cred(, r_l-srv_creds, ps, depth)) /* server credentials. server time stamp appears to be ignored. */ - return False; + if (r_l-buffer_creds) { + if(!smb_io_cred(, r_l-srv_creds, ps, depth)) /* server credentials. server time stamp appears to be ignored. */ + return False; + } if(!prs_uint16(switch_value, ps, depth, r_l-switch_value)) return False; Modified: trunk/source/rpc_server/srv_netlog_nt.c === --- trunk/source/rpc_server/srv_netlog_nt.c 2005-09-15 18:35:26 UTC (rev 10243) +++ trunk/source/rpc_server/srv_netlog_nt.c 2005-09-15 18:50:44 UTC (rev 10244) @@ -463,7 +463,7 @@ return NT_STATUS_INVALID_HANDLE; } - if (!creds_server_step(p-dc, q_u-clnt_id.cred)) { + if (!creds_server_step(p-dc, q_u-clnt_id.cred, cred_out)) { DEBUG(0,(_net_srv_pwset: creds_server_step failed. Rejecting auth request from client %s machine account %s\n, p-dc-remote_machine, p-dc-mach_acct )); @@ -473,7 +473,7 @@ /* Do the second part of the credentials chain. This is split out here so it can be optional for a failed logon. */ - creds_reseed_server(p-dc, cred_out); + creds_reseed_server(p-dc); DEBUG(5,(_net_srv_pwset: %d\n, __LINE__)); @@ -568,8 +568,10 @@ return NT_STATUS_INVALID_HANDLE; } + r_u-buffer_creds = 1; /* yes, we have valid server credentials */ + /* checks and updates credentials. creates reply credentials */ - if (!creds_server_step(p-dc, q_u-sam_id.client.cred)) { + if (!creds_server_step(p-dc, q_u-sam_id.client.cred, r_u-srv_creds)) { DEBUG(0,(_net_sam_logoff: creds_server_step failed. Rejecting auth request from client %s machine account %s\n, p-dc-remote_machine, p-dc-mach_acct )); @@ -582,8 +584,7 @@ /* what happens if we get a logoff for an unknown user? */ /* maybe we want to say 'no', reject the client's credentials */ - r_u-buffer_creds = 1; /* yes, we have valid server credentials */ - creds_reseed_server(p-dc, r_u-srv_creds); + creds_reseed_server(p-dc); r_u-status = NT_STATUS_OK; @@ -620,6 +621,7 @@ r_u-switch_value = 0; /* indicates no info */ r_u-auth_resp = 1; /* authoritative response */ r_u-switch_value = 3; /* indicates type of validation user info */ + r_u-buffer_creds = 1; /* Ensure we always return server creds. */ if
svn commit: samba-web r810 - in trunk/patches: .
Author: jerry Date: 2005-09-15 19:04:21 + (Thu, 15 Sep 2005) New Revision: 810 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-webrev=810 Log: adding more patches to the list Added: trunk/patches/64bit_segv_v1.patch trunk/patches/dosapps_v1.patch Modified: trunk/patches/index.html trunk/patches/net_rpc_shutdown_v1.patch trunk/patches/series Changeset: Added: trunk/patches/64bit_segv_v1.patch === --- trunk/patches/64bit_segv_v1.patch 2005-09-15 18:38:19 UTC (rev 809) +++ trunk/patches/64bit_segv_v1.patch 2005-09-15 19:04:21 UTC (rev 810) @@ -0,0 +1,27 @@ +diff -urBbN --exclude-from=diff.excludes samba-3.0.20-orig/source/nsswitch/winbindd_group.c samba-3.0.20-new/source/nsswitch/winbindd_group.c +--- samba-3.0.20-orig/source/nsswitch/winbindd_group.c 2005-07-28 08:19:44.0 -0500 samba-3.0.20-new/source/nsswitch/winbindd_group.c 2005-09-15 13:56:19.0 -0500 +@@ -1148,7 +1148,9 @@ + DOM_SID user_sid; + NTSTATUS status; + +- int i, num_groups, len, bufsize; ++ int i, num_groups; ++ size_t bufsize; ++ ssize_t len; + DOM_SID *groups; + + /* Ensure null termination */ +diff -urBbN --exclude-from=diff.excludes samba-3.0.20-orig/source/printing/nt_printing.c samba-3.0.20-new/source/printing/nt_printing.c +--- samba-3.0.20-orig/source/printing/nt_printing.c2005-08-07 18:09:53.0 -0500 samba-3.0.20-new/source/printing/nt_printing.c 2005-09-15 13:56:19.0 -0500 +@@ -342,7 +342,8 @@ + SEC_DESC *sec, *new_sec; + TALLOC_CTX *ctx = state; + int result, i; +- uint32 sd_size, size_new_sec; ++ uint32 sd_size; ++ size_t size_new_sec; + DOM_SID sid; + + if (!data.dptr || data.dsize == 0) Added: trunk/patches/dosapps_v1.patch === --- trunk/patches/dosapps_v1.patch 2005-09-15 18:38:19 UTC (rev 809) +++ trunk/patches/dosapps_v1.patch 2005-09-15 19:04:21 UTC (rev 810) @@ -0,0 +1,36 @@ +## +## Fixes https://bugzilla.samba.org/bug/{3044,3060} +## BUG 3044: Access denied when running FOX Pro for DOS applications +## from two or more Win'98 or OS/2 workstations +## BUG 3060: DOS '' does not truncate the file +## +diff -urBbN --exclude-from=diff.excludes samba-3.0.20-orig/source/smbd/open.c samba-3.0.20-new/source/smbd/open.c +--- samba-3.0.20-orig/source/smbd/open.c 2005-07-28 08:19:42.0 -0500 samba-3.0.20-new/source/smbd/open.c2005-09-15 13:45:32.0 -0500 +@@ -1046,13 +1046,13 @@ + + /* Create the NT compatible access_mask. */ + switch (GET_OPENX_MODE(deny_mode)) { ++ case DOS_OPEN_EXEC: /* Implies read-only - used to be FILE_READ_DATA */ + case DOS_OPEN_RDONLY: + access_mask = FILE_GENERIC_READ; + break; + case DOS_OPEN_WRONLY: + access_mask = FILE_GENERIC_WRITE; + break; +- case DOS_OPEN_EXEC: /* This used to be FILE_READ_DATA... */ + case DOS_OPEN_RDWR: + case DOS_OPEN_FCB: + access_mask = FILE_GENERIC_READ|FILE_GENERIC_WRITE; +diff -urBbN --exclude-from=diff.excludes samba-3.0.20-orig/source/smbd/reply.c samba-3.0.20-new/source/smbd/reply.c +--- samba-3.0.20-orig/source/smbd/reply.c 2005-07-28 08:19:42.0 -0500 samba-3.0.20-new/source/smbd/reply.c 2005-09-15 13:45:32.0 -0500 +@@ -1610,7 +1610,7 @@ + create_disposition = FILE_CREATE; + } else { + /* Create if file doesn't exist, truncate if it does. */ +- create_disposition = FILE_OPEN_IF; ++ create_disposition = FILE_OVERWRITE_IF; + } + + /* Open file using ntcreate. */ Modified: trunk/patches/index.html === --- trunk/patches/index.html2005-09-15 18:38:19 UTC (rev 809) +++ trunk/patches/index.html2005-09-15 19:04:21 UTC (rev 810) @@ -75,8 +75,17 @@ /tr tr tda href=/samba/patches/net_rpc_shutdown_v1.patchnet rpc shutdown/a/td -tdFix a regression in quot;net rpc shutdownquot;/td +tdFix a regression in quot;net rpc shutdownquot;(a href=https://bugzilla.samba.org/bug/3080;BUG 3080/a)./td /tr + tr +tda href=/samba/patches/dosapps_v1.patchDOS Applications/a/td +tdCorrects a href=https://bugzilla.samba.org/bug/3044;BUG 3044/a and +a href=https://bugzilla.samba.org/bug/3060;3060/a DOS application interoperability issues./td + /tr + tr +tda href=/samba/patches/64bit_segv_v1.patchx64 crashes/a/td +tdFixes crash bugs in winbindd and smbd on x64 systems./td + /tr /tbody /table Modified: trunk/patches/net_rpc_shutdown_v1.patch
svn commit: samba r10245 - in branches/SAMBA_4_0/source: lib lib/cmdline param
Author: jelmer Date: 2005-09-15 19:52:13 + (Thu, 15 Sep 2005) New Revision: 10245 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10245 Log: Get rid of XFILE in a few places. Add fdprintf() and vfdprintf() helper functions. Modified: branches/SAMBA_4_0/source/lib/cmdline/readline.c branches/SAMBA_4_0/source/lib/credentials.c branches/SAMBA_4_0/source/lib/util_file.c branches/SAMBA_4_0/source/param/generic.c Changeset: Modified: branches/SAMBA_4_0/source/lib/cmdline/readline.c === --- branches/SAMBA_4_0/source/lib/cmdline/readline.c2005-09-15 18:50:44 UTC (rev 10244) +++ branches/SAMBA_4_0/source/lib/cmdline/readline.c2005-09-15 19:52:13 UTC (rev 10245) @@ -59,7 +59,7 @@ fd_set fds; static pstring line; struct timeval timeout; - int fd = x_fileno(x_stdin); + int fd = STDIN_FILENO; char *ret; do_debug(%s, prompt); @@ -88,7 +88,7 @@ char **(completion_fn)(const char *text, int start, int end)) { #if HAVE_LIBREADLINE - if (isatty(x_fileno(x_stdin))) { + if (isatty(STDIN_FILENO)) { char *ret; /* Aargh! Readline does bizzare things with the terminal width Modified: branches/SAMBA_4_0/source/lib/credentials.c === --- branches/SAMBA_4_0/source/lib/credentials.c 2005-09-15 18:50:44 UTC (rev 10244) +++ branches/SAMBA_4_0/source/lib/credentials.c 2005-09-15 19:52:13 UTC (rev 10245) @@ -671,37 +671,30 @@ BOOL cli_credentials_parse_file(struct cli_credentials *cred, const char *file, enum credentials_obtained obtained) { - XFILE *auth; - char buf[128]; uint16_t len = 0; char *ptr, *val, *param; + char **lines; + int i, numlines; - if ((auth=x_fopen(file, O_RDONLY, 0)) == NULL) + lines = file_lines_load(file, numlines, NULL); + + if (lines == NULL) { /* fail if we can't open the credentials file */ d_printf(ERROR: Unable to open credentials file!\n); return False; } - while (!x_feof(auth)) - { - /* get a line from the file */ - if (!x_fgets(buf, sizeof(buf), auth)) - continue; - len = strlen(buf); + for (i = 0; i numlines; i++) { + len = strlen(lines[i]); - if ((len) (buf[len-1]=='\n')) - { - buf[len-1] = '\0'; - len--; - } if (len == 0) continue; /* break up the line into parameter value. * will need to eat a little whitespace possibly */ - param = buf; - if (!(ptr = strchr_m (buf, '='))) + param = lines[i]; + if (!(ptr = strchr_m (lines[i], '='))) continue; val = ptr+1; @@ -720,10 +713,11 @@ } else if (strwicmp(realm, param) == 0) { cli_credentials_set_realm(cred, val, obtained); } - memset(buf, 0, sizeof(buf)); + memset(lines[i], 0, len); } - x_fclose(auth); + talloc_free(lines); + return True; } Modified: branches/SAMBA_4_0/source/lib/util_file.c === --- branches/SAMBA_4_0/source/lib/util_file.c 2005-09-15 18:50:44 UTC (rev 10244) +++ branches/SAMBA_4_0/source/lib/util_file.c 2005-09-15 19:52:13 UTC (rev 10245) @@ -397,3 +397,29 @@ struct stat st; return (stat(path, st) == 0); } + +int vfdprintf(int fd, const char *format, va_list ap) +{ + char *p; + int len, ret; + va_list ap2; + + VA_COPY(ap2, ap); + + len = vasprintf(p, format, ap2); + if (len = 0) return len; + ret = write(fd, p, len); + SAFE_FREE(p); + return ret; +} + +int fdprintf(int fd, const char *format, ...) _PRINTF_ATTRIBUTE(2,3) +{ + va_list ap; + int ret; + + va_start(ap, format); + ret = vfdprintf(fd, format, ap); + va_end(ap); + return ret; +} Modified: branches/SAMBA_4_0/source/param/generic.c === --- branches/SAMBA_4_0/source/param/generic.c 2005-09-15 18:50:44 UTC (rev 10244) +++ branches/SAMBA_4_0/source/param/generic.c 2005-09-15 19:52:13 UTC (rev 10245) @@ -242,28 +242,28 @@ int param_write(struct param_context *ctx, const char *fn) { - XFILE *file; + int file; struct param_section *section; if (fn == NULL || ctx == NULL) return -1; - file = x_fopen(fn, O_WRONLY|O_CREAT, 0755); + file = open(fn, O_WRONLY|O_CREAT, 0755); -
svn commit: samba r10246 - in branches/SAMBA_4_0/source: auth lib
Author: jelmer Date: 2005-09-15 20:03:35 + (Thu, 15 Sep 2005) New Revision: 10246 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10246 Log: Remove unused function Move auth-specific file to auth/ Added: branches/SAMBA_4_0/source/auth/pam_errors.c Removed: branches/SAMBA_4_0/source/lib/pam_errors.c Modified: branches/SAMBA_4_0/source/auth/config.mk branches/SAMBA_4_0/source/lib/basic.mk branches/SAMBA_4_0/source/lib/util_file.c Changeset: Sorry, the patch is too large (285 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10246
svn commit: samba r10247 - in branches/SAMBA_3_0/source/utils: .
Author: jmcd Date: 2005-09-15 20:39:57 + (Thu, 15 Sep 2005) New Revision: 10247 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10247 Log: Fix help text for net rpc shutdown. Modified: branches/SAMBA_3_0/source/utils/net_rpc.c Changeset: Modified: branches/SAMBA_3_0/source/utils/net_rpc.c === --- branches/SAMBA_3_0/source/utils/net_rpc.c 2005-09-15 20:03:35 UTC (rev 10246) +++ branches/SAMBA_3_0/source/utils/net_rpc.c 2005-09-15 20:39:57 UTC (rev 10247) @@ -4469,7 +4469,10 @@ if (opt_comment) { msg = opt_comment; + } else { + msg = ; } + if (opt_timeout) { timeout = opt_timeout; } @@ -5965,7 +5968,7 @@ d_printf(\t-r or --reboot\trequest remote server reboot on shutdown\n); d_printf(\t-f or --force\trequest the remote server force its shutdown\n); d_printf(\t-t or --timeout=timeout\tnumber of seconds before shutdown\n); - d_printf(\t-c or --comment=message\ttext message to display on impending shutdown\n); + d_printf(\t-C or --comment=message\ttext message to display on impending shutdown\n); return -1; }
svn commit: samba r10248 - in trunk/source/utils: .
Author: jmcd Date: 2005-09-15 20:41:25 + (Thu, 15 Sep 2005) New Revision: 10248 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10248 Log: Fix help text for net rpc shutdown Modified: trunk/source/utils/net_rpc.c Changeset: Modified: trunk/source/utils/net_rpc.c === --- trunk/source/utils/net_rpc.c2005-09-15 20:39:57 UTC (rev 10247) +++ trunk/source/utils/net_rpc.c2005-09-15 20:41:25 UTC (rev 10248) @@ -6121,7 +6121,7 @@ d_printf(\t-r or --reboot\trequest remote server reboot on shutdown\n); d_printf(\t-f or --force\trequest the remote server force its shutdown\n); d_printf(\t-t or --timeout=timeout\tnumber of seconds before shutdown\n); - d_printf(\t-c or --comment=message\ttext message to display on impending shutdown\n); + d_printf(\t-C or --comment=message\ttext message to display on impending shutdown\n); return -1; }
svn commit: samba r10249 - in trunk/source: libsmb rpc_server
Author: jra Date: 2005-09-15 21:24:14 + (Thu, 15 Sep 2005) New Revision: 10249 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10249 Log: Revert the effects of the change made for bug #2953 by jmcd. Alsways step server credentials and return them. I will fix this in 3.0 when I get home as the code is different. Jeremy. Modified: trunk/source/libsmb/credentials.c trunk/source/rpc_server/srv_netlog_nt.c Changeset: Modified: trunk/source/libsmb/credentials.c === --- trunk/source/libsmb/credentials.c 2005-09-15 20:41:25 UTC (rev 10248) +++ trunk/source/libsmb/credentials.c 2005-09-15 21:24:14 UTC (rev 10249) @@ -164,24 +164,6 @@ } / - Step the server credential chain one forward. Don't replace current creds, - leave that to reseed below. -/ - -BOOL creds_server_step(struct dcinfo *dc, const DOM_CRED *received_cred, DOM_CRED *cred_out) -{ - dc-sequence = received_cred-timestamp.time; - - creds_step(dc); - - /* Create the outgoing credentials */ - cred_out-timestamp.time = dc-sequence + 1; - cred_out-challenge = dc-srv_chal; - - return creds_server_check(dc, received_cred-challenge); -} - -/ Replace current seed chal. Internal function - due to split server step below. / @@ -197,19 +179,23 @@ DEBUG(5,(cred_reseed: seed %s\n, credstr(dc-seed_chal.data) )); } -/* - stores new seed in client credentials - jmcd - Bug #2953 - moved this functionality out of deal_with_creds, because we're - not supposed to move to the next step in the chain if a nonexistent user tries to logon -*/ - / - Replace current seed chal. + Step the server credential chain one forward. / -void creds_reseed_server(struct dcinfo *dc) +BOOL creds_server_step(struct dcinfo *dc, const DOM_CRED *received_cred, DOM_CRED *cred_out) { + dc-sequence = received_cred-timestamp.time; + + creds_step(dc); + + /* Create the outgoing credentials */ + cred_out-timestamp.time = dc-sequence + 1; + cred_out-challenge = dc-srv_chal; + creds_reseed(dc); + + return creds_server_check(dc, received_cred-challenge); } / Modified: trunk/source/rpc_server/srv_netlog_nt.c === --- trunk/source/rpc_server/srv_netlog_nt.c 2005-09-15 20:41:25 UTC (rev 10248) +++ trunk/source/rpc_server/srv_netlog_nt.c 2005-09-15 21:24:14 UTC (rev 10249) @@ -463,6 +463,7 @@ return NT_STATUS_INVALID_HANDLE; } + /* Step the creds chain forward. */ if (!creds_server_step(p-dc, q_u-clnt_id.cred, cred_out)) { DEBUG(0,(_net_srv_pwset: creds_server_step failed. Rejecting auth request from client %s machine account %s\n, @@ -470,11 +471,6 @@ return NT_STATUS_ACCESS_DENIED; } - /* Do the second part of the credentials chain. This is split out here - so it can be optional for a failed logon. */ - - creds_reseed_server(p-dc); - DEBUG(5,(_net_srv_pwset: %d\n, __LINE__)); rpcstr_pull(workstation,q_u-clnt_id.login.uni_comp_name.buffer, @@ -578,16 +574,7 @@ return NT_STATUS_ACCESS_DENIED; } - /* Do the second part of the credentials chain. This is split out here - so it can be optional for a failed logon. */ - - /* what happens if we get a logoff for an unknown user? */ - - /* maybe we want to say 'no', reject the client's credentials */ - creds_reseed_server(p-dc); - r_u-status = NT_STATUS_OK; - return r_u-status; } @@ -767,11 +754,6 @@ return status; } - /* moved from right after deal_with_creds above, since we weren't - supposed to update unless logon was successful */ - - creds_reseed_server(p-dc); - if (server_info-guest) { /* We don't like guest domain logons... */ DEBUG(5,(_net_sam_logon: Attempted domain logon as GUEST denied.\n));
svn commit: samba r10250 - in branches/SAMBA_4_0/source/lib/ldb/common: .
Author: idra Date: 2005-09-15 23:06:57 + (Thu, 15 Sep 2005) New Revision: 10250 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10250 Log: the comparison is caseless so we must caseless subtract otherwise we get the wrong result when comparing upper case chars with lower case chars Modified: branches/SAMBA_4_0/source/lib/ldb/common/attrib_handlers.c Changeset: Modified: branches/SAMBA_4_0/source/lib/ldb/common/attrib_handlers.c === --- branches/SAMBA_4_0/source/lib/ldb/common/attrib_handlers.c 2005-09-15 21:24:14 UTC (rev 10249) +++ branches/SAMBA_4_0/source/lib/ldb/common/attrib_handlers.c 2005-09-15 23:06:57 UTC (rev 10250) @@ -138,7 +138,7 @@ } while (*s1 == ' ') s1++; while (*s2 == ' ') s2++; - return (int)(*s1) - (int)(*s2); + return (int)(toupper(*s1)) - (int)(toupper(*s2)); } /*
svn commit: samba r10251 - in branches/SAMBA_4_0/source/lib/ldb: ldb_sqlite3 ldb_tdb tests tools
Author: idra Date: 2005-09-15 23:10:07 + (Thu, 15 Sep 2005) New Revision: 10251 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10251 Log: some more work on ldb_sqlite3 I must say that writing a new module is a very good way to find lot of subtle bugs laying in the code We need more tests! commit oLschema2ldif.c to keep it safe from data losses (rm -fr :-) update test generic to reflect the fix made on comparsion functions Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.h branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh branches/SAMBA_4_0/source/lib/ldb/tools/oLschema2ldif.c Changeset: Sorry, the patch is too large (874 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10251
Build status as of Fri Sep 16 00:00:02 2005
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2005-09-15 00:00:12.0 + +++ /home/build/master/cache/broken_results.txt 2005-09-16 00:00:09.0 + @@ -1,17 +1,17 @@ -Build status as of Thu Sep 15 00:00:02 2005 +Build status as of Fri Sep 16 00:00:02 2005 Build counts: Tree Total Broken Panic ccache 9 4 0 distcc 9 2 0 -lorikeet-heimdal 34 14 0 +lorikeet-heimdal 32 15 0 ppp 22 0 0 rsync36 2 0 samba2 1 0 samba-docs 0 0 0 -samba4 38 11 1 -samba_3_036 14 0 -smb-build29 3 0 -talloc 8 2 0 +samba4 38 20 1 +samba_3_037 14 0 +smb-build30 3 0 +talloc 10 4 0 tdb 8 4 0
svn commit: samba r10252 - in branches/SAMBA_4_0/source: ldap_server nbt_server/wins scripting/ejs
Author: tridge Date: 2005-09-16 03:18:49 + (Fri, 16 Sep 2005) New Revision: 10252 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10252 Log: a recent checkin from simo changed the handling of BASE and SUBTREE searches in ldb to be more ldap compliant, but broke the wins server and the ejs ldb code. This fixes those up so 'make test' passes again. Modified: branches/SAMBA_4_0/source/ldap_server/ldap_rootdse.c branches/SAMBA_4_0/source/nbt_server/wins/winsdb.c branches/SAMBA_4_0/source/scripting/ejs/smbcalls_ldb.c Changeset: Modified: branches/SAMBA_4_0/source/ldap_server/ldap_rootdse.c === --- branches/SAMBA_4_0/source/ldap_server/ldap_rootdse.c2005-09-15 23:10:07 UTC (rev 10251) +++ branches/SAMBA_4_0/source/ldap_server/ldap_rootdse.c2005-09-16 03:18:49 UTC (rev 10252) @@ -294,7 +294,8 @@ attrs[j] = NULL; } - count = ldb_search(ldb, NULL, 0, dn=cn=rootDSE, attrs, res); + count = ldb_search(ldb, ldb_dn_explode(local_ctx, cn=rootDSE), 0, + NULL, attrs, res); talloc_steal(local_ctx, res); if (count == 1) { Modified: branches/SAMBA_4_0/source/nbt_server/wins/winsdb.c === --- branches/SAMBA_4_0/source/nbt_server/wins/winsdb.c 2005-09-15 23:10:07 UTC (rev 10251) +++ branches/SAMBA_4_0/source/nbt_server/wins/winsdb.c 2005-09-16 03:18:49 UTC (rev 10252) @@ -87,25 +87,21 @@ /* return a DN for a nbt_name */ -static char *winsdb_dn(TALLOC_CTX *mem_ctx, struct nbt_name *name) +static struct ldb_dn *winsdb_dn(TALLOC_CTX *mem_ctx, struct nbt_name *name) { - char *ret = talloc_asprintf(mem_ctx, type=%02x, name-type); - if (ret == NULL) { - return ret; + struct ldb_dn *dn; + + dn = ldb_dn_string_compose(mem_ctx, NULL, type=%02x, name-type); + if (dn == NULL) { + return NULL; } - if (name-name *name-name) { - ret = talloc_asprintf_append(ret, ,name=%s, name-name); + if (dn name-name *name-name) { + dn = ldb_dn_string_compose(mem_ctx, dn, name=%s, name-name); } - if (ret == NULL) { - return ret; + if (dn name-scope *name-scope) { + dn = ldb_dn_string_compose(mem_ctx, dn, scope=%s, name-scope); } - if (name-scope *name-scope) { - ret = talloc_asprintf_append(ret, ,scope=%s, name-scope); - } - if (ret == NULL) { - return ret; - } - return ret; + return dn; } /* @@ -119,14 +115,11 @@ struct winsdb_record *rec; struct ldb_message_element *el; TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx); - const char *expr; int i; - expr = talloc_asprintf(tmp_ctx, dn=%s, winsdb_dn(tmp_ctx, name)); - if (expr == NULL) goto failed; - /* find the record in the WINS database */ - ret = ldb_search(winssrv-wins_db, NULL, LDB_SCOPE_ONELEVEL, expr, NULL, res); + ret = ldb_search(winssrv-wins_db, winsdb_dn(tmp_ctx, name), LDB_SCOPE_BASE, +NULL, NULL, res); if (res != NULL) { talloc_steal(tmp_ctx, res); } @@ -184,7 +177,7 @@ struct ldb_message *msg = ldb_msg_new(mem_ctx); if (msg == NULL) goto failed; - msg-dn = ldb_dn_explode(msg, winsdb_dn(msg, rec-name)); + msg-dn = winsdb_dn(msg, rec-name); if (msg-dn == NULL) goto failed; ret |= ldb_msg_add_fmt(ldb, msg, objectClass, wins); ret |= ldb_msg_add_fmt(ldb, msg, active, %u, rec-state); @@ -276,7 +269,7 @@ winsdb_remove_version(winssrv, rec-version); - dn = ldb_dn_explode(tmp_ctx, winsdb_dn(tmp_ctx, rec-name)); + dn = winsdb_dn(tmp_ctx, rec-name); if (dn == NULL) goto failed; ret = ldb_delete(ldb, dn); Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_ldb.c === --- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_ldb.c 2005-09-15 23:10:07 UTC (rev 10251) +++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_ldb.c 2005-09-16 03:18:49 UTC (rev 10252) @@ -412,6 +412,7 @@ mprSetVar(ldb, SCOPE_BASE, mprCreateNumberVar(LDB_SCOPE_BASE)); mprSetVar(ldb, SCOPE_ONE, mprCreateNumberVar(LDB_SCOPE_ONELEVEL)); mprSetVar(ldb, SCOPE_SUBTREE, mprCreateNumberVar(LDB_SCOPE_SUBTREE)); + mprSetVar(ldb, SCOPE_DEFAULT, mprCreateNumberVar(LDB_SCOPE_DEFAULT)); return 0; }
svn commit: samba r10253 - in branches/SAMBA_4_0/source/lib: . ldb/ldb_tdb tdb tdb/common tdb/include tdb/tools
Author: tridge Date: 2005-09-16 03:52:42 + (Fri, 16 Sep 2005) New Revision: 10253 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10253 Log: a fairly large tdb cleanup and re-organise. Nearly all of this change just involves splitting up the core tdb.c code into separate files on logical boundaries, but there are some minor functional changes as well: - move the 'struct tdb_context' into tdb_private.h, hiding it from users. This was done to allow the structure to change without breaking code that uses tdb. - added accessor functions tdb_fd(), tdb_name(), and tdb_log_fn() to access the elements of struct tdb_context that were used by external code but are no longer visible - simplied tdb_append() to use tdb_fetch()/tdb_store(), which is just as good due to the way tdb locks work - changed some of the types (such as tdb_off to tdb_off_t) to make syntax highlighting work better - removed the old optional spinlock code. It was a bad idea. - fixed a bug in tdb_reopen_all() that caused tdbtorture to sometimes fail or report nasty looking errors. This is the only real bug fixed in this commit. Jeremy/Jerry, you might like to pickup this change for Samba3, as that could definately affect smbd in Samba3. The aim of all of these changes is to make the tdb transactions/journaling code I am working on easier to write. I started to write it on top of the existing tdb.c code and it got very messy. Splitting up the code makes it much easier to follow. There are more cleanups we could do in tdb, such as using uint32_t instead of u32 (suggested by metze). I'll leave those for another day. Added: branches/SAMBA_4_0/source/lib/tdb/common/dump.c branches/SAMBA_4_0/source/lib/tdb/common/error.c branches/SAMBA_4_0/source/lib/tdb/common/freelist.c branches/SAMBA_4_0/source/lib/tdb/common/io.c branches/SAMBA_4_0/source/lib/tdb/common/lock.c branches/SAMBA_4_0/source/lib/tdb/common/open.c branches/SAMBA_4_0/source/lib/tdb/common/tdb_private.h branches/SAMBA_4_0/source/lib/tdb/common/traverse.c branches/SAMBA_4_0/source/lib/tdb/include/tdbconfig.h.in Removed: branches/SAMBA_4_0/source/lib/tdb/common/spinlock.c branches/SAMBA_4_0/source/lib/tdb/include/spinlock.h Modified: branches/SAMBA_4_0/source/lib/db_wrap.c branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb_wrap.c branches/SAMBA_4_0/source/lib/tdb/Makefile.in branches/SAMBA_4_0/source/lib/tdb/autogen.sh branches/SAMBA_4_0/source/lib/tdb/common/tdb.c branches/SAMBA_4_0/source/lib/tdb/common/tdbutil.c branches/SAMBA_4_0/source/lib/tdb/config.m4 branches/SAMBA_4_0/source/lib/tdb/config.mk branches/SAMBA_4_0/source/lib/tdb/configure.in branches/SAMBA_4_0/source/lib/tdb/include/tdb.h branches/SAMBA_4_0/source/lib/tdb/include/tdbutil.h branches/SAMBA_4_0/source/lib/tdb/tools/tdbdump.c branches/SAMBA_4_0/source/lib/tdb/tools/tdbtest.c branches/SAMBA_4_0/source/lib/tdb/tools/tdbtool.c branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c Changeset: Sorry, the patch is too large (5586 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10253