]>
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 | |
9c944978 | 13 | @@ -1236,6 +1239,8 @@ |
cd749aff | 14 | signal(SIGQUIT, signal_handler); |
15 | if (signal(SIGTERM, SIG_IGN) != SIG_IGN) | |
16 | signal(SIGTERM, signal_handler); | |
d79228b3 SZ |
17 | + if (enable_sigpipe) |
18 | + signal(SIGPIPE, signal_handler); | |
9c944978 | 19 | 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 | |
25 | @@ -235,6 +235,8 @@ | |
46931270 AM |
26 | that enable them to authenticate using the identities loaded into |
27 | the agent. | |
28 | ||
29 | + -B Enable SIGPIPE processing. | |
30 | + | |
31 | -a Disables forwarding of the authentication agent connection. | |
32 | ||
33 | -b bind_address | |
9c944978 JB |
34 | --- openssh-4.0p1/ssh.1.orig 2005-03-09 01:00:06.000000000 +0100 |
35 | +++ openssh-4.0p1/ssh.1 2005-03-10 15:10:40.000000000 +0100 | |
b59525f2 | 36 | @@ -43,7 +43,7 @@ |
37 | .Nd OpenSSH SSH client (remote login program) | |
cd749aff | 38 | .Sh SYNOPSIS |
d79228b3 | 39 | .Nm ssh |
3e988458 AM |
40 | -.Op Fl 1246AaCfgkMNnqsTtVvXxY |
41 | +.Op Fl 1246AaBCfgkMNnqsTtVvXxY | |
d79228b3 SZ |
42 | .Op Fl b Ar bind_address |
43 | .Op Fl c Ar cipher_spec | |
b59525f2 | 44 | .Oo Fl D\ \& |
9c944978 | 45 | @@ -425,6 +425,10 @@ |
4c48535c AM |
46 | on the local machine as the source address |
47 | of the connection. | |
48 | Only useful on systems with more than one address. | |
d79228b3 SZ |
49 | +.It Fl B |
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. | |
cd749aff | 53 | .It Fl C |
54 | Requests compression of all data (including stdin, stdout, stderr, and | |
55 | data for forwarded X11 and TCP/IP connections). | |
9c944978 JB |
56 | --- openssh-4.0p1/ssh.c.orig 2005-03-02 02:04:33.000000000 +0100 |
57 | +++ openssh-4.0p1/ssh.c 2005-03-10 15:11:10.000000000 +0100 | |
cd749aff | 58 | @@ -135,6 +135,9 @@ |
d79228b3 SZ |
59 | /* Should we execute a command or invoke a subsystem? */ |
60 | int subsystem_flag = 0; | |
61 | ||
62 | +/* Enable sigpipe */ | |
63 | +int enable_sigpipe = 0; | |
64 | + | |
65 | /* # of replies received for global requests */ | |
66 | static int client_global_request_id = 0; | |
67 | ||
9c944978 JB |
68 | @@ -157,7 +160,7 @@ |
69 | usage(void) | |
70 | { | |
71 | fprintf(stderr, | |
72 | -"usage: ssh [-1246AaCfgkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]\n" | |
73 | +"usage: ssh [-1246AaBCfgkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]\n" | |
b59525f2 | 74 | " [-D [bind_address:]port] [-e escape_char] [-F configfile]\n" |
9c944978 JB |
75 | " [-i identity_file] [-L [bind_address:]port:host:hostport]\n" |
76 | " [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]\n" | |
b59525f2 | 77 | @@ -244,7 +247,7 @@ |
d79228b3 SZ |
78 | |
79 | again: | |
80 | while ((opt = getopt(ac, av, | |
b59525f2 | 81 | - "1246ab:c:e:fgi:kl:m:no:p:qstvxACD:F:I:L:MNO:PR:S:TVw:XY")) != -1) { |
82 | + "1246ab:c:e:fgi:kl:m:no:p:qstvxABCD:F:I:L:MNO:PR:S:TVw:XY")) != -1) { | |
d79228b3 SZ |
83 | switch (opt) { |
84 | case '1': | |
85 | options.protocol = SSH_PROTO_1; | |
9c944978 | 86 | @@ -291,6 +294,9 @@ |
d79228b3 SZ |
87 | case 'A': |
88 | options.forward_agent = 1; | |
89 | break; | |
90 | + case 'B': | |
91 | + enable_sigpipe = 1; | |
92 | + break; | |
d79228b3 | 93 | case 'k': |
cd749aff | 94 | options.gss_deleg_creds = 0; |
95 | break; |