[Policykit-Gnome] Execute programs with privilege

Chang Yu Huang yillkid at gmail.com
Thu Nov 19 02:12:22 PST 2009


Hi All !

I am writing a Gtk+ program, and the flow chart as below.

(1.) I call the polkit_gnome_auth_obtain( ) function to show the
authenticatedialog.
polkit_gnome_auth_obtain(Pk_Action, 0, getpid( ),
(PolKitGnomeAuthCB)Privilege_Gain, NULL, NULL);

(2.) When the users enter the correct password, the callback function
Privilege_Gain(
) will be called.

My problem is:

In the callback function (Privilege_Gain( ) ), I want to close the current
program and open the other one with privilege.
But I'm not sure how to do that. Please guide me the direction of any
person, or give me a simple example.

Best Regard.
Chang Yu Huang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/polkit-devel/attachments/20091119/7183c259/attachment.html 


More information about the polkit-devel mailing list