Changeset 223 for branches/samba-3.3.x/source/libsmb
- Timestamp:
- May 24, 2009, 7:51:24 AM (16 years ago)
- Location:
- branches/samba-3.3.x/source/libsmb
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/libsmb/clidfs.c
r206 r223 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.3.x/source/libsmb/clientgen.c
r206 r223 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.3.x/source/libsmb/clikrb5.c
r221 r223 869 869 bool get_krb5_smb_session_key(krb5_context context, krb5_auth_context auth_context, DATA_BLOB *session_key, bool remote) 870 870 { 871 krb5_keyblock *skey ;872 krb5_error_code err ;873 bool ret = False;874 875 if (remote) 871 krb5_keyblock *skey = NULL; 872 krb5_error_code err = 0; 873 bool ret = false; 874 875 if (remote) { 876 876 err = krb5_auth_con_getremotesubkey(context, auth_context, &skey); 877 else877 } else { 878 878 err = krb5_auth_con_getlocalsubkey(context, auth_context, &skey); 879 if (err == 0 && skey != NULL) { 880 DEBUG(10, ("Got KRB5 session key of length %d\n", (int)KRB5_KEY_LENGTH(skey))); 881 *session_key = data_blob(KRB5_KEY_DATA(skey), KRB5_KEY_LENGTH(skey)); 882 dump_data_pw("KRB5 Session Key:\n", session_key->data, session_key->length); 883 884 ret = True; 885 879 } 880 881 if (err || skey == NULL) { 882 DEBUG(10, ("KRB5 error getting session key %d\n", err)); 883 goto done; 884 } 885 886 DEBUG(10, ("Got KRB5 session key of length %d\n", (int)KRB5_KEY_LENGTH(skey))); 887 *session_key = data_blob(KRB5_KEY_DATA(skey), KRB5_KEY_LENGTH(skey)); 888 dump_data_pw("KRB5 Session Key:\n", session_key->data, session_key->length); 889 890 ret = true; 891 892 done: 893 if (skey) { 886 894 krb5_free_keyblock(context, skey); 887 } else {888 DEBUG(10, ("KRB5 error getting session key %d\n", err));889 895 } 890 896 -
branches/samba-3.3.x/source/libsmb/clitrans.c
r206 r223 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.3.x/source/libsmb/dsgetdcname.c
r222 r223 312 312 ****************************************************************/ 313 313 314 #define RETURN_ON_FALSE(x) if (! x) return false;314 #define RETURN_ON_FALSE(x) if (!(x)) return false; 315 315 316 316 static bool check_cldap_reply_required_flags(uint32_t ret_flags, -
branches/samba-3.3.x/source/libsmb/libsmb_dir.c
r221 r223 1170 1170 &targetcli, &targetpath)) { 1171 1171 d_printf("Could not resolve %s\n", path); 1172 TALLOC_FREE(frame); 1172 errno = ENOENT; 1173 TALLOC_FREE(frame); 1173 1174 return -1; 1174 1175 } … … 1277 1278 &targetcli, &targetpath)) { 1278 1279 d_printf("Could not resolve %s\n", path); 1280 errno = ENOENT; 1279 1281 TALLOC_FREE(frame); 1280 1282 return -1; … … 1559 1561 &targetcli, &targetpath)) { 1560 1562 d_printf("Could not resolve %s\n", path); 1563 errno = ENOENT; 1561 1564 TALLOC_FREE(frame); 1562 1565 return -1; … … 1750 1753 &targetcli, &targetpath)) { 1751 1754 d_printf("Could not resolve %s\n", path); 1755 errno = ENOENT; 1752 1756 TALLOC_FREE(frame); 1753 1757 return -1; … … 1922 1926 &targetcli1, &targetpath1)) { 1923 1927 d_printf("Could not resolve %s\n", path1); 1928 errno = ENOENT; 1924 1929 TALLOC_FREE(frame); 1925 1930 return -1; … … 1937 1942 &targetcli2, &targetpath2)) { 1938 1943 d_printf("Could not resolve %s\n", path2); 1944 errno = ENOENT; 1939 1945 TALLOC_FREE(frame); 1940 1946 return -1; -
branches/samba-3.3.x/source/libsmb/libsmb_file.c
r221 r223 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.3.x/source/libsmb/libsmb_stat.c
r221 r223 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.3.x/source/libsmb/smb_seal.c
r206 r223 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.3.x/source/libsmb/unexpected.c
r206 r223 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.