pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

security/sudo - weird behaviour on /dev/constty



Hi,

I remember vaguely this - or similar - being discussed. When ran on
/dev/constty, sudo seems to interpret CR as LF:
....
$ id
uid=1000(ci4) gid=100(users) groups=100(users),0(wheel)
$ tty
/dev/constty
$ sudo ls -1 /tmp
.s.PGSQL.5432
             .           s.PGSQL.5432.lock
                                                        lf.ci4.sock

 nimble_15416.out
..... (they a lign exactly in the terminal)
$ doas ls -1 /tmp
.s.PGSQL.5432
.s.PGSQL.5432.lock
lf.ci4.sock
nimble_15416.out
nimble_20137.out
.............................(as expected).

On any other terminal there is no problem:
...
$ tty
/dev/pts/1
$ sudo ls -1 /tmp
.s.PGSQL.5432
.s.PGSQL.5432.lock
lf.ci4.sock
nimble_15416.out
nimble_20137.out
....

This was observed on -current, both amd64 and aarch64. Obviously, it
makes sudo unusable on the system console, as one cannot enter a
command using the default settings. Otherwise /dev/constty works as
usual.

Chavdar

-- 
----


Home | Main Index | Thread Index | Old Index