Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Aug 2002 22:39:09 +0000
From:      Dima Dorfman <dima@trit.org>
To:        Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc:        current@freebsd.org
Subject:   Re: cvs commit: src/usr.bin/lock lock.1 lock.c 
Message-ID:  <20020823223909.AAF433E1A@turbine.trit.org>
In-Reply-To: <20020823044145.GA784@hades.hell.gr>; from keramida@ceid.upatras.gr on "Fri, 23 Aug 2002 07:41:45 %2B0300"

next in thread | previous in thread | raw e-mail | index | archive | help
Giorgos Keramidas <keramida@ceid.upatras.gr> wrote:
> 	charon@hades[07:37]/home/charon$ lock -v -p </dev/ttyv1
> 
> the virtual terminal locks, but since my current tty is a pty of
> screen(1) I can't type anything.  Now, before anyone hits me with a
> heavy, blunt thing...  I know this isn't supposed to work.  The
> evilness happens when I hit CTRL-ALT-ESC though.  There's somewhere a
> nasty interaction of DDB and the locked consoles.  The system freezes

Not quite; it's just constantly trying to switch the console.  Type
"c" (for continue) and press enter to "unfreeze".

> and a constant beeping sound can be heard form the PC speaker :-(

This happens regardless of whether you're using screen(1) or not;
doing a "lock -v" and breaking into DDB is sufficient to reproduce the
problem (actually, I seem to remember testing this combination when I
originally wrote the patches, and it seemed to work "okay", but I can
reproduce it just fine now on a -stable box (I merged this stuff
locally in preparation to MFC)).  It's easy enough for syscons to
allow the switch when it's requested by the kernel, but what do we do
when we get out of DDB?  We don't keep track of which console we came
from, so we can't switch back to that (I suppose this can be changed).
If we keep the switch lock, the user no longer has access to the
instance of "lock(1)" that's maintaining it; if we don't keep the
lock, well, the console isn't locked anymore.

I think the latter might be the best and easiest choice, but it's
counter-intuitive.  I'm not terribly concerned with the security
implications in this case; if you can get into DDB, you can cancel the
lock, anyway; the only harm in not keeping the lock is breaking POLA.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020823223909.AAF433E1A>