]>
git.proxmox.com Git - mirror_frr.git/blob - lib/privs.h
2 * Zebra privileges header.
4 * Copyright (C) 2003 Paul Jakma.
6 * This file is part of GNU Zebra.
8 * GNU Zebra is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2, or (at your option) any
13 * GNU Zebra is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with GNU Zebra; see the file COPYING. If not, write to the Free
20 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24 #ifndef _ZEBRA_PRIVS_H
25 #define _ZEBRA_PRIVS_H
27 /* list of zebra capabilities */
44 } zebra_capabilities_t
;
50 } zebra_privs_current_t
;
60 zebra_capabilities_t
*caps_p
; /* caps required for operation */
61 zebra_capabilities_t
*caps_i
; /* caps to allow inheritance of */
62 int cap_num_p
; /* number of caps in arrays */
64 char *user
; /* user and group to run as */
69 (*change
) (zebra_privs_ops_t
); /* change privileges, 0 on success */
71 (*current_state
) (void); /* current privilege state */
74 /* initialise zebra privileges */
75 void zprivs_init (struct zebra_privs_t
*zprivs
);
76 /* drop all and terminate privileges */
77 void zprivs_terminate (void);
79 #endif /* _ZEBRA_PRIVS_H */