]>
Commit | Line | Data |
---|---|---|
9c944978 JB |
1 | --- openssh-4.0p1/clientloop.c.orig 2005-03-01 11:24:33.000000000 +0100 |
2 | +++ openssh-4.0p1/clientloop.c 2005-03-10 15:10:05.000000000 +0100 | |
3e988458 | 3 | @@ -104,6 +104,9 @@ |
d79228b3 SZ |
4 | */ |
5 | extern char *host; | |
6 | ||
7 | +/* if we process SIGPIPE */ | |
8 | +extern int enable_sigpipe; | |
9 | + | |
10 | /* | |
11 | * Flag to indicate that we have received a window change signal which has | |
12 | * not yet been processed. This will cause a message indicating the new | |
204858e5 AM |
13 | @@ -1317,6 +1317,8 @@ client_loop(struct ssh *ssh, int have_pt |
14 | ssh_signal(SIGQUIT, signal_handler); | |
15 | if (ssh_signal(SIGTERM, SIG_IGN) != SIG_IGN) | |
16 | ssh_signal(SIGTERM, signal_handler); | |
d79228b3 SZ |
17 | + if (enable_sigpipe) |
18 | + signal(SIGPIPE, signal_handler); | |
204858e5 | 19 | ssh_signal(SIGWINCH, window_change_handler); |
d79228b3 | 20 | |
9c944978 | 21 | if (have_pty) |
3e988458 AM |
22 | diff -urN openssh-3.9p1.org/ssh.0 openssh-3.9p1/ssh.0 |
23 | --- openssh-3.9p1.org/ssh.0 2004-08-17 19:03:29.327565840 +0200 | |
24 | +++ openssh-3.9p1/ssh.0 2004-08-17 19:03:41.809668272 +0200 | |
048795bf AM |
25 | @@ -433,6 +433,8 @@ DESCRIPTION |
26 | -y Send log information using the syslog(3) system module. By | |
27 | default this information is sent to stderr. | |
46931270 | 28 | |
048795bf | 29 | + -Z Enable SIGPIPE processing. |
46931270 | 30 | + |
048795bf AM |
31 | ssh may additionally obtain configuration data from a per-user |
32 | configuration file and a system-wide configuration file. The file format | |
33 | and configuration options are described in ssh_config(5). | |
0f6e8103 ER |
34 | --- openssh-5.6p1/ssh.1~ 2010-08-24 14:05:48.000000000 +0300 |
35 | +++ openssh-5.6p1/ssh.1 2010-08-24 14:06:57.879253682 +0300 | |
048795bf AM |
36 | @@ -42,7 +42,7 @@ |
37 | .Nd OpenSSH SSH client (remote login program) | |
cd749aff | 38 | .Sh SYNOPSIS |
d79228b3 | 39 | .Nm ssh |
8a81cd30 | 40 | -.Op Fl 46AaCfGgKkMNnqsTtVvXxYy |
048795bf AM |
41 | +.Op Fl 46AaCfGgKkMNnqsTtVvXxYyZ |
42 | .Op Fl B Ar bind_interface | |
d79228b3 SZ |
43 | .Op Fl b Ar bind_address |
44 | .Op Fl c Ar cipher_spec | |
f9d8b6a7 | 45 | @@ -138,6 +138,11 @@ on the local machine as the source addre |
4c48535c AM |
46 | of the connection. |
47 | Only useful on systems with more than one address. | |
f9d8b6a7 | 48 | .Pp |
048795bf | 49 | +.It Fl Z |
d79228b3 | 50 | +Enables processing of SIGPIPE. Useful when using ssh output as input for |
aa4ad340 SZ |
51 | +another process, for example in a shell script. Be careful - it may break |
52 | +port/X11 forwarding when used. | |
f9d8b6a7 | 53 | +.Pp |
cd749aff | 54 | .It Fl C |
55 | Requests compression of all data (including stdin, stdout, stderr, and | |
f9d8b6a7 | 56 | data for forwarded X11, TCP and |
9c944978 JB |
57 | --- openssh-4.0p1/ssh.c.orig 2005-03-02 02:04:33.000000000 +0100 |
58 | +++ openssh-4.0p1/ssh.c 2005-03-10 15:11:10.000000000 +0100 | |
cd749aff | 59 | @@ -135,6 +135,9 @@ |
d79228b3 SZ |
60 | /* Should we execute a command or invoke a subsystem? */ |
61 | int subsystem_flag = 0; | |
62 | ||
63 | +/* Enable sigpipe */ | |
64 | +int enable_sigpipe = 0; | |
65 | + | |
66 | /* # of replies received for global requests */ | |
67 | static int client_global_request_id = 0; | |
68 | ||
048795bf | 69 | @@ -204,7 +204,7 @@ static void |
9c944978 JB |
70 | usage(void) |
71 | { | |
72 | fprintf(stderr, | |
048795bf AM |
73 | -"usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]\n" |
74 | +"usage: ssh [-46AaCfGgKkMNnqsTtVvXxYyZ] [-B bind_interface]\n" | |
75 | " [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]\n" | |
76 | " [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]\n" | |
77 | " [-i identity_file] [-J [user@]host[:port]] [-L address]\n" | |
78 | @@ -666,7 +666,7 @@ main(int ac, char **av) | |
d79228b3 | 79 | |
fc8529e5 AM |
80 | again: |
81 | while ((opt = getopt(ac, av, "1246ab:c:e:fgi:kl:m:no:p:qstvx" | |
048795bf AM |
82 | - "AB:CD:E:F:GI:J:KL:MNO:PQ:R:S:TVw:W:XYy")) != -1) { |
83 | + "AB:CD:E:F:GI:J:KL:MNO:PQ:R:S:TVw:W:XYyZ")) != -1) { | |
d79228b3 SZ |
84 | switch (opt) { |
85 | case '1': | |
048795bf AM |
86 | fatal("SSH protocol v.1 is no longer supported"); |
87 | @@ -985,6 +985,9 @@ main(int ac, char **av) | |
88 | case 'F': | |
89 | config = optarg; | |
d79228b3 | 90 | break; |
048795bf | 91 | + case 'Z': |
d79228b3 SZ |
92 | + enable_sigpipe = 1; |
93 | + break; | |
048795bf AM |
94 | default: |
95 | usage(); | |
96 | } | |
97 |