Re: exim-1.62 on sunos dumps - was: exim-1.61 on sunos dumps

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Philip Hazel
Fecha:  
A: David Sheryn
Cc: exim-users
Asunto: Re: exim-1.62 on sunos dumps - was: exim-1.61 on sunos dumps
On Thu, 8 May 1997, David Sheryn wrote:

> I was planning to upgrade 1.59 -> 1.62 for our few remaining SunOS 4.1.4
> platforms and appear to have hit the same bug compiling exim-1.62 with gcc
> 2.6.3 and SunOS ld. Is my only option to get Gnu ld built for this environment ?
> (in which case I probably wont bother, since these machines will become
> Solaris 2.5.1 machines sometime soon-ish).


A bug has been discovered that hist SunOS4 systems. I stupidly used an
int when I should have used a uid_t in a place where it mattered - and
on SunOS4 uid_t is short int. Patch below.

-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714



*** exim-1.62/src/spool_in.c        Wed Apr 16 14:34:51 1997
--- spool_in.c  Tue May  6 09:12:51 1997
***************
*** 181,187 ****
  spool_read_header(char *name, BOOL read_headers)
  {
  FILE *f;
! int n;
  BOOL inheader = FALSE;
  char originator[64];


--- 181,187 ----
spool_read_header(char *name, BOOL read_headers)
{
FILE *f;
! int n, uid, gid;
BOOL inheader = FALSE;
char originator[64];

***************
*** 230,238 ****
the time the message was received, and the number of warning messages for
delivery delays that have been sent. */

! if (sscanf(big_buffer, "%s %d %d", originator, (int *)(&originator_uid),
! (int *)(&originator_gid)) != 3) goto SPOOL_FORMAT_ERROR;
originator_login = string_copy(originator);

if (fgets(big_buffer, big_buffer_size, f) == NULL) goto SPOOL_READ_ERROR;
n = (int)strlen(big_buffer);
--- 230,241 ----
the time the message was received, and the number of warning messages for
delivery delays that have been sent. */

! if (sscanf(big_buffer, "%s %d %d", originator, &uid, &gid) != 3)
! goto SPOOL_FORMAT_ERROR;
!
originator_login = string_copy(originator);
+ originator_uid = (uid_t)uid;
+ originator_gid = (gid_t)gid;

if (fgets(big_buffer, big_buffer_size, f) == NULL) goto SPOOL_READ_ERROR;
n = (int)strlen(big_buffer);