]> git.pld-linux.org Git - packages/openssh.git/blame - openssh-sigpipe.patch
- rel 3; fix issues with utmp lines longer than 7 characters ie pts/1000
[packages/openssh.git] / openssh-sigpipe.patch
CommitLineData
cd749aff 1--- openssh-3.8p1/clientloop.c.orig 2003-12-17 06:33:11.000000000 +0100
2+++ openssh-3.8p1/clientloop.c 2004-02-25 21:25:43.000000000 +0100
3@@ -99,6 +99,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
cd749aff 13@@ -940,6 +943,8 @@
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);
d79228b3
SZ
19 if (have_pty)
20 signal(SIGWINCH, window_change_handler);
21
cd749aff 22--- openssh-3.8p1/ssh.1.orig 2003-12-17 06:33:11.000000000 +0100
23+++ openssh-3.8p1/ssh.1 2004-02-25 21:28:27.000000000 +0100
24@@ -43,7 +43,7 @@
25 .Nd OpenSSH SSH client (remote login program)
26 .Sh SYNOPSIS
d79228b3 27 .Nm ssh
cd749aff 28-.Op Fl 1246AaCfgkNnqsTtVvXxY
29+.Op Fl 1246ABaCfgkNnqsTtVvXxY
d79228b3
SZ
30 .Op Fl b Ar bind_address
31 .Op Fl c Ar cipher_spec
cd749aff 32 .Op Fl D Ar port
33@@ -426,6 +426,10 @@
d79228b3
SZ
34 .It Fl b Ar bind_address
35 Specify the interface to transmit from on machines with multiple
36 interfaces or aliased addresses.
37+.It Fl B
38+Enables processing of SIGPIPE. Useful when using ssh output as input for
aa4ad340
SZ
39+another process, for example in a shell script. Be careful - it may break
40+port/X11 forwarding when used.
cd749aff 41 .It Fl C
42 Requests compression of all data (including stdin, stdout, stderr, and
43 data for forwarded X11 and TCP/IP connections).
44--- openssh-3.8p1/ssh.c.orig 2003-12-17 06:33:11.000000000 +0100
45+++ openssh-3.8p1/ssh.c 2004-02-25 21:30:51.000000000 +0100
46@@ -135,6 +135,9 @@
d79228b3
SZ
47 /* Should we execute a command or invoke a subsystem? */
48 int subsystem_flag = 0;
49
50+/* Enable sigpipe */
51+int enable_sigpipe = 0;
52+
53 /* # of replies received for global requests */
54 static int client_global_request_id = 0;
55
cd749aff 56@@ -153,6 +156,7 @@
d79228b3
SZ
57 fprintf(stderr, " -F config Config file (default: ~/%s).\n",
58 _PATH_SSH_USER_CONFFILE);
59 fprintf(stderr, " -A Enable authentication agent forwarding.\n");
60+ fprintf(stderr, " -B Enable SIGPIPE processing.\n");
61 fprintf(stderr, " -a Disable authentication agent forwarding (default).\n");
cd749aff 62 fprintf(stderr, " -X Enable X11 connection forwarding.\n");
63 fprintf(stderr, " -Y Enable trusted X11 connection forwarding.\n");
64@@ -265,7 +269,7 @@
d79228b3
SZ
65
66 again:
67 while ((opt = getopt(ac, av,
cd749aff 68- "1246ab:c:e:fgi:kl:m:no:p:qstvxACD:F:I:L:NPR:TVXY")) != -1) {
69+ "1246ab:c:e:fgi:kl:m:no:p:qstvxABCD:F:I:L:NPR:TVXY")) != -1) {
d79228b3
SZ
70 switch (opt) {
71 case '1':
72 options.protocol = SSH_PROTO_1;
cd749aff 73@@ -308,6 +312,9 @@
d79228b3
SZ
74 case 'A':
75 options.forward_agent = 1;
76 break;
77+ case 'B':
78+ enable_sigpipe = 1;
79+ break;
d79228b3 80 case 'k':
cd749aff 81 options.gss_deleg_creds = 0;
82 break;
This page took 0.043336 seconds and 4 git commands to generate.