]> git.pld-linux.org Git - packages/openssh.git/blob - openssh-sigpipe.patch
- updated
[packages/openssh.git] / openssh-sigpipe.patch
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 @@
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
14 @@ -1202,6 +1205,8 @@
15                 signal(SIGQUIT, signal_handler);
16         if (signal(SIGTERM, SIG_IGN) != SIG_IGN)
17                 signal(SIGTERM, signal_handler);
18 +       if (enable_sigpipe)
19 +               signal(SIGPIPE, signal_handler);
20         if (have_pty)
21                 signal(SIGWINCH, window_change_handler);
22  
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 @@
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
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
38 @@ -43,7 +43,7 @@
39  .Nd OpenSSH SSH client (remote login program)
40  .Sh SYNOPSIS
41  .Nm ssh
42 -.Op Fl 1246AaCfgkMNnqsTtVvXxY
43 +.Op Fl 1246AaBCfgkMNnqsTtVvXxY
44  .Op Fl b Ar bind_address
45  .Op Fl c Ar cipher_spec
46  .Bk -words
47 @@ -443,6 +443,10 @@
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
53 +another process, for example in a shell script. Be careful - it may break
54 +port/X11 forwarding when used.
55  .It Fl C
56  Requests compression of all data (including stdin, stdout, stderr, and
57  data for forwarded X11 and TCP/IP connections).
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
61 @@ -135,6 +135,9 @@
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  
71 @@ -236,7 +239,7 @@
72  
73  again:
74         while ((opt = getopt(ac, av,
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) {
77                 switch (opt) {
78                 case '1':
79                         options.protocol = SSH_PROTO_1;
80 @@ -279,6 +282,9 @@
81                 case 'A':
82                         options.forward_agent = 1;
83                         break;
84 +               case 'B':
85 +                       enable_sigpipe = 1;
86 +                       break;
87                 case 'k':
88                         options.gss_deleg_creds = 0;
89                         break;
This page took 0.038234 seconds and 4 git commands to generate.