diff options
author | dfr <dfr@FreeBSD.org> | 2009-02-05 11:48:10 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2009-02-05 11:48:10 +0000 |
commit | 2926f8fa435de3f0b595eb5309b2a0c364703371 (patch) | |
tree | d87b85e68a016abbd45d9935ff0bf169b47821fe /sys/rpc | |
parent | a4e8c3ba997f73078710bd9a44277288dca15874 (diff) | |
download | FreeBSD-src-2926f8fa435de3f0b595eb5309b2a0c364703371.zip FreeBSD-src-2926f8fa435de3f0b595eb5309b2a0c364703371.tar.gz |
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>
Diffstat (limited to 'sys/rpc')
-rw-r--r-- | sys/rpc/clnt_rc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/rpc/clnt_rc.c b/sys/rpc/clnt_rc.c index 8d7bfd6..48d9495 100644 --- a/sys/rpc/clnt_rc.c +++ b/sys/rpc/clnt_rc.c @@ -181,11 +181,12 @@ again: 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, |