This file is indexed.

/usr/share/topal/patches/pine-4.64.patch is in topal 75-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
diff -cr OP/pine4.64/imap/src/c-client/mail.h NP/pine4.64/imap/src/c-client/mail.h
*** OP/pine4.64/imap/src/c-client/mail.h	2005-02-08 23:44:54.000000000 +0000
--- NP/pine4.64/imap/src/c-client/mail.h	2007-12-28 15:30:39.000000000 +0000
***************
*** 713,718 ****
--- 713,719 ----
    } size;
    char *md5;			/* MD5 checksum */
    void *sparep;			/* spare pointer reserved for main program */
+   unsigned short topal_hack;    /* set to 1 if topal has wrecked the sending */
  };
  
  
diff -cr OP/pine4.64/pine/pine.h NP/pine4.64/pine/pine.h
*** OP/pine4.64/pine/pine.h	2005-09-16 01:39:42.000000000 +0100
--- NP/pine4.64/pine/pine.h	2007-12-28 15:32:00.000000000 +0000
***************
*** 63,69 ****
  #ifndef _PINE_INCLUDED
  #define _PINE_INCLUDED
  
! #define PINE_VERSION		"4.64"
  #define	PHONE_HOME_VERSION	"-count"
  #define	PHONE_HOME_HOST		"docserver.cac.washington.edu"
  
--- 63,69 ----
  #ifndef _PINE_INCLUDED
  #define _PINE_INCLUDED
  
! #define PINE_VERSION		"4.64T"
  #define	PHONE_HOME_VERSION	"-count"
  #define	PHONE_HOME_HOST		"docserver.cac.washington.edu"
  
diff -cr OP/pine4.64/pine/send.c NP/pine4.64/pine/send.c
*** OP/pine4.64/pine/send.c	2005-09-12 23:04:25.000000000 +0100
--- NP/pine4.64/pine/send.c	2007-12-28 15:34:58.000000000 +0000
***************
*** 5254,5259 ****
--- 5254,5269 ----
      pbf = save_previous_pbuf;
      g_rolenick = NULL;
  
+     if ((*body)->type == TYPEMULTIPART 
+ 	&& (*body)->topal_hack == 1)
+       /* This was a single part message which Topal mangled. */
+       (*body)->type = TYPETEXT;
+     if ((*body)->type == TYPEMULTIPART
+ 	&& (*body)->topal_hack != 1)
+       /* Topal mangled a multipart message.  So the first nested part
+ 	 is really TYPETEXT. */
+       (*body)->nested.part->body.type = TYPETEXT;
+     
      dprint(4, (debugfile, "=== send returning ===\n"));
  }
  
***************
*** 6752,6764 ****
  
  				rfc822_parse_content_header(nb,
  				    (char *) ucase((unsigned char *) buf+8),s);
! 				if(nb->type == TYPETEXT
! 				   && nb->subtype
  				   && (!b->subtype 
  				       || strucmp(b->subtype, nb->subtype))){
  				    if(b->subtype)
  				      fs_give((void **) &b->subtype);
  
  				    b->subtype  = nb->subtype;
  				    nb->subtype = NULL;
  				      
--- 6762,6774 ----
  
  				rfc822_parse_content_header(nb,
  				    (char *) ucase((unsigned char *) buf+8),s);
! 				if(nb->subtype
  				   && (!b->subtype 
  				       || strucmp(b->subtype, nb->subtype))){
  				    if(b->subtype)
  				      fs_give((void **) &b->subtype);
  
+ 				    b->type     = nb->type;
  				    b->subtype  = nb->subtype;
  				    nb->subtype = NULL;
  				      
***************
*** 6766,6771 ****
--- 6776,6783 ----
  				    b->parameter = nb->parameter;
  				    nb->parameter = NULL;
  				    mail_free_body_parameter(&nb->parameter);
+ 				    if (b->type != TYPETEXT)
+ 				      b->topal_hack = 1;
  				}
  
  				mail_free_body(&nb);
***************
*** 9411,9427 ****
    dprint(4, (debugfile, "-- pine_encode_body: %d\n", body ? body->type : 0));
    if (body) switch (body->type) {
    case TYPEMULTIPART:		/* multi-part */
!     if (!body->parameter) {	/* cookie not set up yet? */
!       char tmp[MAILTMPLEN];	/* make cookie not in BASE64 or QUOTEPRINT*/
!       sprintf (tmp,"%ld-%ld-%ld=:%ld",gethostid (),random (),(long) time (0),
! 	       (long) getpid ());
!       body->parameter = mail_newbody_parameter ();
!       body->parameter->attribute = cpystr ("BOUNDARY");
!       body->parameter->value = cpystr (tmp);
!     }
!     part = body->nested.part;	/* encode body parts */
!     do pine_encode_body (&part->body);
!     while (part = part->next);	/* until done */
      break;
  /* case MESSAGE:	*/	/* here for documentation */
      /* Encapsulated messages are always treated as text objects at this point.
--- 9423,9441 ----
    dprint(4, (debugfile, "-- pine_encode_body: %d\n", body ? body->type : 0));
    if (body) switch (body->type) {
    case TYPEMULTIPART:		/* multi-part */
!     if (body->topal_hack != 1){
!       if (!body->parameter) {	/* cookie not set up yet? */
! 	char tmp[MAILTMPLEN];	/* make cookie not in BASE64 or QUOTEPRINT*/
! 	sprintf (tmp,"%ld-%ld-%ld=:%ld",gethostid (),random (),(long) time (0),
! 		 (long) getpid ());
! 	body->parameter = mail_newbody_parameter ();
! 	body->parameter->attribute = cpystr ("BOUNDARY");
! 	body->parameter->value = cpystr (tmp);
!       }
!       part = body->nested.part;	/* encode body parts */
!       do pine_encode_body (&part->body);
!       while (part = part->next);	/* until done */
!     }
      break;
  /* case MESSAGE:	*/	/* here for documentation */
      /* Encapsulated messages are always treated as text objects at this point.
***************
*** 9592,9598 ****
  
      dprint(4, (debugfile, "-- pine_rfc822_output_body: %d\n",
  	       body ? body->type : 0));
!     if(body->type == TYPEMULTIPART) {   /* multipart gets special handling */
  	part = body->nested.part;	/* first body part */
  					/* find cookie */
  	for (param = body->parameter; param && !cookie; param = param->next)
--- 9606,9613 ----
  
      dprint(4, (debugfile, "-- pine_rfc822_output_body: %d\n",
  	       body ? body->type : 0));
!     if(body->type == TYPEMULTIPART
!        && body->topal_hack != 1) {   /* multipart gets special handling */
  	part = body->nested.part;	/* first body part */
  					/* find cookie */
  	for (param = body->parameter; param && !cookie; param = param->next)
***************
*** 9652,9658 ****
  	 * Convert text pieces to canonical form
  	 * BEFORE applying any encoding (rfc1341: appendix G)...
  	 */
! 	if(body->type == TYPETEXT && body->encoding != ENCBASE64){
  	    gf_link_filter(gf_local_nvtnl, NULL);
  	}
  
--- 9667,9674 ----
  	 * Convert text pieces to canonical form
  	 * BEFORE applying any encoding (rfc1341: appendix G)...
  	 */
! 	if((body->type == TYPETEXT && body->encoding != ENCBASE64)
! 	   | (body->type == TYPEMULTIPART && body->topal_hack == 1)){
  	    gf_link_filter(gf_local_nvtnl, NULL);
  	}
  
***************
*** 9752,9766 ****
  			      ? body->subtype
  			      : rfc822_default_subtype (body->type))))
  	  return(pwbh_finish(0, so));
! 	    
  	if (param){
! 	    do
! 	      if(!(so_puts(so, "; ")
! 		   && rfc2231_output(so, param->attribute, param->value,
! 				     (char *) tspecials,
! 				     ps_global->VAR_CHAR_SET)))
! 		return(pwbh_finish(0, so));
! 	    while (param = param->next);
  	}
  	else if(!so_puts(so, "; CHARSET=US-ASCII"))
  	  return(pwbh_finish(0, so));
--- 9768,9794 ----
  			      ? body->subtype
  			      : rfc822_default_subtype (body->type))))
  	  return(pwbh_finish(0, so));
! 	
  	if (param){
! 	  do
! 	    if(body->topal_hack == 1 
! 	       && !struncmp(param->attribute, "protocol", 9))
! 	      {
! 		if(!(so_puts(so, "; \015\012\011")
! 		     && rfc2231_output(so, param->attribute, param->value,
! 				       (char *) tspecials,
! 				       ps_global->VAR_CHAR_SET)))
! 		  return(pwbh_finish(0, so));
! 	      }
! 	    else
! 	      {
! 		if(!(so_puts(so, "; ")
! 		     && rfc2231_output(so, param->attribute, param->value,
! 				       (char *) tspecials,
! 				       ps_global->VAR_CHAR_SET)))
! 		  return(pwbh_finish(0, so));
! 	      }
! 	  while (param = param->next);
  	}
  	else if(!so_puts(so, "; CHARSET=US-ASCII"))
  	  return(pwbh_finish(0, so));
***************
*** 9991,9997 ****
      long  l = 0L;
      PART *part;
  
!     if(body->type == TYPEMULTIPART) {   /* multipart gets special handling */
  	part = body->nested.part;	/* first body part */
  	do				/* for each part */
  	  l += send_body_size(&part->body);
--- 10019,10026 ----
      long  l = 0L;
      PART *part;
  
!     if(body->type == TYPEMULTIPART
!        && body->topal_hack != 1) {   /* multipart gets special handling */
  	part = body->nested.part;	/* first body part */
  	do				/* for each part */
  	  l += send_body_size(&part->body);