mirror of git://anongit.mindrot.org/openssh.git
- stevesk@cvs.openbsd.org 2001/12/06 18:09:23
[channels.c session.c] strncpy->strlcpy. remaining strncpy's are necessary. ok markus@
This commit is contained in:
parent
e181a4d294
commit
ccd8d07b3c
|
@ -5,6 +5,9 @@
|
||||||
- stevesk@cvs.openbsd.org 2001/12/06 18:02:32
|
- stevesk@cvs.openbsd.org 2001/12/06 18:02:32
|
||||||
[channels.c sshconnect.c]
|
[channels.c sshconnect.c]
|
||||||
shutdown(sock, SHUT_RDWR) not needed here; ok markus@
|
shutdown(sock, SHUT_RDWR) not needed here; ok markus@
|
||||||
|
- stevesk@cvs.openbsd.org 2001/12/06 18:09:23
|
||||||
|
[channels.c session.c]
|
||||||
|
strncpy->strlcpy. remaining strncpy's are necessary. ok markus@
|
||||||
|
|
||||||
20011206
|
20011206
|
||||||
- (bal) OpenBSD CVS Sync
|
- (bal) OpenBSD CVS Sync
|
||||||
|
@ -7002,4 +7005,4 @@
|
||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.1689 2001/12/07 17:24:49 mouring Exp $
|
$Id: ChangeLog,v 1.1690 2001/12/07 17:26:48 mouring Exp $
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: channels.c,v 1.144 2001/12/06 18:02:32 stevesk Exp $");
|
RCSID("$OpenBSD: channels.c,v 1.145 2001/12/06 18:09:23 stevesk Exp $");
|
||||||
|
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
#include "ssh1.h"
|
#include "ssh1.h"
|
||||||
|
@ -2609,8 +2609,7 @@ x11_connect_display(void)
|
||||||
* Connect to an inet socket. The DISPLAY value is supposedly
|
* Connect to an inet socket. The DISPLAY value is supposedly
|
||||||
* hostname:d[.s], where hostname may also be numeric IP address.
|
* hostname:d[.s], where hostname may also be numeric IP address.
|
||||||
*/
|
*/
|
||||||
strncpy(buf, display, sizeof(buf));
|
strlcpy(buf, display, sizeof(buf));
|
||||||
buf[sizeof(buf) - 1] = 0;
|
|
||||||
cp = strchr(buf, ':');
|
cp = strchr(buf, ':');
|
||||||
if (!cp) {
|
if (!cp) {
|
||||||
error("Could not find ':' in DISPLAY: %.100s", display);
|
error("Could not find ':' in DISPLAY: %.100s", display);
|
||||||
|
@ -2893,8 +2892,7 @@ auth_input_request_forwarding(struct passwd * pw)
|
||||||
/* Bind it to the name. */
|
/* Bind it to the name. */
|
||||||
memset(&sunaddr, 0, sizeof(sunaddr));
|
memset(&sunaddr, 0, sizeof(sunaddr));
|
||||||
sunaddr.sun_family = AF_UNIX;
|
sunaddr.sun_family = AF_UNIX;
|
||||||
strncpy(sunaddr.sun_path, auth_sock_name,
|
strlcpy(sunaddr.sun_path, auth_sock_name, sizeof(sunaddr.sun_path));
|
||||||
sizeof(sunaddr.sun_path));
|
|
||||||
|
|
||||||
if (bind(sock, (struct sockaddr *) & sunaddr, sizeof(sunaddr)) < 0)
|
if (bind(sock, (struct sockaddr *) & sunaddr, sizeof(sunaddr)) < 0)
|
||||||
packet_disconnect("bind: %.100s", strerror(errno));
|
packet_disconnect("bind: %.100s", strerror(errno));
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: session.c,v 1.110 2001/12/01 21:41:48 markus Exp $");
|
RCSID("$OpenBSD: session.c,v 1.111 2001/12/06 18:09:23 stevesk Exp $");
|
||||||
|
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
#include "ssh1.h"
|
#include "ssh1.h"
|
||||||
|
@ -1473,8 +1473,7 @@ do_child(Session *s, const char *command)
|
||||||
|
|
||||||
/* Start the shell. Set initial character to '-'. */
|
/* Start the shell. Set initial character to '-'. */
|
||||||
buf[0] = '-';
|
buf[0] = '-';
|
||||||
strncpy(buf + 1, cp, sizeof(buf) - 1);
|
strlcpy(buf + 1, cp, sizeof(buf) - 1);
|
||||||
buf[sizeof(buf) - 1] = 0;
|
|
||||||
|
|
||||||
/* Execute the shell. */
|
/* Execute the shell. */
|
||||||
argv[0] = buf;
|
argv[0] = buf;
|
||||||
|
|
Loading…
Reference in New Issue