Re: SCP with Resume Feature

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 





On 4/4/21 9:45 PM, Jim Knoble wrote:
[...] I also cannot figure out why I can append directly to the target file. After opening the file I'd seek to the end but the bytes would still start at the 0th byte. I'm probably missing something in atomicio. Writing the temp file and then appending works and it's not taking up a lot of cycles but it doesn't feel like the 'right' way to do it.

This certainly does sound suboptimal. Maybe if you post the code?

In context the you can see the code at https://github.com/rapier1/openssh-portable/blob/resume-scp/scp.c

The diff is available at: https://pastebin.com/icXjV2JP

Honestly, I have no idea why the direct append isn't working. In 'sink' the code opens ofd with an open. I had initially tried doing an lseek to the end of the file which didn't work. Then I tried open the file with O_APPEND and that didn't work either. I think the issue is in atomicio6 but modifying that would be more intrusive than I would like for this issue.

Chris
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux