mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-22 16:44:32 +01:00
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
de2a1afc47
commit
f6e018497f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7948
@ -70,10 +70,14 @@ main(argc, argv)
|
|||||||
int ch, top;
|
int ch, top;
|
||||||
struct passwd *pw = NULL;
|
struct passwd *pw = NULL;
|
||||||
char *cp, homedir[MAXPATHLEN];
|
char *cp, homedir[MAXPATHLEN];
|
||||||
|
struct servent sp_default;
|
||||||
|
|
||||||
sp = getservbyname("ftp", "tcp");
|
sp = getservbyname("ftp", "tcp");
|
||||||
if (sp == 0)
|
if (sp == 0) {
|
||||||
errx(1, "ftp/tcp: unknown service");
|
sp = &sp_default;
|
||||||
|
memset(sp, 0, sizeof *sp);
|
||||||
|
sp->s_port = htons(21);
|
||||||
|
}
|
||||||
doglob = 1;
|
doglob = 1;
|
||||||
interactive = 1;
|
interactive = 1;
|
||||||
autologin = 1;
|
autologin = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user