mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Weinehall <tao@acc.umu.se>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Linus Torvlads <torvalds@transmeta.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Thomas Hood <jdthood@mail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Stop APM readers from responding to events
Date: Thu, 1 Nov 2001 01:50:15 +0100	[thread overview]
Message-ID: <20011101015015.G25701@khan.acc.umu.se> (raw)
In-Reply-To: <20011101012900.1a2f3287.sfr@canb.auug.org.au>
In-Reply-To: <20011101012900.1a2f3287.sfr@canb.auug.org.au>; from sfr@canb.auug.org.au on Thu, Nov 01, 2001 at 01:29:00AM +1100

On Thu, Nov 01, 2001 at 01:29:00AM +1100, Stephen Rothwell wrote:
> Hi Linus,
> 
> This is just a small patch, but fills a hole.  Thanks to Thomas Hood for a
> patch.
> 
> Alan, This will also apply to 2.4.13-ac5.

Shouldn't this be done using capabilities instead?!

> diff -ruN 2.4.14-pre5/arch/i386/kernel/apm.c 2.4.14-pre5-APM.1/arch/i386/kernel/apm.c
> --- 2.4.14-pre5/arch/i386/kernel/apm.c	Wed Oct 24 16:12:20 2001
> +++ 2.4.14-pre5-APM.1/arch/i386/kernel/apm.c	Thu Nov  1 01:09:48 2001
> @@ -1471,7 +1471,7 @@
>  	as = filp->private_data;
>  	if (check_apm_user(as, "ioctl"))
>  		return -EIO;
> -	if (!as->suser)
> +	if ((!as->suser) || (!as->writer))
>  		return -EPERM;
>  	switch (cmd) {
>  	case APM_IOC_STANDBY:


/David Weinehall
  _                                                                 _
 // David Weinehall <tao@acc.umu.se> /> Northern lights wander      \\
//  Project MCA Linux hacker        //  Dance across the winter sky //
\>  http://www.acc.umu.se/~tao/    </   Full colour fire           </

      reply	other threads:[~2001-11-01  0:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-31 14:29 Stephen Rothwell
2001-11-01  0:50 ` David Weinehall [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011101015015.G25701@khan.acc.umu.se \
    --to=tao@acc.umu.se \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jdthood@mail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®