search for: pty_make_controlling_tty

Displaying 10 results from an estimated 10 matches for "pty_make_controlling_tty".

2002 Dec 13
5
[Bug 245] SSH can not log out under Solaris 2.6
...erminal. I uncommented the setsid() in sshd.c and added some debugging log() calls to sshd, which generated the following: sshd[21690]: main: before setsid sid=21460 sshd[21690]: main: after setsid sid=21690 sshd[21690]: Accepted publickey for dtucker from 192.168.1.1 port 1665 ssh2 sshd[21694]: pty_make_controlling_tty called, ttyfd=7, cttyname=/dev/pts/2 sshd[21694]: pty_make_controlling_tty: file descriptor 7 is tty /dev/pts/2 sshd[21694]: pty_make_controlling_tty: before setsid, ppid=21690, sid=21690 sshd[21694]: pty_make_controlling_tty: after setsid, ppid=21690, sid=21694 sshd[21694]: error: open /dev/tty f...
2004 Aug 25
2
[patch] sshd with re-exec disabled causes stdin to get closed.
...t sshd with -r (re-exec disabled), once the daemon is forked to handle a client, the child closes stdin by accident. This causes FD 0 to get re-used by the next open call which eventually you end up with a mess. In the perticual case I saw, the pty fd ended up on FD 0 was closed by do_exec_pty(), pty_make_controlling_tty() then opened a new ttyfd as 0, and do_exec_pty() duped it dup2(0,0), dup2(0,1), dup2(0,2), then called close(ttyfd); which closed 0! Patch against openssh-3.9p1 is attached. -- Dave
2002 Dec 21
6
[PATCH] PAM chauthtok + Privsep
..., Buffer *m) +{ + pid_t pid; + int ttyfd, status; + mysig_t old_signal; + + old_signal = mysignal(SIGCHLD, SIG_DFL); + + ttyfd = mm_receive_fd(socket); + debug3("%s: ttyfd=%d, ttyname=%s", __func__, ttyfd, ttyname(ttyfd)); + + if ((pid = fork()) == 0) { + /* acquire controlling tty */ + pty_make_controlling_tty(ttyfd, ttyname(ttyfd)); + + /* set up stdin, stdout and stderr */ + if (dup2(ttyfd, 0) < 0) + error("dup2 stdin: %s", strerror(errno)); + if (dup2(ttyfd, 1) < 0) + error("dup2 stdout: %s", strerror(errno)); + if (dup2(ttyfd, 2) < 0) + error("dup2 stderr:...
2002 Apr 29
1
SSH client, dup, pty.
Hey, I am hoping that some one on this list may be able to help me. I started investigate the possibility of forking a process, the child then attach to a pty, dup std[in|out] to the pty, then exec the ssh client. For some reason, the ssh client still prompted straight to stdin and stdout rather than through the pty that I created. There seem to be a few issues with this. Can someone tell
2000 Jun 15
1
SCO OpenServer 5.0.5, issues with MAXPATHLEN and tty devices
....c (function pty_alloc) is used that seems to be designed for Solaris 2.X. The header above the code is /* * This code is used e.g. on Solaris 2.x. (Note that Solaris 2.3 * also has bsd-style ptys, but they simply do not work.) */ It tries to use device names like /dev/pts000 and the code in pty_make_controlling_tty to fail. Specifically this code fails: /* Verify that we now have a controlling tty. */ fd = open("/dev/tty", O_WRONLY); if (fd < 0) error("open /dev/tty failed - could not set controlling tty: %.100s", strerror(errno)); else { close(fd); } Causing this message to...
2005 Aug 11
2
Porting to Dynix 4.1.3...
Hello there, I am trying to build OpenSSH on the above (very old) version of unix. With a bit of hacking, I have managed to get everything to compile and run. Scp works fine however when I log in via ssh I end up with a session without a controlling terminal. I have followed the code in pty_make_controlling_tty and it seems to go as follows: 1. Starts with a controlling tty. 2. setsid works, no controlling tty. 3. open of tty works, however it doesn't become the controlling tty. 4. open of /dev/tty fails. I don't have a huge experience of pseudo ttys or controlling ttys but it looks to me lik...
2001 Feb 01
0
warnings on aix325
...en' sshd.c:897: warning: implicit declaration of function `accept' auth-rhosts.c: In function `check_rhosts_file': auth-rhosts.c:110: warning: implicit declaration of function `innetgr' auth-rhosts.c:113: warning: implicit declaration of function `strcasecmp' pty.c: In function `pty_make_controlling_tty': pty.c:222: warning: implicit declaration of function `ioctl' pty.c: In function `pty_setowner': pty.c:312: warning: int format, long int arg (arg 3) pty.c:312: warning: int format, long int arg (arg 4) pty.c:315: warning: unsigned int format, mode_t arg (arg 3) log-server.c: In functi...
2003 Jun 11
2
[PATCH] Fix typos, OpenBSD + Portable
...y.c 2003/06/11 12:29:21 @@ -181,7 +181,7 @@ error("chmod %.100s 0666 failed: %.100s", ttyname, strerror(errno)); } -/* Makes the tty the processes controlling tty and sets it to sane modes. */ +/* Makes the tty the process's controlling tty and sets it to sane modes. */ void pty_make_controlling_tty(int *ttyfd, const char *ttyname)
2000 May 19
2
Solved: on Solaris, "couldn't wait for child '...' completion: No child processes"
> John Horne [SMTP:J.Horne at plymouth.ac.uk] wrote: > > Emanuel Borsboom <emanuel at heatdeath.org> wrote: >> Trying to install the portable OpenSSH on Solaris 2.6. Compiling from >> openssh-2.1.0.tar.gz using gcc. Compiles and installs fine. sshd >> starts fine. First connection from another system works. Child sshd is >> forked, but the parent dies
2002 May 17
16
[Bug 245] SSH can not log out under Solaris 2.6
http://bugzilla.mindrot.org/show_bug.cgi?id=245 ------- Additional Comments From wknox at mitre.org 2002-05-18 00:58 ------- Same issue with Solaris 8 built with gcc 2.95.2 with the following configure options: --without-rsh --with-tcp-wrappers --with-pam --disable-suid-ssh --with-prngd-socket --with-default-path=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin Running a ssh -v