summaryrefslogtreecommitdiff
path: root/usr.sbin/dvmrpd/dvmrpd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-10-13 16:35:23 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-10-13 16:35:23 +0000
commit3bc6f4c74e1cc60c05a1ab152805af447144952a (patch)
tree4a68ea922315ee6f6d1396cafc87ae97f4d0d06f /usr.sbin/dvmrpd/dvmrpd.c
parent3270c1ab5c203bfd16890aaf55afd4c31904e523 (diff)
in all these programs using the same pfctl-derived parse.y, re-unify the
yylex implementation and the code which interacts with yylex. this also brings the future potential for include support to all of the parsers. in the future please do not silly modifications to one of these files without checking if you are de-unifying the code. checked by developers in all these areas.
Diffstat (limited to 'usr.sbin/dvmrpd/dvmrpd.c')
-rw-r--r--usr.sbin/dvmrpd/dvmrpd.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/usr.sbin/dvmrpd/dvmrpd.c b/usr.sbin/dvmrpd/dvmrpd.c
index 01671d1aea9..cf8cb6f7819 100644
--- a/usr.sbin/dvmrpd/dvmrpd.c
+++ b/usr.sbin/dvmrpd/dvmrpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dvmrpd.c,v 1.3 2007/01/24 09:57:51 norby Exp $ */
+/* $OpenBSD: dvmrpd.c,v 1.4 2007/10/13 16:35:20 deraadt Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -59,8 +59,6 @@ void main_dispatch_rde(int, short, void *);
void main_imsg_compose_dvmrpe(int, pid_t, void *, u_int16_t);
void main_imsg_compose_rde(int, pid_t, void *, u_int16_t);
-int check_file_secrecy(int, const char *);
-
int pipe_parent2dvmrpe[2];
int pipe_parent2rde[2];
int pipe_dvmrpe2rde[2];
@@ -463,29 +461,6 @@ main_imsg_compose_rde(int type, pid_t pid, void *data, u_int16_t datalen)
imsg_compose(ibuf_rde, type, 0, pid, data, datalen);
}
-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);
-}
-
/* this needs to be added here so that dvmrpctl can be used without libevent */
void
imsg_event_add(struct imsgbuf *ibuf)