I’m having an issue with the Cisco Anyconnect VPN client that seems to be related to how openSUSE handles a user opening a new shell. If I create a new shell by (1) starting gnome-terminal, (2) opening a new tab in gnome-terminal, (3) logging in over SSH, or (4) starting XTerm, the VPN client treats this as a user log-out event and disconnects the VPN session. Any action that creates a new shell in the system causes this. Starting a new instance of bash or zsh in an existing terminal does not cause this behavior. However, this issue does not reproduce on any other distro I’ve tried, including Fedora, Arch, Debian, and Ubuntu. I can only reproduce it on openSUSE 13.2 and Tumbleweed. Does anyone know the differences between openSUSE and other distros when it comes to handling a new shell instance?
What I’ve tried:
- Different shells (bash, sh, zsh, csh)
- Different GUIs (gnome-terminal, XTerm, VT login)
- Removing /etc/profile, /etc/profile.d, and /etc/bash.bashrc (to see if it was something with the login scripts)
- Replacing /bin/bash with a copy from a Ubuntu system that does not have this problem
And yes, I know openconnect is an option, but this issue is bugging me and I want to find a solution.
There are no important differences that I am aware of.
Try the following from an already open terminal:
( xterm & )
( xterm -ut &)
( xterm +ut & )
Do those one at at time, and see which disconnect the VPN.
The first of those opens an xterm with defaults.
The second opens an xterm, but tells it to not add a line to “utmp”
The third insists that it should add a line to “utmp” (probably the same as the default).
I’m just guessing that maybe something in the VPN software is monitoring “utmp”. This would be a way of testing.
Interesting! Opening a new shell with “xterm -ut” does seem to work. Thanks for the info! So it does appear to be related to utmp, though I’m still curious why this is only an issue on openSUSE.
So it’s definitely an issue with watching /var/run/utmp. I can work around the issue by LD_PRELOAD’ing an .so that replaces inotify_init() with a dummy stub. The VPN client can no longer register an inotify watcher on /var/run/utmp.
But I’m still confused on the real issue: what about utmp is different with openSUSE? I just compared /var/run/utmp on two machines, one openSUSE and another Fedora, before and after opening a new tab in gnome-terminal. In both cases, one line is added to utmp, and the only difference is the login time, pts/#, and login PID. So there has to be more to it.
But I have a work around now, so I’m happy!
Thanks again!
It might be a difference in libraries somewhere. There’s possibly a compile time option that opensuse is using but fedora and ubuntu are not using.