Changeset 233 for branches/samba-3.2.x/source/libsmb
- Timestamp:
- May 27, 2009, 11:39:15 AM (16 years ago)
- Location:
- branches/samba-3.2.x/source/libsmb
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/libsmb/clidfs.c
r232 r233 666 666 const char *dir) 667 667 { 668 char path_sep = '\\'; 669 668 670 /* Ensure the extrapath doesn't start with a separator. */ 669 671 while (IS_DIRECTORY_SEP(*dir)) { … … 671 673 } 672 674 673 return talloc_asprintf(ctx, "\\%s\\%s\\%s", 674 cli->desthost, cli->share, dir); 675 if (cli->posix_capabilities & CIFS_UNIX_POSIX_PATHNAMES_CAP) { 676 path_sep = '/'; 677 } 678 return talloc_asprintf(ctx, "%c%s%c%s%c%s", 679 path_sep, 680 cli->desthost, 681 path_sep, 682 cli->share, 683 path_sep, 684 dir); 675 685 } 676 686 -
branches/samba-3.2.x/source/libsmb/clientgen.c
r232 r233 517 517 SAFE_FREE(cli->inbuf); 518 518 SAFE_FREE(cli->outbuf); 519 SAFE_FREE(cli);519 TALLOC_FREE(cli); 520 520 return NULL; 521 521 } -
branches/samba-3.2.x/source/libsmb/clikrb5.c
r204 r233 862 862 bool get_krb5_smb_session_key(krb5_context context, krb5_auth_context auth_context, DATA_BLOB *session_key, bool remote) 863 863 { 864 krb5_keyblock *skey ;865 krb5_error_code err ;866 bool ret = False;867 868 if (remote) 864 krb5_keyblock *skey = NULL; 865 krb5_error_code err = 0; 866 bool ret = false; 867 868 if (remote) { 869 869 err = krb5_auth_con_getremotesubkey(context, auth_context, &skey); 870 else870 } else { 871 871 err = krb5_auth_con_getlocalsubkey(context, auth_context, &skey); 872 if (err == 0 && skey != NULL) { 873 DEBUG(10, ("Got KRB5 session key of length %d\n", (int)KRB5_KEY_LENGTH(skey))); 874 *session_key = data_blob(KRB5_KEY_DATA(skey), KRB5_KEY_LENGTH(skey)); 875 dump_data_pw("KRB5 Session Key:\n", session_key->data, session_key->length); 876 877 ret = True; 878 872 } 873 874 if (err || skey == NULL) { 875 DEBUG(10, ("KRB5 error getting session key %d\n", err)); 876 goto done; 877 } 878 879 DEBUG(10, ("Got KRB5 session key of length %d\n", (int)KRB5_KEY_LENGTH(skey))); 880 *session_key = data_blob(KRB5_KEY_DATA(skey), KRB5_KEY_LENGTH(skey)); 881 dump_data_pw("KRB5 Session Key:\n", session_key->data, session_key->length); 882 883 ret = true; 884 885 done: 886 if (skey) { 879 887 krb5_free_keyblock(context, skey); 880 } else {881 DEBUG(10, ("KRB5 error getting session key %d\n", err));882 888 } 883 889 … … 1748 1754 tmp = kt_str; 1749 1755 tmp += 5; 1756 } 1757 1758 if (tmp[0] == '/') { 1759 /* Treat as a FILE: keytab definition. */ 1760 found_valid_name = true; 1750 1761 } 1751 1762 -
branches/samba-3.2.x/source/libsmb/clitrans.c
r136 r233 113 113 this_ldata = MIN(ldata-tot_data,cli->max_xmit - (500+this_lparam)); 114 114 115 client_set_trans_sign_state_off(cli, mid);116 client_set_trans_sign_state_on(cli, mid);117 118 115 cli_set_message(cli->outbuf,trans==SMBtrans?8:9,0,True); 119 116 SCVAL(cli->outbuf,smb_com,(trans==SMBtrans ? SMBtranss : SMBtranss2)); … … 139 136 cli_setup_bcc(cli, outdata+this_ldata); 140 137 141 /*142 * Save the mid we're using. We need this for finding143 * signing replies.144 */145 mid = cli->mid;146 147 138 show_msg(cli->outbuf); 139 140 client_set_trans_sign_state_off(cli, mid); 141 cli->mid = mid; 148 142 if (!cli_send_smb(cli)) { 149 client_set_trans_sign_state_off(cli, mid);150 143 return False; 151 144 } 152 153 /* Ensure we use the same mid for the secondaries. */ 154 cli->mid = mid; 145 client_set_trans_sign_state_on(cli, mid); 155 146 156 147 tot_data += this_ldata; … … 462 453 cli_setup_bcc(cli, outdata+this_ldata); 463 454 464 /*465 * Save the mid we're using. We need this for finding466 * signing replies.467 */468 mid = cli->mid;469 470 455 show_msg(cli->outbuf); 471 456 457 client_set_trans_sign_state_off(cli, mid); 458 cli->mid = mid; 472 459 if (!cli_send_smb(cli)) { 473 client_set_trans_sign_state_off(cli, mid);474 460 return False; 475 461 } 476 477 /* Ensure we use the same mid for the secondaries. */ 478 cli->mid = mid; 462 client_set_trans_sign_state_on(cli, mid); 479 463 480 464 tot_data += this_ldata; -
branches/samba-3.2.x/source/libsmb/dsgetdcname.c
r232 r233 440 440 ****************************************************************/ 441 441 442 #define RETURN_ON_FALSE(x) if (! x) return false;442 #define RETURN_ON_FALSE(x) if (!(x)) return false; 443 443 444 444 static bool check_cldap_reply_required_flags(uint32_t ret_flags, -
branches/samba-3.2.x/source/libsmb/libsmb_dir.c
r232 r233 1172 1172 &targetcli, &targetpath)) { 1173 1173 d_printf("Could not resolve %s\n", path); 1174 TALLOC_FREE(frame); 1174 errno = ENOENT; 1175 TALLOC_FREE(frame); 1175 1176 return -1; 1176 1177 } … … 1279 1280 &targetcli, &targetpath)) { 1280 1281 d_printf("Could not resolve %s\n", path); 1282 errno = ENOENT; 1281 1283 TALLOC_FREE(frame); 1282 1284 return -1; … … 1744 1746 &targetcli, &targetpath)) { 1745 1747 d_printf("Could not resolve %s\n", path); 1748 errno = ENOENT; 1749 errno = ENOENT; 1746 1750 TALLOC_FREE(frame); 1747 1751 return -1; … … 1910 1914 &targetcli1, &targetpath1)) { 1911 1915 d_printf("Could not resolve %s\n", path1); 1916 errno = ENOENT; 1912 1917 TALLOC_FREE(frame); 1913 1918 return -1; … … 1918 1923 &targetcli2, &targetpath2)) { 1919 1924 d_printf("Could not resolve %s\n", path2); 1925 errno = ENOENT; 1920 1926 TALLOC_FREE(frame); 1921 1927 return -1; -
branches/samba-3.2.x/source/libsmb/libsmb_file.c
r228 r233 119 119 &targetcli, &targetpath)) { 120 120 d_printf("Could not resolve %s\n", path); 121 errno = ENOENT; 121 122 SAFE_FREE(file); 122 123 TALLOC_FREE(frame); … … 299 300 &targetcli, &targetpath)) { 300 301 d_printf("Could not resolve %s\n", path); 302 errno = ENOENT; 301 303 TALLOC_FREE(frame); 302 304 return -1; … … 388 390 &targetcli, &targetpath)) { 389 391 d_printf("Could not resolve %s\n", path); 392 errno = ENOENT; 390 393 TALLOC_FREE(frame); 391 394 return -1; … … 463 466 &targetcli, &targetpath)) { 464 467 d_printf("Could not resolve %s\n", path); 468 errno = ENOENT; 465 469 TALLOC_FREE(frame); 466 470 return -1; … … 545 549 &targetcli, &targetpath)) { 546 550 d_printf("Couldn't resolve %s\n", path); 551 errno = ENOENT; 547 552 TALLOC_FREE(frame); 548 553 return False; … … 757 762 &targetcli, &targetpath)) { 758 763 d_printf("Could not resolve %s\n", path); 764 errno = ENOENT; 759 765 TALLOC_FREE(frame); 760 766 return -1; … … 848 854 &targetcli, &targetpath)) { 849 855 d_printf("Could not resolve %s\n", path); 856 errno = ENOENT; 850 857 TALLOC_FREE(frame); 851 858 return -1; -
branches/samba-3.2.x/source/libsmb/libsmb_stat.c
r133 r233 261 261 &targetcli, &targetpath)) { 262 262 d_printf("Could not resolve %s\n", path); 263 errno = ENOENT; 263 264 TALLOC_FREE(frame); 264 265 return -1; -
branches/samba-3.2.x/source/libsmb/namequery.c
r232 r233 1503 1503 1504 1504 DEBUG(10, ("internal_resolve_name: looking up %s#%x (sitename %s)\n", 1505 name, name_type, sitename ? sitename : NULL));1505 name, name_type, sitename ? sitename : "(null)")); 1506 1506 1507 1507 if (is_ipaddress(name)) { … … 2142 2142 bool ads_only ) 2143 2143 { 2144 bool ordered ;2144 bool ordered = false; 2145 2145 NTSTATUS status; 2146 2146 enum dc_lookup_type lookup_type = DC_NORMAL_LOOKUP; -
branches/samba-3.2.x/source/libsmb/smb_seal.c
r228 r233 137 137 smb_set_enclen(buf_out, smb_len(buf) + NTLMSSP_SIG_SIZE, enc_ctx_num); 138 138 139 sig = data_blob(NULL, NTLMSSP_SIG_SIZE);139 ZERO_STRUCT(sig); 140 140 141 141 status = ntlmssp_seal_packet(ntlmssp_state, … … 154 154 /* First 16 data bytes are signature for SSPI compatibility. */ 155 155 memcpy(buf_out + 8, sig.data, NTLMSSP_SIG_SIZE); 156 data_blob_free(&sig); 156 157 *ppbuf_out = buf_out; 157 158 return NT_STATUS_OK; -
branches/samba-3.2.x/source/libsmb/unexpected.c
r133 r233 164 164 port); 165 165 166 if (!p) { 167 return 0; 168 } 169 166 170 if ((state->match_type == NMB_PACKET && 167 171 p->packet.nmb.header.name_trn_id == state->match_id) ||
Note:
See TracChangeset
for help on using the changeset viewer.