Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!brl-adm!brl-smoke!smoke!ron@BRL.ARPA From: ron@BRL.ARPA Newsgroups: net.unix-wizards Subject: brl-vgr Bug Report Message-ID: <4575@brl-smoke.ARPA> Date: Mon, 13-Oct-86 19:03:48 EDT Article-I.D.: brl-smok.4575 Posted: Mon Oct 13 19:03:48 1986 Date-Received: Tue, 14-Oct-86 06:54:52 EDT Sender: news@brl-smoke.ARPA Lines: 26 Subject: FTP daemon doesn't like Bourne shell users Index: etc/ftpd/ftpd.c 4.3BSD Description: The FTP daemon denies access to users who have the default login shell (/bin/sh). Repeat-By: chsh to /bin/sh and then try to FTP to your account. Fix: Ftpd attempts to verify the user's shell against those in /etc/shells to prevent accounts like finger from being FTP targets. However, getpwent returns a string with a null in it if the shell field is blank and Ftpd tries to compare this against /bin/sh and misses. This fix avoids the check if the user is using the default system shell. Add the if statement around the getusershell lookup. if(*pw->pw_shell != 0) { while ((cp = getusershell()) != NULL) if (strcmp(cp, pw->pw_shell) == 0) break; endusershell(); if (cp == NULL) return (0); }