Thread View: comp.bugs.4bsd
1 messages
1 total messages
Started by Mark Bartelt
Mon, 12 Nov 1990 20:03
ftpd doesn't believe passwd(5)
Author: Mark Bartelt
Date: Mon, 12 Nov 1990 20:03
Date: Mon, 12 Nov 1990 20:03
43 lines
1598 bytes
1598 bytes
This is one of those "I find it hard to believe nobody has reported this
before" bugs, but nonetheless ... In vanilla 4.3bsd on a VAX:
ftpd(8) sez ...
_F_t_p_d authenticates users according to three rules.
[ ... ]
3) The user must have a standard shell returned by getusershell(3).
passwd(5) sez ...
[ ... ] if the Shell field is null, then /_b_i_n/_s_h is used.
But ftpd nonetheless refuses to authorize a user whose shell field in
/etc/passwd is null; it won't let a Bourne shell user in unless /bin/sh
is explicitly specified in /etc/passwd. One of several ways to fix the
problem in ftpd.c/checkuser():
Replace
while ((cp = getusershell()) != NULL)
if (strcmp(cp, pw->pw_shell) == 0)
break;
endpwent();
endusershell();
if (cp == NULL)
return (0);
with
if ( !*(pw->pw_shell) )
endpwent();
else {
while ((cp = getusershell()) != NULL)
if (strcmp(cp, pw->pw_shell) == 0)
break;
endpwent();
endusershell();
if (cp == NULL)
return (0);
}
Mark Bartelt INTERNET: mark@sickkids.toronto.edu
Hospital for Sick Children, Toronto mark@sickkids.utoronto.ca
416/598-6442 UUCP: {utzoo,decvax}!sickkids!mark
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads