Re: MoreSCF1.0d3 and root privilege
Re: MoreSCF1.0d3 and root privilege
- Subject: Re: MoreSCF1.0d3 and root privilege
- From: Mike Cohen <email@hidden>
- Date: Thu, 07 Feb 2002 11:52:44 -0500
On 2/7/02 11:37 AM, "Duane Murphy" <email@hidden> wrote:
>
--- At Thu, 7 Feb 2002 08:47:38 -0600, Marc Epard wrote:
>
>
>> This makes everything run as root. This is a bad idea security-wise
>
>> (for example, I wouldn't do it unless your Mac is behind a firewall),
>
>> but it will allow you to debug SCF code in CodeWarrior.
>
>
>
> What I do is a little more involved, but it's more selective and doesn't
>
> require enabling root logins. I log in as my normal account, then when I
>
> want to debug something that needs to run as root, I:
>
>
>
> 1. Quit CodeWarrior if it is already running.
>
>
>
> 2. Open a Terminal window.
>
>
>
> 3. Type sudo -s and hit return. It asks for an admin password and then
>
> gives root access for the rest of the Terminal session. You'll notice the
>
> prompt changes to root# instead of the user you started with. This does not
>
> require enabling the root account for normal logins.
>
>
>
> 4. Launch Codwarrior from the terminal session (all one command):
>
>
>
> /System/Library/Frameworks/Carbon.framework/Versions/A/Support/LaunchCFMApp
>
> '/Development/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior
>
> IDE 4.2.6' &
>
>
>
> You can build this command (specify the path to your CodeWarrior) without
>
> line breaks in a text editor and keep it somewhere you can easily copy and
>
> paste into the terminal or drag it out as a text clipping ready to drag into
>
> the Terminal window. The command runs LaunchCFMApp, telling it to load and
>
> run CodeWarrior, a CFM application. The & on the end tells the Terminal
>
> (shell, actually) not to wait for the app to complete. That way you can
>
> enter more commands if you need to and can close the Terminal window when
>
> you want and CodeWarrior will keep running.
>
>
>
> Since the Terminal session is running as root, CodeWarrior will also be
>
> running as root and when it launches gdb and your app for debugging, they'll
>
> be running as root as well.
>
>
>
> Since you didn't log in as root from the start, apps you launch normally
>
> from the Finder will run under the user you logged in as. Only those apps
>
> you launch directly and indirectly from that Terminal session will have root
>
> access.
>
>
Thanks for the tip Mark. I like this much better and is much safer. I
>
hope to never enable root login on my machine and this makes it ever more
>
possible.
>
Even easier, I have the following aliases in my .cshrc:
alias launch
'/System/Library/Frameworks/Carbon.framework/Versions/A/Support/LaunchCFMApp
\!* &'
alias rlaunch 'sudo
/System/Library/Frameworks/Carbon.framework/Versions/A/Support/LaunchCFMApp
\!* &'
--
[ Mike Cohen |
http://www.macmegasite.com/ ]
[ email@hidden |
http://www.worldbeatplanet.com/ ]
Sound is the same for all the world - Youssou N'dour, "Eyes Open"
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.