Open Systemfile under MacOS X

BlitzMax Forums/BlitzMax Programming/Open Systemfile under MacOS X

MacSven(Posted 2006) [#1]
Ho can i open a Systemfile under MacOS X. I need the root permission. Can someone help me?

as example:

file=OpenFile("/etc/pure-ftpd/pure-ftpd.plist")

If Not file RuntimeError "could not open file openfile.bmx"

While Not Eof(file)
Print ReadLine(file)
Wend
CloseStream file


Dreamora(Posted 2006) [#2]
Start the app as root.


MacSven(Posted 2006) [#3]
Can i do it without starting as root?


Will(Posted 2006) [#4]
Probably not, thats probably one of the core security restrictions in OSX.


Winni(Posted 2006) [#5]
Shouldn't it be possible to fire the authentication dialog from an application? Finder , for example, also asks for the su-password before it performs certain operations.


Dreamora(Posted 2006) [#6]
thats a different approach but not with BM
you would need to rewrite or modify some core parts to do it via sudo calls


Winni(Posted 2006) [#7]
Thanks, Dreamora. Then launching the app via sudo remains the only valid option.