View Single Post
  #92  
Old March 22nd 04, 10:03 AM
Dylan Smith
external usenet poster
 
Posts: n/a
Default

In article , David Brooks wrote:
My point is that since under Unix, when email arrives, attachments don't
have the execute bit. They can't. They aren't on the filesystem. You


That's not so. There is nothing stopping an email client from saving the
file, and setting the execute bit, if it finds (say by examining magic
words)


You're right - but the difference is if you are reusing code (which is a
good thing) and use the operating system's API to figure out what to do
with an attached file, under Windows, the OS bits will see ".exe" and
try and run it. The Unix APIs need to see an execute permission on the
filesystem to do the same thing. The attachment won't have it.

Under Windows, you have an Allow, Deny situation. You have to explicitly
code the email client to NOT do the default action. Under Unix you
essentially have a Deny, Allow situation. Therefore, you'd have to write
the client to explicitly ALLOW the thing to execute.

What should a UNIX mail client do when you doubleclick an attachment with a
.sh extension?


Open it in 'vi' of course. It doesn't have the execute bit set.

--
Dylan Smith, Castletown, Isle of Man
Flying: http://www.dylansmith.net
Frontier Elite Universe: http://www.alioth.net
"Maintain thine airspeed, lest the ground come up and smite thee"