"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "source3/libsmb/clilist.c" between
samba-4.12.3.tar.gz and samba-4.12.5.tar.gz

About: Samba is the standard Windows interoperability suite of programs for Linux and Unix providing secure, stable and fast file and print services for all clients using the SMB/CIFS protocol. 4.12 series.

clilist.c  (samba-4.12.3):clilist.c  (samba-4.12.5)
skipping to change at line 155 skipping to change at line 155
make_unix_date2(p+4, make_unix_date2(p+4,
smb1cli_conn_server_time_zone( smb1cli_conn_server_time_zone(
cli->conn))); cli->conn)));
finfo->ctime_ts = convert_time_t_to_timespec( finfo->ctime_ts = convert_time_t_to_timespec(
make_unix_date2(p+4, smb1cli_conn_server_time_zon e(cli->conn))); make_unix_date2(p+4, smb1cli_conn_server_time_zon e(cli->conn)));
finfo->atime_ts = convert_time_t_to_timespec( finfo->atime_ts = convert_time_t_to_timespec(
make_unix_date2(p+8, smb1cli_conn_server_time_zon e(cli->conn))); make_unix_date2(p+8, smb1cli_conn_server_time_zon e(cli->conn)));
finfo->mtime_ts = convert_time_t_to_timespec( finfo->mtime_ts = convert_time_t_to_timespec(
make_unix_date2(p+12, smb1cli_conn_server_time_zo ne(cli->conn))); make_unix_date2(p+12, smb1cli_conn_server_time_zo ne(cli->conn)));
finfo->size = IVAL(p,16); finfo->size = IVAL(p,16);
finfo->mode = CVAL(p,24); finfo->mode = SVAL(p,24);
len = CVAL(p, 26); len = CVAL(p, 26);
p += 27; p += 27;
if (recv_flags2 & FLAGS2_UNICODE_STRINGS) { if (recv_flags2 & FLAGS2_UNICODE_STRINGS) {
p += ucs2_align(base_ptr, p, STR_UNICODE); p += ucs2_align(base_ptr, p, STR_UNICODE);
} }
/* We can safely use len here (which is required by OS/2) /* We can safely use len here (which is required by OS/2)
* and the NAS-BASIC server instead of +2 or +1 as the * and the NAS-BASIC server instead of +2 or +1 as the
* STR_TERMINATE flag below is * STR_TERMINATE flag below is
* actually used as the length calculation. * actually used as the length calculation.
skipping to change at line 214 skipping to change at line 214
make_unix_date2(p+4, make_unix_date2(p+4,
smb1cli_conn_server_time_zone( smb1cli_conn_server_time_zone(
cli->conn))); cli->conn)));
finfo->ctime_ts = convert_time_t_to_timespec( finfo->ctime_ts = convert_time_t_to_timespec(
make_unix_date2(p+4, smb1cli_conn_server_time_zon e(cli->conn))); make_unix_date2(p+4, smb1cli_conn_server_time_zon e(cli->conn)));
finfo->atime_ts = convert_time_t_to_timespec( finfo->atime_ts = convert_time_t_to_timespec(
make_unix_date2(p+8, smb1cli_conn_server_time_zon e(cli->conn))); make_unix_date2(p+8, smb1cli_conn_server_time_zon e(cli->conn)));
finfo->mtime_ts = convert_time_t_to_timespec( finfo->mtime_ts = convert_time_t_to_timespec(
make_unix_date2(p+12, smb1cli_conn_server_time_zo ne(cli->conn))); make_unix_date2(p+12, smb1cli_conn_server_time_zo ne(cli->conn)));
finfo->size = IVAL(p,16); finfo->size = IVAL(p,16);
finfo->mode = CVAL(p,24); finfo->mode = SVAL(p,24);
len = CVAL(p, 30); len = CVAL(p, 30);
p += 31; p += 31;
/* check for unisys! */ /* check for unisys! */
if (p + len + 1 > pdata_end) { if (p + len + 1 > pdata_end) {
return pdata_end - base; return pdata_end - base;
} }
ret = clistr_pull_talloc(ctx, ret = clistr_pull_talloc(ctx,
base_ptr, base_ptr,
recv_flags2, recv_flags2,
&finfo->name, &finfo->name,
skipping to change at line 260 skipping to change at line 260
p += 8; p += 8;
finfo->atime_ts = interpret_long_date(p); finfo->atime_ts = interpret_long_date(p);
p += 8; p += 8;
finfo->mtime_ts = interpret_long_date(p); finfo->mtime_ts = interpret_long_date(p);
p += 8; p += 8;
finfo->ctime_ts = interpret_long_date(p); finfo->ctime_ts = interpret_long_date(p);
p += 8; p += 8;
finfo->size = IVAL2_TO_SMB_BIG_UINT(p,0); finfo->size = IVAL2_TO_SMB_BIG_UINT(p,0);
p += 8; p += 8;
p += 8; /* alloc size */ p += 8; /* alloc size */
finfo->mode = CVAL(p,0); /* NB. We need to enlarge finfo->mode to be 32-bits. */
finfo->mode = (uint16_t)IVAL(p,0);
p += 4; p += 4;
namelen = IVAL(p,0); namelen = IVAL(p,0);
p += 4; p += 4;
p += 4; /* EA size */ p += 4; /* EA size */
slen = CVAL(p, 0); slen = CVAL(p, 0);
if (slen > 24) { if (slen > 24) {
/* Bad short name length. */ /* Bad short name length. */
return pdata_end - base; return pdata_end - base;
} }
p += 2; p += 2;
skipping to change at line 555 skipping to change at line 556
} }
for (i=0; i<num_received; i++) { for (i=0; i<num_received; i++) {
if (!interpret_short_filename( if (!interpret_short_filename(
finfo, state->cli, finfo, state->cli,
(char *)state->dirlist + i * DIR_STRUCT_SIZE, (char *)state->dirlist + i * DIR_STRUCT_SIZE,
&finfo[i])) { &finfo[i])) {
TALLOC_FREE(finfo); TALLOC_FREE(finfo);
return NT_STATUS_NO_MEMORY; return NT_STATUS_NO_MEMORY;
} }
if (finfo->name == NULL) {
TALLOC_FREE(finfo);
return NT_STATUS_INVALID_NETWORK_RESPONSE;
}
status = is_bad_finfo_name(state->cli, finfo); status = is_bad_finfo_name(state->cli, finfo);
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
smbXcli_conn_disconnect(state->cli->conn, status); smbXcli_conn_disconnect(state->cli->conn, status);
TALLOC_FREE(finfo); TALLOC_FREE(finfo);
return status; return status;
} }
} }
*pfinfo = finfo; *pfinfo = finfo;
return NT_STATUS_OK; return NT_STATUS_OK;
} }
skipping to change at line 794 skipping to change at line 798
p2 += interpret_long_filename( p2 += interpret_long_filename(
state->finfo, /* Stick fname to the array as such */ state->finfo, /* Stick fname to the array as such */
state->cli, state->info_level, state->cli, state->info_level,
(char *)data, recv_flags2, p2, (char *)data, recv_flags2, p2,
data_end, finfo, &resume_key, &last_name_raw); data_end, finfo, &resume_key, &last_name_raw);
if (finfo->name == NULL) { if (finfo->name == NULL) {
DEBUG(1, ("cli_list: Error: unable to parse name from " DEBUG(1, ("cli_list: Error: unable to parse name from "
"info level %d\n", state->info_level)); "info level %d\n", state->info_level));
ff_eos = true; tevent_req_nterror(req,
break; NT_STATUS_INVALID_NETWORK_RESPONSE);
return;
} }
status = is_bad_finfo_name(state->cli, finfo); status = is_bad_finfo_name(state->cli, finfo);
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
smbXcli_conn_disconnect(state->cli->conn, status); smbXcli_conn_disconnect(state->cli->conn, status);
tevent_req_nterror(req, status); tevent_req_nterror(req, status);
return; return;
} }
if (!state->first && (state->mask[0] != '\0') && if (!state->first && (state->mask[0] != '\0') &&
 End of changes. 5 change blocks. 
6 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)