All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nfsd] ignore chmod calls on symlinks
@ 2005-07-11 11:06 Olaf Kirch
  2005-07-11 12:46 ` Peter Staubach
  0 siblings, 1 reply; 5+ messages in thread
From: Olaf Kirch @ 2005-07-11 11:06 UTC (permalink / raw)
  To: nfs

I submitted this before - this is a somewhat cosmetic fix to
keep the SpecFS validation test from complaining.

Signed-off-by: Olaf Kirch <okir@suse.de>

Index: linux-2.6.12/fs/nfsd/vfs.c
===================================================================
--- linux-2.6.12.orig/fs/nfsd/vfs.c	2005-07-08 11:45:19.000000000 +0200
+++ linux-2.6.12/fs/nfsd/vfs.c	2005-07-11 13:05:33.000000000 +0200
@@ -255,12 +255,19 @@ nfsd_setattr(struct svc_rqst *rqstp, str
 
 	/* Get inode */
 	err = fh_verify(rqstp, fhp, ftype, accmode);
-	if (err || !iap->ia_valid)
+	if (err)
 		goto out;
 
 	dentry = fhp->fh_dentry;
 	inode = dentry->d_inode;
 
+	/* Ignore any mode updates on symlinks */
+	if (S_ISLNK(inode->i_mode))
+		iap->ia_valid &= ~ATTR_MODE;
+
+	if (!iap->ia_valid)
+		goto out;
+
 	/* NFSv2 does not differentiate between "set-[ac]time-to-now"
 	 * which only requires access, and "set-[ac]time-to-X" which
 	 * requires ownership.
-- 
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
okir@suse.de |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-07-12  8:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-11 11:06 [PATCH nfsd] ignore chmod calls on symlinks Olaf Kirch
2005-07-11 12:46 ` Peter Staubach
2005-07-11 12:59   ` Olaf Kirch
2005-07-11 13:05     ` Peter Staubach
2005-07-12  8:52       ` Olaf Kirch

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.