| Summary: | date overflow with scp -p | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | throw_away_2002 | ||||||
| Component: | scp | Assignee: | OpenSSH Bugzilla mailing list <openssh-bugs> | ||||||
| Status: | CLOSED FIXED | ||||||||
| Severity: | minor | CC: | djm, dtucker | ||||||
| Priority: | P3 | Keywords: | patch | ||||||
| Version: | 3.7.1p2 | ||||||||
| Hardware: | ix86 | ||||||||
| OS: | Linux | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 1353 | ||||||||
| Attachments: |
|
||||||||
|
Description
throw_away_2002
2004-04-01 08:25:02 AEST
Created attachment 588 [details]
Truncate pre-epoch timestamps in scp, add debugging
Does the rcp/scp protocol even permit times before the epoch? If not, the best
we can do is truncate the date to the epoch as per the attached patch.
I added a bit more detail in the debugging:
$ ./scp -vp /mnt/tmp/file localhost:/tmp/
[...]
File mtime -100000 atime 1080785365
Sending file timestamps: T0 0 1080785365 0
Sending file modes: C0664 2323 file
Comment on attachment 588 [details]
Truncate pre-epoch timestamps in scp, add debugging
Please make sure rcp gets this too when you commit
Created attachment 1294 [details]
equivalent change for rcp
This is the equivalent change to rcp. I'm not 100% sure it's right because the format is signed in rcp rather than unsigned in scp and rcp uses stb.st_atimespec.tv_sec rather than stb.st_mtime.
Target 4.8 This has been committed and will be in 4.8. Thanks. Fix shipped in 4.9/4.9p1 release. |