summaryrefslogtreecommitdiff
path: root/sshpty.c
Commit message (Collapse)AuthorAgeFilesLines
* Include stdio.h for FILE in misc.h.Darren Tucker2020-12-221-0/+1
| | | | Fixes build on at least OpenBSD.
* Do not fatal on failed lookup of group "tty".Darren Tucker2019-07-051-1/+1
| | | | | | Some platforms (eg AIX and Cygwin) do not have a "tty" group. In those cases we will fall back to making the tty device the user's primary group, so do not fatal if the group lookup fails. ok djm@
* upstream: fatal() if getgrnam() cannot find "tty"deraadt@openbsd.org2019-07-051-1/+3
| | | | OpenBSD-Commit-ID: d148c1c052fa0ed7d105b5428b5c1bab91630048
* upstream: stat() returns precisely -1 to indicate errorderaadt@openbsd.org2019-07-051-2/+2
| | | | OpenBSD-Commit-ID: 668e8d022ed4ab847747214f64119e5865365fa1
* upstream: When system calls indicate an error they return -1, notderaadt@openbsd.org2019-07-051-9/+9
| | | | | | | | some arbitrary value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future. OpenBSD-Commit-ID: 48081f00db7518e3b712a49dca06efc2a5428075
* Remove UNICOS support.Darren Tucker2018-02-151-25/+0
| | | | | | | The code required to support it is quite invasive to the mainline code that is synced with upstream and is an ongoing maintenance burden. Both the hardware and software are literal museum pieces these days and we could not find anyone still running OpenSSH on one.
* upstream commitdtucker@openbsd.org2016-11-291-1/+15
| | | | | | | Factor out code to disconnect from controlling terminal into its own function. ok djm@ Upstream-ID: 39fd9e8ebd7222615a837312face5cc7ae962885
* Remove no-op brackets to resync with upstream.Darren Tucker2016-09-121-3/+3
|
* upstream commitdjm@openbsd.org2015-08-021-2/+2
| | | | | | | fix pty permissions; patch from Nikolay Edigaryev; ok deraadt Upstream-ID: 40ff076d2878b916fbfd8e4f45dbe5bec019e550
* platform's with openpty don't need pty_releaseDamien Miller2015-04-131-2/+2
|
* upstream commitdjm@openbsd.org2014-10-131-8/+3
| | | | | tighten permissions on pty when the "tty" group does not exist; pointed out by Corinna Vinschen; ok markus
* - (djm) [commit configure.ac defines.h sshpty.c] don't attempt to useDamien Miller2014-05-211-13/+0
| | | | | vhangup on Linux. It doens't work for non-root users, and for them it just messes up the tty settings.
* - (djm) [sshpty.c] bz#1419: OSX uses cloning ptys that automagicallyDamien Miller2009-02-121-0/+9
| | | | set ownership and modes, so avoid explicitly setting them
* - stevesk@cvs.openbsd.org 2007/09/11 23:49:09Damien Miller2007-10-261-1/+1
| | | | | | [sshpty.c] remove #if defined block not needed; ok markus@ dtucker@ (NB. RCD ID sync only for portable)
* - stevesk@cvs.openbsd.org 2007/09/11 04:36:29Damien Miller2007-09-171-1/+1
| | | | | | [sshpty.c] sort #include NB. RCS ID sync only
* - deraadt@cvs.openbsd.org 2006/08/03 03:34:42Damien Miller2006-08-051-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [OVERVIEW atomicio.c atomicio.h auth-bsdauth.c auth-chall.c auth-krb5.c] [auth-options.c auth-options.h auth-passwd.c auth-rh-rsa.c auth-rhosts.c] [auth-rsa.c auth-skey.c auth.c auth.h auth1.c auth2-chall.c auth2-gss.c] [auth2-hostbased.c auth2-kbdint.c auth2-none.c auth2-passwd.c ] [auth2-pubkey.c auth2.c authfd.c authfd.h authfile.c bufaux.c bufbn.c] [buffer.c buffer.h canohost.c channels.c channels.h cipher-3des1.c] [cipher-bf1.c cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c] [compress.c deattack.c dh.c dispatch.c dns.c dns.h fatal.c groupaccess.c] [groupaccess.h gss-genr.c gss-serv-krb5.c gss-serv.c hostfile.c kex.c] [kex.h kexdh.c kexdhc.c kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c] [key.h log.c log.h mac.c match.c md-sha256.c misc.c misc.h moduli.c] [monitor.c monitor_fdpass.c monitor_mm.c monitor_mm.h monitor_wrap.c] [monitor_wrap.h msg.c nchan.c packet.c progressmeter.c readconf.c] [readconf.h readpass.c rsa.c scard.c scard.h scp.c servconf.c servconf.h] [serverloop.c session.c session.h sftp-client.c sftp-common.c] [sftp-common.h sftp-glob.c sftp-server.c sftp.c ssh-add.c ssh-agent.c] [ssh-dss.c ssh-gss.h ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rsa.c] [ssh.c ssh.h sshconnect.c sshconnect.h sshconnect1.c sshconnect2.c] [sshd.c sshlogin.c sshlogin.h sshpty.c sshpty.h sshtty.c ttymodes.c] [uidswap.c uidswap.h uuencode.c uuencode.h xmalloc.c xmalloc.h] [loginrec.c loginrec.h openbsd-compat/port-aix.c openbsd-compat/port-tun.h] almost entirely get rid of the culture of ".h files that include .h files" ok djm, sort of ok stevesk makes the pain stop in one easy step NB. portable commit contains everything *except* removing includes.h, as that will take a fair bit more work as we move headers that are required for portability workarounds to defines.h. (also, this step wasn't "easy")
* - stevesk@cvs.openbsd.org 2006/07/22 20:48:23Damien Miller2006-07-241-1/+2
| | | | | | | | | | | | | | | | | [atomicio.c auth-options.c auth-passwd.c auth-rhosts.c auth-rsa.c] [auth.c auth1.c auth2-chall.c auth2-hostbased.c auth2-passwd.c auth2.c] [authfd.c authfile.c bufaux.c bufbn.c buffer.c canohost.c channels.c] [cipher-3des1.c cipher-bf1.c cipher-ctr.c cipher.c clientloop.c] [compat.c deattack.c dh.c dns.c gss-genr.c gss-serv.c hostfile.c] [includes.h kex.c kexdhc.c kexdhs.c kexgexc.c kexgexs.c key.c log.c] [mac.c match.c md-sha256.c misc.c moduli.c monitor.c monitor_fdpass.c] [monitor_mm.c monitor_wrap.c msg.c nchan.c packet.c rsa.c] [progressmeter.c readconf.c readpass.c scp.c servconf.c serverloop.c] [session.c sftp-client.c sftp-common.c sftp-glob.c sftp-server.c sftp.c] [ssh-add.c ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c] [ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c sshconnect2.c] [sshd.c sshlogin.c sshpty.c ttymodes.c uidswap.c xmalloc.c] move #include <string.h> out of includes.h
* - stevesk@cvs.openbsd.org 2006/07/17 01:31:10Damien Miller2006-07-241-1/+2
| | | | | | | | | [authfd.c authfile.c channels.c cleanup.c clientloop.c groupaccess.c] [includes.h log.c misc.c msg.c packet.c progressmeter.c readconf.c] [readpass.c scp.c servconf.c sftp-client.c sftp-server.c sftp.c] [ssh-add.c ssh-agent.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh.c] [sshconnect.c sshlogin.c sshpty.c uidswap.c] move #include <unistd.h> out of includes.h
* - stevesk@cvs.openbsd.org 2006/07/11 20:07:25Darren Tucker2006-07-121-1/+2
| | | | | | | | | [scp.c auth.c monitor.c serverloop.c sftp-server.c sshpty.c readpass.c sshd.c monitor_wrap.c monitor_fdpass.c ssh-agent.c ttymodes.c atomicio.c includes.h session.c sshlogin.c monitor_mm.c packet.c sshconnect2.c sftp-client.c nchan.c clientloop.c sftp.c misc.c canohost.c channels.c ssh-keygen.c progressmeter.c uidswap.c msg.c readconf.c sshconnect.c] move #include <errno.h> out of includes.h; ok markus@
* - stevesk@cvs.openbsd.org 2006/07/09 15:15:11Damien Miller2006-07-101-1/+2
| | | | | | | | [auth2-none.c authfd.c authfile.c includes.h misc.c monitor.c] [readpass.c scp.c serverloop.c sftp-client.c sftp-server.c] [ssh-add.c ssh-agent.c ssh-keygen.c ssh-keysign.c ssh.c sshd.c] [sshlogin.c sshpty.c] move #include <fcntl.h> out of includes.h
* - stevesk@cvs.openbsd.org 2006/07/06 16:03:53Damien Miller2006-07-101-1/+2
| | | | | | | | | | | [auth-options.c auth-options.h auth-passwd.c auth-rh-rsa.c] [auth-rhosts.c auth-rsa.c auth.c auth.h auth2-hostbased.c] [auth2-pubkey.c auth2.c includes.h misc.c misc.h monitor.c] [monitor_wrap.c monitor_wrap.h scp.c serverloop.c session.c] [session.h sftp-common.c ssh-add.c ssh-keygen.c ssh-keysign.c] [ssh.c sshconnect.c sshconnect.h sshd.c sshpty.c sshpty.h uidswap.c] [uidswap.h] move #include <pwd.h> out of includes.h; ok markus@
* - stevesk@cvs.openbsd.org 2006/07/02 22:45:59Damien Miller2006-07-101-1/+2
| | | | | | [groupaccess.c groupaccess.h includes.h session.c sftp-common.c sshpty.c] move #include <grp.h> out of includes.h (portable needed uidswap.c too)
* - (djm) [Makefile.in configure.ac session.c sshpty.c]Damien Miller2006-04-221-0/+4
| | | | | | | | [contrib/redhat/sshd.init openbsd-compat/Makefile.in] [openbsd-compat/openbsd-compat.h openbsd-compat/port-linux.c] [openbsd-compat/port-linux.h] Add support for SELinux, setting the execution and TTY contexts. based on patch from Daniel Walsh, bz #880; ok dtucker@
* - djm@cvs.openbsd.org 2006/03/25 13:17:03Damien Miller2006-03-261-0/+1
| | | | | | | | | | | | | | | | | | | | | [atomicio.c auth-bsdauth.c auth-chall.c auth-options.c auth-passwd.c] [auth-rh-rsa.c auth-rhosts.c auth-rsa.c auth-skey.c auth.c auth1.c] [auth2-chall.c auth2-hostbased.c auth2-kbdint.c auth2-none.c] [auth2-passwd.c auth2-pubkey.c auth2.c authfd.c authfile.c bufaux.c] [buffer.c canohost.c channels.c cipher-3des1.c cipher-bf1.c] [cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c compress.c] [deattack.c dh.c dispatch.c fatal.c groupaccess.c hostfile.c kex.c] [kexdh.c kexdhc.c kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c log.c] [mac.c match.c md-sha256.c misc.c monitor.c monitor_fdpass.c] [monitor_mm.c monitor_wrap.c msg.c nchan.c packet.c progressmeter.c] [readconf.c readpass.c rsa.c scard.c scp.c servconf.c serverloop.c] [session.c sftp-client.c sftp-common.c sftp-glob.c sftp-server.c] [sftp.c ssh-add.c ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c] [ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c] [sshconnect2.c sshd.c sshlogin.c sshpty.c sshtty.c ttymodes.c] [uidswap.c uuencode.c xmalloc.c] Put $OpenBSD$ tags back (as comments) to replace the RCSID()s that Theo nuked - our scripts to sync -portable need them in the files
* - deraadt@cvs.openbsd.org 2006/03/20 18:14:02Damien Miller2006-03-261-3/+4
| | | | | | [channels.c clientloop.c monitor_wrap.c monitor_wrap.h serverloop.c] [ssh.c sshpty.c sshpty.h] sprinkle u_int throughout pty subsystem, ok markus
* - deraadt@cvs.openbsd.org 2006/03/19 18:51:18Damien Miller2006-03-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | [atomicio.c auth-bsdauth.c auth-chall.c auth-krb5.c auth-options.c] [auth-pam.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c auth-rsa.c] [auth-shadow.c auth-skey.c auth.c auth1.c auth2-chall.c] [auth2-hostbased.c auth2-kbdint.c auth2-none.c auth2-passwd.c] [auth2-pubkey.c auth2.c authfd.c authfile.c bufaux.c buffer.c] [canohost.c channels.c cipher-3des1.c cipher-acss.c cipher-aes.c] [cipher-bf1.c cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c] [compress.c deattack.c dh.c dispatch.c dns.c entropy.c fatal.c] [groupaccess.c hostfile.c includes.h kex.c kexdh.c kexdhc.c] [kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c log.c loginrec.c] [loginrec.h logintest.c mac.c match.c md-sha256.c md5crypt.c misc.c] [monitor.c monitor_fdpass.c monitor_mm.c monitor_wrap.c msg.c] [nchan.c packet.c progressmeter.c readconf.c readpass.c rsa.c] [scard.c scp.c servconf.c serverloop.c session.c sftp-client.c] [sftp-common.c sftp-glob.c sftp-server.c sftp.c ssh-add.c] [ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c] [ssh-rand-helper.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c] [sshconnect2.c sshd.c sshlogin.c sshpty.c sshtty.c ttymodes.c] [uidswap.c uuencode.c xmalloc.c openbsd-compat/bsd-arc4random.c] [openbsd-compat/bsd-closefrom.c openbsd-compat/bsd-cygwin_util.c] [openbsd-compat/bsd-getpeereid.c openbsd-compat/bsd-misc.c] [openbsd-compat/bsd-nextstep.c openbsd-compat/bsd-snprintf.c] [openbsd-compat/bsd-waitpid.c openbsd-compat/fake-rfc2553.c] RCSID() can die
* - (tim) [openssh/sshpty.c openssh/openbsd-compat/port-tun.c] put in someTim Rice2006-03-141-0/+1
| | | | includes removed from includes.h
* - stevesk@cvs.openbsd.org 2006/02/20 17:02:44Damien Miller2006-03-151-1/+3
| | | | | | [clientloop.c includes.h monitor.c progressmeter.c scp.c] [serverloop.c session.c sftp.c ssh-agent.c ssh.c sshd.c] move #include <signal.h> out of includes.h; ok markus@
* - stevesk@cvs.openbsd.org 2006/02/10 00:27:13Damien Miller2006-03-151-1/+3
| | | | | | [channels.c clientloop.c includes.h misc.c progressmeter.c sftp.c] [ssh.c sshd.c sshpty.c] move #include <sys/ioctl.h> out of includes.h; ok markus@
* fix spacing of includeDamien Miller2006-03-151-1/+1
|
* - stevesk@cvs.openbsd.org 2006/02/08 12:15:27Damien Miller2006-03-151-3/+5
| | | | | | | [auth.c clientloop.c includes.h misc.c monitor.c readpass.c] [session.c sftp.c ssh-agent.c ssh-keysign.c ssh.c sshconnect.c] [sshd.c sshpty.c] move #include <paths.h> out of includes.h; ok markus@
* - stevesk@cvs.openbsd.org 2006/02/07 01:42:00Damien Miller2006-03-151-1/+3
| | | | | | [channels.c clientloop.c clientloop.h includes.h packet.h] [serverloop.c sshpty.c sshpty.h sshtty.c ttymodes.c] move #include <termios.h> out of includes.h; ok markus@
* - (dtucker) [acconfig.h configure.ac defines.h includes.h sshpty.cDarren Tucker2005-05-271-2/+2
| | | | | openbsd-compat/bsd-misc.c] Add support for Ultrix. No, that's not a typo. Required changes from Bernhard Simon, integrated by me. ok djm@
* - avsm@cvs.openbsd.org 2004/06/21 17:36:31Darren Tucker2004-06-221-20/+20
| | | | | | | | | | | | | [auth-rsa.c auth2-gss.c auth2-pubkey.c authfile.c canohost.c channels.c cipher.c dns.c kex.c monitor.c monitor_fdpass.c monitor_wrap.c monitor_wrap.h nchan.c packet.c progressmeter.c scp.c sftp-server.c sftp.c ssh-gss.h ssh-keygen.c ssh.c sshconnect.c sshconnect1.c sshlogin.c sshpty.c] make ssh -Wshadow clean, no functional changes markus@ ok There are also some portable-specific -Wshadow warnings to be fixed in monitor.c and montior_wrap.c.
* - deraadt@cvs.openbsd.org 2004/01/11 21:55:06Damien Miller2004-01-211-191/+1
| | | | | | | | [sshpty.c] for pty opening, only use the openpty() path. the other stuff only needs to be in openssh-p; markus ok - (djm) [openbsd-compat/bsd-openpty.c] Rework old sshpty.c code into an openpty() replacement
* - djm@cvs.openbsd.org 2003/11/21 11:57:03Damien Miller2003-11-211-1/+1
| | | | | | [everything] unexpand and delete whitespace at EOL; ok markus@ (done locally and RCS IDs synced)
* - (bal) redo how we handle 'mysignal()'. Move it toBen Lindstrom2003-08-251-6/+6
| | | | | openbsd-compat/bsd-misc.c, s/mysignal/signal/ and #define signal to be our 'mysignal' by default. OK djm@
* - (djm) OpenBSD CVS SyncDamien Miller2003-06-181-2/+2
| | | | | | - markus@cvs.openbsd.org 2003/06/12 07:57:38 [monitor.c sshlogin.c sshpty.c] typos; dtucker at zip.com.au
* - djm@cvs.openbsd.org 2003/05/24 09:30:40Damien Miller2003-05-251-3/+3
| | | | | [authfile.c monitor.c sftp-common.c sshpty.c] cast some types for printing; ok markus@
* *** empty log message ***Damien Miller2003-04-091-2/+2
|
* - markus@cvs.openbsd.org 2003/02/03 08:56:16Damien Miller2003-02-241-3/+3
| | | | | | [sshpty.c] don't call error() for readonly /dev; from soekris list; ok mcbride, henning, deraadt.
* Cray fixes (bug 367) based on patch from Wendy Palm @ cray.Tim Rice2002-09-251-4/+4
| | | | This does not include the deattack.c fixes.
* - (bal) [configure.ac defines.h loginrec.c sshd.c sshpty.c] Partial syncBen Lindstrom2002-07-221-2/+2
| | | | with Cray (mostly #ifdef renaming). Patch by wendyp@cray.com.
* - deraadt@cvs.openbsd.org 2002/06/24 17:57:20Ben Lindstrom2002-06-251-3/+3
| | | | | [sftp-server.c sshpty.c] explicit (u_int) for uid and gid
* - deraadt@cvs.openbsd.org 2002/06/23 21:06:13Ben Lindstrom2002-06-231-4/+4
| | | | | [sshpty.c] KNF
* - deraadt@cvs.openbsd.org 2002/06/23 03:30:58Ben Lindstrom2002-06-231-3/+3
| | | | | | [scard.c ssh-dss.c ssh-rsa.c sshconnect.c sshconnect2.c sshd.c sshlogin.c sshpty.c] various KNF and %d for unsigned
* unexpandBen Lindstrom2002-06-091-3/+3
|
* 20020514Tim Rice2002-05-131-0/+14
| | | | | | | [sshpty.c] set tty modes when allocating old style bsd ptys to match what newer style ptys have when allocated. Based on a patch by Roger Cornelius <rac@tenzing.org> [README.privsep] UnixWare 7 and OpenUNIX 8 work.
* - deraadt@cvs.openbsd.org 2001/12/19 07:18:56Damien Miller2001-12-211-11/+11
| | | | | | | | | | | | [auth1.c auth2.c auth2-chall.c auth-bsdauth.c auth.c authfile.c auth.h] [auth-krb4.c auth-rhosts.c auth-skey.c bufaux.c canohost.c channels.c] [cipher.c clientloop.c compat.c compress.c deattack.c key.c log.c mac.c] [match.c misc.c nchan.c packet.c readconf.c rijndael.c rijndael.h scard.c] [servconf.c servconf.h serverloop.c session.c sftp.c sftp-client.c] [sftp-glob.c sftp-int.c sftp-server.c ssh-add.c ssh-agent.c ssh.c] [sshconnect1.c sshconnect2.c sshconnect.c sshd.8 sshd.c sshd_config] [ssh-keygen.c sshlogin.c sshpty.c sshtty.c ttymodes.c uidswap.c] basic KNF done while i was looking for something else
* - (djm) Cleanup sshpty.c a littleDamien Miller2001-10-121-11/+10
|