1 diff -Naur openssh-3.5p1/clientloop.c openssh-3.5p1-p/clientloop.c
2 --- openssh-3.5p1/clientloop.c Wed Sep 4 08:32:13 2002
3 +++ openssh-3.5p1-p/clientloop.c Tue Nov 5 15:46:26 2002
8 +/* if we process SIGPIPE */
9 +extern int enable_sigpipe;
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
15 signal(SIGINT, signal_handler);
16 signal(SIGQUIT, signal_handler);
17 signal(SIGTERM, signal_handler);
20 + signal(SIGPIPE, signal_handler);
23 signal(SIGWINCH, window_change_handler);
25 diff -Naur openssh-3.5p1/ssh.1 openssh-3.5p1-p/ssh.1
26 --- openssh-3.5p1/ssh.1 Mon Sep 30 04:00:56 2002
27 +++ openssh-3.5p1-p/ssh.1 Tue Nov 5 15:51:54 2002
32 -.Op Fl afgknqstvxACNTX1246
33 +.Op Fl afgknqstvxABCNTX1246
34 .Op Fl b Ar bind_address
35 .Op Fl c Ar cipher_spec
36 .Op Fl e Ar escape_char
38 .It Fl b Ar bind_address
39 Specify the interface to transmit from on machines with multiple
40 interfaces or aliased addresses.
42 +Enables processing of SIGPIPE. Useful when using ssh output as input for
43 +another process, for example in a shell script. Be careful - it may break
44 +port/X11 forwarding when used.
45 .It Fl c Ar blowfish|3des|des
46 Selects the cipher to use for encrypting the session.
48 diff -Naur openssh-3.5p1/ssh.c openssh-3.5p1-p/ssh.c
49 --- openssh-3.5p1/ssh.c Thu Sep 19 04:05:04 2002
50 +++ openssh-3.5p1-p/ssh.c Tue Nov 5 15:44:57 2002
52 /* Should we execute a command or invoke a subsystem? */
53 int subsystem_flag = 0;
56 +int enable_sigpipe = 0;
58 /* # of replies received for global requests */
59 static int client_global_request_id = 0;
62 fprintf(stderr, " -F config Config file (default: ~/%s).\n",
63 _PATH_SSH_USER_CONFFILE);
64 fprintf(stderr, " -A Enable authentication agent forwarding.\n");
65 + fprintf(stderr, " -B Enable SIGPIPE processing.\n");
66 fprintf(stderr, " -a Disable authentication agent forwarding (default).\n");
68 fprintf(stderr, " -k Disable Kerberos ticket and AFS token forwarding.\n");
72 while ((opt = getopt(ac, av,
73 - "1246ab:c:e:fgi:kl:m:no:p:qstvxACD:F:I:L:NPR:TVX")) != -1) {
74 + "1246ab:c:e:fgi:kl:m:no:p:qstvxABCD:F:I:L:NPR:TVX")) != -1) {
77 options.protocol = SSH_PROTO_1;
80 options.forward_agent = 1;
87 options.kerberos_tgt_passing = 0;