--- v1
+++ v38
@@ -1,34 +1,41 @@
-A "security context" is the text representation of
-the information used by LSMs. This provides a structure
-so that the use can be made consistant.
+The scaffolding function lsmcontext_init() is no longer used.
+Remove it.
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
---
- include/linux/security.h | 11 +++++++++++
- 1 file changed, 11 insertions(+)
+ include/linux/security.h | 19 -------------------
+ 1 file changed, 19 deletions(-)
diff --git a/include/linux/security.h b/include/linux/security.h
-index 6c44aca19c65..8dd21133ede8 100644
+index c190b9189287..f6a247033556 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
-@@ -119,6 +119,17 @@ static inline bool lsm_export_equal(struct lsm_export *l, struct lsm_export *m)
+@@ -166,25 +166,6 @@ struct lsmcontext {
+ int slot; /* Identifies the module */
+ };
- extern struct lsm_export *lsm_export_skb(struct sk_buff *skb);
-
-+/* Text representation of LSM specific security information - a "context" */
-+struct lsm_context {
-+ char *context;
-+ u32 len;
-+};
-+
-+static inline void lsm_context_init(struct lsm_context *cp)
-+{
-+ memset(cp, 0, sizeof(*cp));
-+}
-+
- /* These functions are in security/commoncap.c */
- extern int cap_capable(const struct cred *cred, struct user_namespace *ns,
- int cap, unsigned int opts);
+-/**
+- * lsmcontext_init - initialize an lsmcontext structure.
+- * @cp: Pointer to the context to initialize
+- * @context: Initial context, or NULL
+- * @size: Size of context, or 0
+- * @slot: Which LSM provided the context
+- *
+- * Fill in the lsmcontext from the provided information.
+- * This is a scaffolding function that will be removed when
+- * lsmcontext integration is complete.
+- */
+-static inline void lsmcontext_init(struct lsmcontext *cp, char *context,
+- u32 size, int slot)
+-{
+- cp->slot = slot;
+- cp->context = context;
+- cp->len = size;
+-}
+-
+ /*
+ * Data exported by the security modules
+ *
--
-2.19.1
+2.37.3