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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 30 Jan 2014 13:48:48 -0800
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	David Howells <dhowells@...hat.com>
Cc:	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
	linux-afs@...ts.infradead.org,
	Pali Rohár <pali.rohar@...il.com>
Subject: Re: [PATCH] afs: proc cells and rootcell are writeable

David Howells <dhowells@...hat.com> writes:

> From: Pali Rohár <pali.rohar@...il.com>
>
> 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.

Dumb question.  Is this worth fixing?  Should we perhaps instead remove
the write methods?

These files have been read-only since this code was merged in 2002.
Over a decade of not being used seems like a strong indication that no
one cares about the write path.

Eric

> Signed-off-by: Pali Rohár <pali.rohar@...il.com>
> Signed-off-by: David Howells <dhowells@...hat.com>
> ---
>
>  fs/afs/proc.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/afs/proc.c b/fs/afs/proc.c
> index 526e4bbbde59..276cb6ed0b93 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;
>  
>
> --
> 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/
--
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