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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201312100902.37942@pali>
Date:	Tue, 10 Dec 2013 09:02:37 +0100
From:	Pali Rohár <pali.rohar@...il.com>
To:	David Howells <dhowells@...hat.com>
Cc:	linux-afs@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] afs: proc cells and rootcell are writeable

On Wednesday 20 November 2013 14:30:55 Pali Rohár wrote:
> Both proc files are writeable and used for configuring cells.
> But there is missing correct mode flag for writeable files.
> Without this patch both proc files are read only.
> 
> diff --git a/fs/afs/proc.c b/fs/afs/proc.c
> index 526e4bb..276cb6e 100644
> --- a/fs/afs/proc.c
> +++ b/fs/afs/proc.c
> @@ -147,11 +147,11 @@ int afs_proc_init(void)
>  	if (!proc_afs)
>  		goto error_dir;
> 
> -	p = proc_create("cells", 0, proc_afs, &afs_proc_cells_fops);
> +	p = proc_create("cells", S_IFREG | S_IRUGO | S_IWUSR,
> proc_afs, &afs_proc_cells_fops); if (!p)
>  		goto error_cells;
> 
> -	p = proc_create("rootcell", 0, proc_afs,
> &afs_proc_rootcell_fops); +	p = proc_create("rootcell",
> S_IFREG | S_IRUGO | S_IWUSR, proc_afs,
> &afs_proc_rootcell_fops); if (!p)
>  		goto error_rootcell;

Hello, can somebody review my patch?

-- 
Pali Rohár
pali.rohar@...il.com

Download attachment "signature.asc " of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ