Use port 21 as default if getservbyname fails to find it for us. This let
us remove some crud from the install-procedure.
This commit is contained in:
parent
53205b4f9e
commit
f7ddd8c3ef
@ -70,10 +70,14 @@ main(argc, argv)
|
||||
int ch, top;
|
||||
struct passwd *pw = NULL;
|
||||
char *cp, homedir[MAXPATHLEN];
|
||||
struct servent sp_default;
|
||||
|
||||
sp = getservbyname("ftp", "tcp");
|
||||
if (sp == 0)
|
||||
errx(1, "ftp/tcp: unknown service");
|
||||
if (sp == 0) {
|
||||
sp = &sp_default;
|
||||
memset(sp, 0, sizeof *sp);
|
||||
sp->s_port = htons(21);
|
||||
}
|
||||
doglob = 1;
|
||||
interactive = 1;
|
||||
autologin = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user