svn commit: samba r14129 - branches/SAMBA_3_0/source/auth trunk/source/auth
Author: gd Date: 2006-03-10 08:26:40 + (Fri, 10 Mar 2006) New Revision: 14129 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14129 Log: Add the group sids from the Kerberos PAC to the user token. Guenther Modified: branches/SAMBA_3_0/source/auth/auth_util.c trunk/source/auth/auth_util.c Changeset: Modified: branches/SAMBA_3_0/source/auth/auth_util.c === --- branches/SAMBA_3_0/source/auth/auth_util.c 2006-03-10 04:18:29 UTC (rev 14128) +++ branches/SAMBA_3_0/source/auth/auth_util.c 2006-03-10 08:26:40 UTC (rev 14129) @@ -1102,6 +1102,7 @@ DOM_SID user_sid, group_sid; fstring dom_name; auth_serversupplied_info *result; + int i; if ( !(sampass = samu_new( NULL )) ) { return NT_STATUS_NO_MEMORY; @@ -1139,10 +1140,36 @@ result-uid = pwd-pw_uid; result-gid = pwd-pw_gid; - /* TODO: Add groups from pac */ result-sids = NULL; result-num_sids = 0; + /* and create (by appending rids) the 'domain' sids */ + + for (i = 0; i logon_info-info3.num_groups2; i++) { + DOM_SID sid; + if (!sid_compose(sid, logon_info-info3.dom_sid.sid, +logon_info-info3.gids[i].g_rid)) { + DEBUG(3,(could not append additional group rid +0x%x\n, logon_info-info3.gids[i].g_rid)); + TALLOC_FREE(result); + return NT_STATUS_INVALID_PARAMETER; + } + add_sid_to_array(result, sid, result-sids, +result-num_sids); + } + + /* Copy 'other' sids. We need to do sid filtering here to + prevent possible elevation of privileges. See: + + http://www.microsoft.com/windows2000/techinfo/administration/security/sidfilter.asp + */ + + for (i = 0; i logon_info-info3.num_other_sids; i++) { + add_sid_to_array(result, logon_info-info3.other_sids[i].sid, +result-sids, +result-num_sids); + } + *server_info = result; return NT_STATUS_OK; Modified: trunk/source/auth/auth_util.c === --- trunk/source/auth/auth_util.c 2006-03-10 04:18:29 UTC (rev 14128) +++ trunk/source/auth/auth_util.c 2006-03-10 08:26:40 UTC (rev 14129) @@ -1102,6 +1102,7 @@ DOM_SID user_sid, group_sid; fstring dom_name; auth_serversupplied_info *result; + int i; if ( !(sampass = samu_new( NULL )) ) { return NT_STATUS_NO_MEMORY; @@ -1139,10 +1140,36 @@ result-uid = pwd-pw_uid; result-gid = pwd-pw_gid; - /* TODO: Add groups from pac */ result-sids = NULL; result-num_sids = 0; + /* and create (by appending rids) the 'domain' sids */ + + for (i = 0; i logon_info-info3.num_groups2; i++) { + DOM_SID sid; + if (!sid_compose(sid, logon_info-info3.dom_sid.sid, +logon_info-info3.gids[i].g_rid)) { + DEBUG(3,(could not append additional group rid +0x%x\n, logon_info-info3.gids[i].g_rid)); + TALLOC_FREE(result); + return NT_STATUS_INVALID_PARAMETER; + } + add_sid_to_array(result, sid, result-sids, +result-num_sids); + } + + /* Copy 'other' sids. We need to do sid filtering here to + prevent possible elevation of privileges. See: + + http://www.microsoft.com/windows2000/techinfo/administration/security/sidfilter.asp + */ + + for (i = 0; i logon_info-info3.num_other_sids; i++) { + add_sid_to_array(result, logon_info-info3.other_sids[i].sid, +result-sids, +result-num_sids); + } + *server_info = result; return NT_STATUS_OK;
svn commit: samba r14130 - branches/SAMBA_3_0/source/auth branches/SAMBA_3_0/source/smbd trunk/source/auth trunk/source/smbd
Author: gd Date: 2006-03-10 08:43:32 + (Fri, 10 Mar 2006) New Revision: 14130 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14130 Log: Remove make_server_info_pac alltogether, make_server_info_info3 does already do what we need. Guenther Modified: branches/SAMBA_3_0/source/auth/auth_util.c branches/SAMBA_3_0/source/smbd/sesssetup.c trunk/source/auth/auth_util.c trunk/source/smbd/sesssetup.c Changeset: Modified: branches/SAMBA_3_0/source/auth/auth_util.c === --- branches/SAMBA_3_0/source/auth/auth_util.c 2006-03-10 08:26:40 UTC (rev 14129) +++ branches/SAMBA_3_0/source/auth/auth_util.c 2006-03-10 08:43:32 UTC (rev 14130) @@ -1088,95 +1088,6 @@ /*** - Make (and fill) a user_info struct from a Kerberos PAC logon_info by - conversion to a struct samu -***/ - -NTSTATUS make_server_info_pac(auth_serversupplied_info **server_info, - char *unix_username, - struct passwd *pwd, - PAC_LOGON_INFO *logon_info) -{ - NTSTATUS status; - struct samu *sampass = NULL; - DOM_SID user_sid, group_sid; - fstring dom_name; - auth_serversupplied_info *result; - int i; - - if ( !(sampass = samu_new( NULL )) ) { - return NT_STATUS_NO_MEMORY; - } - - status = samu_set_unix( sampass, pwd ); - if ( !NT_STATUS_IS_OK(status) ) { - return status; - } - - result = make_server_info(NULL); - if (result == NULL) { - TALLOC_FREE(sampass); - return NT_STATUS_NO_MEMORY; - } - - /* only copy user_sid, group_sid and domain name out of the PAC for -* now, we will benefit from more later - Guenther */ - - sid_copy(user_sid, logon_info-info3.dom_sid.sid); - sid_append_rid(user_sid, logon_info-info3.user_rid); - pdb_set_user_sid(sampass, user_sid, PDB_SET); - - sid_copy(group_sid, logon_info-info3.dom_sid.sid); - sid_append_rid(group_sid, logon_info-info3.group_rid); - pdb_set_group_sid(sampass, group_sid, PDB_SET); - - unistr2_to_ascii(dom_name, logon_info-info3.uni_logon_dom, -1); - pdb_set_domain(sampass, dom_name, PDB_SET); - - pdb_set_logon_count(sampass, logon_info-info3.logon_count, PDB_SET); - - result-sam_account = sampass; - result-unix_name = talloc_strdup(result, unix_username); - result-uid = pwd-pw_uid; - result-gid = pwd-pw_gid; - - result-sids = NULL; - result-num_sids = 0; - - /* and create (by appending rids) the 'domain' sids */ - - for (i = 0; i logon_info-info3.num_groups2; i++) { - DOM_SID sid; - if (!sid_compose(sid, logon_info-info3.dom_sid.sid, -logon_info-info3.gids[i].g_rid)) { - DEBUG(3,(could not append additional group rid -0x%x\n, logon_info-info3.gids[i].g_rid)); - TALLOC_FREE(result); - return NT_STATUS_INVALID_PARAMETER; - } - add_sid_to_array(result, sid, result-sids, -result-num_sids); - } - - /* Copy 'other' sids. We need to do sid filtering here to - prevent possible elevation of privileges. See: - - http://www.microsoft.com/windows2000/techinfo/administration/security/sidfilter.asp - */ - - for (i = 0; i logon_info-info3.num_other_sids; i++) { - add_sid_to_array(result, logon_info-info3.other_sids[i].sid, -result-sids, -result-num_sids); - } - - *server_info = result; - - return NT_STATUS_OK; -} - - -/*** Make (and fill) a user_info struct from a 'struct passwd' by conversion to a struct samu ***/ Modified: branches/SAMBA_3_0/source/smbd/sesssetup.c === --- branches/SAMBA_3_0/source/smbd/sesssetup.c 2006-03-10 08:26:40 UTC (rev 14129) +++ branches/SAMBA_3_0/source/smbd/sesssetup.c 2006-03-10 08:43:32 UTC (rev 14130) @@ -316,10 +316,10 @@ if ( map_domainuser_to_guest ) { make_server_info_guest(server_info); } else if (logon_info) { - ret = make_server_info_pac(server_info, real_username, pw, logon_info); - + ret = make_server_info_info3(mem_ctx, real_username, real_username, domain, +
svn commit: samba r14131 - branches/SAMBA_3_0/source/lib branches/SAMBA_4_0/source/lib/talloc trunk/source/lib
Author: vlendec Date: 2006-03-10 08:47:59 + (Fri, 10 Mar 2006) New Revision: 14131 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14131 Log: Fix Coverity bug # 127 Modified: branches/SAMBA_3_0/source/lib/talloc.c branches/SAMBA_4_0/source/lib/talloc/talloc.c trunk/source/lib/talloc.c Changeset: Modified: branches/SAMBA_3_0/source/lib/talloc.c === --- branches/SAMBA_3_0/source/lib/talloc.c 2006-03-10 08:43:32 UTC (rev 14130) +++ branches/SAMBA_3_0/source/lib/talloc.c 2006-03-10 08:47:59 UTC (rev 14131) @@ -1026,11 +1026,13 @@ { char *ret; size_t olen = strlen(orig); - size_t alenz = strlen(append) + 1; + size_t alenz; if (!append) return orig; + alenz = strlen(append) + 1; + ret = talloc_realloc(t, orig, char, olen + alenz); if (!ret) return NULL; Modified: branches/SAMBA_4_0/source/lib/talloc/talloc.c === --- branches/SAMBA_4_0/source/lib/talloc/talloc.c 2006-03-10 08:43:32 UTC (rev 14130) +++ branches/SAMBA_4_0/source/lib/talloc/talloc.c 2006-03-10 08:47:59 UTC (rev 14131) @@ -960,11 +960,13 @@ { char *ret; size_t olen = strlen(orig); - size_t alenz = strlen(append) + 1; + size_t alenz; if (!append) return orig; + alenz = strlen(append) + 1; + ret = talloc_realloc(t, orig, char, olen + alenz); if (!ret) return NULL; Modified: trunk/source/lib/talloc.c === --- trunk/source/lib/talloc.c 2006-03-10 08:43:32 UTC (rev 14130) +++ trunk/source/lib/talloc.c 2006-03-10 08:47:59 UTC (rev 14131) @@ -1026,11 +1026,13 @@ { char *ret; size_t olen = strlen(orig); - size_t alenz = strlen(append) + 1; + size_t alenz; if (!append) return orig; + alenz = strlen(append) + 1; + ret = talloc_realloc(t, orig, char, olen + alenz); if (!ret) return NULL;
svn commit: samba r14132 - branches/SAMBA_3_0/source/services trunk/source/services
Author: vlendec Date: 2006-03-10 08:53:15 + (Fri, 10 Mar 2006) New Revision: 14132 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14132 Log: Fix Coverity bug # 150. Jerry, you might want to check this. Thanks Volker Modified: branches/SAMBA_3_0/source/services/services_db.c trunk/source/services/services_db.c Changeset: Modified: branches/SAMBA_3_0/source/services/services_db.c === --- branches/SAMBA_3_0/source/services/services_db.c2006-03-10 08:47:59 UTC (rev 14131) +++ branches/SAMBA_3_0/source/services/services_db.c2006-03-10 08:53:15 UTC (rev 14132) @@ -160,7 +160,7 @@ while ( isspace(*begin) ) begin++; - if ( !begin ) + if ( *begin == '\0' ) return NULL; /* trim any trailing whitespace or carriage returns. Modified: trunk/source/services/services_db.c === --- trunk/source/services/services_db.c 2006-03-10 08:47:59 UTC (rev 14131) +++ trunk/source/services/services_db.c 2006-03-10 08:53:15 UTC (rev 14132) @@ -160,7 +160,7 @@ while ( isspace(*begin) ) begin++; - if ( !begin ) + if ( *begin == '\0' ) return NULL; /* trim any trailing whitespace or carriage returns.
svn commit: samba r14133 - branches/SAMBA_3_0/source/libsmb trunk/source/libsmb
Author: vlendec Date: 2006-03-10 08:56:13 + (Fri, 10 Mar 2006) New Revision: 14133 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14133 Log: Fix Coverity bug # 140 Modified: branches/SAMBA_3_0/source/libsmb/clidfs.c trunk/source/libsmb/clidfs.c Changeset: Modified: branches/SAMBA_3_0/source/libsmb/clidfs.c === --- branches/SAMBA_3_0/source/libsmb/clidfs.c 2006-03-10 08:53:15 UTC (rev 14132) +++ branches/SAMBA_3_0/source/libsmb/clidfs.c 2006-03-10 08:56:13 UTC (rev 14133) @@ -585,11 +585,11 @@ SMB_STRUCT_STAT sbuf; uint32 attributes; - *targetcli = NULL; - if ( !rootcli || !path || !targetcli ) return False; + *targetcli = NULL; + /* send a trans2_query_path_info to check for a referral */ clean_path( cleanpath, path ); Modified: trunk/source/libsmb/clidfs.c === --- trunk/source/libsmb/clidfs.c2006-03-10 08:53:15 UTC (rev 14132) +++ trunk/source/libsmb/clidfs.c2006-03-10 08:56:13 UTC (rev 14133) @@ -585,11 +585,11 @@ SMB_STRUCT_STAT sbuf; uint32 attributes; - *targetcli = NULL; - if ( !rootcli || !path || !targetcli ) return False; + *targetcli = NULL; + /* send a trans2_query_path_info to check for a referral */ clean_path( cleanpath, path );
svn commit: samba r14134 - branches/SAMBA_3_0/source/rpc_parse trunk/source/rpc_parse
Author: vlendec Date: 2006-03-10 09:07:03 + (Fri, 10 Mar 2006) New Revision: 14134 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14134 Log: Fix Coverity bug # 137 Modified: branches/SAMBA_3_0/source/rpc_parse/parse_lsa.c trunk/source/rpc_parse/parse_lsa.c Changeset: Modified: branches/SAMBA_3_0/source/rpc_parse/parse_lsa.c === --- branches/SAMBA_3_0/source/rpc_parse/parse_lsa.c 2006-03-10 08:56:13 UTC (rev 14133) +++ branches/SAMBA_3_0/source/rpc_parse/parse_lsa.c 2006-03-10 09:07:03 UTC (rev 14134) @@ -567,10 +567,16 @@ /* allocate container memory */ out-domlist = TALLOC_P( ctx, DOMAIN_LIST ); + + if ( !out-domlist ) { + out-status = NT_STATUS_NO_MEMORY; + return; + } + out-domlist-domains = TALLOC_ARRAY( ctx, DOMAIN_INFO, out-count ); - if ( !out-domlist || !out-domlist-domains ) { + if ( !out-domlist-domains ) { out-status = NT_STATUS_NO_MEMORY; return; } Modified: trunk/source/rpc_parse/parse_lsa.c === --- trunk/source/rpc_parse/parse_lsa.c 2006-03-10 08:56:13 UTC (rev 14133) +++ trunk/source/rpc_parse/parse_lsa.c 2006-03-10 09:07:03 UTC (rev 14134) @@ -567,10 +567,16 @@ /* allocate container memory */ out-domlist = TALLOC_P( ctx, DOMAIN_LIST ); + + if ( !out-domlist ) { + out-status = NT_STATUS_NO_MEMORY; + return; + } + out-domlist-domains = TALLOC_ARRAY( ctx, DOMAIN_INFO, out-count ); - if ( !out-domlist || !out-domlist-domains ) { + if ( !out-domlist-domains ) { out-status = NT_STATUS_NO_MEMORY; return; }
svn commit: samba r14135 - branches/SAMBA_3_0/source/utils trunk/source/utils
Author: jmcd Date: 2006-03-10 09:41:08 + (Fri, 10 Mar 2006) New Revision: 14135 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14135 Log: Fix for Coverity #123: resource leak. Also rework much of the code to make it cleaner. There's still more to do on this... Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c trunk/source/utils/net_rpc_samsync.c Changeset: Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c === --- branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-03-10 09:07:03 UTC (rev 14134) +++ branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-03-10 09:41:08 UTC (rev 14135) @@ -1710,14 +1710,14 @@ char *ldif_file; fstring sid, domainname; uint32 sync_context = 0; - NTSTATUS result; + NTSTATUS ret = NT_STATUS_OK, result; int k; TALLOC_CTX *mem_ctx; SAM_DELTA_HDR *hdr_deltas; SAM_DELTA_CTR *deltas; uint32 num_deltas; const char *add_ldif = /tmp/add.ldif, *mod_ldif = /tmp/mod.ldif; - FILE *add_fd, *mod_fd, *ldif_fd; + FILE *add_fd = NULL, *mod_fd = NULL, *ldif_fd = NULL; char sys_cmd[1024]; int num_alloced = 0, g_index = 0, a_index = 0, sys_cmd_result; @@ -1739,22 +1739,29 @@ else ldif_file = talloc_strdup(mem_ctx, /tmp/tmp.ldif); - if (ldif_file == NULL) - return NT_STATUS_NO_MEMORY; + if (ldif_file == NULL) { + ret = NT_STATUS_NO_MEMORY; + goto done; + } /* Open the add and mod ldif files */ - add_fd = fopen(add_ldif, a); - mod_fd = fopen(mod_ldif, a); - if (add_fd == NULL || mod_fd == NULL) { + if (!(add_fd = fopen(add_ldif, a))) { DEBUG(1, (Could not open %s\n, add_ldif)); - return NT_STATUS_UNSUCCESSFUL; + ret = NT_STATUS_UNSUCCESSFUL; + goto done; + } + if (!(mod_fd = fopen(mod_ldif, a))) { + DEBUG(1, (Could not open %s\n, mod_ldif)); + ret = NT_STATUS_UNSUCCESSFUL; + goto done; } /* Open the user's ldif file */ ldif_fd = fopen(ldif_file, a); if (ldif_fd == NULL) { DEBUG(1, (Could not open %s\n, ldif_file)); - return NT_STATUS_UNSUCCESSFUL; + ret = NT_STATUS_UNSUCCESSFUL; + goto done; } /* Get the sid */ @@ -1779,7 +1786,8 @@ accountmap = SMB_MALLOC_ARRAY(ACCOUNTMAP, 8); if (groupmap == NULL || accountmap == NULL) { DEBUG(1,(GROUPMAP malloc failed\n)); - return NT_STATUS_NO_MEMORY; + ret = NT_STATUS_NO_MEMORY; + goto done; } /* Initialize the arrays */ @@ -1821,7 +1829,8 @@ deltas); if (!NT_STATUS_IS_OK(result) !NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES)) { - return NT_STATUS_OK; + ret = NT_STATUS_OK; + goto done; /* is this correct? jmcd */ } /* Re-allocate memory for groupmap and accountmap arrays */ @@ -1831,9 +1840,8 @@ num_deltas+num_alloced); if (groupmap == NULL || accountmap == NULL) { DEBUG(1,(GROUPMAP malloc failed\n)); - SAFE_FREE(groupmap); - SAFE_FREE(accountmap); - return NT_STATUS_NO_MEMORY; + ret = NT_STATUS_NO_MEMORY; + goto done; } /* Initialize the new records */ @@ -1925,7 +1933,9 @@ /* Close the ldif files */ fclose(add_fd); + add_fd = NULL; fclose(mod_fd); + mod_fd = NULL; /* Write ldif data to the user's file */ if (db_type == SAM_DATABASE_DOMAIN) { @@ -1946,7 +1956,8 @@ if (sys_cmd_result) { d_fprintf(stderr, %s failed. Error was (%s)\n, sys_cmd, strerror(errno)); - return NT_STATUS_UNSUCCESSFUL; + ret = NT_STATUS_UNSUCCESSFUL; + goto done; } if (db_type == SAM_DATABASE_DOMAIN) { fprintf(ldif_fd, @@ -1966,20 +1977,26 @@ if (sys_cmd_result) { d_fprintf(stderr, %s failed. Error was (%s)\n, sys_cmd, strerror(errno)); - return NT_STATUS_UNSUCCESSFUL; + ret = NT_STATUS_UNSUCCESSFUL; + goto done; } /* Delete the temporary ldif files */ - pstr_sprintf(sys_cmd, rm -f %s %s, add_ldif, mod_ldif); - sys_cmd_result = system(sys_cmd); -
svn commit: samba r14136 - in branches/SAMBA_4_0/source/librpc/rpc: .
Author: mimir Date: 2006-03-10 10:31:47 + (Fri, 10 Mar 2006) New Revision: 14136 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14136 Log: Fix bug causing segfaults in certain circumstances (gcc3.x among others, probably). Funny thing, it didn't segfault on my laptop and gcc4... rafal Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c === --- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c 2006-03-10 09:41:08 UTC (rev 14135) +++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c 2006-03-10 10:31:47 UTC (rev 14136) @@ -763,6 +763,8 @@ struct dcerpc_binding *binding; const struct dcerpc_interface_table *table; struct dcerpc_pipe *pipe; + struct policy_handle handle; + struct GUID guid; struct epm_twr_t twr; struct epm_twr_t *twr_r; struct epm_Map r; @@ -775,8 +777,6 @@ static void continue_epm_recv_binding(struct composite_context *ctx) { - struct policy_handle handle; - struct GUID guid; struct rpc_request *map_req; struct composite_context *c = talloc_get_type(ctx-async.private_data, @@ -787,8 +787,8 @@ c-status = dcerpc_pipe_connect_b_recv(ctx, c, s-pipe); if (!composite_is_ok(c)) return; - ZERO_STRUCT(handle); - ZERO_STRUCT(guid); + ZERO_STRUCT(s-handle); + ZERO_STRUCT(s-guid); s-binding-object = s-table-uuid; s-binding-object_version = s-table-if_version; @@ -797,11 +797,11 @@ if (!composite_is_ok(c)) return; /* with some nice pretty paper around it of course */ - s-r.in.object= guid; + s-r.in.object= s-guid; s-r.in.map_tower = s-twr; - s-r.in.entry_handle = handle; + s-r.in.entry_handle = s-handle; s-r.in.max_towers= 1; - s-r.out.entry_handle = handle; + s-r.out.entry_handle = s-handle; map_req = dcerpc_epm_Map_send(s-pipe, c, s-r); if (composite_nomem(map_req, c)) return;
svn commit: samba r14137 - in branches/SAMBA_4_0/source/librpc/rpc: .
Author: metze Date: 2006-03-10 10:54:37 + (Fri, 10 Mar 2006) New Revision: 14137 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14137 Log: move **p2 to the _recv function for setup the second pipe metze Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c branches/SAMBA_4_0/source/librpc/rpc/dcerpc_schannel.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c === --- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c 2006-03-10 10:31:47 UTC (rev 14136) +++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c 2006-03-10 10:54:37 UTC (rev 14137) @@ -966,7 +966,7 @@ struct sec_conn_state { struct dcerpc_pipe *pipe; - struct dcerpc_pipe **pipe2; + struct dcerpc_pipe *pipe2; struct dcerpc_binding *binding; struct smbcli_tree *tree; }; @@ -978,9 +978,7 @@ static void continue_pipe_open(struct composite_context *c); -struct composite_context* dcerpc_secondary_connection_send(TALLOC_CTX *mem_ctx, - struct dcerpc_pipe *p, - struct dcerpc_pipe **p2, +struct composite_context* dcerpc_secondary_connection_send(struct dcerpc_pipe *p, struct dcerpc_binding *b) { struct composite_context *c; @@ -989,9 +987,11 @@ struct composite_context *pipe_tcp_req; struct composite_context *pipe_ncalrpc_req; - c = talloc_zero(mem_ctx, struct composite_context); + c = talloc_zero(p, struct composite_context); if (c == NULL) return NULL; + c-event_ctx = p-conn-event_ctx; + s = talloc_zero(c, struct sec_conn_state); if (s == NULL) { composite_error(c, NT_STATUS_NO_MEMORY); @@ -1002,17 +1002,11 @@ c-private_data = s; s-pipe = p; - s-pipe2= p2; s-binding = b; - (*s-pipe2) = dcerpc_pipe_init(s-pipe, s-pipe-conn-event_ctx); - if (s-pipe2 == NULL) { - composite_error(c, NT_STATUS_NO_MEMORY); - return c; - } + s-pipe2 = dcerpc_pipe_init(c, s-pipe-conn-event_ctx); + if (composite_nomem(s-pipe2, c)) return c; - c-event_ctx = (*s-pipe2)-conn-event_ctx; - switch (s-pipe-conn-transport.transport) { case NCACN_NP: s-tree = dcerpc_smb_tree(s-pipe-conn); @@ -1021,7 +1015,7 @@ return c; } - pipe_smb_req = dcerpc_pipe_open_smb_send((*s-pipe2)-conn, s-tree, + pipe_smb_req = dcerpc_pipe_open_smb_send(s-pipe2-conn, s-tree, s-binding-endpoint); if (composite_nomem(pipe_smb_req, c)) return c; @@ -1029,7 +1023,7 @@ return c; case NCACN_IP_TCP: - pipe_tcp_req = dcerpc_pipe_open_tcp_send((*s-pipe2)-conn, + pipe_tcp_req = dcerpc_pipe_open_tcp_send(s-pipe2-conn, s-binding-host, atoi(s-binding-endpoint)); if (composite_nomem(pipe_tcp_req, c)) return c; @@ -1038,7 +1032,7 @@ return c; case NCALRPC: - pipe_ncalrpc_req = dcerpc_pipe_open_pipe_send((*s-pipe2)-conn, + pipe_ncalrpc_req = dcerpc_pipe_open_pipe_send(s-pipe2-conn, s-binding-endpoint); if (composite_nomem(pipe_ncalrpc_req, c)) return c; @@ -1057,14 +1051,9 @@ { struct composite_context *c = talloc_get_type(ctx-async.private_data, struct composite_context); - struct sec_conn_state *s = talloc_get_type(c-private_data, - struct sec_conn_state); c-status = dcerpc_pipe_open_smb_recv(ctx); - if (!composite_is_ok(c)) { - talloc_free(*s-pipe2); - return; - } + if (!composite_is_ok(c)) return; continue_pipe_open(c); } @@ -1074,14 +1063,9 @@ { struct composite_context *c = talloc_get_type(ctx-async.private_data, struct composite_context); - struct sec_conn_state *s = talloc_get_type(c-private_data, - struct sec_conn_state); c-status = dcerpc_pipe_open_tcp_recv(ctx); - if (!composite_is_ok(c)) { - talloc_free(*s-pipe2); - return; - } + if (!composite_is_ok(c)) return; continue_pipe_open(c); } @@ -1091,14 +1075,9 @@ { struct composite_context *c =
svn commit: samba r14138 - in branches/SAMBA_4_0/source/include: .
Author: metze Date: 2006-03-10 10:55:33 + (Fri, 10 Mar 2006) New Revision: 14138 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14138 Log: this isn't needed metze Modified: branches/SAMBA_4_0/source/include/structs.h Changeset: Modified: branches/SAMBA_4_0/source/include/structs.h === --- branches/SAMBA_4_0/source/include/structs.h 2006-03-10 10:54:37 UTC (rev 14137) +++ branches/SAMBA_4_0/source/include/structs.h 2006-03-10 10:55:33 UTC (rev 14138) @@ -98,8 +98,6 @@ struct libnet_context; struct libnet_JoinDomain; -struct pipe_connect_state; - struct clilist_file_info; struct netr_LMSessionKey;
svn commit: samba r14139 - in branches/SAMBA_4_0/source/build/smb_build: .
Author: jelmer Date: 2006-03-10 11:25:19 + (Fri, 10 Mar 2006) New Revision: 14139 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14139 Log: Fix issue with undefined variables. Modified: branches/SAMBA_4_0/source/build/smb_build/TODO branches/SAMBA_4_0/source/build/smb_build/makefile.pm Changeset: Modified: branches/SAMBA_4_0/source/build/smb_build/TODO === --- branches/SAMBA_4_0/source/build/smb_build/TODO 2006-03-10 10:55:33 UTC (rev 14138) +++ branches/SAMBA_4_0/source/build/smb_build/TODO 2006-03-10 11:25:19 UTC (rev 14139) @@ -4,8 +4,9 @@ - saner names for some of the .pc files - .pc files also when there is a public header? - get rid of include/structs.h and include/proto.h + - support including a custom header by librpc/gen_ndr/*.c files +- plugin loading support in ldb - add register function to smbtorture -- improve (un)install scripts (rewrite in perl?) - proper #include dependencies: for each subsystem: - include line in Makefile Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm === --- branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2006-03-10 10:55:33 UTC (rev 14138) +++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2006-03-10 11:25:19 UTC (rev 14139) @@ -538,15 +538,11 @@ push (@{$self-{pc_files}}, $path); - if (not defined($ctx-{CFLAGS}) ) { - $ctx-{CFLAGS} = []; - } - smb_build::env::PkgConfig($self, $path, $link_name, $ctx-{OUTPUT}, - join(' ', @{$ctx-{CFLAGS}}), + , $ctx-{MAJOR_VERSION}.$ctx-{MINOR_VERSION}.$ctx-{RELEASE_VERSION}, $ctx-{DESCRIPTION} );
svn commit: samba r14140 - in branches/SAMBA_4_0/source/torture: .
Author: metze Date: 2006-03-10 11:28:47 + (Fri, 10 Mar 2006) New Revision: 14140 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14140 Log: block SIGPIPE in smbtorture hopefully this fixed the problems with BASE-NEGNOWAIT metze Modified: branches/SAMBA_4_0/source/torture/torture.c Changeset: Modified: branches/SAMBA_4_0/source/torture/torture.c === --- branches/SAMBA_4_0/source/torture/torture.c 2006-03-10 11:25:19 UTC (rev 14139) +++ branches/SAMBA_4_0/source/torture/torture.c 2006-03-10 11:28:47 UTC (rev 14140) @@ -2598,6 +2598,9 @@ setbuffer(stdout, NULL, 0); #endif + /* we are never interested in SIGPIPE */ + BlockSignals(True,SIGPIPE); + pc = poptGetContext(smbtorture, argc, (const char **) argv, long_options, POPT_CONTEXT_KEEP_FIRST);
svn commit: samba r14141 - in branches/SAMBA_4_0/source/libcli/raw: .
Author: tridge Date: 2006-03-10 11:47:03 + (Fri, 10 Mar 2006) New Revision: 14141 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14141 Log: fixed bugzilla 2921, forcing correct alignment when in ascii mode Modified: branches/SAMBA_4_0/source/libcli/raw/rawfile.c Changeset: Modified: branches/SAMBA_4_0/source/libcli/raw/rawfile.c === --- branches/SAMBA_4_0/source/libcli/raw/rawfile.c 2006-03-10 11:28:47 UTC (rev 14140) +++ branches/SAMBA_4_0/source/libcli/raw/rawfile.c 2006-03-10 11:47:03 UTC (rev 14141) @@ -297,7 +297,7 @@ parms-ntcreatex.in.ea_list-eas); } - nt.in.params = data_blob_talloc(mem_ctx, NULL, 54); + nt.in.params = data_blob_talloc(mem_ctx, NULL, 53); if (nt.in.params.data == NULL) { talloc_free(mem_ctx); return NULL; @@ -319,7 +319,9 @@ SIVAL(params, 48, parms-ntcreatex.in.impersonation); SCVAL(params, 52, parms-ntcreatex.in.security_flags); SCVAL(params, 53, 0); - + + /* the empty string first forces the correct alignment */ + smbcli_blob_append_string(tree-session, mem_ctx, nt.in.params,, 0); fname_len = smbcli_blob_append_string(tree-session, mem_ctx, nt.in.params, parms-ntcreatex.in.fname, STR_TERMINATE);
svn commit: samba r14142 - in branches/SAMBA_4_0/source/smb_server/smb: .
Author: tridge Date: 2006-03-10 11:49:38 + (Fri, 10 Mar 2006) New Revision: 14142 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14142 Log: fixed ascii padding of nttrans create in server too Modified: branches/SAMBA_4_0/source/smb_server/smb/nttrans.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/smb/nttrans.c === --- branches/SAMBA_4_0/source/smb_server/smb/nttrans.c 2006-03-10 11:47:03 UTC (rev 14141) +++ branches/SAMBA_4_0/source/smb_server/smb/nttrans.c 2006-03-10 11:49:38 UTC (rev 14142) @@ -136,8 +136,8 @@ io-ntcreatex.in.ea_list = NULL; req_pull_string(req, io-ntcreatex.in.fname, - params + 54, - trans-in.params.length - 54, + params + 53, + MIN(fname_len+1, trans-in.params.length - 53), STR_NO_RANGE_CHECK | STR_TERMINATE); if (!io-ntcreatex.in.fname) { return NT_STATUS_INVALID_PARAMETER;
svn commit: samba r14143 - in branches/SAMBA_4_0/source/librpc/rpc: .
Author: mimir Date: 2006-03-10 12:59:05 + (Fri, 10 Mar 2006) New Revision: 14143 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14143 Log: Replace old function with equivalent based on new async code. rafal Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c === --- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c 2006-03-10 11:49:38 UTC (rev 14142) +++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c 2006-03-10 12:59:05 UTC (rev 14143) @@ -1205,80 +1205,17 @@ /* - perform an authenticated bind if needed + perform an authenticated bind if needed - sync version */ NTSTATUS dcerpc_pipe_auth(struct dcerpc_pipe *p, struct dcerpc_binding *binding, const struct dcerpc_interface_table *table, struct cli_credentials *credentials) { - NTSTATUS status; - TALLOC_CTX *tmp_ctx; - tmp_ctx = talloc_new(p); + struct composite_context *c; - p-conn-flags = binding-flags; - - /* remember the binding string for possible secondary connections */ - p-conn-binding_string = dcerpc_binding_string(p, binding); - - if (!cli_credentials_is_anonymous(credentials) - (binding-flags DCERPC_SCHANNEL) - !cli_credentials_get_netlogon_creds(credentials)) { - - /* If we don't already have netlogon credentials for -* the schannel bind, then we have to get these -* first */ - status = dcerpc_bind_auth_schannel(tmp_ctx, p, table, credentials, - dcerpc_auth_level(p-conn)); - } else if (!cli_credentials_is_anonymous(credentials) - !(p-conn-transport.transport == NCACN_NP - !(binding-flags DCERPC_SIGN) - !(binding-flags DCERPC_SEAL))) { - - /* Perform an authenticated DCE-RPC bind, except where -* we ask for a connection on NCACN_NP, and that -* connection is not signed or sealed. For that case -* we rely on the already authenicated CIFS connection -*/ - - uint8_t auth_type; - - if ((p-conn-flags (DCERPC_SIGN|DCERPC_SEAL)) == 0) { - /* - we are doing an authenticated connection, - but not using sign or seal. We must force - the CONNECT dcerpc auth type as a NONE auth - type doesn't allow authentication - information to be passed. - */ - p-conn-flags |= DCERPC_CONNECT; - } - - if (binding-flags DCERPC_AUTH_SPNEGO) { - auth_type = DCERPC_AUTH_TYPE_SPNEGO; - } else if (binding-flags DCERPC_AUTH_KRB5) { - auth_type = DCERPC_AUTH_TYPE_KRB5; - } else if (binding-flags DCERPC_SCHANNEL) { - auth_type = DCERPC_AUTH_TYPE_SCHANNEL; - } else { - auth_type = DCERPC_AUTH_TYPE_NTLMSSP; - } - - status = dcerpc_bind_auth(p, table, - credentials, auth_type, - dcerpc_auth_level(p-conn), - table-authservices-names[0]); - } else { - status = dcerpc_bind_auth_none(p, table); - } - - if (!NT_STATUS_IS_OK(status)) { - char *uuid_str = GUID_string(p, table-uuid); - DEBUG(0,(Failed to bind to uuid %s - %s\n, uuid_str, nt_errstr(status))); - talloc_free(uuid_str); - } - talloc_free(tmp_ctx); - return status; + c = dcerpc_pipe_auth_send(p, binding, table, credentials); + return dcerpc_pipe_auth_recv(c); }
svn commit: samba r14145 - branches/SAMBA_3_0/source/client branches/SAMBA_3_0/source/nsswitch trunk/source/client trunk/source/nsswitch
Author: gd Date: 2006-03-10 13:12:38 + (Fri, 10 Mar 2006) New Revision: 14145 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14145 Log: Add missing WITH_KCM hunks from my local tree. Guenther Modified: branches/SAMBA_3_0/source/client/smbspool.c branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c trunk/source/client/smbspool.c trunk/source/nsswitch/winbindd_ads.c Changeset: Modified: branches/SAMBA_3_0/source/client/smbspool.c === --- branches/SAMBA_3_0/source/client/smbspool.c 2006-03-10 13:01:08 UTC (rev 14144) +++ branches/SAMBA_3_0/source/client/smbspool.c 2006-03-10 13:12:38 UTC (rev 14145) @@ -299,15 +299,21 @@ static char * get_ticket_cache( uid_t uid ) { + char *ticket_file = NULL; + +#ifdef WITH_KCM + snprintf(ticket_file, CC_MAX_FILE_LEN, KCM:%d, uid ); + goto done; +#else + { SMB_STRUCT_DIR *tcdir; /* directory where ticket caches are stored */ SMB_STRUCT_DIRENT *dirent; /* directory entry */ char *filename = NULL; /* holds file names on the tmp directory */ SMB_STRUCT_STAT buf; char user_cache_prefix[CC_MAX_FILE_LEN]; char file_path[CC_MAX_FILE_PATH_LEN]; - char *ticket_file = NULL; time_t t = 0; - + snprintf(user_cache_prefix, CC_MAX_FILE_LEN, %s%d, CC_PREFIX, uid ); tcdir = sys_opendir( TICKET_CC_DIR ); if ( tcdir == NULL ) @@ -343,7 +349,11 @@ } sys_closedir(tcdir); + } +#endif +done: + if ( ticket_file == NULL ) { /* no ticket cache found */ Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c === --- branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c 2006-03-10 13:01:08 UTC (rev 14144) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c 2006-03-10 13:12:38 UTC (rev 14145) @@ -59,7 +59,11 @@ } /* we don't want this to affect the users ccache */ +#ifdef WITH_KCM + setenv(KRB5CCNAME, KCM:SYSTEM, 1); +#else setenv(KRB5CCNAME, MEMORY:winbind_ccache, 1); +#endif ads = ads_init(domain-alt_name, domain-name, NULL); if (!ads) { Modified: trunk/source/client/smbspool.c === --- trunk/source/client/smbspool.c 2006-03-10 13:01:08 UTC (rev 14144) +++ trunk/source/client/smbspool.c 2006-03-10 13:12:38 UTC (rev 14145) @@ -299,15 +299,21 @@ static char * get_ticket_cache( uid_t uid ) { + char *ticket_file = NULL; + +#ifdef WITH_KCM + snprintf(ticket_file, CC_MAX_FILE_LEN, KCM:%d, uid ); + goto done; +#else + { SMB_STRUCT_DIR *tcdir; /* directory where ticket caches are stored */ SMB_STRUCT_DIRENT *dirent; /* directory entry */ char *filename = NULL; /* holds file names on the tmp directory */ SMB_STRUCT_STAT buf; char user_cache_prefix[CC_MAX_FILE_LEN]; char file_path[CC_MAX_FILE_PATH_LEN]; - char *ticket_file = NULL; time_t t = 0; - + snprintf(user_cache_prefix, CC_MAX_FILE_LEN, %s%d, CC_PREFIX, uid ); tcdir = sys_opendir( TICKET_CC_DIR ); if ( tcdir == NULL ) @@ -343,7 +349,11 @@ } sys_closedir(tcdir); + } +#endif +done: + if ( ticket_file == NULL ) { /* no ticket cache found */ Modified: trunk/source/nsswitch/winbindd_ads.c === --- trunk/source/nsswitch/winbindd_ads.c2006-03-10 13:01:08 UTC (rev 14144) +++ trunk/source/nsswitch/winbindd_ads.c2006-03-10 13:12:38 UTC (rev 14145) @@ -59,7 +59,11 @@ } /* we don't want this to affect the users ccache */ +#ifdef WITH_KCM + setenv(KRB5CCNAME, KCM:SYSTEM, 1); +#else setenv(KRB5CCNAME, MEMORY:winbind_ccache, 1); +#endif ads = ads_init(domain-alt_name, domain-name, NULL); if (!ads) {
svn commit: samba r14147 - branches/SAMBA_3_0/source/utils trunk/source/utils
Author: jmcd Date: 2006-03-10 13:33:02 + (Fri, 10 Mar 2006) New Revision: 14147 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14147 Log: Fix coverity #119. alloc'ed memory returned not saved, so not freed. Need to go back and correct the assumption that an ldap xxx suffix parm must have an OU. Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c trunk/source/utils/net_rpc_samsync.c Changeset: Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c === --- branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-03-10 13:14:01 UTC (rev 14146) +++ branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-03-10 13:33:02 UTC (rev 14147) @@ -1076,11 +1076,15 @@ if (machine_suffix *machine_suffix strcmp(machine_suffix, user_suffix) strcmp(machine_suffix, suffix)) { - fprintf(add_fd, # %s\n, lp_ldap_machine_suffix()); - fprintf(add_fd, dn: %s\n, lp_ldap_machine_suffix()); + char *machine_ou = NULL; + fprintf(add_fd, # %s\n, machine_suffix); + fprintf(add_fd, dn: %s\n, machine_suffix); fprintf(add_fd, objectClass: organizationalUnit\n); - fprintf(add_fd, ou: %s\n, - sstring_sub(lp_ldap_machine_suffix(), '=', ',')); + /* this isn't totally correct as it assumes that + there _must_ be an ou. just fixing memleak now. jmcd */ + machine_ou = sstring_sub(lp_ldap_machine_suffix(), '=', ','); + fprintf(add_fd, ou: %s\n, machine_ou); + SAFE_FREE(machine_ou); fprintf(add_fd, \n); fflush(add_fd); } Modified: trunk/source/utils/net_rpc_samsync.c === --- trunk/source/utils/net_rpc_samsync.c2006-03-10 13:14:01 UTC (rev 14146) +++ trunk/source/utils/net_rpc_samsync.c2006-03-10 13:33:02 UTC (rev 14147) @@ -1076,11 +1076,15 @@ if (machine_suffix *machine_suffix strcmp(machine_suffix, user_suffix) strcmp(machine_suffix, suffix)) { - fprintf(add_fd, # %s\n, lp_ldap_machine_suffix()); - fprintf(add_fd, dn: %s\n, lp_ldap_machine_suffix()); + char *machine_ou = NULL; + fprintf(add_fd, # %s\n, machine_suffix); + fprintf(add_fd, dn: %s\n, machine_suffix); fprintf(add_fd, objectClass: organizationalUnit\n); - fprintf(add_fd, ou: %s\n, - sstring_sub(lp_ldap_machine_suffix(), '=', ',')); + /* this isn't totally correct as it assumes that + there _must_ be an ou. just fixing memleak now. jmcd */ + machine_ou = sstring_sub(lp_ldap_machine_suffix(), '=', ','); + fprintf(add_fd, ou: %s\n, machine_ou); + SAFE_FREE(machine_ou); fprintf(add_fd, \n); fflush(add_fd); }
svn commit: samba r14148 - branches/SAMBA_3_0/source branches/SAMBA_3_0/source/client branches/SAMBA_3_0/source/nsswitch trunk/source trunk/source/client trunk/source/nsswitch
Author: gd Date: 2006-03-10 13:36:39 + (Fri, 10 Mar 2006) New Revision: 14148 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14148 Log: Removing the not very well tested krb5 ticket refresh handling activated over --with-kcm. No time to look after it for the moment. Guenther Modified: branches/SAMBA_3_0/source/client/smbspool.c branches/SAMBA_3_0/source/configure.in branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c trunk/source/client/smbspool.c trunk/source/configure.in trunk/source/nsswitch/winbindd_ads.c trunk/source/nsswitch/winbindd_cred_cache.c trunk/source/nsswitch/winbindd_pam.c Changeset: Modified: branches/SAMBA_3_0/source/client/smbspool.c === --- branches/SAMBA_3_0/source/client/smbspool.c 2006-03-10 13:33:02 UTC (rev 14147) +++ branches/SAMBA_3_0/source/client/smbspool.c 2006-03-10 13:36:39 UTC (rev 14148) @@ -300,12 +300,6 @@ char * get_ticket_cache( uid_t uid ) { char *ticket_file = NULL; - -#ifdef WITH_KCM - snprintf(ticket_file, CC_MAX_FILE_LEN, KCM:%d, uid ); - goto done; -#else - { SMB_STRUCT_DIR *tcdir; /* directory where ticket caches are stored */ SMB_STRUCT_DIRENT *dirent; /* directory entry */ char *filename = NULL; /* holds file names on the tmp directory */ @@ -349,11 +343,7 @@ } sys_closedir(tcdir); - } -#endif -done: - if ( ticket_file == NULL ) { /* no ticket cache found */ Modified: branches/SAMBA_3_0/source/configure.in === --- branches/SAMBA_3_0/source/configure.in 2006-03-10 13:33:02 UTC (rev 14147) +++ branches/SAMBA_3_0/source/configure.in 2006-03-10 13:36:39 UTC (rev 14148) @@ -3529,29 +3529,6 @@ fi # -# check for KCM support - -with_kcm_support=no -AC_MSG_CHECKING([for KCM support]) - -AC_ARG_WITH(kcm, -[ --with-kcm KCM support (default no)], -[ case $withval in -yes) - if test x$FOUND_KRB5 = xno; then - AC_MSG_ERROR(libkrb5 is needed for KCM support) - fi - with_kcm_support=$withval - AC_DEFINE(WITH_KCM,1,[Whether to include KCM support]) - ;; -*) - with_kcm_support=no - AC_DEFINE(WITH_KCM,0,[Whether to include KCM support]) - ;; - esac ]) - -AC_MSG_RESULT($with_kcm_support) -# # check for automount support AC_MSG_CHECKING(whether to use automount) AC_ARG_WITH(automount, Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c === --- branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c 2006-03-10 13:33:02 UTC (rev 14147) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c 2006-03-10 13:36:39 UTC (rev 14148) @@ -59,11 +59,7 @@ } /* we don't want this to affect the users ccache */ -#ifdef WITH_KCM - setenv(KRB5CCNAME, KCM:SYSTEM, 1); -#else setenv(KRB5CCNAME, MEMORY:winbind_ccache, 1); -#endif ads = ads_init(domain-alt_name, domain-name, NULL); if (!ads) { Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c === --- branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c2006-03-10 13:33:02 UTC (rev 14147) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c2006-03-10 13:36:39 UTC (rev 14148) @@ -228,8 +228,6 @@ new_entry-uid = uid; -#ifndef WITH_KCM /* no point in doing the refresh in KCM and by ourself */ - if (schedule_refresh_event renew_until 0) { struct timeval t = timeval_set((ticket_end -1 ), 0); @@ -240,7 +238,6 @@ krb5_ticket_refresh_handler, new_entry); } -#endif /* WITH_KCM */ DLIST_ADD(ccache_list, new_entry); Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c === --- branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c 2006-03-10 13:33:02 UTC (rev 14147) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c 2006-03-10 13:36:39 UTC (rev 14148) @@ -313,7 +313,7 @@ uid_t uid, BOOL *internal_ccache) { - /* accept KCM, FILE and WRFILE as krb5_cc_type from the client and then + /* accept FILE and WRFILE as krb5_cc_type from the client and then * build the full ccname string based on the user's uid here - * Guenther*/ @@ -333,10 +333,6 @@ gen_cc = talloc_asprintf(mem_ctx, FILE:/tmp/krb5cc_%d, uid); } else if
svn commit: samba r14149 - in branches/SAMBA_4_0: .
Author: jelmer Date: 2006-03-10 13:38:17 + (Fri, 10 Mar 2006) New Revision: 14149 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14149 Log: Add BUGS.txt (fixes #3523) Added: branches/SAMBA_4_0/BUGS.txt Changeset: Added: branches/SAMBA_4_0/BUGS.txt === --- branches/SAMBA_4_0/BUGS.txt 2006-03-10 13:36:39 UTC (rev 14148) +++ branches/SAMBA_4_0/BUGS.txt 2006-03-10 13:38:17 UTC (rev 14149) @@ -0,0 +1,6 @@ +Samba 4 is still feature incomplete. If you are using it for anything other +then education you are insane. + +Please file bug reports at https://bugzilla.samba.org/, product: Samba4. +Please include as much information as possible, such as SVN revision number +and backtraces. Property changes on: branches/SAMBA_4_0/BUGS.txt ___ Name: svn:eol-style + native
svn commit: samba r14150 - branches/SAMBA_3_0/source/utils trunk/source/utils
Author: jmcd Date: 2006-03-10 14:09:34 + (Fri, 10 Mar 2006) New Revision: 14150 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14150 Log: Fix coverity #118: not freeing alloc'ed storage returned from sstring_sub(). Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c trunk/source/utils/net_rpc_samsync.c Changeset: Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c === --- branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-03-10 13:38:17 UTC (rev 14149) +++ branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-03-10 14:09:34 UTC (rev 14150) @@ -1309,7 +1309,9 @@ fflush(add_fd); /* Deallocate memory, and return */ - if (suffix_attr != NULL) SAFE_FREE(suffix_attr); + SAFE_FREE(suffix_attr); + SAFE_FREE(user_attr); + SAFE_FREE(group_attr); return NT_STATUS_OK; } Modified: trunk/source/utils/net_rpc_samsync.c === --- trunk/source/utils/net_rpc_samsync.c2006-03-10 13:38:17 UTC (rev 14149) +++ trunk/source/utils/net_rpc_samsync.c2006-03-10 14:09:34 UTC (rev 14150) @@ -1309,7 +1309,9 @@ fflush(add_fd); /* Deallocate memory, and return */ - if (suffix_attr != NULL) SAFE_FREE(suffix_attr); + SAFE_FREE(suffix_attr); + SAFE_FREE(user_attr); + SAFE_FREE(group_attr); return NT_STATUS_OK; }
svn commit: samba r14151 - in branches/SAMBA_4_0/source/build/smb_build: .
Author: jelmer Date: 2006-03-10 14:13:04 + (Fri, 10 Mar 2006) New Revision: 14151 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14151 Log: Add simple script that writes a summary to show what libraries the user (might) be missing. Added: branches/SAMBA_4_0/source/build/smb_build/summary.pm Modified: branches/SAMBA_4_0/source/build/smb_build/TODO branches/SAMBA_4_0/source/build/smb_build/header.pm branches/SAMBA_4_0/source/build/smb_build/input.pm branches/SAMBA_4_0/source/build/smb_build/main.pl Changeset: Modified: branches/SAMBA_4_0/source/build/smb_build/TODO === --- branches/SAMBA_4_0/source/build/smb_build/TODO 2006-03-10 14:09:34 UTC (rev 14150) +++ branches/SAMBA_4_0/source/build/smb_build/TODO 2006-03-10 14:13:04 UTC (rev 14151) @@ -1,3 +1,4 @@ +- subdir handler for install headers into a specific directory - sonames - hack for loading modules locally - create Modified: branches/SAMBA_4_0/source/build/smb_build/header.pm === --- branches/SAMBA_4_0/source/build/smb_build/header.pm 2006-03-10 14:09:34 UTC (rev 14150) +++ branches/SAMBA_4_0/source/build/smb_build/header.pm 2006-03-10 14:13:04 UTC (rev 14151) @@ -2,6 +2,7 @@ # - create output for build.h # # Copyright (C) Stefan (metze) Metzmacher 2004 +# Copyright (C) Jelmer Vernooij 2005 # Released under the GNU GPL package header; Modified: branches/SAMBA_4_0/source/build/smb_build/input.pm === --- branches/SAMBA_4_0/source/build/smb_build/input.pm 2006-03-10 14:09:34 UTC (rev 14150) +++ branches/SAMBA_4_0/source/build/smb_build/input.pm 2006-03-10 14:13:04 UTC (rev 14151) @@ -33,10 +33,7 @@ sub check_subsystem($$$) { my ($INPUT, $subsys, $default_ot) = @_; - if ($subsys-{ENABLE} ne YES) { - printf(Subsystem `%s' disabled\n,$subsys-{NAME}); - return; - } + return if ($subsys-{ENABLE} ne YES); unless(defined($subsys-{OUTPUT_TYPE})) { $subsys-{OUTPUT_TYPE} = $default_ot; @@ -60,11 +57,7 @@ return; } - if ($mod-{ENABLE} ne YES) - { - printf(Module `%s' disabled\n,$mod-{NAME}); - return; - } + return if ($mod-{ENABLE} ne YES); if (exists($INPUT-{$mod-{SUBSYSTEM}}{INIT_FUNCTION_TYPE})) { $mod-{INIT_FUNCTION_TYPE} = $INPUT-{$mod-{SUBSYSTEM}}{INIT_FUNCTION_TYPE}; @@ -91,10 +84,7 @@ { my ($INPUT, $lib, $default_ot) = @_; - if ($lib-{ENABLE} ne YES) { - printf(Library `%s' disabled\n,$lib-{NAME}); - return; - } + return if ($lib-{ENABLE} ne YES); $lib-{OUTPUT_TYPE} = $default_ot; @@ -114,10 +104,7 @@ { my ($INPUT, $bin) = @_; - if ($bin-{ENABLE} ne YES) { - printf(Binary `%s' disabled\n,$bin-{NAME}); - return; - } + return if ($bin-{ENABLE} ne YES); ($bin-{BINARY} = (lc $bin-{NAME})) if not defined($bin-{BINARY}); Modified: branches/SAMBA_4_0/source/build/smb_build/main.pl === --- branches/SAMBA_4_0/source/build/smb_build/main.pl 2006-03-10 14:09:34 UTC (rev 14150) +++ branches/SAMBA_4_0/source/build/smb_build/main.pl 2006-03-10 14:13:04 UTC (rev 14151) @@ -12,6 +12,7 @@ use smb_build::output; use smb_build::env; use smb_build::cflags; +use smb_build::summary; use config; use strict; @@ -81,4 +82,6 @@ cflags::create_cflags($OUTPUT, extra_cflags.txt); +summary::show($OUTPUT, \%config::config); + 1; Added: branches/SAMBA_4_0/source/build/smb_build/summary.pm === --- branches/SAMBA_4_0/source/build/smb_build/summary.pm2006-03-10 14:09:34 UTC (rev 14150) +++ branches/SAMBA_4_0/source/build/smb_build/summary.pm2006-03-10 14:13:04 UTC (rev 14151) @@ -0,0 +1,51 @@ +# Samba Build System +# - write out summary +# +# Copyright (C) Jelmer Vernooij 2006 +# Released under the GNU GPL + +package summary; +use strict; + +sub showitem($$$) +{ + my ($output,$desc,$items) = @_; + + my @need = (); + + foreach (@$items) { + if ($output-{EXT_LIB_$_}-{ENABLE} ne YES) { + push (@need, $_); + } + } + + print Support for $desc: ; + if ($#need 0) { + print no (install . join(',',@need) . )\n; + } else { + print yes\n; + } +} + +sub show($$) +{ + my ($output,$config) = @_; + print Summary:\n\n; + showitem($output, GTK+ frontends, [gtk,gconf]); + showitem($output, SSL in SWAT, [GNUTLS]); + showitem($output, threads in smbd, [PTHREAD]); + showitem($output,
svn commit: samba r14152 - branches/SAMBA_3_0/source/utils trunk/source/utils
Author: jmcd Date: 2006-03-10 14:14:23 + (Fri, 10 Mar 2006) New Revision: 14152 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14152 Log: Fix coverity #117: free storage alloc'ed by sstring_sub Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c trunk/source/utils/net_rpc_samsync.c Changeset: Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c === --- branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-03-10 14:13:04 UTC (rev 14151) +++ branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-03-10 14:14:23 UTC (rev 14152) @@ -1384,6 +1384,7 @@ group_attr, suffix); accountmap[7].rid = 551; pstr_sprintf(accountmap[7].cn, %s, Replicators); + SAFE_FREE(group_attr); return NT_STATUS_OK; } Modified: trunk/source/utils/net_rpc_samsync.c === --- trunk/source/utils/net_rpc_samsync.c2006-03-10 14:13:04 UTC (rev 14151) +++ trunk/source/utils/net_rpc_samsync.c2006-03-10 14:14:23 UTC (rev 14152) @@ -1384,6 +1384,7 @@ group_attr, suffix); accountmap[7].rid = 551; pstr_sprintf(accountmap[7].cn, %s, Replicators); + SAFE_FREE(group_attr); return NT_STATUS_OK; }
svn commit: samba r14153 - branches/SAMBA_3_0/source/utils trunk/source/utils
Author: jmcd Date: 2006-03-10 14:17:44 + (Fri, 10 Mar 2006) New Revision: 14153 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14153 Log: Fix coverity #116: free storage alloc'ed by sstring_sub() Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c trunk/source/utils/net_rpc_samsync.c Changeset: Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c === --- branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-03-10 14:14:23 UTC (rev 14152) +++ branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-03-10 14:17:44 UTC (rev 14153) @@ -1412,6 +1412,7 @@ strcmp(groupname, Print Operators) == 0 || strcmp(groupname, Backup Operators) == 0 || strcmp(groupname, Replicators) == 0) { + SAFE_FREE(group_attr); return NT_STATUS_OK; } else { /* Increment the gid for the new group */ @@ -1441,6 +1442,7 @@ fprintf(add_fd, \n); fflush(add_fd); + SAFE_FREE(group_attr); /* Return */ return NT_STATUS_OK; } Modified: trunk/source/utils/net_rpc_samsync.c === --- trunk/source/utils/net_rpc_samsync.c2006-03-10 14:14:23 UTC (rev 14152) +++ trunk/source/utils/net_rpc_samsync.c2006-03-10 14:17:44 UTC (rev 14153) @@ -1412,6 +1412,7 @@ strcmp(groupname, Print Operators) == 0 || strcmp(groupname, Backup Operators) == 0 || strcmp(groupname, Replicators) == 0) { + SAFE_FREE(group_attr); return NT_STATUS_OK; } else { /* Increment the gid for the new group */ @@ -1441,6 +1442,7 @@ fprintf(add_fd, \n); fflush(add_fd); + SAFE_FREE(group_attr); /* Return */ return NT_STATUS_OK; }
svn commit: samba r14154 - in branches/SAMBA_4_0/source/build/smb_build: .
Author: jelmer Date: 2006-03-10 14:18:10 + (Fri, 10 Mar 2006) New Revision: 14154 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14154 Log: Add summary line for extended attribute library Modified: branches/SAMBA_4_0/source/build/smb_build/summary.pm Changeset: Modified: branches/SAMBA_4_0/source/build/smb_build/summary.pm === --- branches/SAMBA_4_0/source/build/smb_build/summary.pm2006-03-10 14:17:44 UTC (rev 14153) +++ branches/SAMBA_4_0/source/build/smb_build/summary.pm2006-03-10 14:18:10 UTC (rev 14154) @@ -36,6 +36,7 @@ showitem($output, threads in smbd, [PTHREAD]); showitem($output, intelligent command line editing, [READLINE]); showitem($output, changing process titles, [SETPROCTITLE]); + showitem($output, using extended attributes, [XATTR]); print Using external popt: $output-{EXT_LIB_POPT}-{ENABLE}\n; print Using shared libraries internally (experimental): ;
svn commit: samba r14155 - branches/SAMBA_3_0/source/utils trunk/source/utils
Author: jmcd Date: 2006-03-10 14:20:09 + (Fri, 10 Mar 2006) New Revision: 14155 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14155 Log: Fix coverity #115: free storage alloc'ed by sstring_sub() Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c trunk/source/utils/net_rpc_samsync.c Changeset: Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c === --- branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-03-10 14:18:10 UTC (rev 14154) +++ branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-03-10 14:20:09 UTC (rev 14155) @@ -1636,6 +1636,7 @@ strcmp(aliasname, Print Operators) == 0 || strcmp(aliasname, Backup Operators) == 0 || strcmp(aliasname, Replicator) == 0) { + SAFE_FREE(group_attr); return NT_STATUS_OK; } else { /* Increment the gid for the new group */ @@ -1663,6 +1664,7 @@ fprintf(add_fd, \n); fflush(add_fd); + SAFE_FREE(group_attr); /* Return */ return NT_STATUS_OK; } Modified: trunk/source/utils/net_rpc_samsync.c === --- trunk/source/utils/net_rpc_samsync.c2006-03-10 14:18:10 UTC (rev 14154) +++ trunk/source/utils/net_rpc_samsync.c2006-03-10 14:20:09 UTC (rev 14155) @@ -1636,6 +1636,7 @@ strcmp(aliasname, Print Operators) == 0 || strcmp(aliasname, Backup Operators) == 0 || strcmp(aliasname, Replicator) == 0) { + SAFE_FREE(group_attr); return NT_STATUS_OK; } else { /* Increment the gid for the new group */ @@ -1663,6 +1664,7 @@ fprintf(add_fd, \n); fflush(add_fd); + SAFE_FREE(group_attr); /* Return */ return NT_STATUS_OK; }
svn commit: samba r14156 - branches/SAMBA_3_0/source/utils trunk/source/utils
Author: jmcd Date: 2006-03-10 14:28:51 + (Fri, 10 Mar 2006) New Revision: 14156 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14156 Log: Fix coverity #114: free storage alloc'ed by sstring_sub() Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c trunk/source/utils/net_rpc_samsync.c Changeset: Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c === --- branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-03-10 14:20:09 UTC (rev 14155) +++ branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-03-10 14:28:51 UTC (rev 14156) @@ -1455,7 +1455,7 @@ fstring hex_nt_passwd, hex_lm_passwd; fstring description, fullname, sambaSID; uchar lm_passwd[16], nt_passwd[16]; - char *flags; + char *flags, *user_rdn; const char* nopasswd = ; static uchar zero_buf[16]; uint32 rid = 0, group_rid = 0, gidNumber = 0; @@ -1551,10 +1551,11 @@ NEW_PW_FORMAT_SPACE_PADDED_LEN); /* Add the user to the temporary add ldif file */ - fprintf(add_fd, # %s, %s, %s\n, username, - sstring_sub(lp_ldap_user_suffix(), '=', ','), suffix); - fprintf(add_fd, dn: uid=%s,ou=%s,%s\n, username, - sstring_sub(lp_ldap_user_suffix(), '=', ','), suffix); + /* this isn't quite right...we can't assume there's just OU=. jmcd */ + user_rdn = sstring_sub(lp_ldap_user_suffix(), '=', ','); + fprintf(add_fd, # %s, %s, %s\n, username, user_rdn, suffix); + fprintf(add_fd, dn: uid=%s,ou=%s,%s\n, username, user_rdn, suffix); + SAFE_FREE(user_rdn); fprintf(add_fd, ObjectClass: top\n); fprintf(add_fd, objectClass: inetOrgPerson\n); fprintf(add_fd, objectClass: posixAccount\n); Modified: trunk/source/utils/net_rpc_samsync.c === --- trunk/source/utils/net_rpc_samsync.c2006-03-10 14:20:09 UTC (rev 14155) +++ trunk/source/utils/net_rpc_samsync.c2006-03-10 14:28:51 UTC (rev 14156) @@ -1455,7 +1455,7 @@ fstring hex_nt_passwd, hex_lm_passwd; fstring description, fullname, sambaSID; uchar lm_passwd[16], nt_passwd[16]; - char *flags; + char *flags, *user_rdn; const char* nopasswd = ; static uchar zero_buf[16]; uint32 rid = 0, group_rid = 0, gidNumber = 0; @@ -1551,10 +1551,11 @@ NEW_PW_FORMAT_SPACE_PADDED_LEN); /* Add the user to the temporary add ldif file */ - fprintf(add_fd, # %s, %s, %s\n, username, - sstring_sub(lp_ldap_user_suffix(), '=', ','), suffix); - fprintf(add_fd, dn: uid=%s,ou=%s,%s\n, username, - sstring_sub(lp_ldap_user_suffix(), '=', ','), suffix); + /* this isn't quite right...we can't assume there's just OU=. jmcd */ + user_rdn = sstring_sub(lp_ldap_user_suffix(), '=', ','); + fprintf(add_fd, # %s, %s, %s\n, username, user_rdn, suffix); + fprintf(add_fd, dn: uid=%s,ou=%s,%s\n, username, user_rdn, suffix); + SAFE_FREE(user_rdn); fprintf(add_fd, ObjectClass: top\n); fprintf(add_fd, objectClass: inetOrgPerson\n); fprintf(add_fd, objectClass: posixAccount\n);
svn commit: samba r14157 - in branches/SAMBA_4_0/source: ntvfs ntvfs/cifs ntvfs/ipc ntvfs/nbench ntvfs/posix ntvfs/print ntvfs/simple ntvfs/unixuid smb_server smb_server/smb
Author: metze Date: 2006-03-10 14:31:17 + (Fri, 10 Mar 2006) New Revision: 14157 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14157 Log: - pass a struct ntvfs_request to the ntvfs layer (for now we just do #define ntvfs_request smbsrv_request, but it's the first step...) - rename ntvfs_openfile() - ntvfs_open() - fix the talloc hierachie in some places in the ntvfs_map_*() code metze Modified: branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c branches/SAMBA_4_0/source/ntvfs/ipc/ipc_rap.c branches/SAMBA_4_0/source/ntvfs/ipc/rap_server.c branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c branches/SAMBA_4_0/source/ntvfs/nbench/vfs_nbench.c branches/SAMBA_4_0/source/ntvfs/ntvfs.h branches/SAMBA_4_0/source/ntvfs/ntvfs_base.c branches/SAMBA_4_0/source/ntvfs/ntvfs_generic.c branches/SAMBA_4_0/source/ntvfs/ntvfs_interface.c branches/SAMBA_4_0/source/ntvfs/ntvfs_util.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_acl.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_flush.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_fsinfo.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_ioctl.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_lock.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_mkdir.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_qfileinfo.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_read.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_rename.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_search.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_seek.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_setfileinfo.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_unlink.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_wait.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_write.c branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h branches/SAMBA_4_0/source/ntvfs/print/vfs_print.c branches/SAMBA_4_0/source/ntvfs/simple/svfs_util.c branches/SAMBA_4_0/source/ntvfs/simple/vfs_simple.c branches/SAMBA_4_0/source/ntvfs/unixuid/vfs_unixuid.c branches/SAMBA_4_0/source/smb_server/smb/nttrans.c branches/SAMBA_4_0/source/smb_server/smb/reply.c branches/SAMBA_4_0/source/smb_server/smb/trans2.c branches/SAMBA_4_0/source/smb_server/smb_server.h branches/SAMBA_4_0/source/smb_server/tcon.c Changeset: Sorry, the patch is too large (4686 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14157
svn commit: samba r14158 - in branches/SAMBA_3_0/source/libsmb: .
Author: ab Date: 2006-03-10 14:39:29 + (Fri, 10 Mar 2006) New Revision: 14158 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14158 Log: Fix coverity CID #147 -- do not dereference pointers before checking their existence Modified: branches/SAMBA_3_0/source/libsmb/libsmbclient.c Changeset: Modified: branches/SAMBA_3_0/source/libsmb/libsmbclient.c === --- branches/SAMBA_3_0/source/libsmb/libsmbclient.c 2006-03-10 14:31:17 UTC (rev 14157) +++ branches/SAMBA_3_0/source/libsmb/libsmbclient.c 2006-03-10 14:39:29 UTC (rev 14158) @@ -1282,8 +1282,8 @@ pstring path, targetpath; struct cli_state *targetcli; -offset = file-offset; /* See offset comment in smbc_read_ctx() */ - + /* First check all pointers before dereferencing them */ + if (!context || !context-internal || !context-internal-_initialized) { @@ -1308,6 +1308,8 @@ } +offset = file-offset; /* See offset comment in smbc_read_ctx() */ + /*d_printf(write: parsing %s\n, file-fname);*/ if (smbc_parse_path(context, file-fname, NULL, 0,
svn commit: samba r14159 - in trunk/source/libsmb: .
Author: ab Date: 2006-03-10 14:39:59 + (Fri, 10 Mar 2006) New Revision: 14159 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14159 Log: Fix coverity CID #147 -- do not dereference pointers before checking their existence Modified: trunk/source/libsmb/libsmbclient.c Changeset: Modified: trunk/source/libsmb/libsmbclient.c === --- trunk/source/libsmb/libsmbclient.c 2006-03-10 14:39:29 UTC (rev 14158) +++ trunk/source/libsmb/libsmbclient.c 2006-03-10 14:39:59 UTC (rev 14159) @@ -1282,8 +1282,8 @@ pstring path, targetpath; struct cli_state *targetcli; -offset = file-offset; /* See offset comment in smbc_read_ctx() */ - + /* First check all pointers before dereferencing them */ + if (!context || !context-internal || !context-internal-_initialized) { @@ -1308,6 +1308,8 @@ } +offset = file-offset; /* See offset comment in smbc_read_ctx() */ + /*d_printf(write: parsing %s\n, file-fname);*/ if (smbc_parse_path(context, file-fname, NULL, 0,
svn commit: samba r14160 - in branches/SAMBA_4_0/source/libcli/raw: .
Author: metze Date: 2006-03-10 15:10:47 + (Fri, 10 Mar 2006) New Revision: 14160 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14160 Log: don't write behind the buffer metze Modified: branches/SAMBA_4_0/source/libcli/raw/rawfile.c Changeset: Modified: branches/SAMBA_4_0/source/libcli/raw/rawfile.c === --- branches/SAMBA_4_0/source/libcli/raw/rawfile.c 2006-03-10 14:39:59 UTC (rev 14159) +++ branches/SAMBA_4_0/source/libcli/raw/rawfile.c 2006-03-10 15:10:47 UTC (rev 14160) @@ -318,7 +318,6 @@ SIVAL(params, 40, ea_blob.length); SIVAL(params, 48, parms-ntcreatex.in.impersonation); SCVAL(params, 52, parms-ntcreatex.in.security_flags); - SCVAL(params, 53, 0); /* the empty string first forces the correct alignment */ smbcli_blob_append_string(tree-session, mem_ctx, nt.in.params,, 0);
svn commit: samba r14161 - in branches/SAMBA_4_0/source/lib/ldb: ldb_ildap ldb_ldap ldb_sqlite3 ldb_tdb
Author: idra Date: 2006-03-10 15:27:16 + (Fri, 10 Mar 2006) New Revision: 14161 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14161 Log: return early if we know the job is already finished 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-03-10 15:10:47 UTC (rev 14160) +++ branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c 2006-03-10 15:27:16 UTC (rev 14161) @@ -352,6 +352,9 @@ h-private_data = (void *)ildb_ac; + h-state = LDB_ASYNC_INIT; + h-status = LDB_SUCCESS; + req = ldap_request_send(ildb-ldap, msg); if (req == NULL) { ldb_set_errstring(module-ldb, talloc_asprintf(module, async send request failed)); @@ -922,6 +925,10 @@ { struct ildb_async_context *ac = talloc_get_type(handle-private_data, struct ildb_async_context); + if (handle-state == LDB_ASYNC_DONE) { + return handle-status; + } + if (!ac) { return LDB_ERR_OPERATIONS_ERROR; } 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-03-10 15:10:47 UTC (rev 14160) +++ branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c 2006-03-10 15:27:16 UTC (rev 14161) @@ -87,6 +87,9 @@ h-private_data = (void *)ac; + h-state = LDB_ASYNC_INIT; + h-status = LDB_SUCCESS; + ac-module = module; ac-context = context; ac-callback = callback; @@ -885,12 +888,15 @@ LDAPMessage *result; int ret = LDB_ERR_OPERATIONS_ERROR; - if (!ac-msgid) { + if (handle-state == LDB_ASYNC_DONE) { + return handle-status; + } + + if (!ac || !ac-msgid) { return LDB_ERR_OPERATIONS_ERROR; } handle-status = LDB_SUCCESS; - handle-state = LDB_ASYNC_INIT; switch(type) { case LDB_WAIT_NONE: 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-03-10 15:10:47 UTC (rev 14160) +++ branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c 2006-03-10 15:27:16 UTC (rev 14161) @@ -57,9 +57,9 @@ int (*callback)(struct ldb_context *, void *, struct ldb_async_result *); }; -static struct ldb_async_handle *init_lsql_handle(struct lsqlite3_private *lsqlite3, struct ldb_module *module, -void *context, -int (*callback)(struct ldb_context *, void *, struct ldb_async_result *)) +static struct ldb_async_handle *init_handle(struct lsqlite3_private *lsqlite3, struct ldb_module *module, + void *context, + int (*callback)(struct ldb_context *, void *, struct ldb_async_result *)) { struct lsql_async_context *ac; struct ldb_async_handle *h; @@ -81,6 +81,9 @@ h-private_data = (void *)ac; + h-state = LDB_ASYNC_INIT; + h-status = LDB_SUCCESS; + ac-module = module; ac-context = context; ac-callback = callback; @@ -899,7 +902,7 @@ char *query = NULL; int ret; - *handle = init_lsql_handle(lsqlite3, module, context, callback); + *handle = init_handle(lsqlite3, module, context, callback); if (*handle == NULL) { talloc_free(*handle); return LDB_ERR_OPERATIONS_ERROR; @@ -,7 +1114,7 @@ int i; int ret = LDB_ERR_OPERATIONS_ERROR; - *handle = init_lsql_handle(lsqlite3, module, context, callback); + *handle = init_handle(lsqlite3, module, context, callback); if (*handle == NULL) { goto failed; } @@ -1267,7 +1270,7 @@ int i; int ret = LDB_ERR_OPERATIONS_ERROR; - *handle = init_lsql_handle(lsqlite3, module, context, callback); + *handle = init_handle(lsqlite3, module, context, callback); if (*handle == NULL) { goto failed; } @@ -1481,7 +1484,7 @@ int ret = LDB_ERR_OPERATIONS_ERROR; - *handle = init_lsql_handle(lsqlite3, module, context, callback); + *handle = init_handle(lsqlite3, module, context, callback); if (*handle == NULL) { goto failed; } @@ -1559,7 +1562,7 @@ char *query;
svn commit: samba r14162 - in branches/SAMBA_4_0/source/lib/ldb/modules: .
Author: idra Date: 2006-03-10 15:28:25 + (Fri, 10 Mar 2006) New Revision: 14162 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14162 Log: Minor fixes on sort Initial work on async paged_results Modified: branches/SAMBA_4_0/source/lib/ldb/modules/paged_results.c branches/SAMBA_4_0/source/lib/ldb/modules/sort.c Changeset: Sorry, the patch is too large (659 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14162
svn commit: samba r14163 - in branches/SAMBA_4_0/source/lib/ldb: include ldb_ildap ldb_ldap
Author: idra Date: 2006-03-10 15:50:47 + (Fri, 10 Mar 2006) New Revision: 14163 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14163 Log: Remove LDB_WAIT_ONCE, we can hardly guarante we get anything if not waiting for all, keeping this value may just lead to false expectations. You either make blocking call waiting for ALL results transforming this in a sync call, or either you loop expecting from 0 to all results being returned at any time on any of these loops. It should be clear also that when you may receive results at any time as soon as you call ldb_request. Your callback may have received all results even before calling ldb_async_wait the first time. Simo. Modified: 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_ldap/ldb_ldap.c Changeset: Modified: branches/SAMBA_4_0/source/lib/ldb/include/ldb.h === --- branches/SAMBA_4_0/source/lib/ldb/include/ldb.h 2006-03-10 15:28:25 UTC (rev 14162) +++ branches/SAMBA_4_0/source/lib/ldb/include/ldb.h 2006-03-10 15:50:47 UTC (rev 14163) @@ -577,7 +577,6 @@ enum ldb_async_wait_type { LDB_WAIT_ALL, - LDB_WAIT_ONCE, LDB_WAIT_NONE }; 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-03-10 15:28:25 UTC (rev 14162) +++ branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c 2006-03-10 15:50:47 UTC (rev 14163) @@ -941,13 +941,6 @@ return LDB_ERR_OTHER; } break; - case LDB_WAIT_ONCE: - while (handle-status == LDB_SUCCESS handle-state == LDB_ASYNC_INIT) { - if (event_loop_once(ac-req-conn-event.event_ctx) != 0) { - return LDB_ERR_OTHER; - } - } - break; case LDB_WAIT_ALL: while (handle-status == LDB_SUCCESS handle-state != LDB_ASYNC_DONE) { if (event_loop_once(ac-req-conn-event.event_ctx) != 0) { 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-03-10 15:28:25 UTC (rev 14162) +++ branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c 2006-03-10 15:50:47 UTC (rev 14163) @@ -913,16 +913,6 @@ } ret = lldb_parse_result(handle, result); break; - case LDB_WAIT_ONCE: - timeout.tv_sec = ac-timeout; - timeout.tv_usec = 0; - ret = ldap_result(lldb-ldap, ac-msgid, 0, timeout, result); - if (ret == -1 || ret == 0) { - handle-status = LDB_ERR_OPERATIONS_ERROR; - return handle-status; - } - ret = lldb_parse_result(handle, result); - break; case LDB_WAIT_ALL: timeout.tv_sec = ac-timeout; timeout.tv_usec = 0;
svn commit: samba-web r927 - in trunk/support: .
Author: deryck Date: 2006-03-10 16:25:33 + (Fri, 10 Mar 2006) New Revision: 927 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-webrev=927 Log: Typo fix for support entry. deryck Modified: trunk/support/ireland.html Changeset: Modified: trunk/support/ireland.html === --- trunk/support/ireland.html 2006-03-08 20:45:21 UTC (rev 926) +++ trunk/support/ireland.html 2006-03-10 16:25:33 UTC (rev 927) @@ -6,7 +6,7 @@ !-- Added: 07 March 2006 -- presmall -TWise Ltd +ITWise Ltd Experience powering your business Kilmullen, Portarlington Co. Laois, Ireland
svn commit: samba r14164 - in branches/SAMBA_4_0/source/librpc/rpc: .
Author: mimir Date: 2006-03-10 16:36:35 + (Fri, 10 Mar 2006) New Revision: 14164 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14164 Log: More comments. rafal Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c === --- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c 2006-03-10 15:50:47 UTC (rev 14163) +++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c 2006-03-10 16:36:35 UTC (rev 14164) @@ -588,6 +588,9 @@ static void continue_pipe_auth(struct composite_context *ctx); +/* + Stage 2 of pipe_connect_b: Receive result of endpoint mapping +*/ static void continue_map_binding(struct composite_context *ctx) { struct composite_context *c = talloc_get_type(ctx-async.private_data, @@ -608,6 +611,9 @@ } +/* + Stage 2 of pipe_connect_b: Continue connection after endpoint is known +*/ static void continue_connect(struct composite_context *c, struct pipe_connect_state *s) { struct dcerpc_pipe_connect pc; @@ -625,6 +631,7 @@ pc.interface= s-table; pc.creds= s-credentials; + /* connect dcerpc pipe depending on required transport */ switch (s-binding-transport) { case NCACN_NP: if (pc.binding-flags DCERPC_SMB2) { @@ -667,11 +674,16 @@ return; default: + /* looks like a transport we don't support now */ composite_error(c, NT_STATUS_NOT_SUPPORTED); } } +/* + Stage 3 of pipe_connect_b: Receive result of pipe connect request on + named pipe on smb2 +*/ static void continue_pipe_connect_ncacn_np_smb2(struct composite_context *ctx) { struct composite_context *c = talloc_get_type(ctx-async.private_data, @@ -686,6 +698,10 @@ } +/* + Stage 3 of pipe_connect_b: Receive result of pipe connect request on + named pipe on smb +*/ static void continue_pipe_connect_ncacn_np_smb(struct composite_context *ctx) { struct composite_context *c = talloc_get_type(ctx-async.private_data, @@ -700,6 +716,9 @@ } +/* + Stage 3 of pipe_connect_b: Receive result of pipe connect request on tcp/ip +*/ static void continue_pipe_connect_ncacn_ip_tcp(struct composite_context *ctx) { struct composite_context *c = talloc_get_type(ctx-async.private_data, @@ -714,6 +733,9 @@ } +/* + Stage 3 of pipe_connect_b: Receive result of pipe connect request on unix socket +*/ static void continue_pipe_connect_ncacn_unix(struct composite_context *ctx) { struct composite_context *c = talloc_get_type(ctx-async.private_data, @@ -728,6 +750,9 @@ } +/* + Stage 3 of pipe_connect_b: Receive result of pipe connect request on local rpc +*/ static void continue_pipe_connect_ncalrpc(struct composite_context *ctx) { struct composite_context *c = talloc_get_type(ctx-async.private_data, @@ -742,6 +767,10 @@ } +/* + Stage 4 of pipe_connect_b: Start an authentication on connected dcerpc pipe + depending on credentials and binding flags passed. +*/ static void continue_pipe_connect(struct composite_context *c, struct pipe_connect_state *s) { struct composite_context *auth_bind_req; @@ -760,6 +789,10 @@ } +/* + Stage 5 of pipe_connect_b: Receive result of pipe authentication request + and say if all went ok +*/ static void continue_pipe_auth(struct composite_context *ctx) { struct composite_context *c = talloc_get_type(ctx-async.private_data, @@ -772,6 +805,10 @@ } +/* + start a request to open a rpc connection to a rpc pipe, using + specified binding structure to determine the endpoint and options +*/ struct composite_context* dcerpc_pipe_connect_b_send(TALLOC_CTX *parent_ctx, struct dcerpc_pipe **pp, struct dcerpc_binding *binding, @@ -800,9 +837,11 @@ s-pipe = dcerpc_pipe_init(c, ev); if (composite_nomem(s-pipe, c)) return c; + /* get event context from initialised dcerpc pipe */ c-event_ctx = s-pipe-conn-event_ctx; (*pp) = s-pipe; + /* store parameters in state structure */ s-binding = binding; s-table= table; s-credentials = credentials; @@ -827,6 +866,9 @@ } +/* + receive result of a request to open a rpc connection to a rpc pipe +*/ NTSTATUS dcerpc_pipe_connect_b_recv(struct composite_context *c, TALLOC_CTX *mem_ctx, struct dcerpc_pipe **p) { @@ -872,6 +914,12 @@ static void continue_pipe_connect_b(struct composite_context *ctx); + +/* + Initiate rpc connection to a rpc pipe, using the specified string + binding to determine the endpoint and options. + The string is to be parsed to a binding structure first. +*/ struct
svn commit: samba r14165 - in branches/SAMBA_4_0/source/librpc/rpc: .
Author: mimir Date: 2006-03-10 16:52:46 + (Fri, 10 Mar 2006) New Revision: 14165 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14165 Log: More comments and my copyright. rafal Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c === --- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c 2006-03-10 16:36:35 UTC (rev 14164) +++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c 2006-03-10 16:52:46 UTC (rev 14165) @@ -6,6 +6,7 @@ Copyright (C) Andrew Tridgell 2003 Copyright (C) Jelmer Vernooij 2004 Copyright (C) Andrew Bartlett [EMAIL PROTECTED] 2005 + Copyright (C) Rafal Szczesniak 2006 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 @@ -1048,6 +1049,9 @@ static void continue_auth_none(struct composite_context *ctx); +/* + Stage 2 of pipe_auth: Receive result of schannel bind request +*/ static void continue_auth_schannel(struct composite_context *ctx) { struct composite_context *c = talloc_get_type(ctx-async.private_data, @@ -1060,6 +1064,9 @@ } +/* + Stage 2 of pipe_auth: Receive result of authenticated bind request +*/ static void continue_auth(struct composite_context *ctx) { struct composite_context *c = talloc_get_type(ctx-async.private_data, @@ -1072,6 +1079,9 @@ } +/* + Stage 2 of pipe_auth: Receive result of non-authenticated bind request +*/ static void continue_auth_none(struct composite_context *ctx) { struct composite_context *c = talloc_get_type(ctx-async.private_data, @@ -1084,6 +1094,10 @@ } +/* + Request to perform an authenticated bind if required. Authentication + is determined using credentials passed and binding flags. +*/ struct composite_context *dcerpc_pipe_auth_send(struct dcerpc_pipe *p, struct dcerpc_binding *binding, const struct dcerpc_interface_table *table, @@ -1106,6 +1120,7 @@ c-private_data = s; c-event_ctx = p-conn-event_ctx; + /* store parameters in state structure */ s-binding = binding; s-table= table; s-credentials = credentials; @@ -1186,6 +1201,9 @@ } +/* + Receive result of authenticated bind request on dcerpc pipe +*/ NTSTATUS dcerpc_pipe_auth_recv(struct composite_context *c) { NTSTATUS status; @@ -1205,7 +1223,7 @@ /* - perform an authenticated bind if needed - sync version + Perform an authenticated bind if needed - sync version */ NTSTATUS dcerpc_pipe_auth(struct dcerpc_pipe *p, struct dcerpc_binding *binding,
svn commit: samba-web r928 - in trunk/support: .
Author: deryck Date: 2006-03-10 17:21:12 + (Fri, 10 Mar 2006) New Revision: 928 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-webrev=928 Log: New support provider in US. deryck Modified: trunk/support/us.html Changeset: Modified: trunk/support/us.html === --- trunk/support/us.html 2006-03-10 16:25:33 UTC (rev 927) +++ trunk/support/us.html 2006-03-10 17:21:12 UTC (rev 928) @@ -766,7 +766,35 @@ site has approx. 100 users. /small/pre +!-- Added: 10 March 2006 -- +hr / +h3MARYLAND/h3 +presmall +Opensource Assist, Inc. +Opensource Assist gives enterprise quality support for Linux, MySQL, +Samba, and many other Open Source packages. Providing both on-site +and remote system administration/support depending on your needs. +We've performed several different types of Samba implementations +and migrations with excellent results. Our experience includes +configuring Samba with clustered back-ends and integrating it with +Netatalk to serve both Windows and Mac clients. + +Opensource Assist, Inc. +315 Grove Blvd +Frederick, MD 21701 + +a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/a + +a href=http://www.opensourceassist.com;http://www.opensourceassist.com/a + +US Toll Free: 1-866-515-7598 +International: 1-301-668-7629 +Free World Dialup: 748119 +/small/pre + + + !-- Added: 29 June 2005 -- hr / h3MASSACHUSETTS/h3
svn commit: samba r14166 - in branches/SAMBA_3_0/source/client: .
Author: jra Date: 2006-03-10 17:51:22 + (Fri, 10 Mar 2006) New Revision: 14166 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14166 Log: Fix const warning. Jeremy. Modified: branches/SAMBA_3_0/source/client/umount.cifs.c Changeset: Modified: branches/SAMBA_3_0/source/client/umount.cifs.c === --- branches/SAMBA_3_0/source/client/umount.cifs.c 2006-03-10 16:52:46 UTC (rev 14165) +++ branches/SAMBA_3_0/source/client/umount.cifs.c 2006-03-10 17:51:22 UTC (rev 14166) @@ -83,7 +83,7 @@ { NULL, 0, NULL, 0 } }; -char * thisprogram; +const char * thisprogram; int verboseflg = 0; static void umount_cifs_usage(void)
svn commit: samba r14167 - in trunk/source/client: .
Author: jra Date: 2006-03-10 17:51:35 + (Fri, 10 Mar 2006) New Revision: 14167 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14167 Log: Fix const warning. Jeremy. Modified: trunk/source/client/umount.cifs.c Changeset: Modified: trunk/source/client/umount.cifs.c === --- trunk/source/client/umount.cifs.c 2006-03-10 17:51:22 UTC (rev 14166) +++ trunk/source/client/umount.cifs.c 2006-03-10 17:51:35 UTC (rev 14167) @@ -83,7 +83,7 @@ { NULL, 0, NULL, 0 } }; -char * thisprogram; +const char * thisprogram; int verboseflg = 0; static void umount_cifs_usage(void)
svn commit: samba r14168 - in branches/SAMBA_3_0/source/smbd: .
Author: jra Date: 2006-03-10 17:52:41 + (Fri, 10 Mar 2006) New Revision: 14168 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14168 Log: Fix Coverity #219. I think this is a false coverity warning as it seems to get confused with assignment and comparison. Clarify the code anyway. Jeremy. Modified: branches/SAMBA_3_0/source/smbd/sesssetup.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/sesssetup.c === --- branches/SAMBA_3_0/source/smbd/sesssetup.c 2006-03-10 17:51:35 UTC (rev 14167) +++ branches/SAMBA_3_0/source/smbd/sesssetup.c 2006-03-10 17:52:41 UTC (rev 14168) @@ -1044,7 +1044,10 @@ } else { struct auth_context *plaintext_auth_context = NULL; const uint8 *chal; - if (NT_STATUS_IS_OK(nt_status = make_auth_context_subsystem(plaintext_auth_context))) { + + nt_status = make_auth_context_subsystem(plaintext_auth_context); + + if (NT_STATUS_IS_OK(nt_status)) { chal = plaintext_auth_context-get_ntlm_challenge(plaintext_auth_context); if (!make_user_info_for_reply(user_info,
svn commit: samba r14169 - in trunk/source/smbd: .
Author: jra Date: 2006-03-10 17:52:52 + (Fri, 10 Mar 2006) New Revision: 14169 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14169 Log: Fix Coverity #219. I think this is a false coverity warning as it seems to get confused with assignment and comparison. Clarify the code anyway. Jeremy. Modified: trunk/source/smbd/sesssetup.c Changeset: Modified: trunk/source/smbd/sesssetup.c === --- trunk/source/smbd/sesssetup.c 2006-03-10 17:52:41 UTC (rev 14168) +++ trunk/source/smbd/sesssetup.c 2006-03-10 17:52:52 UTC (rev 14169) @@ -1044,7 +1044,10 @@ } else { struct auth_context *plaintext_auth_context = NULL; const uint8 *chal; - if (NT_STATUS_IS_OK(nt_status = make_auth_context_subsystem(plaintext_auth_context))) { + + nt_status = make_auth_context_subsystem(plaintext_auth_context); + + if (NT_STATUS_IS_OK(nt_status)) { chal = plaintext_auth_context-get_ntlm_challenge(plaintext_auth_context); if (!make_user_info_for_reply(user_info,
svn commit: samba r14171 - in trunk/source: libads smbd
Author: jra Date: 2006-03-10 18:32:23 + (Fri, 10 Mar 2006) New Revision: 14171 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14171 Log: Paranioa fix for sesssetup. Fix Coverity bug #26. Guard against NULL ref. Jeremy. Modified: trunk/source/libads/krb5_setpw.c trunk/source/smbd/sesssetup.c Changeset: Modified: trunk/source/libads/krb5_setpw.c === --- trunk/source/libads/krb5_setpw.c2006-03-10 18:32:18 UTC (rev 14170) +++ trunk/source/libads/krb5_setpw.c2006-03-10 18:32:23 UTC (rev 14171) @@ -65,19 +65,22 @@ princ = SMB_STRDUP(principal); if ((c = strchr_m(princ, '/')) == NULL) { - c = princ; + c = princ; } else { - *c = '\0'; - c++; - princ_part1 = princ; + *c = '\0'; + c++; + princ_part1 = princ; } princ_part2 = c; if ((c = strchr_m(c, '@')) != NULL) { - *c = '\0'; - c++; - realm = c; + *c = '\0'; + c++; + realm = c; + } else { + /* We must have a realm component. */ + return data_blob(NULL, 0); } memset(req, 0, sizeof(req)); @@ -97,8 +100,9 @@ asn1_push_tag(req, ASN1_CONTEXT(1)); asn1_push_tag(req, ASN1_SEQUENCE(0)); - if (princ_part1) - asn1_write_GeneralString(req, princ_part1); + if (princ_part1) { + asn1_write_GeneralString(req, princ_part1); + } asn1_write_GeneralString(req, princ_part2); asn1_pop_tag(req); @@ -151,6 +155,10 @@ else return EINVAL; + if (setpw.data == NULL || setpw.length == 0) { + return EINVAL; + } + encoded_setpw.data = (char *)setpw.data; encoded_setpw.length = setpw.length; Modified: trunk/source/smbd/sesssetup.c === --- trunk/source/smbd/sesssetup.c 2006-03-10 18:32:18 UTC (rev 14170) +++ trunk/source/smbd/sesssetup.c 2006-03-10 18:32:23 UTC (rev 14171) @@ -1079,6 +1079,11 @@ return ERROR_NT(nt_status_squash(nt_status)); } + /* Ensure we can't possible take a code path leading to a null defref. */ + if (!server_info) { + return ERROR_NT(NT_STATUS_LOGON_FAILURE); + } + nt_status = create_local_token(server_info); if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(10, (create_local_token failed: %s\n,
svn commit: samba r14170 - in branches/SAMBA_3_0/source: libads smbd
Author: jra Date: 2006-03-10 18:32:18 + (Fri, 10 Mar 2006) New Revision: 14170 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14170 Log: Paranioa fix for sesssetup. Fix Coverity bug #26. Guard against NULL ref. Jeremy. Modified: branches/SAMBA_3_0/source/libads/krb5_setpw.c branches/SAMBA_3_0/source/smbd/sesssetup.c Changeset: Modified: branches/SAMBA_3_0/source/libads/krb5_setpw.c === --- branches/SAMBA_3_0/source/libads/krb5_setpw.c 2006-03-10 17:52:52 UTC (rev 14169) +++ branches/SAMBA_3_0/source/libads/krb5_setpw.c 2006-03-10 18:32:18 UTC (rev 14170) @@ -65,19 +65,22 @@ princ = SMB_STRDUP(principal); if ((c = strchr_m(princ, '/')) == NULL) { - c = princ; + c = princ; } else { - *c = '\0'; - c++; - princ_part1 = princ; + *c = '\0'; + c++; + princ_part1 = princ; } princ_part2 = c; if ((c = strchr_m(c, '@')) != NULL) { - *c = '\0'; - c++; - realm = c; + *c = '\0'; + c++; + realm = c; + } else { + /* We must have a realm component. */ + return data_blob(NULL, 0); } memset(req, 0, sizeof(req)); @@ -97,8 +100,9 @@ asn1_push_tag(req, ASN1_CONTEXT(1)); asn1_push_tag(req, ASN1_SEQUENCE(0)); - if (princ_part1) - asn1_write_GeneralString(req, princ_part1); + if (princ_part1) { + asn1_write_GeneralString(req, princ_part1); + } asn1_write_GeneralString(req, princ_part2); asn1_pop_tag(req); @@ -151,6 +155,10 @@ else return EINVAL; + if (setpw.data == NULL || setpw.length == 0) { + return EINVAL; + } + encoded_setpw.data = (char *)setpw.data; encoded_setpw.length = setpw.length; Modified: branches/SAMBA_3_0/source/smbd/sesssetup.c === --- branches/SAMBA_3_0/source/smbd/sesssetup.c 2006-03-10 17:52:52 UTC (rev 14169) +++ branches/SAMBA_3_0/source/smbd/sesssetup.c 2006-03-10 18:32:18 UTC (rev 14170) @@ -1079,6 +1079,11 @@ return ERROR_NT(nt_status_squash(nt_status)); } + /* Ensure we can't possible take a code path leading to a null defref. */ + if (!server_info) { + return ERROR_NT(NT_STATUS_LOGON_FAILURE); + } + nt_status = create_local_token(server_info); if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(10, (create_local_token failed: %s\n,
svn commit: samba r14172 - in branches/SAMBA_4_0/source/librpc/rpc: .
Author: metze Date: 2006-03-10 20:08:15 + (Fri, 10 Mar 2006) New Revision: 14172 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14172 Log: composite_is_ok(c) destroys c, when the status isn't ok. so we need to return directly. metze Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c === --- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c 2006-03-10 18:32:23 UTC (rev 14171) +++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c 2006-03-10 20:08:15 UTC (rev 14172) @@ -47,15 +47,10 @@ { struct composite_context *c = talloc_get_type(ctx-async.private_data, struct composite_context); - struct pipe_np_smb_state *s = talloc_get_type(c-private_data, - struct pipe_np_smb_state); /* receive result of named pipe open request on smb */ c-status = dcerpc_pipe_open_smb_recv(ctx); - if (!composite_is_ok(c)) { - DEBUG(0,(Failed to open pipe %s - %s\n, s-io.pipe_name, nt_errstr(c-status))); - return; - } + if (!composite_is_ok(c)) return; composite_done(c); } @@ -73,10 +68,7 @@ /* receive result of smb connect request */ c-status = smb_composite_connect_recv(ctx, c); - if (!composite_is_ok(c)) { - DEBUG(0,(Failed to connect to %s - %s\n, s-io.binding-host, nt_errstr(c-status))); - return; - } + if (!composite_is_ok(c)) return; /* prepare named pipe open parameters */ s-tree = s-conn.out.tree; @@ -187,15 +179,10 @@ { struct composite_context *c = talloc_get_type(ctx-async.private_data, struct composite_context); - struct pipe_np_smb2_state *s = talloc_get_type(c-private_data, - struct pipe_np_smb2_state); /* receive result of named pipe open request on smb2 */ c-status = dcerpc_pipe_open_smb2_recv(ctx); - if (!composite_is_ok(c)) { - DEBUG(0,(Failed to open pipe %s - %s\n, s-io.pipe_name, nt_errstr(c-status))); - return; - } + if (!composite_is_ok(c)) return; composite_done(c); } @@ -214,10 +201,7 @@ /* receive result of smb2 connect request */ c-status = smb2_connect_recv(ctx, c, s-tree); - if (!composite_is_ok(c)) { - DEBUG(0,(Failed to connect to %s - %s\n, s-io.binding-host, nt_errstr(c-status))); - return; - } + if (!composite_is_ok(c)) return; /* prepare named pipe open parameters */ s-io.pipe_name = s-io.binding-endpoint; @@ -315,16 +299,10 @@ { struct composite_context *c = talloc_get_type(ctx-async.private_data, struct composite_context); - struct pipe_ip_tcp_state *s = talloc_get_type(c-private_data, - struct pipe_ip_tcp_state); /* receive result of named pipe open request on tcp/ip */ c-status = dcerpc_pipe_open_tcp_recv(ctx); - if (!composite_is_ok(c)) { - DEBUG(0,(Failed to connect to %s:%d - %s\n, s-host, s-port, -nt_errstr(c-status))); - return; - } + if (!composite_is_ok(c)) return; composite_done(c); } @@ -403,16 +381,10 @@ { struct composite_context *c = talloc_get_type(ctx-async.private_data, struct composite_context); - struct pipe_unix_state *s = talloc_get_type(c-private_data, - struct pipe_unix_state); /* receive result of pipe open request on unix socket */ c-status = dcerpc_pipe_open_unix_stream_recv(ctx); - if (!composite_is_ok(c)) { - DEBUG(0,(Failed to open unix socket %s - %s\n, -s-io.binding-endpoint, nt_errstr(c-status))); - return; - } + if (!composite_is_ok(c)) return; composite_done(c); } @@ -497,16 +469,10 @@ { struct composite_context *c = talloc_get_type(ctx-async.private_data, struct composite_context); - struct pipe_ncalrpc_state *s = talloc_get_type(c-private_data, -struct pipe_ncalrpc_state); /* receive result of pipe open request on ncalrpc */ c-status = dcerpc_pipe_connect_ncalrpc_recv(ctx); - if (!composite_is_ok(c)) { - DEBUG(0,(Failed to open ncalrpc pipe '%s' - %s\n, s-io.binding-endpoint, -
svn commit: samba r14173 - in branches/SAMBA_4_0/source: client libcli libcli/raw libcli/smb2 libcli/smb_composite librpc/rpc ntvfs ntvfs/cifs ntvfs/ipc ntvfs/nbench ntvfs/posix ntvfs/print ntvfs/simp
Author: metze Date: 2006-03-10 20:49:20 + (Fri, 10 Mar 2006) New Revision: 14173 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14173 Log: change smb interface structures to always use a union smb_file, to abtract - const char *path fot qpathinfo and setpathinfo - uint16_t fnum for SMB - smb2_handle handle for SMB2 the idea is to later add a struct ntvfs_handle *ntvfs so that the ntvfs subsystem don't need to know the difference between SMB and SMB2 metze Modified: branches/SAMBA_4_0/source/client/cifsddio.c branches/SAMBA_4_0/source/client/client.c branches/SAMBA_4_0/source/libcli/clifile.c branches/SAMBA_4_0/source/libcli/clireadwrite.c branches/SAMBA_4_0/source/libcli/clitrans2.c branches/SAMBA_4_0/source/libcli/raw/interfaces.h branches/SAMBA_4_0/source/libcli/raw/rawacl.c branches/SAMBA_4_0/source/libcli/raw/rawfile.c branches/SAMBA_4_0/source/libcli/raw/rawfileinfo.c branches/SAMBA_4_0/source/libcli/raw/rawioctl.c branches/SAMBA_4_0/source/libcli/raw/rawnotify.c branches/SAMBA_4_0/source/libcli/raw/rawreadwrite.c branches/SAMBA_4_0/source/libcli/smb2/getinfo.c branches/SAMBA_4_0/source/libcli/smb_composite/appendacl.c branches/SAMBA_4_0/source/libcli/smb_composite/loadfile.c branches/SAMBA_4_0/source/libcli/smb_composite/savefile.c branches/SAMBA_4_0/source/librpc/rpc/dcerpc_smb.c branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c branches/SAMBA_4_0/source/ntvfs/nbench/vfs_nbench.c branches/SAMBA_4_0/source/ntvfs/ntvfs.h branches/SAMBA_4_0/source/ntvfs/ntvfs_generic.c branches/SAMBA_4_0/source/ntvfs/ntvfs_interface.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_acl.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_flush.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_ioctl.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_lock.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_qfileinfo.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_read.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_seek.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_unlink.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_write.c branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c branches/SAMBA_4_0/source/ntvfs/print/vfs_print.c branches/SAMBA_4_0/source/ntvfs/simple/vfs_simple.c branches/SAMBA_4_0/source/ntvfs/unixuid/vfs_unixuid.c branches/SAMBA_4_0/source/smb_server/smb/nttrans.c branches/SAMBA_4_0/source/smb_server/smb/reply.c branches/SAMBA_4_0/source/smb_server/smb/trans2.c branches/SAMBA_4_0/source/torture/basic/delaywrite.c branches/SAMBA_4_0/source/torture/basic/delete.c branches/SAMBA_4_0/source/torture/basic/denytest.c branches/SAMBA_4_0/source/torture/basic/disconnect.c branches/SAMBA_4_0/source/torture/gentest.c branches/SAMBA_4_0/source/torture/nbench/nbio.c branches/SAMBA_4_0/source/torture/raw/acls.c branches/SAMBA_4_0/source/torture/raw/chkpath.c branches/SAMBA_4_0/source/torture/raw/close.c branches/SAMBA_4_0/source/torture/raw/context.c branches/SAMBA_4_0/source/torture/raw/eas.c branches/SAMBA_4_0/source/torture/raw/ioctl.c branches/SAMBA_4_0/source/torture/raw/lock.c branches/SAMBA_4_0/source/torture/raw/mux.c branches/SAMBA_4_0/source/torture/raw/notify.c branches/SAMBA_4_0/source/torture/raw/open.c branches/SAMBA_4_0/source/torture/raw/oplock.c branches/SAMBA_4_0/source/torture/raw/qfileinfo.c branches/SAMBA_4_0/source/torture/raw/read.c branches/SAMBA_4_0/source/torture/raw/rename.c branches/SAMBA_4_0/source/torture/raw/search.c branches/SAMBA_4_0/source/torture/raw/seek.c branches/SAMBA_4_0/source/torture/raw/setfileinfo.c branches/SAMBA_4_0/source/torture/raw/streams.c branches/SAMBA_4_0/source/torture/raw/unlink.c branches/SAMBA_4_0/source/torture/raw/write.c branches/SAMBA_4_0/source/torture/smb2/find.c branches/SAMBA_4_0/source/torture/smb2/getinfo.c branches/SAMBA_4_0/source/torture/smb2/setinfo.c branches/SAMBA_4_0/source/torture/smb2/util.c branches/SAMBA_4_0/source/torture/torture.c branches/SAMBA_4_0/source/torture/torture_util.c Changeset: Sorry, the patch is too large (6941 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14173
Re: svn commit: samba r14172 - in branches/SAMBA_4_0/source/librpc/rpc: .
On Fri, Mar 10, 2006 at 08:08:16PM +, [EMAIL PROTECTED] wrote: Author: metze Date: 2006-03-10 20:08:15 + (Fri, 10 Mar 2006) New Revision: 14172 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14172 Log: composite_is_ok(c) destroys c, when the status isn't ok. so we need to return directly. Thanks for this, Stefan. I need to put those debug messages elsewhere. cheers, -- Rafal Szczesniak Samba Team member http://www.samba.org signature.asc Description: Digital signature
svn commit: samba r14174 - in branches/SAMBA_4_0/source: libcli/raw ntvfs/posix
Author: metze Date: 2006-03-10 21:38:07 + (Fri, 10 Mar 2006) New Revision: 14174 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14174 Log: fix typos metze Modified: branches/SAMBA_4_0/source/libcli/raw/rawsetfileinfo.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_setfileinfo.c Changeset: Modified: branches/SAMBA_4_0/source/libcli/raw/rawsetfileinfo.c === --- branches/SAMBA_4_0/source/libcli/raw/rawsetfileinfo.c 2006-03-10 20:49:20 UTC (rev 14173) +++ branches/SAMBA_4_0/source/libcli/raw/rawsetfileinfo.c 2006-03-10 21:38:07 UTC (rev 14174) @@ -283,7 +283,7 @@ raw_push_dos_date3(tree-session-transport, req-out.vwv, VWV(1), parms-setattr.in.write_time); memset(req-out.vwv + VWV(3), 0, 10); /* reserved */ - smbcli_req_append_ascii4(req, parms-setattr.file.fname, STR_TERMINATE); + smbcli_req_append_ascii4(req, parms-setattr.file.path, STR_TERMINATE); smbcli_req_append_ascii4(req, , STR_TERMINATE); if (!smbcli_request_send(req)) { @@ -399,7 +399,7 @@ /* send request and process the output */ req = smb_raw_setpathinfo_blob_send(tree, mem_ctx, - parms-generic.file.fname, + parms-generic.file.path, parms-generic.level, blob); Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_setfileinfo.c === --- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_setfileinfo.c2006-03-10 20:49:20 UTC (rev 14173) +++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_setfileinfo.c2006-03-10 21:38:07 UTC (rev 14174) @@ -435,7 +435,7 @@ uint32_t access_needed; /* resolve the cifs name to a posix name */ - status = pvfs_resolve_name(pvfs, req, info-generic.file.fname, + status = pvfs_resolve_name(pvfs, req, info-generic.file.path, PVFS_RESOLVE_STREAMS, name); if (!NT_STATUS_IS_OK(status)) { return status;
svn commit: samba r14175 - in branches/SAMBA_4_0/source/librpc/rpc: .
Author: mimir Date: 2006-03-10 21:40:47 + (Fri, 10 Mar 2006) New Revision: 14175 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14175 Log: More comments and my copyright. rafal Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_schannel.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_schannel.c === --- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_schannel.c 2006-03-10 21:38:07 UTC (rev 14174) +++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_schannel.c 2006-03-10 21:40:47 UTC (rev 14175) @@ -5,6 +5,7 @@ Copyright (C) Andrew Tridgell 2004 Copyright (C) Andrew Bartlett [EMAIL PROTECTED] 2004-2005 + Copyright (C) Rafal Szczesniak 2006 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 @@ -49,6 +50,10 @@ static void continue_srv_auth2(struct rpc_request *req); +/* + Stage 2 of schannel_key: Receive endpoint mapping and request secondary + rpc connection +*/ static void continue_epm_map_binding(struct composite_context *ctx) { struct composite_context *c; @@ -58,6 +63,7 @@ c = talloc_get_type(ctx-async.private_data, struct composite_context); s = talloc_get_type(c-private_data, struct schannel_key_state); + /* receive endpoint mapping */ c-status = dcerpc_epm_map_binding_recv(ctx); if (!composite_is_ok(c)) { DEBUG(0,(Failed to map DCERPC/TCP NCACN_NP pipe for '%s' - %s\n, @@ -65,6 +71,7 @@ return; } + /* send a request for secondary rpc connection */ sec_conn_req = dcerpc_secondary_connection_send(s-pipe, s-binding); if (composite_nomem(sec_conn_req, c)) return; @@ -73,6 +80,10 @@ } +/* + Stage 3 of schannel_key: Receive secondary rpc connection and perform + non-authenticated bind request +*/ static void continue_secondary_connection(struct composite_context *ctx) { struct composite_context *c; @@ -82,9 +93,11 @@ c = talloc_get_type(ctx-async.private_data, struct composite_context); s = talloc_get_type(c-private_data, struct schannel_key_state); + /* receive secondary rpc connection */ c-status = dcerpc_secondary_connection_recv(ctx, s-pipe2); if (!composite_is_ok(c)) return; + /* initiate a non-authenticated bind */ auth_none_req = dcerpc_bind_auth_none_send(c, s-pipe2, dcerpc_table_netlogon); if (composite_nomem(auth_none_req, c)) return; @@ -92,6 +105,10 @@ } +/* + Stage 4 of schannel_key: Receive non-authenticated bind and get + a netlogon challenge +*/ static void continue_bind_auth_none(struct composite_context *ctx) { struct composite_context *c; @@ -100,25 +117,26 @@ c = talloc_get_type(ctx-async.private_data, struct composite_context); s = talloc_get_type(c-private_data, struct schannel_key_state); - + + /* receive result of non-authenticated bind request */ c-status = dcerpc_bind_auth_none_recv(ctx); if (!composite_is_ok(c)) { talloc_free(s-pipe2); return; } - + + /* prepare a challenge request */ s-r.in.server_name = talloc_asprintf(c, %s, dcerpc_server_name(s-pipe)); if (composite_nomem(s-r.in.server_name, c)) return; s-r.in.computer_name = cli_credentials_get_workstation(s-credentials); s-r.in.credentials = s-credentials1; s-r.out.credentials = s-credentials2; - + generate_random_buffer(s-credentials1.data, sizeof(s-credentials1.data)); /* - request a netlogon challenge + request a netlogon challenge - a rpc request over opened secondary pipe */ - srv_challenge_req = dcerpc_netr_ServerReqChallenge_send(s-pipe2, c, s-r); if (composite_nomem(srv_challenge_req, c)) return; @@ -126,6 +144,10 @@ } +/* + Stage 5 of schannel_key: Receive a challenge and perform authentication + on the netlogon pipe +*/ static void continue_srv_challenge(struct rpc_request *req) { struct composite_context *c; @@ -135,18 +157,17 @@ c = talloc_get_type(req-async.private, struct composite_context); s = talloc_get_type(c-private_data, struct schannel_key_state); + /* receive rpc request result - netlogon challenge */ c-status = dcerpc_ndr_request_recv(req); if (!composite_is_ok(c)) return; - /* - authenticate on the netlogon pipe - */ - + /* prepare credentials for auth2 request */ s-mach_pwd = cli_credentials_get_nt_hash(s-credentials, c); creds_client_init(s-creds, s-credentials1, s-credentials2, s-mach_pwd, s-credentials3, s-negotiate_flags); + /* auth2
svn commit: samba r14176 - in branches/SAMBA_3_0/source/client: .
Author: jra Date: 2006-03-10 23:22:38 + (Fri, 10 Mar 2006) New Revision: 14176 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14176 Log: Fix coverity bug #30. Ensure no possible null deref. Jeremy. Modified: branches/SAMBA_3_0/source/client/smbspool.c Changeset: Modified: branches/SAMBA_3_0/source/client/smbspool.c === --- branches/SAMBA_3_0/source/client/smbspool.c 2006-03-10 21:40:47 UTC (rev 14175) +++ branches/SAMBA_3_0/source/client/smbspool.c 2006-03-10 23:22:38 UTC (rev 14176) @@ -375,9 +375,14 @@ return NULL; } - + /* We pretty much guarentee password must be valid or a pointer + to a 0 char. */ + if (!password) { +return NULL; + } + if ( (username) (*username) - ((!password) || ((password) (strlen(password) == 0 ))) + (strlen(password) == 0 ) (cli-use_kerberos) ) { /* Use kerberos authentication */
svn commit: samba r14177 - in trunk/source/client: .
Author: jra Date: 2006-03-10 23:22:44 + (Fri, 10 Mar 2006) New Revision: 14177 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14177 Log: Fix coverity bug #30. Ensure no possible null deref. Jeremy. Modified: trunk/source/client/smbspool.c Changeset: Modified: trunk/source/client/smbspool.c === --- trunk/source/client/smbspool.c 2006-03-10 23:22:38 UTC (rev 14176) +++ trunk/source/client/smbspool.c 2006-03-10 23:22:44 UTC (rev 14177) @@ -375,9 +375,14 @@ return NULL; } - + /* We pretty much guarentee password must be valid or a pointer + to a 0 char. */ + if (!password) { +return NULL; + } + if ( (username) (*username) - ((!password) || ((password) (strlen(password) == 0 ))) + (strlen(password) == 0 ) (cli-use_kerberos) ) { /* Use kerberos authentication */
svn commit: samba r14178 - in branches/SAMBA_3_0/source/rpc_server: .
Author: jra Date: 2006-03-10 23:52:37 + (Fri, 10 Mar 2006) New Revision: 14178 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14178 Log: Clarify code for Coverity #49. Ensure we know we can't have an uninitialized *returned val. Jeremy. Modified: branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c Changeset: Modified: branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c === --- branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c 2006-03-10 23:22:44 UTC (rev 14177) +++ branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c 2006-03-10 23:52:37 UTC (rev 14178) @@ -4484,6 +4484,8 @@ PRINTER_INFO_2 current_prt; WERROR result = WERR_OK; + *returned = 0; + for (snum=0; snumn_services; snum++) { if (lp_browseable(snum) lp_snum_ok(snum) lp_print_ok(snum) ) { DEBUG(4,(Found a printer in smb.conf: %s[%x]\n, lp_servicename(snum), snum));
Build status as of Sat Mar 11 00:00:02 2006
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2006-03-10 00:00:10.0 + +++ /home/build/master/cache/broken_results.txt 2006-03-11 00:00:32.0 + @@ -1,17 +1,17 @@ -Build status as of Fri Mar 10 00:00:01 2006 +Build status as of Sat Mar 11 00:00:02 2006 Build counts: Tree Total Broken Panic -ccache 10 4 0 -distcc 10 2 0 -lorikeet-heimdal 29 29 0 -ppp 16 0 0 -rsync33 3 0 +ccache 8 1 0 +distcc 9 3 0 +lorikeet-heimdal 28 28 0 +ppp 14 0 0 +rsync30 2 0 samba2 0 0 samba-docs 0 0 0 -samba4 36 30 5 -samba_3_034 6 0 -smb-build24 5 0 -talloc 11 6 0 -tdb 30 2 0 +samba4 32 21 2 +samba_3_031 7 0 +smb-build20 5 0 +talloc 29 12 0 +tdb 29 3 0
svn commit: samba r14180 - in branches/SAMBA_4_0/source/auth/kerberos: .
Author: abartlet Date: 2006-03-11 02:06:30 + (Sat, 11 Mar 2006) New Revision: 14180 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14180 Log: The PAC isn't so special that it deserves a level 0 debug any more. Andrew Bartlett Modified: branches/SAMBA_4_0/source/auth/kerberos/kerberos_pac.c Changeset: Modified: branches/SAMBA_4_0/source/auth/kerberos/kerberos_pac.c === --- branches/SAMBA_4_0/source/auth/kerberos/kerberos_pac.c 2006-03-10 23:52:45 UTC (rev 14179) +++ branches/SAMBA_4_0/source/auth/kerberos/kerberos_pac.c 2006-03-11 02:06:30 UTC (rev 14180) @@ -303,7 +303,7 @@ } #endif - DEBUG(0,(account_name: %s [%s]\n, + DEBUG(3,(Found account name from PAC: %s [%s]\n, logon_info-info3.base.account_name.string, logon_info-info3.base.full_name.string)); *pac_data_out = pac_data;
svn commit: samba r14181 - in branches/SAMBA_4_0/source/dsdb/samdb: .
Author: abartlet Date: 2006-03-11 02:07:14 + (Sat, 11 Mar 2006) New Revision: 14181 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14181 Log: This doesn't need level 1 debug, it happens whenever the DNS name is looked up. Andrew Bartlett Modified: branches/SAMBA_4_0/source/dsdb/samdb/cracknames.c Changeset: Modified: branches/SAMBA_4_0/source/dsdb/samdb/cracknames.c === --- branches/SAMBA_4_0/source/dsdb/samdb/cracknames.c 2006-03-11 02:06:30 UTC (rev 14180) +++ branches/SAMBA_4_0/source/dsdb/samdb/cracknames.c 2006-03-11 02:07:14 UTC (rev 14181) @@ -129,7 +129,7 @@ } } while (p); } - DEBUG(1, (LDB_lookup_spn_alias: no alias for service %s applicable\n, alias_from)); + DEBUG(4, (LDB_lookup_spn_alias: no alias for service %s applicable\n, alias_from)); talloc_free(tmp_ctx); return DRSUAPI_DS_NAME_STATUS_NOT_FOUND; }
svn commit: samba r14182 - in branches/SAMBA_3_0/source/rpc_server: .
Author: jra Date: 2006-03-11 02:09:18 + (Sat, 11 Mar 2006) New Revision: 14182 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14182 Log: Ensure we know that dom_sid cannot be null. Jeremy. Modified: branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c Changeset: Modified: branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c === --- branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c 2006-03-11 02:07:14 UTC (rev 14181) +++ branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c 2006-03-11 02:09:18 UTC (rev 14182) @@ -120,7 +120,7 @@ ref-max_entries = MAX_REF_DOMAINS; ref-num_ref_doms_2 = num+1; - ref-hdr_ref_dom[num].ptr_dom_sid = dom_sid != NULL ? 1 : 0; + ref-hdr_ref_dom[num].ptr_dom_sid = 1; /* dom sid cannot be NULL. */ init_unistr2(ref-ref_dom[num].uni_dom_name, dom_name, UNI_FLAGS_NONE); init_uni_hdr(ref-hdr_ref_dom[num].hdr_dom_name, ref-ref_dom[num].uni_dom_name);
svn commit: samba r14183 - in trunk/source/rpc_server: .
Author: jra Date: 2006-03-11 02:09:30 + (Sat, 11 Mar 2006) New Revision: 14183 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14183 Log: Ensure we know that dom_sid cannot be null. Jeremy. Modified: trunk/source/rpc_server/srv_lsa_nt.c Changeset: Modified: trunk/source/rpc_server/srv_lsa_nt.c === --- trunk/source/rpc_server/srv_lsa_nt.c2006-03-11 02:09:18 UTC (rev 14182) +++ trunk/source/rpc_server/srv_lsa_nt.c2006-03-11 02:09:30 UTC (rev 14183) @@ -120,7 +120,7 @@ ref-max_entries = MAX_REF_DOMAINS; ref-num_ref_doms_2 = num+1; - ref-hdr_ref_dom[num].ptr_dom_sid = dom_sid != NULL ? 1 : 0; + ref-hdr_ref_dom[num].ptr_dom_sid = 1; /* dom sid cannot be NULL. */ init_unistr2(ref-ref_dom[num].uni_dom_name, dom_name, UNI_FLAGS_NONE); init_uni_hdr(ref-hdr_ref_dom[num].hdr_dom_name, ref-ref_dom[num].uni_dom_name);
svn commit: samba r14184 - in branches/SAMBA_3_0/source/printing: .
Author: jra Date: 2006-03-11 02:12:25 + (Sat, 11 Mar 2006) New Revision: 14184 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14184 Log: Coverity fix #56. Ensure we can't deref null. Jeremy. Modified: branches/SAMBA_3_0/source/printing/nt_printing.c Changeset: Modified: branches/SAMBA_3_0/source/printing/nt_printing.c === --- branches/SAMBA_3_0/source/printing/nt_printing.c2006-03-11 02:09:30 UTC (rev 14183) +++ branches/SAMBA_3_0/source/printing/nt_printing.c2006-03-11 02:12:25 UTC (rev 14184) @@ -3531,7 +3531,7 @@ } lines = file_lines_load(mapfile, numlines,0); - if (numlines == 0) { + if (numlines == 0 || lines == NULL) { DEBUG(0,(No entries in OS/2 driver map %s\n,mapfile)); return; }
svn commit: samba r14185 - in trunk/source/printing: .
Author: jra Date: 2006-03-11 02:12:30 + (Sat, 11 Mar 2006) New Revision: 14185 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14185 Log: Coverity fix #56. Ensure we can't deref null. Jeremy. Modified: trunk/source/printing/nt_printing.c Changeset: Modified: trunk/source/printing/nt_printing.c === --- trunk/source/printing/nt_printing.c 2006-03-11 02:12:25 UTC (rev 14184) +++ trunk/source/printing/nt_printing.c 2006-03-11 02:12:30 UTC (rev 14185) @@ -3531,7 +3531,7 @@ } lines = file_lines_load(mapfile, numlines,0); - if (numlines == 0) { + if (numlines == 0 || lines == NULL) { DEBUG(0,(No entries in OS/2 driver map %s\n,mapfile)); return; }
svn commit: samba r14186 - in branches/SAMBA_3_0/source/libmsrpc: .
Author: jra Date: 2006-03-11 02:14:49 + (Sat, 11 Mar 2006) New Revision: 14186 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14186 Log: Coverity fix #31. Don't deref null. Jeremy. Modified: branches/SAMBA_3_0/source/libmsrpc/libmsrpc_internal.c Changeset: Modified: branches/SAMBA_3_0/source/libmsrpc/libmsrpc_internal.c === --- branches/SAMBA_3_0/source/libmsrpc/libmsrpc_internal.c 2006-03-11 02:12:30 UTC (rev 14185) +++ branches/SAMBA_3_0/source/libmsrpc/libmsrpc_internal.c 2006-03-11 02:14:49 UTC (rev 14186) @@ -165,6 +165,7 @@ default: TALLOC_FREE(blob); blob = NULL; + return NULL; } if(!(blob-buffer)) {
svn commit: samba r14187 - in trunk/source/libmsrpc: .
Author: jra Date: 2006-03-11 02:14:55 + (Sat, 11 Mar 2006) New Revision: 14187 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14187 Log: Coverity fix #31. Don't deref null. Jeremy. Modified: trunk/source/libmsrpc/libmsrpc_internal.c Changeset: Modified: trunk/source/libmsrpc/libmsrpc_internal.c === --- trunk/source/libmsrpc/libmsrpc_internal.c 2006-03-11 02:14:49 UTC (rev 14186) +++ trunk/source/libmsrpc/libmsrpc_internal.c 2006-03-11 02:14:55 UTC (rev 14187) @@ -165,6 +165,7 @@ default: TALLOC_FREE(blob); blob = NULL; + return NULL; } if(!(blob-buffer)) {
svn commit: samba r14188 - in branches/SAMBA_3_0/source/libmsrpc: .
Author: jra Date: 2006-03-11 02:17:00 + (Sat, 11 Mar 2006) New Revision: 14188 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14188 Log: Coverity fix #32. Don't deref null. Jeremy. Modified: branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c Changeset: Modified: branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c === --- branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c 2006-03-11 02:14:55 UTC (rev 14187) +++ branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c 2006-03-11 02:17:00 UTC (rev 14188) @@ -521,6 +521,7 @@ if(!op || !op-in.pol) { hnd-status = NT_STATUS_INVALID_PARAMETER; + return CAC_FAILURE; } pipe_hnd = cac_GetPipe(hnd, PI_LSARPC);
svn commit: samba r14189 - in trunk/source/libmsrpc: .
Author: jra Date: 2006-03-11 02:17:06 + (Sat, 11 Mar 2006) New Revision: 14189 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14189 Log: Coverity fix #32. Don't deref null. Jeremy. Modified: trunk/source/libmsrpc/cac_lsarpc.c Changeset: Modified: trunk/source/libmsrpc/cac_lsarpc.c === --- trunk/source/libmsrpc/cac_lsarpc.c 2006-03-11 02:17:00 UTC (rev 14188) +++ trunk/source/libmsrpc/cac_lsarpc.c 2006-03-11 02:17:06 UTC (rev 14189) @@ -521,6 +521,7 @@ if(!op || !op-in.pol) { hnd-status = NT_STATUS_INVALID_PARAMETER; + return CAC_FAILURE; } pipe_hnd = cac_GetPipe(hnd, PI_LSARPC);
svn commit: samba r14190 - in branches/SAMBA_3_0/source/libmsrpc: .
Author: jra Date: 2006-03-11 02:20:58 + (Sat, 11 Mar 2006) New Revision: 14190 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14190 Log: Coverity bug #33. Missing initialization of pipe_hnd. Jeremy. Modified: branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c Changeset: Modified: branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c === --- branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c 2006-03-11 02:17:06 UTC (rev 14189) +++ branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c 2006-03-11 02:20:58 UTC (rev 14190) @@ -793,6 +793,11 @@ return CAC_FAILURE; } + pipe_hnd = cac_GetPipe(hnd, PI_LSARPC); + if(!pipe_hnd) { + hnd-status = NT_STATUS_INVALID_HANDLE; + return CAC_FAILURE; + } /*look up the user's SID if we have to*/ if(op-in.name !op-in.sid) {
svn commit: samba r14191 - in trunk/source/libmsrpc: .
Author: jra Date: 2006-03-11 02:21:03 + (Sat, 11 Mar 2006) New Revision: 14191 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14191 Log: Coverity bug #33. Missing initialization of pipe_hnd. Jeremy. Modified: trunk/source/libmsrpc/cac_lsarpc.c Changeset: Modified: trunk/source/libmsrpc/cac_lsarpc.c === --- trunk/source/libmsrpc/cac_lsarpc.c 2006-03-11 02:20:58 UTC (rev 14190) +++ trunk/source/libmsrpc/cac_lsarpc.c 2006-03-11 02:21:03 UTC (rev 14191) @@ -793,6 +793,11 @@ return CAC_FAILURE; } + pipe_hnd = cac_GetPipe(hnd, PI_LSARPC); + if(!pipe_hnd) { + hnd-status = NT_STATUS_INVALID_HANDLE; + return CAC_FAILURE; + } /*look up the user's SID if we have to*/ if(op-in.name !op-in.sid) {
svn commit: lorikeet r516 - in trunk/heimdal/lib/krb5: .
Author: abartlet Date: 2006-03-11 02:21:07 + (Sat, 11 Mar 2006) New Revision: 516 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=lorikeetrev=516 Log: Hackey hack hack. Merge this from Samba4 to lorikeet-heimdal. Andrew Bartlett Modified: trunk/heimdal/lib/krb5/krb5.h Changeset: Modified: trunk/heimdal/lib/krb5/krb5.h === --- trunk/heimdal/lib/krb5/krb5.h 2006-03-07 05:33:41 UTC (rev 515) +++ trunk/heimdal/lib/krb5/krb5.h 2006-03-11 02:21:07 UTC (rev 516) @@ -451,6 +451,9 @@ int large_msg_size; krb5_boolean fdns; /* Lookup hostnames to find full name, or send as-is */ struct send_and_recv *send_and_recv; /* Alternate functions for KDC communication */ +void *mem_ctx; /* Some parts of Samba4 need a valid + memory context (under the event + context) to use */ } krb5_context_data; enum {
svn commit: samba r14192 - in branches/SAMBA_3_0/source/libmsrpc: .
Author: jra Date: 2006-03-11 02:29:23 + (Sat, 11 Mar 2006) New Revision: 14192 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14192 Log: Don't forget to correctly initialize pipe_hnd. Coverity fix #34. Jeremy. Modified: branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c Changeset: Modified: branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c === --- branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c 2006-03-11 02:21:03 UTC (rev 14191) +++ branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c 2006-03-11 02:29:23 UTC (rev 14192) @@ -59,6 +59,12 @@ hnd-_internal.pipes[PI_LSARPC] = True; } + pipe_hnd = cac_GetPipe(hnd, PI_LSARPC); + if(!pipe_hnd) { + hnd-status = NT_STATUS_INVALID_HANDLE; + return CAC_FAILURE; + } + policy = SMB_MALLOC_P(POLICY_HND); if(!policy) { errno = ENOMEM;
svn commit: samba r14193 - in trunk/source/libmsrpc: .
Author: jra Date: 2006-03-11 02:29:29 + (Sat, 11 Mar 2006) New Revision: 14193 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14193 Log: Don't forget to correctly initialize pipe_hnd. Coverity fix #34. Jeremy. Modified: trunk/source/libmsrpc/cac_lsarpc.c Changeset: Modified: trunk/source/libmsrpc/cac_lsarpc.c === --- trunk/source/libmsrpc/cac_lsarpc.c 2006-03-11 02:29:23 UTC (rev 14192) +++ trunk/source/libmsrpc/cac_lsarpc.c 2006-03-11 02:29:29 UTC (rev 14193) @@ -59,6 +59,12 @@ hnd-_internal.pipes[PI_LSARPC] = True; } + pipe_hnd = cac_GetPipe(hnd, PI_LSARPC); + if(!pipe_hnd) { + hnd-status = NT_STATUS_INVALID_HANDLE; + return CAC_FAILURE; + } + policy = SMB_MALLOC_P(POLICY_HND); if(!policy) { errno = ENOMEM;
svn commit: lorikeet r517 - in trunk/heimdal/lib/hdb: .
Author: abartlet Date: 2006-03-11 02:38:24 + (Sat, 11 Mar 2006) New Revision: 517 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=lorikeetrev=517 Log: Another Samba4 hack. This ldb module isn't in the heimdal tree, so it's not picked up by the proto generation. Andrew Bartlett Modified: trunk/heimdal/lib/hdb/hdb_locl.h Changeset: Modified: trunk/heimdal/lib/hdb/hdb_locl.h === --- trunk/heimdal/lib/hdb/hdb_locl.h2006-03-11 02:21:07 UTC (rev 516) +++ trunk/heimdal/lib/hdb/hdb_locl.h2006-03-11 02:38:24 UTC (rev 517) @@ -64,4 +64,11 @@ #include hdb.h #include hdb-private.h +krb5_error_code +hdb_ldb_create ( + krb5_context /*context*/, + HDB ** /*db*/, + const char */*arg*/); + + #endif /* __HDB_LOCL_H__ */
svn commit: samba r14194 - in branches/SAMBA_3_0/source/libmsrpc: .
Author: jra Date: 2006-03-11 02:43:25 + (Sat, 11 Mar 2006) New Revision: 14194 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14194 Log: Coverity bug #35. Fix uninitialized pipe_hnd. Jeremy. Modified: branches/SAMBA_3_0/source/libmsrpc/cac_winreg.c Changeset: Modified: branches/SAMBA_3_0/source/libmsrpc/cac_winreg.c === --- branches/SAMBA_3_0/source/libmsrpc/cac_winreg.c 2006-03-11 02:29:29 UTC (rev 14193) +++ branches/SAMBA_3_0/source/libmsrpc/cac_winreg.c 2006-03-11 02:43:25 UTC (rev 14194) @@ -56,6 +56,12 @@ hnd-_internal.pipes[PI_WINREG] = True; } + pipe_hnd = cac_GetPipe(hnd, PI_WINREG); + if(!pipe_hnd) { + hnd-status = NT_STATUS_INVALID_HANDLE; + return CAC_FAILURE; + } + key = talloc(mem_ctx, POLICY_HND); if(!key) { hnd-status = NT_STATUS_NO_MEMORY;
svn commit: samba r14195 - in trunk/source/libmsrpc: .
Author: jra Date: 2006-03-11 02:43:34 + (Sat, 11 Mar 2006) New Revision: 14195 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14195 Log: Coverity bug #35. Fix uninitialized pipe_hnd. Jeremy. Modified: trunk/source/libmsrpc/cac_winreg.c Changeset: Modified: trunk/source/libmsrpc/cac_winreg.c === --- trunk/source/libmsrpc/cac_winreg.c 2006-03-11 02:43:25 UTC (rev 14194) +++ trunk/source/libmsrpc/cac_winreg.c 2006-03-11 02:43:34 UTC (rev 14195) @@ -56,6 +56,12 @@ hnd-_internal.pipes[PI_WINREG] = True; } + pipe_hnd = cac_GetPipe(hnd, PI_WINREG); + if(!pipe_hnd) { + hnd-status = NT_STATUS_INVALID_HANDLE; + return CAC_FAILURE; + } + key = talloc(mem_ctx, POLICY_HND); if(!key) { hnd-status = NT_STATUS_NO_MEMORY;
svn commit: samba r14196 - in branches/SAMBA_3_0/source/libmsrpc: .
Author: jra Date: 2006-03-11 02:48:20 + (Sat, 11 Mar 2006) New Revision: 14196 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14196 Log: Move to using talloc, not malloc for all policy handles. Jeremy Modified: branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c Changeset: Modified: branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c === --- branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c 2006-03-11 02:43:34 UTC (rev 14195) +++ branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c 2006-03-11 02:48:20 UTC (rev 14196) @@ -65,7 +65,7 @@ return CAC_FAILURE; } - policy = SMB_MALLOC_P(POLICY_HND); + policy = TALLOC_P(mem_ctx, POLICY_HND); if(!policy) { errno = ENOMEM; hnd-status = NT_STATUS_NO_MEMORY; @@ -95,7 +95,6 @@ } if(!NT_STATUS_IS_OK(hnd-status)) { - SAFE_FREE(policy); return CAC_FAILURE; } @@ -125,14 +124,13 @@ return CAC_FAILURE; } - hnd-status = rpccli_lsa_close(pipe_hnd, mem_ctx, pol); + TALLOC_FREE(pol); + if(!NT_STATUS_IS_OK(hnd-status)) return CAC_FAILURE; - SAFE_FREE(pol); - return CAC_SUCCESS; }
svn commit: samba r14197 - in trunk/source/libmsrpc: .
Author: jra Date: 2006-03-11 02:48:26 + (Sat, 11 Mar 2006) New Revision: 14197 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14197 Log: Move to using talloc, not malloc for all policy handles. Jeremy Modified: trunk/source/libmsrpc/cac_lsarpc.c Changeset: Modified: trunk/source/libmsrpc/cac_lsarpc.c === --- trunk/source/libmsrpc/cac_lsarpc.c 2006-03-11 02:48:20 UTC (rev 14196) +++ trunk/source/libmsrpc/cac_lsarpc.c 2006-03-11 02:48:26 UTC (rev 14197) @@ -65,7 +65,7 @@ return CAC_FAILURE; } - policy = SMB_MALLOC_P(POLICY_HND); + policy = TALLOC_P(mem_ctx, POLICY_HND); if(!policy) { errno = ENOMEM; hnd-status = NT_STATUS_NO_MEMORY; @@ -95,7 +95,6 @@ } if(!NT_STATUS_IS_OK(hnd-status)) { - SAFE_FREE(policy); return CAC_FAILURE; } @@ -125,14 +124,13 @@ return CAC_FAILURE; } - hnd-status = rpccli_lsa_close(pipe_hnd, mem_ctx, pol); + TALLOC_FREE(pol); + if(!NT_STATUS_IS_OK(hnd-status)) return CAC_FAILURE; - SAFE_FREE(pol); - return CAC_SUCCESS; }
svn commit: samba r14198 - in branches/SAMBA_4_0/source: heimdal heimdal/kdc heimdal/lib/asn1 heimdal/lib/com_err heimdal/lib/des heimdal/lib/gssapi heimdal/lib/hdb heimdal/lib/krb5 heimdal/lib/roken
Author: abartlet Date: 2006-03-11 04:03:12 + (Sat, 11 Mar 2006) New Revision: 14198 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14198 Log: Update Samba4 to current lorikeet-heimdal. Andrew Bartlett Added: branches/SAMBA_4_0/source/heimdal/lib/asn1/der_format.c branches/SAMBA_4_0/source/heimdal/lib/des/bn.h branches/SAMBA_4_0/source/heimdal/lib/des/dh.h branches/SAMBA_4_0/source/heimdal/lib/des/dsa.h branches/SAMBA_4_0/source/heimdal/lib/des/engine.h branches/SAMBA_4_0/source/heimdal/lib/des/evp.c branches/SAMBA_4_0/source/heimdal/lib/des/evp.h branches/SAMBA_4_0/source/heimdal/lib/des/hcrypto branches/SAMBA_4_0/source/heimdal/lib/des/hmac.c branches/SAMBA_4_0/source/heimdal/lib/des/hmac.h branches/SAMBA_4_0/source/heimdal/lib/des/md2.c branches/SAMBA_4_0/source/heimdal/lib/des/md2.h branches/SAMBA_4_0/source/heimdal/lib/des/pkcs12.h branches/SAMBA_4_0/source/heimdal/lib/des/pkcs5.c branches/SAMBA_4_0/source/heimdal/lib/des/rand.h branches/SAMBA_4_0/source/heimdal/lib/des/rsa.h branches/SAMBA_4_0/source/heimdal/lib/des/ui.h branches/SAMBA_4_0/source/heimdal/lib/roken/hex.c branches/SAMBA_4_0/source/heimdal/lib/roken/hex.h Removed: branches/SAMBA_4_0/source/heimdal/fix-export Modified: branches/SAMBA_4_0/source/heimdal/kdc/kdc-private.h branches/SAMBA_4_0/source/heimdal/kdc/kdc_locl.h branches/SAMBA_4_0/source/heimdal/kdc/kerberos5.c branches/SAMBA_4_0/source/heimdal/kdc/misc.c branches/SAMBA_4_0/source/heimdal/kdc/pkinit.c branches/SAMBA_4_0/source/heimdal/lib/asn1/asn1_gen.c branches/SAMBA_4_0/source/heimdal/lib/asn1/der.h branches/SAMBA_4_0/source/heimdal/lib/asn1/der_cmp.c branches/SAMBA_4_0/source/heimdal/lib/asn1/der_copy.c branches/SAMBA_4_0/source/heimdal/lib/asn1/der_get.c branches/SAMBA_4_0/source/heimdal/lib/asn1/der_length.c branches/SAMBA_4_0/source/heimdal/lib/asn1/extra.c branches/SAMBA_4_0/source/heimdal/lib/asn1/parse.y branches/SAMBA_4_0/source/heimdal/lib/com_err/lex.c branches/SAMBA_4_0/source/heimdal/lib/des/aes.h branches/SAMBA_4_0/source/heimdal/lib/des/des.c branches/SAMBA_4_0/source/heimdal/lib/des/des.h branches/SAMBA_4_0/source/heimdal/lib/des/md4.h branches/SAMBA_4_0/source/heimdal/lib/des/md5.h branches/SAMBA_4_0/source/heimdal/lib/des/rc2.h branches/SAMBA_4_0/source/heimdal/lib/des/rc4.h branches/SAMBA_4_0/source/heimdal/lib/des/rijndael-alg-fst.h branches/SAMBA_4_0/source/heimdal/lib/des/rnd_keys.c branches/SAMBA_4_0/source/heimdal/lib/des/sha.h branches/SAMBA_4_0/source/heimdal/lib/des/ui.c branches/SAMBA_4_0/source/heimdal/lib/gssapi/delete_sec_context.c branches/SAMBA_4_0/source/heimdal/lib/gssapi/import_name.c branches/SAMBA_4_0/source/heimdal/lib/gssapi/wrap.c branches/SAMBA_4_0/source/heimdal/lib/hdb/hdb-protos.h branches/SAMBA_4_0/source/heimdal/lib/hdb/hdb.c branches/SAMBA_4_0/source/heimdal/lib/hdb/hdb_locl.h branches/SAMBA_4_0/source/heimdal/lib/hdb/keytab.c branches/SAMBA_4_0/source/heimdal/lib/krb5/crypto.c branches/SAMBA_4_0/source/heimdal/lib/krb5/error_string.c branches/SAMBA_4_0/source/heimdal/lib/krb5/get_cred.c branches/SAMBA_4_0/source/heimdal/lib/krb5/get_for_creds.c branches/SAMBA_4_0/source/heimdal/lib/krb5/init_creds.c branches/SAMBA_4_0/source/heimdal/lib/krb5/krb5-private.h branches/SAMBA_4_0/source/heimdal/lib/krb5/krb5-protos.h branches/SAMBA_4_0/source/heimdal/lib/krb5/krb5_err.et branches/SAMBA_4_0/source/heimdal/lib/krb5/krb5_locl.h branches/SAMBA_4_0/source/heimdal/lib/krb5/mk_priv.c branches/SAMBA_4_0/source/heimdal/lib/krb5/pkinit.c branches/SAMBA_4_0/source/heimdal/lib/roken/resolve.c branches/SAMBA_4_0/source/heimdal_build/config.mk branches/SAMBA_4_0/source/heimdal_build/crypto-headers.h Changeset: Sorry, the patch is too large (5109 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14198
svn commit: samba r14200 - in branches/SAMBA_4_0/source: scripting/libjs setup
Author: abartlet Date: 2006-03-11 07:07:28 + (Sat, 11 Mar 2006) New Revision: 14200 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14200 Log: Now we have real USN support, don't force the values in the provision scripts. This tests the real module, and avoids duplication. Andrew Bartlett Modified: branches/SAMBA_4_0/source/scripting/libjs/provision.js branches/SAMBA_4_0/source/setup/provision.ldif branches/SAMBA_4_0/source/setup/provision_templates.ldif branches/SAMBA_4_0/source/setup/provision_users.ldif Changeset: Sorry, the patch is too large (557 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14200
svn commit: samba r14201 - in branches/SAMBA_4_0/source/auth/kerberos: .
Author: abartlet Date: 2006-03-11 07:55:15 + (Sat, 11 Mar 2006) New Revision: 14201 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14201 Log: I don't think including roken is going to be a good solution. Let's try and find the real solution. Andrew Bartlett Modified: branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c Changeset: Modified: branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c === --- branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c 2006-03-11 07:07:28 UTC (rev 14200) +++ branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c 2006-03-11 07:55:15 UTC (rev 14201) @@ -27,8 +27,6 @@ #include lib/socket/socket.h #include lib/events/events.h -#include heimdal_build/roken.h /* needed on AIX for 'struct addrinfo' */ - /* context structure for operations on cldap packets */