From owner-cvs-all@FreeBSD.ORG Fri Sep 29 04:41:37 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC7B416A40F; Fri, 29 Sep 2006 04:41:37 +0000 (UTC) (envelope-from luoqi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D79F43D49; Fri, 29 Sep 2006 04:41:37 +0000 (GMT) (envelope-from luoqi@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k8T4fbGM008708; Fri, 29 Sep 2006 04:41:37 GMT (envelope-from luoqi@repoman.freebsd.org) Received: (from luoqi@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k8T4fbIE008707; Fri, 29 Sep 2006 04:41:37 GMT (envelope-from luoqi) Message-Id: <200609290441.k8T4fbIE008707@repoman.freebsd.org> From: Luoqi Chen Date: Fri, 29 Sep 2006 04:41:37 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/usr.bin/su su.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Sep 2006 04:41:37 -0000 luoqi 2006-09-29 04:41:37 UTC FreeBSD src repository Modified files: usr.bin/su su.c Log: Do not chdir(2) until after setuid(2), otherwise "su - username" would fail when root doesn't have the permission to enter target user's home directory. If set, PAM environment variable HOME will be used in chdir(2) instead of pwd->pw_dir, this allows pam_chroot module to continue to function. Revision Changes Path 1.81 +4 -6 src/usr.bin/su/su.c