From: "Andrew Gray" <7114@blargh.com>
To: nfs@lists.sourceforge.net
Subject: Patch to mountd to mount files > 2GB
Date: Tue, 13 Jan 2004 21:19:16 -0800 [thread overview]
Message-ID: <01c401c3da5d$f50dc580$2a00a8c0@phoenix> (raw)
[-- 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 --]
reply other threads:[~2004-01-14 5:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='01c401c3da5d$f50dc580$2a00a8c0@phoenix' \
--to=7114@blargh.com \
--cc=nfs@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.