Re: osascript, root vs other users
Re: osascript, root vs other users
- Subject: Re: osascript, root vs other users
- From: email@hidden
- Date: Thu, 8 Aug 2002 13:00:47 -0700
Most likely (and this is just a guess), osascript opens applications just
like Finder does, via the "open" command line tool.
This tool used to be able to open as any user by sudo'ing, like you are
trying.
But then a security hole was found. If you opened and quit Terminal, went
to an setuid'd application, and then opened Terminal via the Recent
Applications Menu, Terminal opened as root!
This was no good. Unfortunately, the fix involved patching "open" to always
open apps as the logged-in User.
So yes, this is expected behavior. But no, you can't count on it, because
on some early versions of 10, it'll open as the sudo'd user.
It would require more testing to confirm this, but I think that this
explanation is quite likely.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Seth A. Roby
Scriptwriter Intern
"Life is like an exploded clown. It's really funny until you figure out
what just happened."
James Reynolds
<email@hidden> To: email@hidden
Sent by: cc:
applescript-users-admin@list Subject: osascript, root vs other users
s.apple.com
08/08/2002 12:39 PM
I am executing this command:
sudo osascript -e 'tell application "Internet Explorer" to Activate"
I would think that Internet Explorer would launch as root user, but
no. See output of ps command:
% ps -axo user,command | grep Explorer
root osascript -e tell application "Internet Explorer" to Activate
% ps -axo user,command | grep Explorer
james /Applications/Internet Explorer.app/Contents/MacOS/Internet
Explorer /Applications/Internet Explorer.
I am curious how an osascript command executed by root launches IE as
the current logged in user. Is this something I can rely on always
happening?
--
Thanks,
James Reynolds
University of Utah
Student Computing Labs
email@hidden
801-585-9811
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.