capabilities: initialize has_cap
Serge Hallyn [Mon, 15 Aug 2011 13:29:50 +0000 (08:29 -0500)]
Initialize has_cap in cap_bprm_set_creds()

Reported-by: Andrew G. Morgan <morgan@kernel.org>
Signed-off-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: James Morris <jmorris@namei.org>

security/commoncap.c

index 0f620c5..ee4f848 100644 (file)
@@ -479,7 +479,7 @@ int cap_bprm_set_creds(struct linux_binprm *bprm)
 {
        const struct cred *old = current_cred();
        struct cred *new = bprm->cred;
-       bool effective, has_cap;
+       bool effective, has_cap = false;
        int ret;
 
        effective = false;