Use the correct creds when reconnecting so that we have enough privilege to

bind reserved ports (if necessary).

Submitted by:	Jaakko Heinonen <jh at saualaht dot fi>
This commit is contained in:
Doug Rabson 2009-02-05 11:48:10 +00:00
parent 27dd8057d3
commit 9719301922
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=188142

View File

@ -181,11 +181,12 @@ clnt_reconnect_connect(CLIENT *cl)
rpc_createerr.cf_error.re_errno = 0;
goto out;
}
if (rc->rc_privport)
bindresvport(so, NULL);
oldcred = td->td_ucred;
td->td_ucred = rc->rc_ucred;
if (rc->rc_privport)
bindresvport(so, NULL);
if (rc->rc_nconf->nc_semantics == NC_TPI_CLTS)
rc->rc_client = clnt_dg_create(so,
(struct sockaddr *) &rc->rc_addr, rc->rc_prog, rc->rc_vers,