From 2aeb201c9751d4ee82978c623310e14b9e831b94 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 17 Apr 2018 12:43:54 +0200 Subject: libbb: new option FEATURE_ETC_SERVICES: if off, /etc/services reads often avoided In practice, "wget http://host.com/" always uses port 80. People explicitly set non-standard ports via options or parameters ("telnet 1.2.3.4 567" or "telnet 1.2.3.4 ftp") instead of modifying /etc/services. function old new delta telnet_main 1466 1464 -2 rdate_main 215 198 -17 fakeidentd_main 269 252 -17 parse_url 459 392 -67 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-103) Total: -103 bytes Signed-off-by: Denys Vlasenko --- util-linux/rdate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util-linux') diff --git a/util-linux/rdate.c b/util-linux/rdate.c index f27294e25..5ec795208 100644 --- a/util-linux/rdate.c +++ b/util-linux/rdate.c @@ -45,7 +45,7 @@ static time_t askremotedate(const char *host) alarm(10); signal(SIGALRM, socket_timeout); - fd = create_and_connect_stream_or_die(host, bb_lookup_port("time", "tcp", 37)); + fd = create_and_connect_stream_or_die(host, bb_lookup_std_port("time", "tcp", 37)); if (safe_read(fd, &nett, 4) != 4) /* read time from server */ bb_error_msg_and_die("%s: %s", host, "short read"); -- cgit v1.2.3