ports/security/sshpass/files/patch-main.c
Sunpoet Po-Chuan Hsieh 64129ffe3d Update to 1.0.6
- While I'm here:
  - Add LICENSE_FILE
  - Regenerate patch file with makepatch:
  - Update WWW

Changes:	https://sourceforge.net/projects/sshpass/files/sshpass/1.06/ChangeLog/view
PR:		216319
Submitted by:	Hung-Yi Chen <gaod@hychen.org> (maintainer)
2017-01-20 19:38:49 +00:00

15 lines
492 B
C

--- main.c.orig 2016-06-30 19:23:33 UTC
+++ main.c
@@ -280,6 +280,12 @@ int runprogram( int argc, char *argv[] )
setsid();
// This line makes the ptty our controlling tty. We do not otherwise need it open
slavept=open(name, O_RDWR );
+#ifdef __FreeBSD__
+ if (ioctl(slavept, TIOCSCTTY, NULL) == -1) {
+ perror("sshpass: Failed to TIOCSCTTY");
+ exit(RETURN_RUNTIME_ERROR);
+ }
+#endif
close( slavept );
close( masterpt );