Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Dec 2001 22:22:49 -0500 (EST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        arch@FreeBSD.org
Subject:   Re: adding cred argument to socreate(), making NFS connect using ,  mount-time credential
Message-ID:  <Pine.NEB.3.96L.1011230221849.98474B-100000@fledge.watson.org>
In-Reply-To: <3C2FD293.DA31AC4D@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sun, 30 Dec 2001, Terry Lambert wrote:

> Robert Watson wrote:
> > 
> > Attached please find a diff that does the following:
> > 
> > (1) Makes the credential used by socreate() an explicit argument to
> >     socreate(), rather than getting it implicitly from the thread
> >     argument.
> 
> This prevents you from running connections to completion at interrupt,
> in that it assumes that all calls will be down. 
> 
> The correct way to handle this in the "accept at interrupt" case is to
> simply clone the credential off the listen socket, instead. 

Actually, socreate() does not appear to be used for the receiving end of
the socket code: sonewconn() directly clones features of the listen socket
into the accept socket.  socreate() appears only to be used in the
"outgoing" (down) direction.  The only conceptual exception is
socketpair(), but since the process gets both ends...  This patch won't
run into the problem, however.

In fact, just a few weejs ago, I fixed the socket code to do precisely
what you say: previously, it selected the credential based on one of
thread (if available) and listen socket.  This inconsistency caused great
suffering, so I changed it to consistently clone the listen socket
credential, for the reason you describe. 

Robert N M Watson             FreeBSD Core Team, TrustedBSD Project
robert@fledge.watson.org      NAI Labs, Safeport Network Services



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1011230221849.98474B-100000>