search for: stdin_null_flag

Displaying 15 results from an estimated 15 matches for "stdin_null_flag".

2017 Oct 09
5
Why dup()?
Hello all, My scripts, which read stdout from ssh, weren't seeing EOF from the remote session.? It was being sent, but lost.? I tracked it down to the following code, in ssh.c, at ssh_session2_open: ??????? if (stdin_null_flag) { ??????????????? in = open(_PATH_DEVNULL, O_RDONLY); ??????? } else { ??????????????? in = dup(STDIN_FILENO); ??????? } ??????? out = dup(STDOUT_FILENO); ??????? err = dup(STDERR_FILENO); The remote session did close stdout.? The sshd from which it was spawned signaled to close stdout.? T...
2001 Apr 06
1
-n vs batch_mode vs batch_flag
How is -n supposed to work? When you say ssh -n, it sets stdin_null_flag but not batch mode. When the client is choosing authmethods, there is a batch_flag that is tested to see (presumably) if we are in batch mode or perhaps if -n has been given. But nothing sets it. It looks like it's supposed to point to options.batch_mode, but it's never even initialized!...
2005 Jun 12
2
%h,%p,%u expansion for ControlPath
This allows me to set 'ControlPath ~/.ssh/sockets/%h.%p.%u' for example. Have I missed a good reason why ssh_connect finds the default port number for itself instead of just having it in options.port (like we do for the the default in options.user)? --- openssh-4.1p1/ssh.c~ 2005-06-12 09:47:18.000000000 +0100 +++ openssh-4.1p1/ssh.c 2005-06-12 09:40:53.000000000 +0100 @@ -604,6 +604,17
2002 Feb 01
1
FEATURE: -f -f - fork after successful open of fwd port/display/agent
...500 +++ 3_0_2p1_double_dash_f.1/ssh.c Fri, 01 Feb 2002 12:59:13 -0500 @@ -111,6 +111,7 @@ * background. */ int fork_after_authentication_flag = 0; +int wait_for_port_open_before_fork = 0; /* * General data structure for command line options and options configurable @@ -330,6 +331,8 @@ stdin_null_flag = 1; break; case 'f': + if (fork_after_authentication_flag) + wait_for_port_open_before_fork = 1; fork_after_authentication_flag = 1; stdin_null_flag = 1; break; @@ -1164,7 +1167,7 @@ id = ssh_session2_open(); /* If requested, let ssh continue in the backgroun...
2004 Apr 01
0
[Bug 829] Don't allocate a tty if -n option is set
...openssh-3.8p1.orig/ssh.c Wed Dec 17 06:33:11 2003 +++ openssh-3.8p1/ssh.c Thu Apr 1 09:01:02 2004 @@ -549,7 +549,7 @@ if (no_tty_flag) tty_flag = 0; /* Do not allocate a tty if stdin is not a tty. */ - if (!isatty(fileno(stdin)) && !force_tty_flag) { + if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { if (tty_flag) logit("Pseudo-terminal will not be allocated because stdin is not a terminal."); tty_flag = 0; -- Cheers, Ignasi Roca Fujitsu-Siemens Computers ------- You are receiving this mail because: ------- You are the assignee for the bu...
2016 Jul 22
2
SSH crash on OpenBSD (pledge related?)
Hello, I just ran upon this problem and couldn't find it in bugzilla. SSH crashes (abort trap) if all of the following conditions are met: (a) option -f is used (crash happens when going to background), (b) reverse port forwarding is set up (option -R), (c) option ExitOnForwardFailure is enabled, (d) there are no actual port-forwarding failures. The problem can be reproduced by
2019 Sep 16
2
ssh client is setting O_NONBLOCK on a pipe shared with other processes
> Case in point; EAGAIN can come if you give your fd to another process > and continue using it yourself. > Short counts; It is documented behavior that read() and write() may > return short counts. It is not documented why, so you can not make > any assumptions. You might be right about short counts but if you're right about EAGAIN, there are bugs everywhere. My first
2002 Jan 27
0
[PATCH] Add an exit delay to Openssh-3.0.2p1 for use in tunneling
...oop.c --- openssh-3.0.2p1/clientloop.c Sun Nov 11 17:06:33 2001 +++ openssh-3.0.2p1S/clientloop.c Sat Jan 19 14:50:11 2002 @@ -84,6 +84,7 @@ /* import options */ extern Options options; +extern int no_tty_flag; /* Flag indicating that stdin should be redirected from /dev/null. */ extern int stdin_null_flag; @@ -122,7 +123,8 @@ static int connection_in; /* Connection to server (input). */ static int connection_out; /* Connection to server (output). */ static int need_rekeying; /* Set to non-zero if rekeying is requested. */ -static int session_closed = 0; /* In SSH2: login session closed. */ +enum...
2000 Sep 12
0
OpenSSH 2.2.0p1 port to QNX 4
...2,41 ---- #include "buffer.h" #include "bufaux.h" + #if defined(__QNX__) && !defined(__QNXNTO__) + #include "qnx-term.h" + #endif /* __QNX__ && !__QNXNTO__ */ + /* Flag indicating that stdin should be redirected from /dev/null. */ extern int stdin_null_flag; diff -cr openssh-2.2.0p1.orig/includes.h openssh-2.2.0p1.qnx/includes.h *** openssh-2.2.0p1.orig/includes.h Fri Aug 18 06:59:59 2000 --- openssh-2.2.0p1.qnx/includes.h Tue Sep 12 10:26:21 2000 *************** *** 27,33 **** --- 27,35 ---- #include <sys/socket.h> #include <sys/ioctl...
2001 Sep 28
1
[PATCH] fix for Linux hang on exit bug in 2.9.9p2
...oop.c --- openssh-2.9.9p2/clientloop.c Mon Sep 17 23:51:14 2001 +++ openssh-2.9.9p2J/clientloop.c Fri Sep 28 12:47:09 2001 @@ -84,6 +84,7 @@ /* import options */ extern Options options; +extern int no_tty_flag; /* Flag indicating that stdin should be redirected from /dev/null. */ extern int stdin_null_flag; @@ -122,7 +123,8 @@ static int connection_in; /* Connection to server (input). */ static int connection_out; /* Connection to server (output). */ static int need_rekeying; /* Set to non-zero if rekeying is requested. */ -static int session_closed = 0; /* In SSH2: login session closed. */ +enum...
2004 Jul 07
3
DynamicWindow Patch
We have developed a patch that enables changing the SSH window size using the tcp window size as the source. This allows SSH to obtain maximum use of the bandwidth on high BDP links. We also have a page that describes the changes and performance. http://www.psc.edu/~rapier/hpn-ssh/ The patch against CVS is included here. Common subdirectories: src/usr.bin/ssh/CVS and ssh/CVS diff -u
2010 Jan 14
1
ssh(1) multiplexing rewrite
...p.c =================================================================== RCS file: /cvs/src/usr.bin/ssh/clientloop.c,v retrieving revision 1.216 diff -u -p -r1.216 clientloop.c --- clientloop.c 9 Jan 2010 05:04:24 -0000 1.216 +++ clientloop.c 14 Jan 2010 03:07:49 -0000 @@ -113,7 +113,7 @@ extern int stdin_null_flag; extern int no_shell_flag; /* Control socket */ -extern int muxserver_sock; +extern int muxserver_sock; /* XXX use mux_client_cleanup() instead */ /* * Name of the host we are connecting to. This is the name given on the @@ -138,7 +138,7 @@ static volatile sig_atomic_t received_si static...
2001 Sep 05
2
sshd hangs on logout -- is this a bug?
In the changelog, there is an entry: 20001129 - (djm) Back out all the serverloop.c hacks. sshd will now hang again if there are background children with open fds. Does this mean that this is regarded as expected (and correct) behavior, that should not change in the future, or does it mean that this behavior is a known problem that someone will eventually fix? --Adam -- Adam McKenna
2001 Nov 14
6
[PATCH]: Patch to fix hang on exit bug under Linux and add optional exit delay
...entloop.c --- openssh-3.0p1/clientloop.c Thu Oct 11 19:36:09 2001 +++ openssh-3.0p1J/clientloop.c Tue Nov 13 16:06:36 2001 @@ -84,6 +84,7 @@ /* import options */ extern Options options; +extern int no_tty_flag; /* Flag indicating that stdin should be redirected from /dev/null. */ extern int stdin_null_flag; @@ -122,7 +123,8 @@ static int connection_in; /* Connection to server (input). */ static int connection_out; /* Connection to server (output). */ static int need_rekeying; /* Set to non-zero if rekeying is requested. */ -static int session_closed = 0; /* In SSH2: login session closed. */ +enum...
2000 Mar 03
7
[PATCH] Add a Maximum Idle Time (1.2.2)
The attached patch adds an option (off by default to preserve current behavior) to set a timeout on the select() statement that waits for input in clientloop.c. This fixes a timeout issue for me (explained below) and probably also fixes the timeouts mentioned in last month's thread "Idle time out". The patch is also available by http from: