pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/nfsbug Declare functions before using them to...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3e4ec4799077
branches:  trunk
changeset: 523171:3e4ec4799077
user:      minskim <minskim%pkgsrc.org@localhost>
date:      Wed Jan 03 03:31:54 2007 +0000

description:
Declare functions before using them to avoid wrong guess.

diffstat:

 security/nfsbug/distinfo         |   4 +-
 security/nfsbug/patches/patch-ab |  76 ++++++++++++++++++++-------------------
 2 files changed, 41 insertions(+), 39 deletions(-)

diffs (198 lines):

diff -r 67ad63d003c2 -r 3e4ec4799077 security/nfsbug/distinfo
--- a/security/nfsbug/distinfo  Wed Jan 03 03:26:31 2007 +0000
+++ b/security/nfsbug/distinfo  Wed Jan 03 03:31:54 2007 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2007/01/03 03:26:31 minskim Exp $
+$NetBSD: distinfo,v 1.8 2007/01/03 03:31:54 minskim Exp $
 
 SHA1 (nfsBugFerret.tgz) = 6b0b2d25fadd3156cf0f8851d72b6d6070dc528c
 RMD160 (nfsBugFerret.tgz) = e238e0a892bb8e46969278687ce6ec1944ae24c8
@@ -7,5 +7,5 @@
 RMD160 (nfsShell.c) = 340454d35e6e67b87255cba7437186639f16cfa5
 Size (nfsShell.c) = 47258 bytes
 SHA1 (patch-aa) = b28b48831632d2ffe8e103589c9fbf5b3e840d02
-SHA1 (patch-ab) = 92908f57337c9fd2857720f14027f426809c669a
+SHA1 (patch-ab) = 9848a6b64eb5aa9279f913292795e8bc10fc7799
 SHA1 (patch-ac) = 8beb4759a385252700aabcee9f6cd0d585bf5274
diff -r 67ad63d003c2 -r 3e4ec4799077 security/nfsbug/patches/patch-ab
--- a/security/nfsbug/patches/patch-ab  Wed Jan 03 03:26:31 2007 +0000
+++ b/security/nfsbug/patches/patch-ab  Wed Jan 03 03:31:54 2007 +0000
@@ -1,117 +1,119 @@
-$NetBSD: patch-ab,v 1.2 1998/11/12 23:48:35 frueauf Exp $
+$NetBSD: patch-ab,v 1.3 2007/01/03 03:31:54 minskim Exp $
 
---- nfsshell.c.orig    Mon Sep 28 15:54:36 1998
-+++ nfsshell.c Mon Sep 28 15:57:22 1998
+--- nfsshell.c.orig    2007-01-02 19:29:27.000000000 -0800
++++ nfsshell.c
 @@ -1,3 +1,4 @@
-+/* URL: http://www.asmodeus.com/archive/Xnix/nfsShell */
++/* URL: http://www.asmodeus.com/archive/Xnix/nfsShell */
  /*
   * Copyright, 1991, 1992, by Leendert van Doorn (leendert%cs.vu.nl@localhost)
   *
-@@ -21,14 +22,19 @@
+@@ -21,14 +22,21 @@
  #include <sys/ioctl.h>
  #include <sys/socket.h>
  #include <sys/vnode.h>
 -#include <sys/vfs.h>
-+/* #include <sys/vfs.h> *//*HF*/
++/* #include <sys/vfs.h> *//*HF*/
  #include <netinet/in.h>
  #include <arpa/inet.h>
  #include <sys/time.h>
 -#include <ufs/inode.h>
-+#include <ufs/ufs/dinode.h> /*HF: NetBSD*/
-+/* #include <sys/fs/ufs_inode.h> *//*HF: Solaris*/
-+#include <sys/filio.h>
++#include <ufs/ufs/dinode.h> /*HF: NetBSD*/
++/* #include <sys/fs/ufs_inode.h> *//*HF: Solaris*/
++#include <sys/filio.h>
  #include "mount.h"
  #include "nfs_prot.h"
  
-+int getline(char *buf, int bufsize, int *argc, char **argv, int argvsize);
-+
-+
++int getline(char *buf, int bufsize, int *argc, char **argv, int argvsize);
++AUTH * MYauthunix_create_default(uid, gid);
++static int determine_transfersize();
++
++
  /*
   * Fundamental constants
   */
-@@ -284,8 +290,11 @@
+@@ -284,8 +292,11 @@ getline(buf, bufsize, argc, argv, argvsi
      register char *p;
  
      if (interact) printf("nfs> ");
 -    if (fgets(buf, bufsize, stdin) == NULL)
-+    if (fgets(buf, bufsize, stdin) == NULL){ 
-+      perror("fgets");
-+      fprintf(stderr,"EOF?!\n");
++    if (fgets(buf, bufsize, stdin) == NULL){ 
++      perror("fgets");
++      fprintf(stderr,"EOF?!\n");
        return 0;
-+    }
++    }
      *argc = 0;
      for (p = buf; *p == ' ' || *p == '\t'; p++)
        /* skip white spaces */;
-@@ -340,7 +349,7 @@
+@@ -340,7 +351,7 @@ do_setid(var, argc, argv)
      *var = argc == 2 ? atoi(argv[1]) : -2;
      if (nfsclient && nfsclient->cl_auth) {
        auth_destroy(nfsclient->cl_auth);
 -      nfsclient->cl_auth = authunix_create_default(uid, gid);
-+      nfsclient->cl_auth = MYauthunix_create_default(uid, gid);
++      nfsclient->cl_auth = MYauthunix_create_default(uid, gid);
      }
  }
  
-@@ -509,8 +518,7 @@
+@@ -509,8 +520,7 @@ do_ls(argc, argv)
  /*
   * Print long listing of a files, much in the way ``ls -l'' does
   */
 -printfilestatus(name)
 -    char *name;
-+printfilestatus(char *name)
++printfilestatus(char *name)
  {
      diropargs args;
      diropres *res;
-@@ -1160,7 +1168,7 @@
+@@ -1160,7 +1170,7 @@ do_handle(argc, argv)
          return 0;
      }
      clnt_control(nfsclient, CLSET_TIMEOUT, &timeout);
 -    nfsclient->cl_auth = authunix_create_default(uid, gid);
-+    nfsclient->cl_auth = MYauthunix_create_default(uid, gid);
++    nfsclient->cl_auth = MYauthunix_create_default(uid, gid);
  
      /* provide some generic name for it */
      if ((mountpath = malloc(8 + 1)) == NULL) {
-@@ -1235,7 +1243,7 @@
+@@ -1235,7 +1245,7 @@ do_mroot(var, argc, argv)
      *var = 0x00100000;
      if (nfsclient && nfsclient->cl_auth) {
        auth_destroy(nfsclient->cl_auth);
 -      nfsclient->cl_auth = authunix_create_default(uid, gid);
-+      nfsclient->cl_auth = MYauthunix_create_default(uid, gid);
++      nfsclient->cl_auth = MYauthunix_create_default(uid, gid);
      }
  /*
   * Put in some type of code here
-@@ -1493,7 +1501,7 @@
+@@ -1493,7 +1503,7 @@ open_mount(host)
          return 0;
      }
      clnt_control(mntclient, CLSET_TIMEOUT, &timeout);
 -    mntclient->cl_auth = authunix_create_default(0, 0);
-+    mntclient->cl_auth = MYauthunix_create_default(0, 0);
++    mntclient->cl_auth = MYauthunix_create_default(0, 0);
      if (verbose)
        printf("Open %s (%s)\n",
            remotehost, inet_ntoa(server_addr.sin_addr));
-@@ -1540,7 +1548,7 @@
+@@ -1540,7 +1550,7 @@ open_nfs(path, umount, portmap)
          return 0;
      }
      clnt_control(nfsclient, CLSET_TIMEOUT, &timeout);
 -    nfsclient->cl_auth = authunix_create_default(uid, gid);
-+    nfsclient->cl_auth = MYauthunix_create_default(uid, gid);
++    nfsclient->cl_auth = MYauthunix_create_default(uid, gid);
  
      /*
       * Get file handle for this path from the mount daemon. There
-@@ -1634,7 +1642,7 @@
+@@ -1634,7 +1644,7 @@ privileged()
        return RPC_ANYSOCK;
      for (;;) {
        sin.sin_port = htons((u_short)lport);
 -      if (bind(s, (caddr_t)&sin, sizeof (sin), 0) >= 0) {
-+      if (bind(s, (caddr_t)&sin, sizeof (sin)/*, 0*//*HF*/) >= 0) {
++      if (bind(s, (caddr_t)&sin, sizeof (sin)/*, 0*//*HF*/) >= 0) {
            (void)ioctl(s, FIONBIO, (char *) &dontblock);
            if (verbose)
                fprintf(stderr, "Using a privileged port (%d)\n", lport);
-@@ -1672,14 +1680,14 @@
+@@ -1672,14 +1682,14 @@ close_nfs()
   * syscalls.
   */
  AUTH *
 -authunix_create_default(uid, gid)
-+MYauthunix_create_default(uid, gid)
++MYauthunix_create_default(uid, gid)
      int uid, gid;
  {
      char machname[MAX_MACHINE_NAME + 1];
@@ -119,21 +121,21 @@
  
      if (gethostname(machname, MAX_MACHINE_NAME) == -1) {
 -      fprintf(stderr, "authunix_create_default: cannot get hostname\n");
-+      fprintf(stderr, "MYauthunix_create_default: cannot get hostname\n");
++      fprintf(stderr, "MYauthunix_create_default: cannot get hostname\n");
        exit(1);
      }
      machname[MAX_MACHINE_NAME] = 0;
-@@ -1858,8 +1866,7 @@
+@@ -1858,8 +1868,7 @@ umatchpattern(s, p)
   * NFS errors
   */
  char *
 -nfs_error(nfsstat)
 -    enum nfsstat nfsstat;
-+nfs_error(enum nfsstat nfsstat)
++nfs_error(enum nfsstat nfsstat)
  {
      switch (nfsstat) {
      case NFS_OK:
-@@ -1903,4 +1910,3 @@
+@@ -1903,4 +1912,3 @@ nfs_error(nfsstat)
      }
  }
  



Home | Main Index | Thread Index | Old Index