]> git.pld-linux.org Git - packages/openssh.git/blob - openssh-sigpipe.patch
- updated
[packages/openssh.git] / openssh-sigpipe.patch
1 diff -urN openssh-3.8.1p1.org/clientloop.c openssh-3.8.1p1/clientloop.c
2 --- openssh-3.8.1p1.org/clientloop.c    2004-04-29 01:37:05.496553160 +0200
3 +++ openssh-3.8.1p1/clientloop.c        2004-04-29 01:37:29.691874912 +0200
4 @@ -99,6 +99,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 @@ -940,6 +943,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.8.1p1.org/ssh.0 openssh-3.8.1p1/ssh.0
24 --- openssh-3.8.1p1.org/ssh.0   2004-04-29 01:37:06.122458008 +0200
25 +++ openssh-3.8.1p1/ssh.0       2004-04-29 01:39:29.069726720 +0200
26 @@ -228,6 +228,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.8.1p1.org/ssh.1 openssh-3.8.1p1/ssh.1
36 --- openssh-3.8.1p1.org/ssh.1   2004-04-29 01:37:05.604536744 +0200
37 +++ openssh-3.8.1p1/ssh.1       2004-04-29 01:37:29.693874608 +0200
38 @@ -43,7 +43,7 @@
39  .Nd OpenSSH SSH client (remote login program)
40  .Sh SYNOPSIS
41  .Nm ssh
42 -.Op Fl 1246AaCfgkNnqsTtVvXxY
43 +.Op Fl 1246ABaCfgkNnqsTtVvXxY
44  .Op Fl b Ar bind_address
45  .Op Fl c Ar cipher_spec
46  .Op Fl D Ar port
47 @@ -426,6 +426,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.8.1p1.org/ssh.c openssh-3.8.1p1/ssh.c
59 --- openssh-3.8.1p1.org/ssh.c   2004-04-29 01:37:05.651529600 +0200
60 +++ openssh-3.8.1p1/ssh.c       2004-04-29 01:37:29.699873696 +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 @@ -228,7 +231,7 @@
72  
73  again:
74         while ((opt = getopt(ac, av,
75 -           "1246ab:c:e:fgi:kl:m:no:p:qstvxACD:F:I:L:NPR:TVXY")) != -1) {
76 +           "1246ab:c:e:fgi:kl:m:no:p:qstvxABCD:F:I:L:NPR:TVXY")) != -1) {
77                 switch (opt) {
78                 case '1':
79                         options.protocol = SSH_PROTO_1;
80 @@ -271,6 +274,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.048145 seconds and 4 git commands to generate.