Commit 8c7be35
committed
wolfsftp, port: apply the attributes SETSTAT and FSETSTAT acknowledge
- SFTP_SetFileAttributes() and SFTP_SetFileAttributesHandle() carry
out the size, ownership, permission and timestamp requests while ret
is WS_SUCCESS, bound the size with wResolveOffset() against
WOLFSSH_MAX_FILE_OFFSET, and set WS_UNIMPLEMENTED_E where the port
defines no wrapper.
- wolfSSH_SFTP_RecvSetSTAT() and wolfSSH_SFTP_RecvFSetSTAT() answer
WOLFSSH_FTP_UNSUPPORTED for WS_UNIMPLEMENTED_E; wolfSSH_SFTP_CHMOD()
sets the attribute flags to WOLFSSH_FILEATRB_PERM before sending.
- port.h adds WTRUNCATE, WFTRUNCATE, WCHOWN and WFCHOWN for the POSIX
port, and defines WSETTIME and WFSETTIME over the existing WUTIMES
and WFUTIMES helpers in place of their (0) definitions.
- SFTP_SetMode() guards on _WIN32_WCE in place of USE_WINDOWS_API, and
port.c adds WS_ChmodA(), which trims the SFTP leading root and calls
_wchmod(); it and the WCHMOD mapping to it are left out under
_WIN32_WCE, which keeps the _chmod mapping.
- tests/regress.c adds TestSftpSetStatAttributes(); tests/sftp.c adds
a chmod of a directory and installs SFTP_TEST_UMASK in place of the
sftpTestUmask static; the STATE_SET_ATR_SEND case in tests/api.c
sets atr.flags to WOLFSSH_FILEATRB_PERM.
Issue: F-116581 parent 78633a1 commit 8c7be35
6 files changed
Lines changed: 485 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
545 | 583 | | |
546 | 584 | | |
547 | 585 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6046 | 6046 | | |
6047 | 6047 | | |
6048 | 6048 | | |
6049 | | - | |
| 6049 | + | |
6050 | 6050 | | |
6051 | 6051 | | |
6052 | 6052 | | |
| |||
6082 | 6082 | | |
6083 | 6083 | | |
6084 | 6084 | | |
| 6085 | + | |
| 6086 | + | |
| 6087 | + | |
6085 | 6088 | | |
6086 | 6089 | | |
6087 | | - | |
6088 | | - | |
| 6090 | + | |
| 6091 | + | |
| 6092 | + | |
| 6093 | + | |
| 6094 | + | |
| 6095 | + | |
| 6096 | + | |
| 6097 | + | |
| 6098 | + | |
6089 | 6099 | | |
6090 | 6100 | | |
6091 | 6101 | | |
6092 | | - | |
6093 | | - | |
| 6102 | + | |
| 6103 | + | |
| 6104 | + | |
| 6105 | + | |
| 6106 | + | |
| 6107 | + | |
| 6108 | + | |
| 6109 | + | |
6094 | 6110 | | |
6095 | 6111 | | |
6096 | | - | |
6097 | 6112 | | |
6098 | | - | |
| 6113 | + | |
6099 | 6114 | | |
6100 | 6115 | | |
6101 | | - | |
6102 | 6116 | | |
6103 | 6117 | | |
6104 | 6118 | | |
| 6119 | + | |
6105 | 6120 | | |
6106 | 6121 | | |
6107 | 6122 | | |
| 6123 | + | |
| 6124 | + | |
| 6125 | + | |
6108 | 6126 | | |
6109 | 6127 | | |
6110 | 6128 | | |
| |||
6128 | 6146 | | |
6129 | 6147 | | |
6130 | 6148 | | |
| 6149 | + | |
| 6150 | + | |
| 6151 | + | |
6131 | 6152 | | |
6132 | 6153 | | |
6133 | | - | |
6134 | | - | |
| 6154 | + | |
| 6155 | + | |
| 6156 | + | |
| 6157 | + | |
| 6158 | + | |
| 6159 | + | |
| 6160 | + | |
| 6161 | + | |
| 6162 | + | |
6135 | 6163 | | |
6136 | 6164 | | |
6137 | 6165 | | |
6138 | | - | |
6139 | | - | |
| 6166 | + | |
| 6167 | + | |
| 6168 | + | |
| 6169 | + | |
| 6170 | + | |
| 6171 | + | |
| 6172 | + | |
| 6173 | + | |
6140 | 6174 | | |
6141 | 6175 | | |
6142 | | - | |
6143 | 6176 | | |
6144 | | - | |
6145 | | - | |
6146 | | - | |
| 6177 | + | |
| 6178 | + | |
| 6179 | + | |
| 6180 | + | |
| 6181 | + | |
| 6182 | + | |
6147 | 6183 | | |
| 6184 | + | |
6148 | 6185 | | |
6149 | 6186 | | |
6150 | 6187 | | |
| 6188 | + | |
6151 | 6189 | | |
6152 | 6190 | | |
6153 | 6191 | | |
| 6192 | + | |
| 6193 | + | |
| 6194 | + | |
6154 | 6195 | | |
6155 | 6196 | | |
6156 | 6197 | | |
| |||
6159 | 6200 | | |
6160 | 6201 | | |
6161 | 6202 | | |
6162 | | - | |
6163 | | - | |
6164 | | - | |
| 6203 | + | |
| 6204 | + | |
| 6205 | + | |
6165 | 6206 | | |
6166 | 6207 | | |
6167 | 6208 | | |
| |||
6186 | 6227 | | |
6187 | 6228 | | |
6188 | 6229 | | |
| 6230 | + | |
6189 | 6231 | | |
6190 | 6232 | | |
6191 | 6233 | | |
| |||
6224 | 6266 | | |
6225 | 6267 | | |
6226 | 6268 | | |
6227 | | - | |
6228 | | - | |
| 6269 | + | |
| 6270 | + | |
| 6271 | + | |
| 6272 | + | |
| 6273 | + | |
| 6274 | + | |
| 6275 | + | |
| 6276 | + | |
6229 | 6277 | | |
6230 | 6278 | | |
6231 | 6279 | | |
| |||
6261 | 6309 | | |
6262 | 6310 | | |
6263 | 6311 | | |
| 6312 | + | |
6264 | 6313 | | |
6265 | 6314 | | |
6266 | 6315 | | |
| |||
6315 | 6364 | | |
6316 | 6365 | | |
6317 | 6366 | | |
6318 | | - | |
6319 | | - | |
| 6367 | + | |
| 6368 | + | |
| 6369 | + | |
| 6370 | + | |
| 6371 | + | |
| 6372 | + | |
| 6373 | + | |
| 6374 | + | |
6320 | 6375 | | |
6321 | 6376 | | |
6322 | 6377 | | |
| |||
7665 | 7720 | | |
7666 | 7721 | | |
7667 | 7722 | | |
7668 | | - | |
| 7723 | + | |
| 7724 | + | |
7669 | 7725 | | |
7670 | 7726 | | |
7671 | 7727 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4848 | 4848 | | |
4849 | 4849 | | |
4850 | 4850 | | |
| 4851 | + | |
| 4852 | + | |
| 4853 | + | |
4851 | 4854 | | |
4852 | 4855 | | |
4853 | 4856 | | |
| |||
0 commit comments