svn commit: r188142 - head/sys/rpc

Doug Rabson dfr at FreeBSD.org
Thu Feb 5 03:48:11 PST 2009


Author: dfr
Date: Thu Feb  5 11:48:10 2009
New Revision: 188142
URL: http://svn.freebsd.org/changeset/base/188142

Log:
  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>

Modified:
  head/sys/rpc/clnt_rc.c

Modified: head/sys/rpc/clnt_rc.c
==============================================================================
--- head/sys/rpc/clnt_rc.c	Thu Feb  5 08:46:18 2009	(r188141)
+++ head/sys/rpc/clnt_rc.c	Thu Feb  5 11:48:10 2009	(r188142)
@@ -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,


More information about the svn-src-all mailing list