linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ima: Remove unused is_ima_appraise_enabled() function.
@ 2018-07-03 11:19 Stefan Berger
  2018-07-03 13:13 ` Mimi Zohar
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Berger @ 2018-07-03 11:19 UTC (permalink / raw)
  To: linux-integrity, jarkko.sakkinen, zohar
  Cc: jgg, linux-kernel, linux-security-module, Stefan Berger

Remove the unused is_ima_appraise_enabled() function.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
---
 include/linux/ima.h                   |  6 ------
 security/integrity/ima/ima_appraise.c | 10 ----------
 2 files changed, 16 deletions(-)

diff --git a/include/linux/ima.h b/include/linux/ima.h
index 0e4647e0eb60..7f6952f8d6aa 100644
--- a/include/linux/ima.h
+++ b/include/linux/ima.h
@@ -75,17 +75,11 @@ static inline void ima_add_kexec_buffer(struct kimage *image)
 #endif
 
 #ifdef CONFIG_IMA_APPRAISE
-extern bool is_ima_appraise_enabled(void);
 extern void ima_inode_post_setattr(struct dentry *dentry);
 extern int ima_inode_setxattr(struct dentry *dentry, const char *xattr_name,
 		       const void *xattr_value, size_t xattr_value_len);
 extern int ima_inode_removexattr(struct dentry *dentry, const char *xattr_name);
 #else
-static inline bool is_ima_appraise_enabled(void)
-{
-	return 0;
-}
-
 static inline void ima_inode_post_setattr(struct dentry *dentry)
 {
 	return;
diff --git a/security/integrity/ima/ima_appraise.c b/security/integrity/ima/ima_appraise.c
index 8bd7a0733e51..7bf7fcacfdbb 100644
--- a/security/integrity/ima/ima_appraise.c
+++ b/security/integrity/ima/ima_appraise.c
@@ -33,16 +33,6 @@ static int __init default_appraise_setup(char *str)
 
 __setup("ima_appraise=", default_appraise_setup);
 
-/*
- * is_ima_appraise_enabled - return appraise status
- *
- * Only return enabled, if not in ima_appraise="fix" or "log" modes.
- */
-bool is_ima_appraise_enabled(void)
-{
-	return ima_appraise & IMA_APPRAISE_ENFORCE;
-}
-
 /*
  * ima_must_appraise - set appraise flag
  *
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ima: Remove unused is_ima_appraise_enabled() function.
  2018-07-03 11:19 [PATCH] ima: Remove unused is_ima_appraise_enabled() function Stefan Berger
@ 2018-07-03 13:13 ` Mimi Zohar
  0 siblings, 0 replies; 2+ messages in thread
From: Mimi Zohar @ 2018-07-03 13:13 UTC (permalink / raw)
  To: Stefan Berger, linux-integrity, jarkko.sakkinen
  Cc: jgg, linux-kernel, linux-security-module

On Tue, 2018-07-03 at 07:19 -0400, Stefan Berger wrote:
> Remove the unused is_ima_appraise_enabled() function.

is_ima_appraise_enabled() was introduced to coordinate between IMA and
the lockdown patch set.  Before removing it, let's wait and see if it
is still needed by the lockdown patches.

Mimi

> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
> ---
>  include/linux/ima.h                   |  6 ------
>  security/integrity/ima/ima_appraise.c | 10 ----------
>  2 files changed, 16 deletions(-)
> 
> diff --git a/include/linux/ima.h b/include/linux/ima.h
> index 0e4647e0eb60..7f6952f8d6aa 100644
> --- a/include/linux/ima.h
> +++ b/include/linux/ima.h
> @@ -75,17 +75,11 @@ static inline void ima_add_kexec_buffer(struct kimage *image)
>  #endif
> 
>  #ifdef CONFIG_IMA_APPRAISE
> -extern bool is_ima_appraise_enabled(void);
>  extern void ima_inode_post_setattr(struct dentry *dentry);
>  extern int ima_inode_setxattr(struct dentry *dentry, const char *xattr_name,
>  		       const void *xattr_value, size_t xattr_value_len);
>  extern int ima_inode_removexattr(struct dentry *dentry, const char *xattr_name);
>  #else
> -static inline bool is_ima_appraise_enabled(void)
> -{
> -	return 0;
> -}
> -
>  static inline void ima_inode_post_setattr(struct dentry *dentry)
>  {
>  	return;
> diff --git a/security/integrity/ima/ima_appraise.c b/security/integrity/ima/ima_appraise.c
> index 8bd7a0733e51..7bf7fcacfdbb 100644
> --- a/security/integrity/ima/ima_appraise.c
> +++ b/security/integrity/ima/ima_appraise.c
> @@ -33,16 +33,6 @@ static int __init default_appraise_setup(char *str)
> 
>  __setup("ima_appraise=", default_appraise_setup);
> 
> -/*
> - * is_ima_appraise_enabled - return appraise status
> - *
> - * Only return enabled, if not in ima_appraise="fix" or "log" modes.
> - */
> -bool is_ima_appraise_enabled(void)
> -{
> -	return ima_appraise & IMA_APPRAISE_ENFORCE;
> -}
> -
>  /*
>   * ima_must_appraise - set appraise flag
>   *

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-03 13:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-03 11:19 [PATCH] ima: Remove unused is_ima_appraise_enabled() function Stefan Berger
2018-07-03 13:13 ` Mimi Zohar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).