home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / kernel-s / v1.2 / patch-1.001 / patch-1.2.12
Text File  |  1995-07-25  |  7KB  |  239 lines

  1. diff -u --recursive --new-file v1.2.11/linux/Makefile linux/Makefile
  2. --- v1.2.11/linux/Makefile    Thu Jul  6 09:17:25 1995
  3. +++ linux/Makefile    Fri Jul  7 11:17:28 1995
  4. @@ -1,6 +1,6 @@
  5.  VERSION = 1
  6.  PATCHLEVEL = 2
  7. -SUBLEVEL = 11
  8. +SUBLEVEL = 12
  9.  
  10.  ARCH = i386
  11.  
  12. diff -u --recursive --new-file v1.2.11/linux/drivers/net/ppp.c linux/drivers/net/ppp.c
  13. --- v1.2.11/linux/drivers/net/ppp.c    Mon May 29 11:16:07 1995
  14. +++ linux/drivers/net/ppp.c    Sun Jul 16 22:21:35 1995
  15. @@ -505,6 +505,9 @@
  16.      ppp_release (ppp);
  17.  
  18.      PRINTKN (2,(KERN_INFO "ppp: channel %s closing.\n", ppp->dev->name));
  19. +#ifdef MODULE
  20. +    MOD_DEC_USE_COUNT;
  21. +#endif
  22.    }
  23.  }
  24.  
  25. @@ -613,9 +616,6 @@
  26.    PRINTKN (2,(KERN_INFO "ppp: channel %s going down for IP packets!\n",
  27.            dev->name));
  28.    CHECK_PPP(-ENXIO);
  29. -#ifdef MODULE
  30. -  MOD_DEC_USE_COUNT;
  31. -#endif
  32.    return 0;
  33.  }
  34.  
  35. diff -u --recursive --new-file v1.2.11/linux/drivers/scsi/buslogic.c linux/drivers/scsi/buslogic.c
  36. --- v1.2.11/linux/drivers/scsi/buslogic.c    Thu Jun  1 13:16:24 1995
  37. +++ linux/drivers/scsi/buslogic.c    Tue Jul  4 07:52:26 1995
  38. @@ -1515,8 +1515,8 @@
  39.          ip[1] = 32;
  40.          }
  41.  #else
  42. -        ip[0] = 256;
  43. -        ip[1] = 64;
  44. +        ip[0] = 255;
  45. +        ip[1] = 63;
  46.  #endif
  47.      } else {
  48.          ip[0] = 128;
  49. diff -u --recursive --new-file v1.2.11/linux/drivers/scsi/scsi.c linux/drivers/scsi/scsi.c
  50. --- v1.2.11/linux/drivers/scsi/scsi.c    Mon May 29 11:16:08 1995
  51. +++ linux/drivers/scsi/scsi.c    Mon Jul 17 15:20:24 1995
  52. @@ -457,7 +457,8 @@
  53.  
  54.            if (!strncmp(scsi_result+8,"NEC",3)) {
  55.            if (!strncmp(scsi_result+16,"CD-ROM DRIVE:84 ",16) ||
  56. -              !strncmp(scsi_result+16,"CD-ROM DRIVE:25",15))
  57. +              !strncmp(scsi_result+16,"CD-ROM DRIVE:25",15) ||
  58. +              !strncmp(scsi_result+16,"CD-ROM DRIVE:83",15))
  59.                SDpnt->manufacturer = SCSI_MAN_NEC_OLDCDR;
  60.            else
  61.                SDpnt->manufacturer = SCSI_MAN_NEC;
  62. diff -u --recursive --new-file v1.2.11/linux/fs/exec.c linux/fs/exec.c
  63. --- v1.2.11/linux/fs/exec.c    Mon Jan 30 13:08:04 1995
  64. +++ linux/fs/exec.c    Thu Jul  6 09:16:51 1995
  65. @@ -509,7 +509,8 @@
  66.      int ch;
  67.      char * name;
  68.  
  69. -    current->dumpable = 1;
  70. +    if (current->euid == current->uid && current->egid == current->gid)
  71. +        current->dumpable = 1;
  72.      name = bprm->filename;
  73.      for (i=0; (ch = *(name++)) != '\0';) {
  74.          if (ch == '/')
  75. diff -u --recursive --new-file v1.2.11/linux/fs/proc/inode.c linux/fs/proc/inode.c
  76. --- v1.2.11/linux/fs/proc/inode.c    Thu Jul  6 09:17:26 1995
  77. +++ linux/fs/proc/inode.c    Thu Jul  6 09:16:52 1995
  78. @@ -194,7 +194,8 @@
  79.          return;
  80.      }
  81.      ino &= 0x0000ffff;
  82. -    if (p->dumpable && p->uid == p->euid && p->gid == p->egid) {
  83. +    if (ino == PROC_PID_INO ||
  84. +        (p->dumpable && p->uid == p->euid && p->gid == p->egid)) {
  85.          inode->i_uid = p->uid;
  86.          inode->i_gid = p->gid;
  87.      }
  88. diff -u --recursive --new-file v1.2.11/linux/kernel/ksyms.c linux/kernel/ksyms.c
  89. --- v1.2.11/linux/kernel/ksyms.c    Mon May 29 11:16:09 1995
  90. +++ linux/kernel/ksyms.c    Sun Jul 16 22:21:35 1995
  91. @@ -286,6 +286,7 @@
  92.      X(slhc_remember),
  93.      X(slhc_compress),
  94.      X(slhc_uncompress),
  95. +    X(slhc_toss),
  96.  #endif
  97.  #endif
  98.      /* Device callback registration */
  99. diff -u --recursive --new-file v1.2.11/linux/kernel/sys.c linux/kernel/sys.c
  100. --- v1.2.11/linux/kernel/sys.c    Thu Mar  9 20:37:36 1995
  101. +++ linux/kernel/sys.c    Thu Jul  6 09:16:52 1995
  102. @@ -195,6 +195,7 @@
  103.  asmlinkage int sys_setregid(gid_t rgid, gid_t egid)
  104.  {
  105.      int old_rgid = current->gid;
  106. +    int old_egid = current->egid;
  107.  
  108.      if (rgid != (gid_t) -1) {
  109.          if ((old_rgid == rgid) ||
  110. @@ -219,6 +220,8 @@
  111.          (egid != (gid_t) -1 && egid != old_rgid))
  112.          current->sgid = current->egid;
  113.      current->fsgid = current->egid;
  114. +    if (current->egid != old_egid)
  115. +        current->dumpable = 0;
  116.      return 0;
  117.  }
  118.  
  119. @@ -227,12 +230,16 @@
  120.   */
  121.  asmlinkage int sys_setgid(gid_t gid)
  122.  {
  123. +    int old_egid = current->egid;
  124. +
  125.      if (suser())
  126.          current->gid = current->egid = current->sgid = current->fsgid = gid;
  127.      else if ((gid == current->gid) || (gid == current->sgid))
  128.          current->egid = current->fsgid = gid;
  129.      else
  130.          return -EPERM;
  131. +    if (current->egid != old_egid)
  132. +        current->dumpable = 0;
  133.      return 0;
  134.  }
  135.  
  136. @@ -284,6 +291,7 @@
  137.  asmlinkage int sys_setreuid(uid_t ruid, uid_t euid)
  138.  {
  139.      int old_ruid = current->uid;
  140. +    int old_euid = current->euid;
  141.  
  142.      if (ruid != (uid_t) -1) {
  143.          if ((old_ruid == ruid) || 
  144. @@ -308,6 +316,8 @@
  145.          (euid != (uid_t) -1 && euid != old_ruid))
  146.          current->suid = current->euid;
  147.      current->fsuid = current->euid;
  148. +    if (current->euid != old_euid)
  149. +        current->dumpable = 0;
  150.      return 0;
  151.  }
  152.  
  153. @@ -324,12 +334,16 @@
  154.   */
  155.  asmlinkage int sys_setuid(uid_t uid)
  156.  {
  157. +    int old_euid = current->euid;
  158. +
  159.      if (suser())
  160.          current->uid = current->euid = current->suid = current->fsuid = uid;
  161.      else if ((uid == current->uid) || (uid == current->suid))
  162.          current->fsuid = current->euid = uid;
  163.      else
  164.          return -EPERM;
  165. +    if (current->euid != old_euid)
  166. +        current->dumpable = 0;
  167.      return(0);
  168.  }
  169.  
  170. @@ -346,6 +360,8 @@
  171.      if (uid == current->uid || uid == current->euid ||
  172.          uid == current->suid || uid == current->fsuid || suser())
  173.          current->fsuid = uid;
  174. +    if (current->fsuid != old_fsuid)
  175. +        current->dumpable = 0;
  176.      return old_fsuid;
  177.  }
  178.  
  179. @@ -359,6 +375,8 @@
  180.      if (gid == current->gid || gid == current->egid ||
  181.          gid == current->sgid || gid == current->fsgid || suser())
  182.          current->fsgid = gid;
  183. +    if (current->fsgid != old_fsgid)
  184. +        current->dumpable = 0;
  185.      return old_fsgid;
  186.  }
  187.  
  188. diff -u --recursive --new-file v1.2.11/linux/net/inet/af_inet.c linux/net/inet/af_inet.c
  189. --- v1.2.11/linux/net/inet/af_inet.c    Thu Jul  6 09:17:27 1995
  190. +++ linux/net/inet/af_inet.c    Thu Jul 13 17:33:13 1995
  191. @@ -1259,7 +1259,7 @@
  192.  static int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
  193.  {
  194.      struct sock *sk=(struct sock *)sock->data;
  195. -    int err;
  196. +    int err, pid;
  197.  
  198.      switch(cmd) 
  199.      {
  200. @@ -1268,7 +1268,11 @@
  201.              err=verify_area(VERIFY_READ,(int *)arg,sizeof(long));
  202.              if(err)
  203.                  return err;
  204. -            sk->proc = get_fs_long((int *) arg);
  205. +            pid = get_fs_long((int *) arg);
  206. +            /* see inet_fcntl */
  207. +            if (current->pid != pid && current->pgrp != -pid && !suser())
  208. +                return -EPERM;
  209. +            sk->proc = pid;
  210.              return(0);
  211.          case FIOGETOWN:
  212.          case SIOCGPGRP:
  213. diff -u --recursive --new-file v1.2.11/linux/net/inet/tcp.c linux/net/inet/tcp.c
  214. --- v1.2.11/linux/net/inet/tcp.c    Thu Jun  1 13:16:25 1995
  215. +++ linux/net/inet/tcp.c    Thu Jul 13 17:29:39 1995
  216. @@ -135,6 +135,8 @@
  217.   *        Alan Cox    :    tcp_data() doesn't ack illegal PSH
  218.   *                    only frames. At least one pc tcp stack
  219.   *                    generates them.
  220. + *        Mark Yarvis    :    In tcp_read_wakeup(), don't send an
  221. + *                    ack if stat is TCP_CLOSED.
  222.   *
  223.   *
  224.   * To Fix:
  225. @@ -1801,6 +1803,13 @@
  226.  
  227.      if (!sk->ack_backlog) 
  228.          return;
  229. +
  230. +    /*
  231. +     * If we're closed, don't send an ack, or we'll get a RST
  232. +     * from the closed destination.
  233. +     */
  234. +    if ((sk->state == TCP_CLOSE) || (sk->state == TCP_TIME_WAIT))
  235. +        return; 
  236.  
  237.      /*
  238.       * FIXME: we need to put code here to prevent this routine from
  239.