Hello all,
I am developing a plug-in using Cocoa/Objective c on Leopard. I need to modify a file located in /etc/cups/ppd for example test.ppd by inserting some lines to it.
But fopen call fails because the file belongs to root, instead of user.
Here are the rights to test.ppd file:
-rw-r--r-- 1 root _lp
Every modification I do to this file I do using:
sudo vi test.ppd
So, is it possible to modify it from my plug-in code? Even asking somehow for the root password?
Thank you in advance!
I am developing a plug-in using Cocoa/Objective c on Leopard. I need to modify a file located in /etc/cups/ppd for example test.ppd by inserting some lines to it.
But fopen call fails because the file belongs to root, instead of user.
Here are the rights to test.ppd file:
-rw-r--r-- 1 root _lp
Every modification I do to this file I do using:
sudo vi test.ppd
So, is it possible to modify it from my plug-in code? Even asking somehow for the root password?
Thank you in advance!