search for: namebuflen

Displaying 4 results from an estimated 4 matches for "namebuflen".

2000 Aug 28
1
PTY-Allocation under SCO 5
...re XXX depends on the number of pseudo tty's entered in the scoadmin Tool for the network interface. So I change the allocation routine in the pty.c file from: snprintf(buf, sizeof buf, "/dev/pty%c%c", ptymajors[i / num_minors], ptyminors[i % num_minors]); snprintf(namebuf, namebuflen, "/dev/tty%c%c", ptymajors[i / num_minors], ptyminors[i % num_minors]); into: snprintf(buf, sizeof buf, "/dev/ptyp%d", i); snprintf(namebuf, namebuflen, "/dev/ttyp%d", i); 'i' is set in the for loop. I set 'i' to the maximum of 256. A possi...
1999 Dec 16
4
ANNOUNCE: openssh-1.2.1pre18
...ons compiler support from Darren_Hall at progressive.com 19991214 - OpenBSD CVS Changes - [canohost.c] fix get_remote_port() and friends for sshd -i; Holger.Trapp at Informatik.TU-Chemnitz.DE - [mpaux.c] make code simpler. no need for memcpy. niels@ ok - [pty.c] namebuflen not sizeof namebuflen; bnd at ep-ag.com via djm at mindrot.org fix proto; markus - [ssh.1] typo; mark.baushke at solipsa.com - [channels.c ssh.c ssh.h sshd.c] type conflict for 'extern Type *options' in channels.c; dot at dotat.at - [sshconnect.c] move checking...
2001 Feb 17
2
Where is OpenSSH 2.5.0p1?
...pty(3) exists in OSF/1 and some other os'es */ - char buf[64]; + char *name; int i; - i = openpty(ptyfd, ttyfd, buf, NULL, NULL); + i = openpty(ptyfd, ttyfd, NULL, NULL, NULL); if (i < 0) { error("openpty: %.100s", strerror(errno)); return 0; } - strlcpy(namebuf, buf, namebuflen); /* possible truncation */ + name = ttyname(*ttyfd); + if (!name) + fatal("openpty returns device for which ttyname fails."); + + strlcpy(namebuf, name, namebuflen); /* possible truncation */ return 1; #else /* HAVE_OPENPTY */ #ifdef HAVE__GETPTY
2014 Sep 08
1
possible deadcodes in sources
...} break; case sClientAliveInterval: * monitor_wrap.c:720:dead_error_line ? Execution cannot reach this statement "close(tmp2);".o --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -714,10 +714,8 @@ mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) if ((tmp1 = dup(pmonitor->m_recvfd)) == -1 || (tmp2 = dup(pmonitor->m_recvfd)) == -1) { error("%s: cannot allocate fds for pty", __func__); - if (tmp1 > 0) + if (tmp1 > -1) close(tmp1); -...