All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem with 2.6.33-rc1 and insecure flag
@ 2009-12-20  1:52 Michael Guntsche
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Guntsche @ 2009-12-20  1:52 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: linux-nfs

Hi,

I am testing 2.6.33-rc1 on my nfs server here and I noticed a problem
with macosx clients.

Commit 12045a6ee9908b38b6d286530c7d816e39071346
nfsd: let "insecure" flag vary by pseudoflavor

seems to be the problem. For macosx clients you need to specify the
insecure flag since they try to mount with a high port per default. This
commit somehow turns the logic around. If I specify insecure I can ONLY
mount the export if I use a port <= 1023. Reverting the commit fixes the
problem for me.

Kind regards,
Michael Guntsche

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: Problem with 2.6.33-rc1 and insecure flag
@ 2009-12-20  9:28 Michael Guntsche
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Guntsche @ 2009-12-20  9:28 UTC (permalink / raw)
  To: bfields; +Cc: linux-nfs

Good morning

Some more info on this topic.

I tried mounting the same export from the server itself for testing.
Using the noresvport flag I got the same result as with the macosx
client.

mount -onoresvport gibson:/var/media /mnt
mount.nfs: Operation not permitted

The relevant part from my exports file.

/var/media         192.168.42.0/24(rw,async,no_subtree_check,insecure)
dreambox(rw,async,no_subtree_check,insecure,anonuid=1000)

Kind regards,
Michael

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: Problem with 2.6.33-rc1 and insecure flag
@ 2009-12-20  9:46 Michael Guntsche
       [not found] ` <20091220094625.GA2159-8FIgwK2HfyKMj3X28ACnv+Tv7YV0F9Eg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Guntsche @ 2009-12-20  9:46 UTC (permalink / raw)
  To: bfields; +Cc: linux-nfs

I think I figured out the problem. 

Apparently the code checked if insecure was set, while it should check if it was NOT set.

Kind regards,
Michael

diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index 1c12177..55c8e63 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -89,7 +89,7 @@ static __be32 nfsd_setuser_and_check_port(struct svc_rqst *rqstp,
        int flags = nfsexp_flags(rqstp, exp);
 
        /* Check if the request originated from a secure port. */
-       if (!rqstp->rq_secure && (flags & NFSEXP_INSECURE_PORT)) {
+       if (!rqstp->rq_secure && !(flags & NFSEXP_INSECURE_PORT)) {
                RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
                dprintk(KERN_WARNING
                       "nfsd: request from insecure port %s!\n",




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

end of thread, other threads:[~2009-12-20 15:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-20  1:52 Problem with 2.6.33-rc1 and insecure flag Michael Guntsche
  -- strict thread matches above, loose matches on Subject: below --
2009-12-20  9:28 Michael Guntsche
2009-12-20  9:46 Michael Guntsche
     [not found] ` <20091220094625.GA2159-8FIgwK2HfyKMj3X28ACnv+Tv7YV0F9Eg@public.gmane.org>
2009-12-20 10:13   ` Muntz, Daniel
     [not found]     ` <7A24DF798E223B4C9864E8F92E8C93EC04EBFD3F-hX7t0kiaRRpT+ZUat5FNkAK/GNPrWCqfQQ4Iyu8u01E@public.gmane.org>
2009-12-20 15:46       ` J. Bruce Fields
2009-12-20 15:41   ` J. Bruce Fields

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.