xref: /freebsd/usr.sbin/syslogd/syslogd_cap.c (revision 964687879a38034d3f0221d3c73b9add6cadb567)
1*96468787SJake Freeland /*-
2*96468787SJake Freeland  * SPDX-License-Identifier: BSD-2-Clause
3*96468787SJake Freeland  *
4*96468787SJake Freeland  * Copyright (c) 2023 The FreeBSD Foundation
5*96468787SJake Freeland  *
6*96468787SJake Freeland  * This software was developed by Jake Freeland <jfree@FreeBSD.org>
7*96468787SJake Freeland  * under sponsorship from the FreeBSD Foundation.
8*96468787SJake Freeland  *
9*96468787SJake Freeland  * Redistribution and use in source and binary forms, with or without
10*96468787SJake Freeland  * modification, are permitted provided that the following conditions
11*96468787SJake Freeland  * are met:
12*96468787SJake Freeland  * 1. Redistributions of source code must retain the above copyright
13*96468787SJake Freeland  *    notice, this list of conditions and the following disclaimer.
14*96468787SJake Freeland  * 2. Redistributions in binary form must reproduce the above copyright
15*96468787SJake Freeland  *    notice, this list of conditions and the following disclaimer in the
16*96468787SJake Freeland  *    documentation and/or other materials provided with the distribution.
17*96468787SJake Freeland  *
18*96468787SJake Freeland  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19*96468787SJake Freeland  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20*96468787SJake Freeland  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21*96468787SJake Freeland  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22*96468787SJake Freeland  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23*96468787SJake Freeland  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24*96468787SJake Freeland  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25*96468787SJake Freeland  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26*96468787SJake Freeland  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27*96468787SJake Freeland  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28*96468787SJake Freeland  * SUCH DAMAGE.
29*96468787SJake Freeland  */
30*96468787SJake Freeland 
31*96468787SJake Freeland #include <sys/types.h>
32*96468787SJake Freeland #include <sys/socket.h>
33*96468787SJake Freeland 
34*96468787SJake Freeland #include <libcasper.h>
35*96468787SJake Freeland 
36*96468787SJake Freeland #include <casper/cap_net.h>
37*96468787SJake Freeland 
38*96468787SJake Freeland #include "syslogd_cap.h"
39*96468787SJake Freeland 
40*96468787SJake Freeland /* This is where libcasper receives commands via nvlist. */
41*96468787SJake Freeland static int
42*96468787SJake Freeland casper_command(const char *cmd __unused, const nvlist_t *limits __unused,
43*96468787SJake Freeland     nvlist_t *nvlin __unused, nvlist_t *nvlout __unused)
44*96468787SJake Freeland {
45*96468787SJake Freeland 	int error = EINVAL;
46*96468787SJake Freeland 	return (error);
47*96468787SJake Freeland }
48*96468787SJake Freeland 
49*96468787SJake Freeland CREATE_SERVICE("syslogd.casper", NULL, casper_command, CASPER_SERVICE_STDIO);
50