From xaa@stack.nl  Fri Jan 15 08:07:55 1999
Received: from mailhost.stack.nl (terra.stack.nl [131.155.140.128])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA04238
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 15 Jan 1999 08:07:48 -0800 (PST)
          (envelope-from xaa@stack.nl)
Received: from toad.stack.nl (toad.stack.nl [131.155.140.135])
	by mailhost.stack.nl (Postfix) with ESMTP
	id CB1632FF1; Fri, 15 Jan 1999 17:06:32 +0100 (MET)
Received: by toad.stack.nl (Postfix, from userid 239)
	id 95D5A965E; Fri, 15 Jan 1999 17:06:33 +0100 (CET)
Message-Id: <19990115160633.95D5A965E@toad.stack.nl>
Date: Fri, 15 Jan 1999 17:06:33 +0100 (CET)
From: xaa@xaa.iae.nl
Sender: xaa@stack.nl
Reply-To: xaa@xaa.iae.nl
To: FreeBSD-gnats-submit@freebsd.org
Subject: ftpd doesn't honor invalid shell in login class
X-Send-Pr-Version: 3.2

>Number:         9516
>Category:       bin
>Synopsis:       ftpd doesn't honor invalid shelll in login class
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 15 08:10:00 PST 1999
>Closed-Date:    Sun Jun 17 00:07:18 PDT 2001
>Last-Modified:  Sun Jun 17 00:07:57 PDT 2001
>Originator:     Mark Huizer
>Release:        FreeBSD 2.2.7-STABLE i386
>Organization:
MCGV Stack
>Environment:

	2.2.7 and 3.0-current

>Description:

	a user in a login class with an invalid shell (think 'lockout
	class') can ftp to his account without trouble.

>How-To-Repeat:

	create lockout class with /bin/false as shell,change user to
	that class, ftp to his account

>Fix:

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:
State-Changed-From-To: open->closed 
State-Changed-By: mikeh 
State-Changed-When: Sun Jun 17 00:07:18 PDT 2001 
State-Changed-Why:  
Many changes have been made since then. Please try again and file 
another PR if this is still a problem. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=9516 
>Unformatted:
