diff options
Diffstat (limited to 'networking/inetd.c')
-rw-r--r-- | networking/inetd.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/networking/inetd.c b/networking/inetd.c index fb00c6cd7..226a6491c 100644 --- a/networking/inetd.c +++ b/networking/inetd.c | |||
@@ -154,6 +154,17 @@ | |||
154 | * setuid() | 154 | * setuid() |
155 | */ | 155 | */ |
156 | 156 | ||
157 | //usage:#define inetd_trivial_usage | ||
158 | //usage: "[-fe] [-q N] [-R N] [CONFFILE]" | ||
159 | //usage:#define inetd_full_usage "\n\n" | ||
160 | //usage: "Listen for network connections and launch programs\n" | ||
161 | //usage: "\nOptions:" | ||
162 | //usage: "\n -f Run in foreground" | ||
163 | //usage: "\n -e Log to stderr" | ||
164 | //usage: "\n -q N Socket listen queue (default: 128)" | ||
165 | //usage: "\n -R N Pause services after N connects/min" | ||
166 | //usage: "\n (default: 0 - disabled)" | ||
167 | |||
157 | #include <syslog.h> | 168 | #include <syslog.h> |
158 | #include <sys/un.h> | 169 | #include <sys/un.h> |
159 | 170 | ||
@@ -501,7 +512,7 @@ static void prepare_socket_fd(servtab_t *sep) | |||
501 | 512 | ||
502 | /* zero out the port for all RPC services; let bind() | 513 | /* zero out the port for all RPC services; let bind() |
503 | * find one. */ | 514 | * find one. */ |
504 | set_nport(sep->se_lsa, 0); | 515 | set_nport(&sep->se_lsa->u.sa, 0); |
505 | 516 | ||
506 | /* for RPC services, attempt to use a reserved port | 517 | /* for RPC services, attempt to use a reserved port |
507 | * if they are going to be running as root. */ | 518 | * if they are going to be running as root. */ |
@@ -959,7 +970,7 @@ static void reread_config_file(int sig UNUSED_PARAM) | |||
959 | } | 970 | } |
960 | if (LONE_CHAR(sep->se_local_hostname, '*')) { | 971 | if (LONE_CHAR(sep->se_local_hostname, '*')) { |
961 | lsa = xzalloc_lsa(sep->se_family); | 972 | lsa = xzalloc_lsa(sep->se_family); |
962 | set_nport(lsa, port); | 973 | set_nport(&lsa->u.sa, port); |
963 | } else { | 974 | } else { |
964 | lsa = host_and_af2sockaddr(sep->se_local_hostname, | 975 | lsa = host_and_af2sockaddr(sep->se_local_hostname, |
965 | ntohs(port), sep->se_family); | 976 | ntohs(port), sep->se_family); |