danfruehauf / NetworkManager-ssh

SSH VPN integration for NetworkManager
Other
253 stars 40 forks source link

fix bashism in nm_ssh_get_free_device #105

Closed jcmvbkbc closed 7 months ago

jcmvbkbc commented 3 years ago

On systems with default shell being anything other than bash the redirection '>& /dev/null' may cause shell error, resulting in nm_ssh_get_free_device always returning 0. When tun0 or tap0 is busy this results in failure to establish the tunnel.

Replace bash-specific redirection form '>& /dev/null' with more generic '> /dev/null 2>&1'.

Signed-off-by: Max Filippov jcmvbkbc@gmail.com

danfruehauf commented 3 years ago

Looks good, I'm tempted to just merge it. Have you got a change to test it?

jcmvbkbc commented 3 years ago

Yes, I'm running nm-ssh-service with this change for a few weeks now on a machine with sh symlinked to dash and tap0 used for qemu network.

jcmvbkbc commented 2 years ago

Ping. I wonder if there's anything that prevents merging this simple fix?

petterreinholdtsen commented 1 year ago

Any hope to have this fix merged?