Blame view

security/keys/sysctl.c 1.55 KB
0b77f5bfb   David Howells   keys: make the ke...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  /* Key management controls
   *
   * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
   * Written by David Howells (dhowells@redhat.com)
   *
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of the GNU General Public Licence
   * as published by the Free Software Foundation; either version
   * 2 of the Licence, or (at your option) any later version.
   */
  
  #include <linux/key.h>
  #include <linux/sysctl.h>
  #include "internal.h"
5d135440f   David Howells   KEYS: Add garbage...
15
  static const int zero, one = 1, max = INT_MAX;
0b77f5bfb   David Howells   keys: make the ke...
16
17
  ctl_table key_sysctls[] = {
  	{
0b77f5bfb   David Howells   keys: make the ke...
18
19
20
21
  		.procname = "maxkeys",
  		.data = &key_quota_maxkeys,
  		.maxlen = sizeof(unsigned),
  		.mode = 0644,
6d4561110   Eric W. Biederman   sysctl: Drop & in...
22
  		.proc_handler = proc_dointvec_minmax,
5d135440f   David Howells   KEYS: Add garbage...
23
24
  		.extra1 = (void *) &one,
  		.extra2 = (void *) &max,
0b77f5bfb   David Howells   keys: make the ke...
25
26
  	},
  	{
0b77f5bfb   David Howells   keys: make the ke...
27
28
29
30
  		.procname = "maxbytes",
  		.data = &key_quota_maxbytes,
  		.maxlen = sizeof(unsigned),
  		.mode = 0644,
6d4561110   Eric W. Biederman   sysctl: Drop & in...
31
  		.proc_handler = proc_dointvec_minmax,
5d135440f   David Howells   KEYS: Add garbage...
32
33
  		.extra1 = (void *) &one,
  		.extra2 = (void *) &max,
0b77f5bfb   David Howells   keys: make the ke...
34
35
  	},
  	{
0b77f5bfb   David Howells   keys: make the ke...
36
37
38
39
  		.procname = "root_maxkeys",
  		.data = &key_quota_root_maxkeys,
  		.maxlen = sizeof(unsigned),
  		.mode = 0644,
6d4561110   Eric W. Biederman   sysctl: Drop & in...
40
  		.proc_handler = proc_dointvec_minmax,
5d135440f   David Howells   KEYS: Add garbage...
41
42
  		.extra1 = (void *) &one,
  		.extra2 = (void *) &max,
0b77f5bfb   David Howells   keys: make the ke...
43
44
  	},
  	{
0b77f5bfb   David Howells   keys: make the ke...
45
46
47
48
  		.procname = "root_maxbytes",
  		.data = &key_quota_root_maxbytes,
  		.maxlen = sizeof(unsigned),
  		.mode = 0644,
6d4561110   Eric W. Biederman   sysctl: Drop & in...
49
  		.proc_handler = proc_dointvec_minmax,
5d135440f   David Howells   KEYS: Add garbage...
50
51
52
53
  		.extra1 = (void *) &one,
  		.extra2 = (void *) &max,
  	},
  	{
5d135440f   David Howells   KEYS: Add garbage...
54
55
56
57
  		.procname = "gc_delay",
  		.data = &key_gc_delay,
  		.maxlen = sizeof(unsigned),
  		.mode = 0644,
6d4561110   Eric W. Biederman   sysctl: Drop & in...
58
  		.proc_handler = proc_dointvec_minmax,
5d135440f   David Howells   KEYS: Add garbage...
59
60
  		.extra1 = (void *) &zero,
  		.extra2 = (void *) &max,
0b77f5bfb   David Howells   keys: make the ke...
61
  	},
5cdb35557   Eric W. Biederman   sysctl security/k...
62
  	{ }
0b77f5bfb   David Howells   keys: make the ke...
63
  };