Skip to content

Commit

Permalink
Use the correct creds when reconnecting so that we have enough privil…
Browse files Browse the repository at this point in the history
…ege to

bind reserved ports (if necessary).

Submitted by:	Jaakko Heinonen <jh at saualaht dot fi>
  • Loading branch information
dfr authored and dfr committed Feb 5, 2009
1 parent a4e8c3b commit 2926f8f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sys/rpc/clnt_rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2926f8f

Please sign in to comment.