浏览代码

capabilities: initialize has_cap

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>
Serge Hallyn 14 年之前
父节点
当前提交
7d8db1808a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      security/commoncap.c

+ 1 - 1
security/commoncap.c

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