Re: [PATCH v2 1/2] syslog: distinguish between /proc/kmsg and syscalls

From: Alex Riesen
Date: Thu Feb 04 2010 - 02:58:52 EST


On Thu, Feb 4, 2010 at 00:36, Kees Cook <kees.cook@xxxxxxxxxxxxx> wrote:
> @@ -888,12 +889,16 @@ error:
> Â/**
> Â* cap_syslog - Determine whether syslog function is permitted
> Â* @type: Function requested
> + * @from_file: Whether this request came from an open file (i.e. /proc)
> Â*
> Â* Determine whether the current process is permitted to use a particular
> Â* syslog function, returning 0 if permission is granted, -ve if not.
> Â*/
> -int cap_syslog(int type)
> +int cap_syslog(int type, bool from_file)
> Â{
> + Â Â Â /* /proc/kmsg can open be opened by CAP_SYS_ADMIN */
> + Â Â Â if (type != 1 && from_file)
> + Â Â Â Â Â Â Â return 0;

"can open be opened"?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/