mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] security/integrity/ima/ima_main.c: Fix return value
@ 2010-02-08  7:00 wzt wzt
  2010-02-08 15:47 ` Mimi Zohar
  0 siblings, 1 reply; 2+ messages in thread
From: wzt wzt @ 2010-02-08  7:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: zohar

Hi:
  In security/integrity/ima/ima_main.c ima_file_mmap() called by
security_file_mmap(), it depend on the return value of
ima_file_mmap(), not always return 0. see also in ima_bprm_check().


Signed-off-by: wzt <zhitong.wangzt@alibaba-inc.com>

diff --git a/security/integrity/ima/ima_main.c
b/security/integrity/ima/ima_main.c
index 294b005..705a991 100644
--- a/security/integrity/ima/ima_main.c
+++ b/security/integrity/ima/ima_main.c
@@ -271,7 +271,7 @@ int ima_file_mmap(struct file *file, unsigned long prot)
        if (prot & PROT_EXEC)
                rc = process_measurement(file, file->f_dentry->d_name.name,
                                         MAY_EXEC, FILE_MMAP);
-       return 0;
+       return rc;
 }

 /**
@@ -293,7 +293,7 @@ int ima_bprm_check(struct linux_binprm *bprm)

        rc = process_measurement(bprm->file, bprm->filename,
                                 MAY_EXEC, BPRM_CHECK);
-       return 0;
+       return rc;
 }

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

end of thread, other threads:[~2010-02-08 15:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-08  7:00 [PATCH] security/integrity/ima/ima_main.c: Fix return value wzt wzt
2010-02-08 15:47 ` Mimi Zohar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®