lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LRH.1.10.0811141115350.25835@tundra.namei.org>
Date:	Fri, 14 Nov 2008 11:16:30 +1100 (EST)
From:	James Morris <jmorris@...ei.org>
To:	Eric Paris <eparis@...hat.com>
cc:	linux-kernel@...r.kernel.org, serue@...ibm.com, morgan@...nel.org
Subject: Re: [PATCH] capabilities: define get_vfs_caps_from_disk when file
 caps are not enabled

On Thu, 13 Nov 2008, Eric Paris wrote:

> When CONFIG_SECURITY_FILE_CAPABILITIES is not set the audit system may
> try to call into the capabilities function vfs_cap_from_file.  This
> patch defines that function so kernels can build and work.
> 
> Signed-off-by: Eric Paris <eparis@...hat.com>
> 
> ---
> 
>  security/commoncap.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/security/commoncap.c b/security/commoncap.c
> index 0b88160..574a70b 100644
> --- a/security/commoncap.c
> +++ b/security/commoncap.c
> @@ -337,6 +337,12 @@ int cap_inode_killpriv(struct dentry *dentry)
>  	return 0;
>  }
>  
> +int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps)
> +{
> +	memset(cpu_caps, 0, sizeof(struct cpu_vfs_cap_data));
> +	return -ENODATA;
> +}
> +

As the function is returning an error, the caller should not depend on the 
state of any modifiable arguments, so I suggest removing the memset.


>  static inline int get_file_caps(struct linux_binprm *bprm)
>  {
>  	bprm_clear_caps(bprm);
> 
> 

-- 
James Morris
<jmorris@...ei.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ