Skip to contentSkip to conversation

ima: fix up #endif comments

PATCH In review Tycho Andersen 2 participants 2 messages May 5, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ima: fix up #endif comments

While reading the code, I noticed that these #endif comments don't match how they're actually nested. This patch fixes that.

---
 security/integrity/ima/ima.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
security/integrity/ima/ima.h +2 -2
index b563fbd4d122..d26a30e37d13 100644
@@ -306,12 +306,12 @@ static inline int security_filter_rule_match(u32 secid, u32 field, u32 op,
 {
 	return -EINVAL;
 }
-#endif /* CONFIG_IMA_TRUSTED_KEYRING */
+#endif /* CONFIG_IMA_LSM_RULES */
 
 #ifdef	CONFIG_IMA_READ_POLICY
 #define	POLICY_FILE_FLAGS	(S_IWUSR | S_IRUSR)
 #else
 #define	POLICY_FILE_FLAGS	S_IWUSR
-#endif /* CONFIG_IMA_WRITE_POLICY */
+#endif /* CONFIG_IMA_READ_POLICY */
 
 #endif /* __LINUX_IMA_H */
Signature · 1 line
2.11.0
#1 lore raw
Quoted 4 lines · Tycho Andersen

While reading the code, I noticed that these #endif comments don't match how they're actually nested. This patch fixes that.

Thanks!

Mimi

Quoted 23 lines
---
 security/integrity/ima/ima.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
security/integrity/ima/ima.h +2 -2
index b563fbd4d122..d26a30e37d13 100644
@@ -306,12 +306,12 @@ static inline int security_filter_rule_match(u32 secid, u32 field, u32 op,
 {
 	return -EINVAL;
 }
-#endif /* CONFIG_IMA_TRUSTED_KEYRING */
+#endif /* CONFIG_IMA_LSM_RULES */
 
 #ifdef	CONFIG_IMA_READ_POLICY
 #define	POLICY_FILE_FLAGS	(S_IWUSR | S_IRUSR)
 #else
 #define	POLICY_FILE_FLAGS	S_IWUSR
-#endif /* CONFIG_IMA_WRITE_POLICY */
+#endif /* CONFIG_IMA_READ_POLICY */
 
 #endif /* __LINUX_IMA_H */