diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2004-03-22 12:01:23 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2004-03-22 12:01:23 +0000 |
commit | a7b0bf21514af248fa2d99f991f6e997a481e4d7 (patch) | |
tree | a1a36abe22636760090e6e7642d8e03be9546fec /usr.sbin | |
parent | 01944bbfc202d8a168d130fd817467ca9fd323b8 (diff) | |
download | FreeBSD-src-a7b0bf21514af248fa2d99f991f6e997a481e4d7.zip FreeBSD-src-a7b0bf21514af248fa2d99f991f6e997a481e4d7.tar.gz |
On startup, warn if inetd's config file doesn't exist. This isn't
exactly the same as patch from the PR, which also exited if the
config file was missing. I didn't use Jeff's patch because I was
worried that some people might start inetd, create the config file
and then HUP inetd.
PR: 60806
Submitted by: Jeff Ito <jeffi@rcn.com>
MFC after: 2 weeks
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/inetd/inetd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c index b590a3b..b1f31da 100644 --- a/usr.sbin/inetd/inetd.c +++ b/usr.sbin/inetd/inetd.c @@ -466,6 +466,8 @@ main(int argc, char **argv) if (argc > 0) CONFIG = argv[0]; + if (access(CONFIG, R_OK) < 0) + syslog(LOG_ERR, "Accessing %s: %m, continuing anyway.", CONFIG); if (debug == 0) { FILE *fp; if (daemon(0, 0) < 0) { |