Unix Programming - Re: puzzle

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > June 2005 > Re: puzzle





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: puzzle
Sherm Pendley

2005-06-14, 7:53 am

SM Ryan <wyrmwif@tango-sierra-oscar-foxtrot-tango.fake.org> writes:

> This short program
>
> #import <AppKit/NSApplication.h>
> int main(int argc, const char * argv[]) {
> [NSApplication sharedApplication];
> return 0;
> }
>
> when compiled and setuid root
>
> chown root daemon
> chmod a+x,u+s daemon
>
> gets on a SIGBUS when run as a daemon (outside of process manager) on
> some systems. Does anybody have any ideas how to deal with this?


Yes: Don't do that. GUI apps don't need root access, and daemons don't
have GUIS.

Factor your app into two parts, a root daemon that does just the bare
minimum task that requires root access to function, and a GUI app that
communicates with it.

sherm--
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com