Branch: Tag:

1998-04-03

1998-04-03 20:55:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed security hole.

Rev: src/modules/Pipe/pipe.c:1.18

22:   #include <fcntl.h>      #include "global.h" - RCSID("$Id: pipe.c,v 1.17 1998/04/03 20:06:48 grubba Exp $"); + RCSID("$Id: pipe.c,v 1.18 1998/04/03 20:55:47 grubba Exp $");      #include "threads.h"   #include "stralloc.h"
446:    this->firstinput &&    this->bytes_in_buffer<MAX_BYTES_IN_BUFFER)    { -  if (this->type == I_BLOCKING_OBJ) { +  if (this->firstinput->type == I_BLOCKING_OBJ) {    push_int(8192);    push_int(1); /* We don't care if we don't get all 8192 bytes. */ -  apply(i->u.obj, "read", 2); +  apply(i->firstinput->u.obj, "read", 2);    if (sp[-1].type == T_STRING) {    append_buffer(sp[-1].u.string);    } else {    /* FIXME: Should probably check the return value. */    /* EOF */ -  +  this->sleeping = 0;    input_finish();    }    pop_stack();
687: Inside #if defined(HAVE_MMAP) && defined(HAVE_MUNMAP) and #if defined(HAVE_GETEUID)
  #ifdef HAVE_GETEUID    if(ou) {   #ifdef HAVE_SETEUID -  seteuid(0); +  seteuid(ou);   #else /* ! HAVE_SETEUID */   #ifdef HAVE_SETREUID    setresuid(-1, ou, -1);