lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <ec8635c36005ba5ea3784276214fb905720ee3ec.1345055639.git.dmitry.kasatkin@intel.com>
Date:	Wed, 15 Aug 2012 21:43:07 +0300
From:	Dmitry Kasatkin <dmitry.kasatkin@...el.com>
To:	zohar@...ux.vnet.ibm.com, jmorris@...ei.org, rusty@...tcorp.com.au,
	dhowells@...hat.com, linux-security-module@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc:	Mimi Zohar <zohar@...ibm.com>
Subject: [RFC v2 2/7] keys: initialize root uid and session keyrings early

From: Mimi Zohar <zohar@...ux.vnet.ibm.com>

In order to create the integrity keyrings (eg. _evm, _ima, _modules),
root's uid and session keyrings need to be initialized early.

Signed-off-by: Mimi Zohar <zohar@...ibm.com>
---
 security/keys/Makefile       |    1 +
 security/keys/root_keyring.c |   18 ++++++++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 security/keys/root_keyring.c

diff --git a/security/keys/Makefile b/security/keys/Makefile
index 504aaa0..c93ce8d 100644
--- a/security/keys/Makefile
+++ b/security/keys/Makefile
@@ -18,6 +18,7 @@ obj-y := \
 obj-$(CONFIG_KEYS_COMPAT) += compat.o
 obj-$(CONFIG_PROC_FS) += proc.o
 obj-$(CONFIG_SYSCTL) += sysctl.o
+obj-$(CONFIG_INTEGRITY_SIGNATURE) += root_keyring.o
 
 #
 # Key types
diff --git a/security/keys/root_keyring.c b/security/keys/root_keyring.c
new file mode 100644
index 0000000..f6662eb
--- /dev/null
+++ b/security/keys/root_keyring.c
@@ -0,0 +1,18 @@
+/*
+ * Copyright (C) 2012 IBM Corporation
+ *
+ * Author:
+ * Mimi Zohar <zohar@...ibm.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 2 of the License.
+ */
+
+#include "internal.h"
+static int __init init_root_keyring(void)
+{
+	return install_user_keyrings();
+}
+
+late_initcall(init_root_keyring);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ