* [PATCH] nfs-utils 7 of 10 - Changed mountd to use stat64()
@ 2005-09-23 14:48 Steve Dickson
0 siblings, 0 replies; only message in thread
From: Steve Dickson @ 2005-09-23 14:48 UTC (permalink / raw)
To: nfs
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: nfs-utils-1.0.7-mountd-stat64.patch --]
[-- Type: text/x-patch, Size: 2242 bytes --]
Changed mountd to use stat64() (bz 165062)
Which fixed the following error:
rpc.mountd: can't stat exported dir /mnt/bigfile: Value too large
for defined data type
I wonder if it would be better just to make mountd a 64bit
application by compiling with -D_FILE_OFFSET_BITS=64?
Details can be found in:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=165062
Signed-off-by: Steve Dickson <steved@redhat.com>
---------
--- nfs-utils-1.0.7/utils/mountd/mountd.c.orig 2005-08-02 10:25:34.000000000 -0400
+++ nfs-utils-1.0.7/utils/mountd/mountd.c 2005-08-16 04:01:27.000000000 -0400
@@ -187,7 +187,7 @@ mount_pathconf_2_svc(struct svc_req *rqs
{
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;
@@ -209,7 +209,7 @@ mount_pathconf_2_svc(struct svc_req *rqs
/* 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);
@@ -263,7 +263,7 @@ get_rootfh(struct svc_req *rqstp, dirpat
{
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;
@@ -283,7 +283,7 @@ get_rootfh(struct svc_req *rqstp, dirpat
/* 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)
@@ -293,7 +293,7 @@ get_rootfh(struct svc_req *rqstp, dirpat
} 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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-09-23 14:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-23 14:48 [PATCH] nfs-utils 7 of 10 - Changed mountd to use stat64() Steve Dickson
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.