On Sat, 11 Sep 2010, martin f krafft wrote:

> also sprach Peter Palfrader <wea...@debian.org> [2010.09.10.2046 +0200]:
> > I applied this patch, but now mollyguard doesn't recognize my tty is
> > from ssh.
> 
> Please elaborate, I have no kfreebsd systems to test molly-guard on.
> I mean, I can get an SSH shell and run it in test-mode, but I cannot
> test whether my changes break the commands for other types of tty.

Why is access to io and asdfasdf not sufficient?  Even on these you can
probably check the return code of your scripts.

wea...@asdfasdf:~$ ALWAYS_QUERY_HOSTNAME=0 SSH_CONNECTION='' 
MOLLYGUARD_SETTINGS='' MOLLYGUARD_CMD='' sh -x ./30-query-hostname 
+ set -eu
+ ME=molly-guard
+ '[' -f '' ']'
+ PRETEND_SSH=0
+ test -t 0
+ case "${ALWAYS_QUERY_HOSTNAME:-0}" in
++ tty
+ PTS=/dev/ttyp6
+ pgrep -f '^sshd.+ttyp6\>'
+ '[' -z '' ']'
+ '[' 0 -eq 1 ']'
+ exit 0
wea...@asdfasdf:~$ 

[SSH_CONNECTION would usually be eaten by sudo]

-- 
                           |  .''`.  ** Debian GNU/Linux **
      Peter Palfrader      | : :' :      The  universal
 http://www.palfrader.org/ | `. `'      Operating System
                           |   `-    http://www.debian.org/



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to