From owner-svn-src-head@FreeBSD.ORG Thu Feb 5 11:48:11 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CB8B106564A; Thu, 5 Feb 2009 11:48:11 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A5DC8FC1A; Thu, 5 Feb 2009 11:48:11 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15BmAc1026165; Thu, 5 Feb 2009 11:48:10 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15BmA54026164; Thu, 5 Feb 2009 11:48:10 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200902051148.n15BmA54026164@svn.freebsd.org> From: Doug Rabson Date: Thu, 5 Feb 2009 11:48:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188142 - head/sys/rpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 11:48:11 -0000 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 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,