François Perrad
28b6111db0
use strlcpy & strlcat ( #74 )
...
* refactor checkpubkeyperms() with safe BSD functions
fix gcc8 warnings
```
svr-authpubkey.c: In function 'checkpubkeyperms':
svr-authpubkey.c:427:2: warning: 'strncat' specified bound 5 equals source length [-Wstringop-overflow=]
strncat(filename, "/.ssh", 5); /* strlen("/.ssh") == 5 */
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
svr-authpubkey.c:433:2: warning: 'strncat' specified bound 16 equals source length [-Wstringop-overflow=]
strncat(filename, "/authorized_keys", 16);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
see https://www.sudo.ws/todd/papers/strlcpy.html
* restore strlcpy in xstrdup
see original https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/xmalloc.c?rev=1.16
2019-03-20 22:09:19 +08:00
Ben Gardner
100cbc5f3f
Use DROPBEAR_PATH_DEVNULL instead of undefined _PATH_DEVNULL
2016-05-25 09:52:23 -05:00
Michael Witten
6453b5b70e
scp: Have `fatal()' append a newline to the message
...
Date: Wed, 4 Nov 2015 20:33:19 -0000
It would seem that it's standard practice not to include a newline in the message
text, but that results in poor formatting, as a shell's command line then begins
on the line of the error message itself.
This commit simply instructs `fatal()' to append a newline after the message,
which should be suitable behavior for all of the invocations I've come across.
2016-01-19 00:23:19 +08:00
Matt Johnston
61b49ea2e3
Add note about OpenSSH origin
2016-01-19 00:22:23 +08:00
Matt Johnston
9be0d6b53d
Define _GNU_SOURCE for vasprintf
2013-03-24 00:02:20 +08:00
Matt Johnston
3a5c4b68bb
Update to scp from OpenSSH portable 4.3p2
...
--HG--
extra : convert_revision : e2bccdd6ba49edd575b1d0272c7dfee5f9f7acf6
2006-03-08 14:20:24 +00:00
Matt Johnston
225452befc
get rid of the substitution... We want a fixed identifier
...
--HG--
extra : convert_revision : d6b70dbcc1713663608033cb41cde196d44d4f2c
2004-07-30 11:27:52 +00:00
Matt Johnston
674a607488
Makefile.in contains updated files required
...
--HG--
extra : convert_revision : cc8a8c49dc70e632c352853a39801089b08149be
2004-06-01 02:46:09 +00:00