linux-mips-fnet
[Top] [All Lists]

nfsd

To: linux-mips@fnet.fr
Subject: nfsd
From: Systemkennung Linux <linux@mailhost.uni-koblenz.de>
Date: Wed, 27 Mar 1996 21:52:15 +0100 (MET)
Hi all,

below are the patches that fix some portability problems with the
nfs-server-2.2beta13 from Olaf Kirch.  I can now mount the IDE CDROM of
my MIPS box on my Linux/i386 box :-)

If someone of you tries to recompile nfsd - there are some more problems
with nfsd caused by namespace pollution.  For now I declare GNU libc guilty
and have therefore removed the related patches from the appended patchfile.

   Ralf

diff -urN nfs-server-2.2beta13.orig/auth_init.c nfs-server-2.2beta13/auth_init.c
--- nfs-server-2.2beta13.orig/auth_init.c       Thu Feb 15 01:32:29 1996
+++ nfs-server-2.2beta13/auth_init.c    Tue Mar 26 03:40:20 1996
@@ -41,7 +41,7 @@
 int            have_setfsuid = 0;
 
 static _PRO(int  filt_getc,    (FILE *)                                        
);
-static _PRO(int  getline,      (char **, FILE *)                       );
+static _PRO(int  mygetline,      (char **, FILE *)                     );
 static _PRO(char *parse_opts,  (char *, char, nfs_mount *, char *)     );
 static _PRO(void parse_squash, (nfs_mount *mp, int uidflag, char **cpp)        
);
 static _PRO(int  parse_num,    (char **cpp)                            );
@@ -73,7 +73,7 @@
        return (c);
 }
 
-static int getline(lbuf, f)
+static int mygetline(lbuf, f)
 char **lbuf;
 FILE *f;
 {
@@ -318,7 +318,7 @@
                        fname, strerror(errno));
                exit(1);
        }
-       while (getline(&cp, ef)) {
+       while (mygetline(&cp, ef)) {
                char *saved_line = cp;  /* For free()ing it later. */
                char *mount_point, *host_name, cc;
                nfs_client *clnt;
diff -urN nfs-server-2.2beta13.orig/ugid_map.c nfs-server-2.2beta13/ugid_map.c
--- nfs-server-2.2beta13.orig/ugid_map.c        Thu Feb  1 11:54:24 1996
+++ nfs-server-2.2beta13/ugid_map.c     Wed Mar 27 18:30:42 1996
@@ -16,6 +16,7 @@
  */
 
 #include <sys/socket.h>
+#include <sys/types.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <pwd.h>
@@ -25,11 +26,11 @@
 #include "ugid.h"
 
 #define UID_BITS       (sizeof(uid_t) * CHAR_BIT)
-#define UID_MAX                (1L << UID_BITS)
-#define UID_LIM1       (UID_MAX/2)
+#define UID_MAX                (1ULL << UID_BITS)
+#define UID_LIM1       (1UL << (UID_BITS - 1))
 #define GID_BITS       (sizeof(gid_t) * CHAR_BIT)
-#define GID_MAX                (1L << GID_BITS)
-#define GID_LIM1       (GID_MAX/2)
+#define GID_MAX                (1ULL << GID_BITS)
+#define GID_LIM1       (1UL << (GID_BITS - 1))
 
 /* This structure holds a uid/gid map. 
  * We do a little hack here so that we're able to hold ids at the lower 

<Prev in Thread] Current Thread [Next in Thread>
  • nfsd, Systemkennung Linux <=