going for another easy picking: snmpe_dispatch_parent is just an empty
stub. proc.c assigns proc_dispatch_null to p_cb if it's null, which 
effectively does the same thing.

OK?

martijn@

Index: snmpe.c
===================================================================
RCS file: /cvs/src/usr.sbin/snmpd/snmpe.c,v
retrieving revision 1.66
diff -u -p -r1.66 snmpe.c
--- snmpe.c     6 Sep 2020 15:51:28 -0000       1.66
+++ snmpe.c     6 Sep 2020 16:37:10 -0000
@@ -46,7 +46,6 @@ void   snmpe_tryparse(int, struct snmp_me
 int     snmpe_parsevarbinds(struct snmp_message *);
 void    snmpe_response(struct snmp_message *);
 void    snmpe_sig_handler(int sig, short, void *);
-int     snmpe_dispatch_parent(int, struct privsep_proc *, struct imsg *);
 int     snmpe_bind(struct address *);
 void    snmpe_recvmsg(int fd, short, void *);
 void    snmpe_readcb(int fd, short, void *);
@@ -60,7 +59,7 @@ struct imsgev *iev_parent;
 static const struct timeval    snmpe_tcp_timeout = { 10, 0 }; /* 10s */
 
 static struct privsep_proc procs[] = {
-       { "parent",     PROC_PARENT,    snmpe_dispatch_parent }
+       { "parent",     PROC_PARENT }
 };
 
 void
@@ -133,17 +132,6 @@ snmpe_shutdown(void)
                close(h->fd);
        }
        kr_shutdown();
-}
-
-int
-snmpe_dispatch_parent(int fd, struct privsep_proc *p, struct imsg *imsg)
-{
-       switch (imsg->hdr.type) {
-       default:
-               break;
-       }
-
-       return (-1);
 }
 
 int

Reply via email to