sysctl.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. #include <linux/key.h>
  12. #include <linux/sysctl.h>
  13. #include "internal.h"
  14. ctl_table key_sysctls[] = {
  15. {
  16. .ctl_name = CTL_UNNUMBERED,
  17. .procname = "maxkeys",
  18. .data = &key_quota_maxkeys,
  19. .maxlen = sizeof(unsigned),
  20. .mode = 0644,
  21. .proc_handler = &proc_dointvec,
  22. },
  23. {
  24. .ctl_name = CTL_UNNUMBERED,
  25. .procname = "maxbytes",
  26. .data = &key_quota_maxbytes,
  27. .maxlen = sizeof(unsigned),
  28. .mode = 0644,
  29. .proc_handler = &proc_dointvec,
  30. },
  31. {
  32. .ctl_name = CTL_UNNUMBERED,
  33. .procname = "root_maxkeys",
  34. .data = &key_quota_root_maxkeys,
  35. .maxlen = sizeof(unsigned),
  36. .mode = 0644,
  37. .proc_handler = &proc_dointvec,
  38. },
  39. {
  40. .ctl_name = CTL_UNNUMBERED,
  41. .procname = "root_maxbytes",
  42. .data = &key_quota_root_maxbytes,
  43. .maxlen = sizeof(unsigned),
  44. .mode = 0644,
  45. .proc_handler = &proc_dointvec,
  46. },
  47. { .ctl_name = 0 }
  48. };