From owner-freebsd-bugs Sun Jun 17 0:30:26 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id BF5E037B40C for ; Sun, 17 Jun 2001 00:30:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f5H7U3G69506; Sun, 17 Jun 2001 00:30:03 -0700 (PDT) (envelope-from gnats) Received: from nala.dohd.org (a29150.upc-a.chello.nl [62.163.29.150]) by hub.freebsd.org (Postfix) with ESMTP id 23E6D37B407 for ; Sun, 17 Jun 2001 00:22:38 -0700 (PDT) (envelope-from root@dohd.org) Received: from tiggr.local.dohd.org (tiggr6.local.dohd.org [2001:610:1108:5201:250:fcff:fe0b:c665]) by nala.dohd.org (Postfix) with ESMTP id 455B0D906 for ; Sun, 17 Jun 2001 09:22:37 +0200 (MET DST) Received: by tiggr.local.dohd.org (Postfix, from userid 0) id 26B055E14; Sun, 17 Jun 2001 09:22:37 +0200 (CEST) Message-Id: <20010617072237.26B055E14@tiggr.local.dohd.org> Date: Sun, 17 Jun 2001 09:22:37 +0200 (CEST) From: xaa@dohd.org Reply-To: xaa@dohd.org To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/28223: su doesn't look at login.conf all the time Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 28223 >Category: bin >Synopsis: su doesn't look at login.conf all the time >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jun 17 00:30:03 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Mark Huizer >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD tiggr.local.dohd.org 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Sat Jun 2 10:41:56 MET DST 2001 xaa@eeyore.local.dohd.org:/usr2/sources/obj/usr2/sources/src/sys/tiggr i386 Problem exists since at least FreeBSD 2.2.7 (see also the closed PR bin/9495) >Description: If a user is given an illegal shell in /etc/login.conf (e.g. for a login class called 'lockout'), su will happily su to that user. This should not be allowed if a mortal user su's to another mortal user. >How-To-Repeat: create loginclass with e.g. /usr/bin/false as shell, su to that user, yeah... >Fix: The old quick and dirty patch to su.c was: 355a356,360 > #ifdef LOGIN_CAP > if (!chshell(login_getcapstr(lc, "shell", pwd->pw_shell, pwd->pw_shell)) && ruid) > errx(1, "permission denied (shell)."); > else > #endif 366a372 > Haven't tested if it still applies cleanly, but the idea stands >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message