]>
Commit | Line | Data |
---|---|---|
3e988458 AM |
1 | diff -urN openssh-3.9p1.org/clientloop.c openssh-3.9p1/clientloop.c |
2 | --- openssh-3.9p1.org/clientloop.c 2004-08-17 19:03:29.093601408 +0200 | |
3 | +++ openssh-3.9p1/clientloop.c 2004-08-17 19:03:41.803669184 +0200 | |
4 | @@ -104,6 +104,9 @@ | |
d79228b3 SZ |
5 | */ |
6 | extern char *host; | |
7 | ||
8 | +/* if we process SIGPIPE */ | |
9 | +extern int enable_sigpipe; | |
10 | + | |
11 | /* | |
12 | * Flag to indicate that we have received a window change signal which has | |
13 | * not yet been processed. This will cause a message indicating the new | |
3e988458 | 14 | @@ -1202,6 +1205,8 @@ |
cd749aff | 15 | signal(SIGQUIT, signal_handler); |
16 | if (signal(SIGTERM, SIG_IGN) != SIG_IGN) | |
17 | signal(SIGTERM, signal_handler); | |
d79228b3 SZ |
18 | + if (enable_sigpipe) |
19 | + signal(SIGPIPE, signal_handler); | |
d79228b3 SZ |
20 | if (have_pty) |
21 | signal(SIGWINCH, window_change_handler); | |
22 | ||
3e988458 AM |
23 | diff -urN openssh-3.9p1.org/ssh.0 openssh-3.9p1/ssh.0 |
24 | --- openssh-3.9p1.org/ssh.0 2004-08-17 19:03:29.327565840 +0200 | |
25 | +++ openssh-3.9p1/ssh.0 2004-08-17 19:03:41.809668272 +0200 | |
26 | @@ -235,6 +235,8 @@ | |
46931270 AM |
27 | that enable them to authenticate using the identities loaded into |
28 | the agent. | |
29 | ||
30 | + -B Enable SIGPIPE processing. | |
31 | + | |
32 | -a Disables forwarding of the authentication agent connection. | |
33 | ||
34 | -b bind_address | |
3e988458 AM |
35 | diff -urN openssh-3.9p1.org/ssh.1 openssh-3.9p1/ssh.1 |
36 | --- openssh-3.9p1.org/ssh.1 2004-08-17 19:03:29.208583928 +0200 | |
37 | +++ openssh-3.9p1/ssh.1 2004-08-17 19:04:51.366094088 +0200 | |
cd749aff | 38 | @@ -43,7 +43,7 @@ |
39 | .Nd OpenSSH SSH client (remote login program) | |
40 | .Sh SYNOPSIS | |
d79228b3 | 41 | .Nm ssh |
3e988458 AM |
42 | -.Op Fl 1246AaCfgkMNnqsTtVvXxY |
43 | +.Op Fl 1246AaBCfgkMNnqsTtVvXxY | |
d79228b3 SZ |
44 | .Op Fl b Ar bind_address |
45 | .Op Fl c Ar cipher_spec | |
3e988458 AM |
46 | .Bk -words |
47 | @@ -443,6 +443,10 @@ | |
d79228b3 SZ |
48 | .It Fl b Ar bind_address |
49 | Specify the interface to transmit from on machines with multiple | |
50 | interfaces or aliased addresses. | |
51 | +.It Fl B | |
52 | +Enables processing of SIGPIPE. Useful when using ssh output as input for | |
aa4ad340 SZ |
53 | +another process, for example in a shell script. Be careful - it may break |
54 | +port/X11 forwarding when used. | |
cd749aff | 55 | .It Fl C |
56 | Requests compression of all data (including stdin, stdout, stderr, and | |
57 | data for forwarded X11 and TCP/IP connections). | |
3e988458 AM |
58 | diff -urN openssh-3.9p1.org/ssh.c openssh-3.9p1/ssh.c |
59 | --- openssh-3.9p1.org/ssh.c 2004-08-17 19:03:29.209583776 +0200 | |
60 | +++ openssh-3.9p1/ssh.c 2004-08-17 19:04:36.765313744 +0200 | |
cd749aff | 61 | @@ -135,6 +135,9 @@ |
d79228b3 SZ |
62 | /* Should we execute a command or invoke a subsystem? */ |
63 | int subsystem_flag = 0; | |
64 | ||
65 | +/* Enable sigpipe */ | |
66 | +int enable_sigpipe = 0; | |
67 | + | |
68 | /* # of replies received for global requests */ | |
69 | static int client_global_request_id = 0; | |
70 | ||
3e988458 | 71 | @@ -236,7 +239,7 @@ |
d79228b3 SZ |
72 | |
73 | again: | |
74 | while ((opt = getopt(ac, av, | |
3e988458 AM |
75 | - "1246ab:c:e:fgi:kl:m:no:p:qstvxACD:F:I:L:MNPR:S:TVXY")) != -1) { |
76 | + "1246ab:c:e:fgi:kl:m:no:p:qstvxABCD:F:I:L:MNPR:S:TVXY")) != -1) { | |
d79228b3 SZ |
77 | switch (opt) { |
78 | case '1': | |
79 | options.protocol = SSH_PROTO_1; | |
3e988458 | 80 | @@ -279,6 +282,9 @@ |
d79228b3 SZ |
81 | case 'A': |
82 | options.forward_agent = 1; | |
83 | break; | |
84 | + case 'B': | |
85 | + enable_sigpipe = 1; | |
86 | + break; | |
d79228b3 | 87 | case 'k': |
cd749aff | 88 | options.gss_deleg_creds = 0; |
89 | break; |