From 42d85772a9b2fdade2f43576db696f20a045301b Mon Sep 17 00:00:00 2001 From: henning <> Date: Sun, 25 Jul 2004 18:27:58 +0000 Subject: [PATCH] remove unused function --- src/usr.sbin/ntpd/config.c | 25 +------------------------ src/usr.sbin/ntpd/ntpd.h | 3 +-- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/src/usr.sbin/ntpd/config.c b/src/usr.sbin/ntpd/config.c index db3a3744..c78199c5 100644 --- a/src/usr.sbin/ntpd/config.c +++ b/src/usr.sbin/ntpd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.7 2004/07/08 01:22:57 henning Exp $ */ +/* $OpenBSD: config.c,v 1.8 2004/07/25 18:27:58 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -31,29 +31,6 @@ struct ntp_addr *host_v4(const char *); struct ntp_addr *host_v6(const char *); struct ntp_addr *host_dns(const char *); -int -check_file_secrecy(int fd, const char *fname) -{ - struct stat st; - - if (fstat(fd, &st)) { - log_warn("cannot stat %s", fname); - return (-1); - } - - if (st.st_uid != 0 && st.st_uid != getuid()) { - log_warnx("%s: owner not root or current user", fname); - return (-1); - } - - if (st.st_mode & (S_IRWXG | S_IRWXO)) { - log_warnx("%s: group/world readable/writeable", fname); - return (-1); - } - - return (0); -} - struct ntp_addr * host(const char *s) { diff --git a/src/usr.sbin/ntpd/ntpd.h b/src/usr.sbin/ntpd/ntpd.h index 5d13c278..d1506ac3 100644 --- a/src/usr.sbin/ntpd/ntpd.h +++ b/src/usr.sbin/ntpd/ntpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.h,v 1.28 2004/07/20 16:47:55 henning Exp $ */ +/* $OpenBSD: ntpd.h,v 1.29 2004/07/25 18:27:58 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -206,7 +206,6 @@ int parse_config(char *, struct ntpd_conf *); int cmdline_symset(char *); /* config.c */ -int check_file_secrecy(int, const char *); struct ntp_addr *host(const char *); /* ntp_msg.c */