xref: /aosp_15_r20/external/libcap-ng/src/libdrop_ambient.c (revision 8dd5e09d5faf27a871e8654ddaa2d2af7c696578)
1 /* libdrop_ambient.c --
2  * Copyright 2020 Red Hat Inc.
3  * All Rights Reserved.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this program; see the file COPYING.LIB. If not, write to the
17  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
18  * Boston, MA 02110-1335, USA.
19  *
20  * Authors:
21  *      Steve Grubb <[email protected]>
22  */
23 
24 #include "config.h"
25 #include <sys/prctl.h>
26 
init(void)27 void __attribute__ ((constructor)) init(void)
28 {
29 	prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL, 0, 0, 0);
30 }
31 
32