Commit f1b6a99
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 a472f1e commit f1b6a99
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 | |
|---|---|---|---|
| |||
6061 | 6061 | | |
6062 | 6062 | | |
6063 | 6063 | | |
6064 | | - | |
| 6064 | + | |
6065 | 6065 | | |
6066 | 6066 | | |
6067 | 6067 | | |
| |||
6097 | 6097 | | |
6098 | 6098 | | |
6099 | 6099 | | |
| 6100 | + | |
| 6101 | + | |
| 6102 | + | |
6100 | 6103 | | |
6101 | 6104 | | |
6102 | | - | |
6103 | | - | |
| 6105 | + | |
| 6106 | + | |
| 6107 | + | |
| 6108 | + | |
| 6109 | + | |
| 6110 | + | |
| 6111 | + | |
| 6112 | + | |
| 6113 | + | |
6104 | 6114 | | |
6105 | 6115 | | |
6106 | 6116 | | |
6107 | | - | |
6108 | | - | |
| 6117 | + | |
| 6118 | + | |
| 6119 | + | |
| 6120 | + | |
| 6121 | + | |
| 6122 | + | |
| 6123 | + | |
| 6124 | + | |
6109 | 6125 | | |
6110 | 6126 | | |
6111 | | - | |
6112 | 6127 | | |
6113 | | - | |
| 6128 | + | |
6114 | 6129 | | |
6115 | 6130 | | |
6116 | | - | |
6117 | 6131 | | |
6118 | 6132 | | |
6119 | 6133 | | |
| 6134 | + | |
6120 | 6135 | | |
6121 | 6136 | | |
6122 | 6137 | | |
| 6138 | + | |
| 6139 | + | |
| 6140 | + | |
6123 | 6141 | | |
6124 | 6142 | | |
6125 | 6143 | | |
| |||
6143 | 6161 | | |
6144 | 6162 | | |
6145 | 6163 | | |
| 6164 | + | |
| 6165 | + | |
| 6166 | + | |
6146 | 6167 | | |
6147 | 6168 | | |
6148 | | - | |
6149 | | - | |
| 6169 | + | |
| 6170 | + | |
| 6171 | + | |
| 6172 | + | |
| 6173 | + | |
| 6174 | + | |
| 6175 | + | |
| 6176 | + | |
| 6177 | + | |
6150 | 6178 | | |
6151 | 6179 | | |
6152 | 6180 | | |
6153 | | - | |
6154 | | - | |
| 6181 | + | |
| 6182 | + | |
| 6183 | + | |
| 6184 | + | |
| 6185 | + | |
| 6186 | + | |
| 6187 | + | |
| 6188 | + | |
6155 | 6189 | | |
6156 | 6190 | | |
6157 | | - | |
6158 | 6191 | | |
6159 | | - | |
6160 | | - | |
6161 | | - | |
| 6192 | + | |
| 6193 | + | |
| 6194 | + | |
| 6195 | + | |
| 6196 | + | |
| 6197 | + | |
6162 | 6198 | | |
| 6199 | + | |
6163 | 6200 | | |
6164 | 6201 | | |
6165 | 6202 | | |
| 6203 | + | |
6166 | 6204 | | |
6167 | 6205 | | |
6168 | 6206 | | |
| 6207 | + | |
| 6208 | + | |
| 6209 | + | |
6169 | 6210 | | |
6170 | 6211 | | |
6171 | 6212 | | |
| |||
6174 | 6215 | | |
6175 | 6216 | | |
6176 | 6217 | | |
6177 | | - | |
6178 | | - | |
6179 | | - | |
| 6218 | + | |
| 6219 | + | |
| 6220 | + | |
6180 | 6221 | | |
6181 | 6222 | | |
6182 | 6223 | | |
| |||
6201 | 6242 | | |
6202 | 6243 | | |
6203 | 6244 | | |
| 6245 | + | |
6204 | 6246 | | |
6205 | 6247 | | |
6206 | 6248 | | |
| |||
6239 | 6281 | | |
6240 | 6282 | | |
6241 | 6283 | | |
6242 | | - | |
6243 | | - | |
| 6284 | + | |
| 6285 | + | |
| 6286 | + | |
| 6287 | + | |
| 6288 | + | |
| 6289 | + | |
| 6290 | + | |
| 6291 | + | |
6244 | 6292 | | |
6245 | 6293 | | |
6246 | 6294 | | |
| |||
6276 | 6324 | | |
6277 | 6325 | | |
6278 | 6326 | | |
| 6327 | + | |
6279 | 6328 | | |
6280 | 6329 | | |
6281 | 6330 | | |
| |||
6330 | 6379 | | |
6331 | 6380 | | |
6332 | 6381 | | |
6333 | | - | |
6334 | | - | |
| 6382 | + | |
| 6383 | + | |
| 6384 | + | |
| 6385 | + | |
| 6386 | + | |
| 6387 | + | |
| 6388 | + | |
| 6389 | + | |
6335 | 6390 | | |
6336 | 6391 | | |
6337 | 6392 | | |
| |||
7680 | 7735 | | |
7681 | 7736 | | |
7682 | 7737 | | |
7683 | | - | |
| 7738 | + | |
| 7739 | + | |
7684 | 7740 | | |
7685 | 7741 | | |
7686 | 7742 | | |
| |||
| 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