Hi,

Le 21/10/2021 à 01:55, Dave Mielke a écrit :
[quoted lines by Didier Spaier on 2021/10/21 at 01:31 +0200]

I start brltty like this:
brltty -d /dev/tty2 -b tt

To get an output on /dev/tty2 I need to login in this tty, as the regular
user
who started brltty.

You need to log into tty2, or is tty2 a free console, a login prompt, or what?

I need to press Alt+F2 (or Ctrl+Alt+F2 to switch to text mode from a graphical
environment), then the login name, press Enter, type type the password, then
press Enter again. After that the output of brltty is displayed in /dev/tty2 as expected. It is displayed immediately if I have logged in in /dev/tty2 prior to
start brltty from another tty as the same user.

I get an output in /dev/tty2 regardless of the user who produces it, both in
a
console or in a graphical terminal.

I think I'm misunderstanding because this seems to contradict the previous 
statement. I'm understanding, from this one, that you can log in as any 
non-root user on any other tty and tty2 works as your virtual braille display.

After brltty has been started for user X with -d /dev/tty2 anything displayed
in another tty (even the login prompt so before anyone be logged in in this
other tty)) is also displayed in /dev/tty2 (as an output of brltty).


If I start brltty as root, no matter what, I don't get an output in
/dev/tty2.

Does the log contain any errors? Perhaps you need to use -ldebug.

Like below (timestamps removed):
checking braille device: /dev/tty2
braille device type: serial
checking for braille driver: tt
initializing braille driver: tt -> /dev/tty2
cannot open serial device: /dev/tty2: Permission denied
braille driver initialization failed: tt -> /dev/tty2
braille driver not found

Indeed using a tty as braille device is not what blind users will do, but maybe
for testing.

But these tests were intended as a way for a sighted packager to check if
isolating the brltty outputs for two regular users (maybe not using the same
Braille table) was possible, as asked by Pawel Loba. The answer is no as far as my tests can say. This is confirmed by two blind users having tested using the
same package, namely Patrick Delavalade and Tony Seth, in CC, using braille
displays.

Hence this question: What really brings to the user the ability to start brltty
as regular user? added security? I fail to understand how.

Further, to display the login prompt on a braille device brltty should then be
started during the init sequence as a regular user (but which one, then?). I
can't check if it works myself.

As an aside, I still fail to grasp how these changes practically increase the
security of the system, including switching to a regular user if started as
root.

For the records here are the outputs I get starting brltty as root:
root@darkstar:~# brltty -d /dev/tty2 -b tt -l 7 -L /tmp/brltty_as_root
BRLTTY 6.4 rev BRLTTY-6.4 [https://brltty.app/]
brltty: switched to unprivileged user: brltty
brltty: kernel module not installed: pcspkr

and as regular user:
didier@darkstar:~$ brltty -d /dev/tty2 -b tt -l 7 -L /tmp/brltty_as_regular_user
BRLTTY 6.4 rev BRLTTY-6.4 [https://brltty.app/]
brltty: executing as the invoking user: didier
brltty: kernel module not installed: pcspkr

Additional question: I don't ship the pcspkr driver in Slint kernels to avoid that Alsa consider this device as the default sound board, hence the messages
above. Is pcspkr really needed by brltty and for what purpose?

Cheers,
Didier
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: [email protected]
For general information, go to: http://brltty.app/mailman/listinfo/brltty

Reply via email to