Discussion:
Inappropriate ioctl for device
Kapetanakis Giannis
2014-08-27 08:55:26 UTC
Permalink
Hi,

I'm getting this in my daily security(8) run:

Running security(8):
tset: standard error: Inappropriate ioctl for device


How can I get more details?

thanks

G
Ingo Schwarze
2014-08-28 02:17:02 UTC
Permalink
Hi,
Post by Kapetanakis Giannis
tset: standard error: Inappropriate ioctl for device
How can I get more details?
You might start by showing the information you already have.
Unless you have heavily edited /usr/libexec/security,
it seems highly probably to me that you have edited out
at least one line between "Running security(8):" and
"tset: standard error:" and that that line contains the
decisive clue.

Also, please show the following:

$ grep security,v /usr/libexec/security

Have a look at the following files:

/etc/ksh.kshrc /etc/profile /root/.profile

Does any of these files contain an unguarded tset(1) call,
that is, one that is executed regardless, even if the shell
is not interactive?

Yours,
Ingo
Kapetanakis Giannis
2014-08-28 08:53:33 UTC
Permalink
Hi,
I have NOT edited /usr/libexec/security nor the e-mail from /etc/daily
tset: standard error: Inappropriate ioctl for device
Oh. My bad. stderr doesn't go through nag(), indeed.
So you don't get a check_title. That's hard to fix,
actually. I fear we have to live with it.
# grep security,v /usr/libexec/security
# $OpenBSD: security,v 1.31 2014/07/14 08:49:27 schwarze Exp $
Good, that's up to date.
only tset is in /root/.profile
if [ -x /usr/bin/tset ]; then
if [ X"$XTERM_VERSION" = X"" ]; then
eval `/usr/bin/tset -sQ '-munknown:?vt220' $TERM`
else
eval `/usr/bin/tset -IsQ '-munknown:?vt220' $TERM`
fi
fi
Your problem's right here: The check for an interactive
shell is missing. Compare to
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/etc/root/dot.profile?rev=HEAD
case "$-" in
*i*) # interactive shell
[...]
;;
esac
This should solve the issue. Feel free to forward to the list
such that others can see the solution, too.
Yours,
Ingo
Thanx,
I've updated root's .profile

G

Loading...