]> git.baikalelectronics.ru Git - kernel.git/commit
ima: fix filename hint to reflect script interpreter name
authorMimi Zohar <zohar@us.ibm.com>
Tue, 15 May 2012 01:50:11 +0000 (21:50 -0400)
committerJames Morris <james.l.morris@oracle.com>
Wed, 16 May 2012 00:36:41 +0000 (10:36 +1000)
commit94b8c1d07070b625159678cb29eaed12da509617
treed1d5debe01e000fd38f2af8232d342a054b754a4
parent977fe4a7698f8444f3ab9e50fd0eb006411570b0
ima: fix filename hint to reflect script interpreter name

When IMA was first upstreamed, the bprm filename and interp were
always the same.  Currently, the bprm->filename and bprm->interp
are the same, except for when only bprm->interp contains the
interpreter name.  So instead of using the bprm->filename as
the IMA filename hint in the measurement list, we could replace
it with bprm->interp, but this feels too fragil.

The following patch is not much better, but at least there is some
indication that sometimes we're passing the filename and other times
the interpreter name.

Reported-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
security/integrity/ima/ima_main.c