Bugzilla – Bug 779874
Compiled ksh93 shell code not executable
Last modified: 2020-06-04 12:32:09 UTC
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111216 Firefox/9.0 SeaMonkey/2.6 On Solaris 11 it is possible to execute compiled shell code directly, e.g. % echo "print hello" >xxx.sh % shcomp xxx.sh xxx % chmod a+x xxx % ./xxx hello It turns out this is a one line entry for Linux, as described in http://www.mail-archive.com/ast-users@research.att.com/msg01730.html ######################## On Linux you can do this: -- snip -- echo ':shbinexec:M::\x0b\x13\x08:\xff\xff\xff:/usr/bin/ksh93:O' > /proc/sys/fs/binfmt_misc/register -- snip -- After this point all compiled shell scripts (even those with only the exec bit but not the read bit set) can be executed directly. ######################## Reproducible: Always Steps to Reproduce: 1.See description 2. 3. This feature is needed to port applications from Solaris to Suse. Thank you.
Anyone? Klara? This should be *simple* to fix. One single-line entry in whatever configures binfmt_misc at system startup.
One year later. Customer still unhappy.
(In reply to comment #1) > Anyone? Klara? This should be *simple* to fix. One single-line entry in > whatever configures binfmt_misc at system startup. It's the matter of proper configuration and I don't think it is a reasonable system default. All you need to do (guessing your 12.2 system runs systemd) echo ':shbinexec:M::\x0b\x13\x08:\xff\xff\xff:/usr/bin/ksh93:O' /etc/binfmt.d/ksh93.conf systemctl enable systemd-binfmt.service systemctl start systemd-binfmt.service and that's it. @coolo: do you have an idea who shall be an assignee for such feature request?
upps, missing redirection echo ':shbinexec:M::\x0b\x13\x08:\xff\xff\xff:/usr/bin/ksh93:O' > /etc/binfmt.d/ksh93.conf
I assume that coolo has changed the infoprovider to answer comment 3 - but I only know for the Enterprise products how to file such a request. Use the fate.suse.com tool to file the feature request for openSUSE, for Enterprise products you can do so there, too, but better go through productmanagement.
Another four years have passed and ksh has receded further into history. openSUSE 12.2 is out of maintenance; changing product to Tumbleweed.
Reassigning to the right maintainer would be a good start. As a matter of fact, there is *no* package in current Leap registering a binfmt_misc handler. Things like java or wine also need to be manually started. So this would be something new. Tumbleweed does have a java-binfmt-misc package.
(In reply to Michal Marek from comment #8) > Reassigning to the right maintainer would be a good start. Indeed
Beside this: I in doubt that the ksh maintainer is responsible for this. This looks more like a configuration problem
Interesting .. there is a /bin/ksh93 but no /usr/bin/ksh93 OK ... getting root, doing echo ':kshbinexe:M::\x0b\x13\x08::/bin/ksh93:' > \ /proc/sys/fs/binfmt_misc/register now normal user doing /tmp> echo 'print hello' > xxx.sh /tmp> shcomp xxx.sh xxx /tmp> ksh93 ./xxx hello /tmp> chmod a+x xxx /tmp> xxx hello ... works!