mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: wzt wzt <wzt.wzt@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: zohar@us.ibm.com
Subject: [PATCH] security/integrity/ima/ima_main.c: Fix return value
Date: Mon, 8 Feb 2010 15:00:43 +0800	[thread overview]
Message-ID: <628d1651002072300i59bc192dy86fddca9713b5701@mail.gmail.com> (raw)

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;
 }

             reply	other threads:[~2010-02-08  7:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-08  7:00 wzt wzt [this message]
2010-02-08 15:47 ` Mimi Zohar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=628d1651002072300i59bc192dy86fddca9713b5701@mail.gmail.com \
    --to=wzt.wzt@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zohar@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®