xref: /linux/security/keys/sysctl.c (revision 8fa5723aa7e053d498336b48448b292fc2e0458b)
1 /* Key management controls
2  *
3  * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
4  * Written by David Howells (dhowells@redhat.com)
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public Licence
8  * as published by the Free Software Foundation; either version
9  * 2 of the Licence, or (at your option) any later version.
10  */
11 
12 #include <linux/key.h>
13 #include <linux/sysctl.h>
14 #include "internal.h"
15 
16 ctl_table key_sysctls[] = {
17 	{
18 		.ctl_name = CTL_UNNUMBERED,
19 		.procname = "maxkeys",
20 		.data = &key_quota_maxkeys,
21 		.maxlen = sizeof(unsigned),
22 		.mode = 0644,
23 		.proc_handler = &proc_dointvec,
24 	},
25 	{
26 		.ctl_name = CTL_UNNUMBERED,
27 		.procname = "maxbytes",
28 		.data = &key_quota_maxbytes,
29 		.maxlen = sizeof(unsigned),
30 		.mode = 0644,
31 		.proc_handler = &proc_dointvec,
32 	},
33 	{
34 		.ctl_name = CTL_UNNUMBERED,
35 		.procname = "root_maxkeys",
36 		.data = &key_quota_root_maxkeys,
37 		.maxlen = sizeof(unsigned),
38 		.mode = 0644,
39 		.proc_handler = &proc_dointvec,
40 	},
41 	{
42 		.ctl_name = CTL_UNNUMBERED,
43 		.procname = "root_maxbytes",
44 		.data = &key_quota_root_maxbytes,
45 		.maxlen = sizeof(unsigned),
46 		.mode = 0644,
47 		.proc_handler = &proc_dointvec,
48 	},
49 	{ .ctl_name = 0 }
50 };
51