]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
relax insecure option on mountd
authorRobert Gordon <rbg@openrbg.com>
Mon, 16 Nov 2009 18:25:02 +0000 (13:25 -0500)
committerSteve Dickson <steved@redhat.com>
Mon, 16 Nov 2009 18:25:02 +0000 (13:25 -0500)
In nfs-utils 1.2.0, I noticed that the insecure option validates that
the client port is a
subset of IPPORT_RESERVED as opposed to just validating it is a valid
reserved port. The following proposed patch would correct that issue.

Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Robert Gordon <rbg@openrbg.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mountd/auth.c

index 575f207bd028f0d74eed6097a82d485499c4d8b8..5a7ff8cd0fb81239eb5b717db3749bc7a665f196 100644 (file)
@@ -169,8 +169,7 @@ auth_authenticate_internal(char *what, struct sockaddr_in *caller,
                }
        }
        if (!(exp->m_export.e_flags & NFSEXP_INSECURE_PORT) &&
-                   (ntohs(caller->sin_port) <  IPPORT_RESERVED/2 ||
-                    ntohs(caller->sin_port) >= IPPORT_RESERVED)) {
+                    ntohs(caller->sin_port) >= IPPORT_RESERVED) {
                *error = illegal_port;
                return NULL;
        }