* Patch to mountd to mount files > 2GB
@ 2004-01-14 5:19 Andrew Gray
0 siblings, 0 replies; only message in thread
From: Andrew Gray @ 2004-01-14 5:19 UTC (permalink / raw)
To: nfs
[-- Attachment #1: Type: text/plain, Size: 2721 bytes --]
Greetings all,
If this has been problem/solution has been posted before, please disregard
:)
I'm using NFS to serve out FLAR archives to Sun machines. These files are >
2GB, and the auto-installer for the Sun boxes mount the files, not the
directories. mountd was refusing to authenticate these otherwise legit
requests because the stat() call was bombing due the filesize being too
large. I hacked up the quick diff below that fixed the problem. The files
transfer correctly and completely, but I admit I haven't performed further
testing.
diff -u nfs-utils-1.0.6-orig/utils/mountd/mountd.c
nfs-utils-1.0.6/utils/mountd/mountd.c
--- nfs-utils-1.0.6-orig/utils/mountd/mountd.c Fri Sep 12 15:14:16 2003
+++ nfs-utils-1.0.6/utils/mountd/mountd.c Tue Jan 13 20:11:49 2004
@@ -176,7 +176,7 @@
{
struct sockaddr_in *sin
= (struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
- struct stat stb;
+ struct stat64 stb;
nfs_export *exp;
char rpath[MAXPATHLEN+1];
char *p = *path;
@@ -198,7 +198,7 @@
/* Now authenticate the intruder... */
if (!(exp = auth_authenticate("pathconf", sin, p))) {
return 1;
- } else if (stat(p, &stb) < 0) {
+ } else if (stat64(p, &stb) < 0) {
xlog(L_WARNING, "can't stat exported dir %s: %s",
p, strerror(errno));
export_reset (exp);
@@ -248,7 +248,7 @@
{
struct sockaddr_in *sin =
(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
- struct stat stb, estb;
+ struct stat64 stb, estb;
nfs_export *exp;
char rpath[MAXPATHLEN+1];
char *p = *path;
@@ -268,7 +268,7 @@
/* Now authenticate the intruder... */
if (!(exp = auth_authenticate("mount", sin, p))) {
*error = NFSERR_ACCES;
- } else if (stat(p, &stb) < 0) {
+ } else if (stat64(p, &stb) < 0) {
xlog(L_WARNING, "can't stat exported dir %s: %s",
p, strerror(errno));
if (errno == ENOENT)
@@ -278,7 +278,7 @@
} else if (!S_ISDIR(stb.st_mode) && !S_ISREG(stb.st_mode)) {
xlog(L_WARNING, "%s is not a directory or regular file", p);
*error = NFSERR_NOTDIR;
- } else if (stat(exp->m_export.e_path, &estb) < 0) {
+ } else if (stat64(exp->m_export.e_path, &estb) < 0) {
xlog(L_WARNING, "can't stat export point %s: %s",
p, strerror(errno));
*error = NFSERR_NOENT;
[-- Attachment #2: Type: text/html, Size: 5847 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-01-14 5:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-14 5:19 Patch to mountd to mount files > 2GB Andrew Gray
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.