Re: IT IS A BUG -- Re: Strangeness when binary executable overwritten by text -- bug or feature?
On 2018-11-05, Greg Wooledge wrote: > > In this case, he probably "told it to run in a terminal", and whether > the terminal uses a login shell or not is irrelevant. The fact that > now it's running the program inside a terminal (or possibly a terminal > plus a shell), instead of directly executing the program within an X11 > session but outside of a terminal, is what causes the changed behavior. So this comes down to him running the vitiated program from a terminal and therefore getting an error message (rather than dead silence) of some sort (like, "Ouch, you clumsy brute, think I got prepended by a man page and became inoperable") and believes this should be the default behavior when running any and all programs/executables from his file manager. > See my previous message in this thread for a discussion of the treatment > of ENOEXEC by various shells and non-shell programs. > > It would be helpful if we knew *which* GUI launcher was in use. Someone > may know precisely how it operates, so we could avoid guesswork and > assumptions. I think he did mention Caja at one point. > Also remember to whom you're responding here. Richard Owlett has quite > a reputation on this list, and some research into his past threads might > be informative. > > -- “If a person is not talented enough to be a novelist, not smart enough to be a lawyer, and his hands are too shaky to perform operations, he becomes a journalist.” --Norman Mailer
Re: IT IS A BUG -- Re: Strangeness when binary executable overwritten by text -- bug or feature?
On Mon, Nov 05, 2018 at 12:31:11PM +, Andy Smith wrote: > - You have a launcher file that references an executable. In normal > cases calling the launcher from your desktop environment (I don't > know if this is by menu or button or something else) causes the > binary to run. I'm assuming it is a command line binary and you've > told it to run in a terminal, so, the expected result is a > terminal window with this program running in it. I would not assume that he "told it to run in a terminal". I would in fact assume the exact opposite. > - You told the launcher to run a terminal with a login shell and now > it does do something to indicate there was a failure of the > binary. In this case, he probably "told it to run in a terminal", and whether the terminal uses a login shell or not is irrelevant. The fact that now it's running the program inside a terminal (or possibly a terminal plus a shell), instead of directly executing the program within an X11 session but outside of a terminal, is what causes the changed behavior. See my previous message in this thread for a discussion of the treatment of ENOEXEC by various shells and non-shell programs. It would be helpful if we knew *which* GUI launcher was in use. Someone may know precisely how it operates, so we could avoid guesswork and assumptions. Also remember to whom you're responding here. Richard Owlett has quite a reputation on this list, and some research into his past threads might be informative.
Re: IT IS A BUG -- Re: Strangeness when binary executable overwritten by text -- bug or feature?
Hello, On Mon, Nov 05, 2018 at 06:18:17AM -0600, Richard Owlett wrote: > On 11/04/2018 07:34 AM, Andy Smith wrote: > >I don't think the login shell setting has anything to do with it. > > You obviously could not be bothered trying it! I don't run any of the same software as you so it would be a lot of work to try this out. I'm only trying to help you file the right bug against the right software, but if that is not welcome just say so and I am happy to leave you to it. If I understand correctly: - You have a launcher file that references an executable. In normal cases calling the launcher from your desktop environment (I don't know if this is by menu or button or something else) causes the binary to run. I'm assuming it is a command line binary and you've told it to run in a terminal, so, the expected result is a terminal window with this program running in it. - You accidentally overwrote the binary with the textual output of "man" resulting in a file which was still marked executable but was not a valid Linux binary or script. - Now when you call the launcher there is no visual feedback to indicate that there was a problem. - You told the launcher to run a terminal with a login shell and now it does do something to indicate there was a failure of the binary. - You therefore conclude that every launcher which uses a terminal should default to using a login shell and wish to file a bug to that effect. I'm expressing disbelief that the terminal using a login shell is what is making the difference, but you weren't clear about what the difference actually is. So, assuming I understand the situation (as above), what is the actual difference in behaviour when you run this corrupt binary from a launcher that is set to terminal+login as opposed to just terminal? Cheers, Andy -- https://bitfolk.com/ -- No-nonsense VPS hosting "I remember the first time I made love. Perhaps it was not love exactly but I made it and it still works." — The League Against Tedium
Re: IT IS A BUG -- Re: Strangeness when binary executable overwritten by text -- bug or feature?
On 11/04/2018 07:34 AM, Andy Smith wrote: On Sun, Nov 04, 2018 at 07:24:04AM -0600, Richard Owlett wrote: Turns out there was a *YUCKY* choice for a default setting. In the default profile for mate-terminal there is a choice titled "Run command as a login shell". The option is *not* enabled. That makes the choice "given"(sic) by Caja of "Run in terminal" and "Run" moot. I don't think the login shell setting has anything to do with it. You obviously could not be bothered trying it!
Re: IT IS A BUG -- Re: Strangeness when binary executable overwritten by text -- bug or feature?
On Sun, Nov 04, 2018 at 07:24:04AM -0600, Richard Owlett wrote: > Turns out there was a *YUCKY* choice for a default setting. > In the default profile for mate-terminal there is a choice titled >"Run command as a login shell". > The option is *not* enabled. > > That makes the choice "given"(sic) by Caja of >"Run in terminal" > and >"Run" > moot. I think your real issue here is that whatever this GUI launcher is, it does nothing visible when told to launch an executable file that is not a valid binary. It may have spewed some error into some log file, but did not pop up a dialog saying "That isn't a valid binary" or whatever. I don't think that you would get different results no matter what setting you had for running terminals as login or not. So if it bothers you that trying to execute garbage produces no visible feedback, I think that is the bug you should file. I don't think the login shell setting has anything to do with it. I can't see why whether it is a login shell or not has any bearing on what happens when the system tries to execute a file of junk. $ dd if=/dev/urandom bs=1k count=100 of=/tmp/foo 100+0 records in 100+0 records out 102400 bytes (102 kB) copied, 0.0142731 s, 7.2 MB/s $ chmod -c +x /tmp/foo mode of ‘/tmp/foo’ changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x) $ /tmp/foo /tmp/foo: line 10: syntax error near unexpected token `(' bfooB�B��A�>O���g� [j%�9̋Ov��g��í�<���ᲾU��9hj�y3j��(�c5�S��S]Ub���l��)�xdƁU]D�Hho{�v�z� �=}3�� (���;g�:5��o���a\Yg��/�┘ˬ�R�L┬�·��*→·V&���d6TEeC/�ܨ�A�⎺�)/S���;O]Pڣ��⎼K���G┤�*ɾ%�π�!ĵ�5_";S��] c�$ N≠·(&%↓Z�V�│���L⎻/─�┌��7�ݢ≤←b���\ʿ┬:���*2��˸�ٜ���⎼>@'M[�;�K�⎺HL≤�ʠ ���→X@�;�πO$⎽@┴��≥⎺�C9π"≠�)8�⎼�R���)π�b�ߨ�┌π��/��Ѝ│ج� ┌���S(�↓⎺��▒�┌�◆ꍺ)H?#┘≥?�E_#��O#���1Џ�_�,̆ *ׅM� J*�c��%�==�KI��KH��GL≥$≤�=�!▮⎼�R�6�װ��UZ�m��d�'1Dsy"}R�)G ��q=[|�5C-M]2 0��!ԧG=q�j�hj' $ Cheers, Andy -- https://bitfolk.com/ -- No-nonsense VPS hosting
IT IS A BUG -- Re: Strangeness when binary executable overwritten by text -- bug or feature?
On 10/31/2018 09:14 AM, Richard Owlett wrote: Debian 9.1 with MATE installed from DVD set. Due a non-reproducible sequence of events, a binary executable was over written by the contents of a man page in pure text format. For unknown reason, the resulting file was tagged as executable. A custom MATE launcher pointed the corrupted file. When the launcher icon was clicked there was no response whatsoever. Including *NO ERROR MESSAGE* Is this a bug or a feature? If a feature, why? Turns out there was a *YUCKY* choice for a default setting. In the default profile for mate-terminal there is a choice titled "Run command as a login shell". The option is *not* enabled. That makes the choice "given"(sic) by Caja of "Run in terminal" and "Run" moot. I consider this a Debian, not Upstream, bug as each distro should be responsible for choosing their defaults. Please contact me offline if you are willing to help a first time bug reporter. TIA