summaryrefslogtreecommitdiff
path: root/daemon/pty_open.c
Commit message (Collapse)AuthorAgeFilesLines
* pty_open: Prevent build warningsOndrej Holy2018-05-101-1/+3
| | | | | | Prevent the following build warning which is shown in some cases: warning: ignoring return value of 'chdir', declared with attribute warn_unused_result [-Wunused-result]
* pty_open: Fix warnings with BSD codepathRoss Lagerwall2014-10-171-5/+4
| | | | | | | Fix warnings by conditionally compiling functions needed for the UNIX98_PTY codepath. Also, make a function static. https://bugzilla.gnome.org/show_bug.cgi?id=724780
* sftp: Don't spin before the SSH process opens the slave ptyRoss Lagerwall2014-10-171-15/+25
| | | | | | | | | | | | | | | | | | | | When OpenSSH starts, it closes all its open file descriptors, including the slave pty which is used for handling the login. This would cause gvfsd-sftp to spin because the poll() call in handle_login would return immediately with POLLHUP. Open the slave pty in the parent process so that poll() doesn't return POLLHUP and spin needlessly. Once the login has been completed, the slave fd can be closed in the parent process (this fixes an fd leak in the BSD openpty codepath). This change is based on what sshfs does, and is also similar to how the BSD openpty codepath behaves. Although the problem occurs briefly for any login, it is most noticeable when trying to connect to a server that drops SSH packets. E.g. gvfs-mount sftp://8.8.8.8 https://bugzilla.gnome.org/show_bug.cgi?id=724780
* sftp: force openpty(3) on BSDAntoine Jacoutot2014-01-171-0/+8
| | | | | | | | | Implementation of grantpt() and unlockpt() on FreeBSD and OpenBSD does not conform to IEEE Std 1003.1-2008 (``POSIX.1'') so force using the openpty(3) code path so that the key fingerprint and login/password dialogs instead of just failing or falling back to SSH_ASKPASS. https://bugzilla.gnome.org/show_bug.cgi?id=722001
* Update the Address of the FSFFelix Möller2012-07-301-2/+2
| | | | | | | | | | | | | | | Updating the address of the FSF. This has been done by: while read file; do sed -i 's:59 Temple Place:51 Franklin Street:' $file sed -i 's:Suite 330:Fifth Floor:' $file sed -i 's:02111-1307:02110-1301:' $file done https://bugzilla.gnome.org/show_bug.cgi?id=656598 Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
* daemon: Support allocating PTYs through openpty on BSDMartin Pieuchot2012-07-131-5/+127
| | | | | | | | | | Allows systems supporting the BSD openpty(3) utily function but not the Unix98 PTY function family (grantpt(3), unlockpt(3), ...) to allocate a pseudo-tty required for the ssh authentication. https://bugzilla.gnome.org/show_bug.cgi?id=679790 Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
* sftp: Close pty master in child processTomas Bzatek2010-11-121-0/+1
| | | | Prevent fd leakage and possible selinux alert.
* Save errno befor making other calls. Be safe when calling g_set_error()Alexander Larsson2008-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-02-11 Alexander Larsson <alexl@redhat.com> * client/gdaemonfile.c: * client/gdaemonfileinputstream.c: * client/gdaemonfileoutputstream.c: * common/gsysutils.c: * common/gvfsdaemonprotocol.c: * daemon/gvfsbackendburn.c: * daemon/gvfsbackendcdda.c: * daemon/gvfsbackenddav.c: * daemon/gvfsbackendsftp.c: * daemon/gvfsbackendsmb.c: * daemon/gvfsbackendsmbbrowse.c: * daemon/gvfsbackendtest.c: * daemon/gvfsdaemonutils.c: * daemon/gvfsjob.c: * daemon/mount.c: * daemon/pty_open.c: Save errno befor making other calls. Be safe when calling g_set_error() Patch from Christian Persch (#514822) svn path=/trunk/; revision=1254
* Code cleanups from Kjartan Maraas.Alexander Larsson2007-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 2007-11-16 Alexander Larsson <alexl@redhat.com> * client/gdaemonfile.c: * client/gdaemonfileinputstream.c: * client/gdaemonfileoutputstream.c: * client/smburi.c: * common/gdbusutils.c: * common/gmountsource.c: * daemon/gvfsbackendftp.c: * daemon/gvfsbackendtrash.c: * daemon/gvfsdaemon.c: * daemon/gvfsjob.c: * daemon/gvfsjobdbus.c: * daemon/gvfsjobopenforwrite.h: * daemon/mount.c: * daemon/pty_open.c: * test/benchmark-gvfs-big-files.c: * test/benchmark-gvfs-small-files.c: * test/benchmark-posix-small-files.c: Code cleanups from Kjartan Maraas. svn path=/trunk/; revision=1031
* Add copyright information to source files.Christian Kellner2007-11-011-0/+22
| | | | | | | | | | | | 2007-11-01 Christian Kellner <gicmo@gnome.org> * client/*.[ch]: * common/*.[ch]: * daemon/*.[ch]: * test/*.[ch]: Add copyright information to source files. svn path=/trunk/; revision=1007
* Initial sftp code (doesn't do anything yet)Alexander Larsson2007-09-131-0/+821
Original git commit by Alexander Larsson <alexl@redhat.com> at 1189150726 +0200 svn path=/trunk/; revision=897