Created attachment 863324 [details] sesh loginshell argv[0] replacement patch Reproduces in sudo-1.8.8-1.fc20.x86_64 as well +++ This bug was initially created as a clone of Bug #1065415 +++ Description of problem: /usr/libexec/sesh if called as -sesh by sudo executes the login shell with wrongly replaced argv[0]. The last "/" is replaced with "-", but the rest of the path remains intact. I expect login shell should be called as "-shell", not "/bin-shell". This can cause unexpected behaviour e.g. in case /bin/zsh which thinks it was called as /bin-zsh, thus runs in sh emulation mode because bin-zsh starts with "b". Version-Release number of selected component (if applicable): sudo-1.8.6p3-12.el6.x86_64 How reproducible: Always Steps to Reproduce: 1. add %wheel ALL=(ALL) ROLE=unconfined_r TYPE=unconfined_t NOPASSWD: ALL to sudoers (this triggers sesh, without selinux context specified sesh isn't involved) 2. # chsh -s /bin/zsh 3. # usermod -G wheel zshuser 4. [zshuser@rhel6]~% sudo -i Actual results: only # prompt is shown, no zsh specific rc scripts are sourced in sh emulation mode In strace we see: execve("/bin/zsh", ["/bin-zsh"], ... Expected results: [root@rhel62]~# prompt is shown, zsh is launched without emulation In strace we see: execve("/bin/zsh", ["-zsh"], ... Additional info: Reproduces in sudo-1.8.8-1.fc20.x86_64 as well Patch attached
sudo-1.8.11-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/sudo-1.8.11-1.fc20
Package sudo-1.8.11-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing sudo-1.8.11-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-11928/sudo-1.8.11-1.fc20 then log in and leave karma (feedback).
sudo-1.8.11p2-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/sudo-1.8.11p2-1.fc20
sudo-1.8.12-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/sudo-1.8.12-1.fc20
sudo-1.8.12-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.