From owner-freebsd-bugs Sun Jun 17 0:30:29 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 E30AA37B40E 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 f5H7U3g69516; 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 8491637B406 for ; Sun, 17 Jun 2001 00:26:20 -0700 (PDT) (envelope-from xaa@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 95CF0D906 for ; Sun, 17 Jun 2001 09:26:19 +0200 (MET DST) Received: by tiggr.local.dohd.org (Postfix, from userid 1002) id 669D65E07; Sun, 17 Jun 2001 09:26:19 +0200 (CEST) Message-Id: <20010617072619.669D65E07@tiggr.local.dohd.org> Date: Sun, 17 Jun 2001 09:26:19 +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/28224: ftpd doesn't honor invalid shelll in login class 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: 28224 >Category: bin >Synopsis: ftpd doesn't honor invalid shelll in login class >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: Via Net.Works Netherlands >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 FreeBSD -current and probably all releases since at least 2.2.7 (see the 'closed' PR bin/9516) >Description: a user in a login class with an invalid shell (think 'lockout class') can ftp to his account without any trouble. >How-To-Repeat: create lockoutclass with /usr/bin/false as shell, change user to that class, ftp to his account >Fix: The old patch might still apply, but anyway, the idea is clear: patch to libexec/ftpd.c 772a773,775 > #ifdef LOGIN_CAP > login_cap_t *lc = NULL; > #endif 811a815,825 > #ifdef LOGIN_CAP > lc = login_getpwclass(pw); > if (lc == NULL) { > if ((shell = pw->pw_shell) == NULL || *shell == 0) > shell = _PATH_BSHELL; > } else { > shell = login_getcapstr(lc, "shell", pw->pw_shell, pw->pw_shell); > if (shell==NULL || *shell == 0) > shell = _PATH_BSHELL; > } > #else 813a828 > #endif >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message