~ubuntu-branches/ubuntu/trusty/libgksu/trusty

« back to all changes in this revision

Viewing changes to docs/xml/libgksu.xml

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2009-03-09 09:24:17 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20090309092417-azxlh0kaad57hhsg
Tags: 2.0.9-1ubuntu1
* New upstream bugfix release
* 09_multihead.patch: updated
* 13_polish_startup.diff: updated
* 20_better_usleep.patch: updated
* 22_increase_gksu_helper_buf.patch: dropped, taken upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
<refname>API Reference</refname>
13
13
<refpurpose>This API provides functions to provide su and sudo functionality to
14
14
its users.</refpurpose>
15
 
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
16
15
</refnamediv>
17
16
 
18
17
<refsynopsisdiv id="libgksu-API-Reference.synopsis" role="synopsis">
23
22
<link linkend="GksuContext">GksuContext</link>*        <link linkend="gksu-context-new">gksu_context_new</link>                    (void);
24
23
<link linkend="void">void</link>                <link linkend="gksu-context-set-user">gksu_context_set_user</link>               (<link linkend="GksuContext">GksuContext</link> *context,
25
24
                                                         <link linkend="gchar">gchar</link> *username);
26
 
const <link linkend="gchar">gchar</link>*        <link linkend="gksu-context-get-user">gksu_context_get_user</link>               (<link linkend="GksuContext">GksuContext</link> *context);
 
25
const <link linkend="gchar">gchar</link> *       <link linkend="gksu-context-get-user">gksu_context_get_user</link>               (<link linkend="GksuContext">GksuContext</link> *context);
27
26
<link linkend="void">void</link>                <link linkend="gksu-context-set-command">gksu_context_set_command</link>            (<link linkend="GksuContext">GksuContext</link> *context,
28
27
                                                         <link linkend="gchar">gchar</link> *command);
29
 
const <link linkend="gchar">gchar</link>*        <link linkend="gksu-context-get-command">gksu_context_get_command</link>            (<link linkend="GksuContext">GksuContext</link> *context);
 
28
const <link linkend="gchar">gchar</link> *       <link linkend="gksu-context-get-command">gksu_context_get_command</link>            (<link linkend="GksuContext">GksuContext</link> *context);
30
29
<link linkend="void">void</link>                <link linkend="gksu-context-set-keep-env">gksu_context_set_keep_env</link>           (<link linkend="GksuContext">GksuContext</link> *context,
31
30
                                                         <link linkend="gboolean">gboolean</link> value);
32
31
<link linkend="gboolean">gboolean</link>            <link linkend="gksu-context-get-keep-env">gksu_context_get_keep_env</link>           (<link linkend="GksuContext">GksuContext</link> *context);
33
 
<link linkend="gchar">gchar</link>*              <link linkend="gksu-context-get-description">gksu_context_get_description</link>        (<link linkend="GksuContext">GksuContext</link> *context);
 
32
<link linkend="gchar">gchar</link> *             <link linkend="gksu-context-get-description">gksu_context_get_description</link>        (<link linkend="GksuContext">GksuContext</link> *context);
34
33
<link linkend="void">void</link>                <link linkend="gksu-context-set-description">gksu_context_set_description</link>        (<link linkend="GksuContext">GksuContext</link> *context,
35
34
                                                         <link linkend="gchar">gchar</link> *description);
36
35
<link linkend="void">void</link>                <link linkend="gksu-context-set-message">gksu_context_set_message</link>            (<link linkend="GksuContext">GksuContext</link> *context,
37
36
                                                         <link linkend="gchar">gchar</link> *message);
38
 
<link linkend="gchar">gchar</link>*              <link linkend="gksu-context-get-message">gksu_context_get_message</link>            (<link linkend="GksuContext">GksuContext</link> *context);
 
37
<link linkend="gchar">gchar</link> *             <link linkend="gksu-context-get-message">gksu_context_get_message</link>            (<link linkend="GksuContext">GksuContext</link> *context);
39
38
<link linkend="void">void</link>                <link linkend="gksu-context-set-login-shell">gksu_context_set_login_shell</link>        (<link linkend="GksuContext">GksuContext</link> *context,
40
39
                                                         <link linkend="gboolean">gboolean</link> value);
41
40
<link linkend="gboolean">gboolean</link>            <link linkend="gksu-context-get-login-shell">gksu_context_get_login_shell</link>        (<link linkend="GksuContext">GksuContext</link> *context);
70
69
                                                         <link linkend="GksuPassNotNeededFunc">GksuPassNotNeededFunc</link> pass_not_needed,
71
70
                                                         <link linkend="gpointer">gpointer</link> pass_not_needed_data,
72
71
                                                         <link linkend="GError">GError</link> **error);
73
 
<link linkend="gchar">gchar</link>*              <link linkend="gksu-ask-password">gksu_ask_password</link>                   (<link linkend="GError">GError</link> **error);
74
 
<link linkend="gchar">gchar</link>*              <link linkend="gksu-ask-password-full">gksu_ask_password_full</link>              (<link linkend="GksuContext">GksuContext</link> *context,
 
72
<link linkend="gchar">gchar</link> *             <link linkend="gksu-ask-password">gksu_ask_password</link>                   (<link linkend="GError">GError</link> **error);
 
73
<link linkend="gchar">gchar</link> *             <link linkend="gksu-ask-password-full">gksu_ask_password_full</link>              (<link linkend="GksuContext">GksuContext</link> *context,
75
74
                                                         <link linkend="gchar">gchar</link> *prompt,
76
75
                                                         <link linkend="GError">GError</link> **error);
77
76
</synopsis>
88
87
<refsect1 id="libgksu-API-Reference.description" role="desc">
89
88
<title role="desc.title">Description</title>
90
89
<para>
91
 
 
92
90
</para>
93
91
</refsect1>
94
92
 
96
94
<title role="details.title">Details</title>
97
95
<refsect2 id="GksuError" role="enum">
98
96
<title>enum GksuError</title>
99
 
<indexterm zone="GksuError"><primary>GksuError</primary></indexterm><programlisting>typedef enum
 
97
<indexterm zone="GksuError"><primary sortas="GksuError">GksuError</primary></indexterm><programlisting>typedef enum
100
98
{
101
99
  GKSU_ERROR_XAUTH,
102
100
  GKSU_ERROR_HELPER,
114
112
} GksuError;
115
113
</programlisting>
116
114
<para>
117
 
 
118
115
</para></refsect2>
119
116
<refsect2 id="gksu-context-new" role="function">
120
117
<title>gksu_context_new ()</title>
121
 
<indexterm zone="gksu-context-new"><primary>gksu_context_new</primary></indexterm><programlisting><link linkend="GksuContext">GksuContext</link>*        gksu_context_new                    (void);</programlisting>
 
118
<indexterm zone="gksu-context-new"><primary sortas="gksu_context_new">gksu_context_new</primary></indexterm><programlisting><link linkend="GksuContext">GksuContext</link>*        gksu_context_new                    (void);</programlisting>
122
119
<para>
123
120
This function should be used when creating a new <link linkend="GksuContext"><type>GksuContext</type></link> to
124
121
pass to gksu_su_full or gksu_sudo_full. The <link linkend="GksuContext"><type>GksuContext</type></link> must be
125
122
freed with gksu_context_free.</para>
126
123
<para>
127
 
 
128
124
</para><variablelist role="params">
129
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated <link linkend="GksuContext"><type>GksuContext</type></link>
 
125
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a newly allocated <link linkend="GksuContext"><type>GksuContext</type></link>
130
126
</simpara></listitem></varlistentry>
131
127
</variablelist></refsect2>
132
128
<refsect2 id="gksu-context-set-user" role="function">
133
129
<title>gksu_context_set_user ()</title>
134
 
<indexterm zone="gksu-context-set-user"><primary>gksu_context_set_user</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_set_user               (<link linkend="GksuContext">GksuContext</link> *context,
 
130
<indexterm zone="gksu-context-set-user"><primary sortas="gksu_context_set_user">gksu_context_set_user</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_set_user               (<link linkend="GksuContext">GksuContext</link> *context,
135
131
                                                         <link linkend="gchar">gchar</link> *username);</programlisting>
136
132
<para>
137
133
Sets up what user the command will be run as. The default
138
134
is root, but you can run the command as any user.</para>
139
135
<para>
140
 
 
141
136
</para><variablelist role="params">
142
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
137
<varlistentry><term><parameter>context</parameter>&#160;:</term>
143
138
<listitem><simpara> the <link linkend="GksuContext"><type>GksuContext</type></link> you want to modify
144
139
</simpara></listitem></varlistentry>
145
 
<varlistentry><term><parameter>username</parameter>&nbsp;:</term>
 
140
<varlistentry><term><parameter>username</parameter>&#160;:</term>
146
141
<listitem><simpara> the target username
147
142
</simpara></listitem></varlistentry>
148
143
</variablelist></refsect2>
149
144
<refsect2 id="gksu-context-get-user" role="function">
150
145
<title>gksu_context_get_user ()</title>
151
 
<indexterm zone="gksu-context-get-user"><primary>gksu_context_get_user</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>*        gksu_context_get_user               (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
 
146
<indexterm zone="gksu-context-get-user"><primary sortas="gksu_context_get_user">gksu_context_get_user</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link> *       gksu_context_get_user               (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
152
147
<para>
153
148
Gets the user the command will be run as, as set
154
149
by gksu_context_set_user.</para>
155
150
<para>
156
 
 
157
151
</para><variablelist role="params">
158
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
152
<varlistentry><term><parameter>context</parameter>&#160;:</term>
159
153
<listitem><simpara> the <link linkend="GksuContext"><type>GksuContext</type></link> from which to grab the information
160
154
</simpara></listitem></varlistentry>
161
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a string with the user or NULL if not set.
 
155
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a string with the user or NULL if not set.
162
156
</simpara></listitem></varlistentry>
163
157
</variablelist></refsect2>
164
158
<refsect2 id="gksu-context-set-command" role="function">
165
159
<title>gksu_context_set_command ()</title>
166
 
<indexterm zone="gksu-context-set-command"><primary>gksu_context_set_command</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_set_command            (<link linkend="GksuContext">GksuContext</link> *context,
 
160
<indexterm zone="gksu-context-set-command"><primary sortas="gksu_context_set_command">gksu_context_set_command</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_set_command            (<link linkend="GksuContext">GksuContext</link> *context,
167
161
                                                         <link linkend="gchar">gchar</link> *command);</programlisting>
168
162
<para>
169
163
Sets up what command will run with the target user.</para>
170
164
<para>
171
 
 
172
165
</para><variablelist role="params">
173
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
166
<varlistentry><term><parameter>context</parameter>&#160;:</term>
174
167
<listitem><simpara> the <link linkend="GksuContext"><type>GksuContext</type></link> you want to modify
175
168
</simpara></listitem></varlistentry>
176
 
<varlistentry><term><parameter>command</parameter>&nbsp;:</term>
 
169
<varlistentry><term><parameter>command</parameter>&#160;:</term>
177
170
<listitem><simpara> the command that shall be ran
178
171
</simpara></listitem></varlistentry>
179
172
</variablelist></refsect2>
180
173
<refsect2 id="gksu-context-get-command" role="function">
181
174
<title>gksu_context_get_command ()</title>
182
 
<indexterm zone="gksu-context-get-command"><primary>gksu_context_get_command</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>*        gksu_context_get_command            (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
 
175
<indexterm zone="gksu-context-get-command"><primary sortas="gksu_context_get_command">gksu_context_get_command</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link> *       gksu_context_get_command            (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
183
176
<para>
184
177
Gets the command that will be run, as set by
185
178
gksu_context_set_command.</para>
186
179
<para>
187
 
 
188
180
</para><variablelist role="params">
189
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
181
<varlistentry><term><parameter>context</parameter>&#160;:</term>
190
182
<listitem><simpara> the <link linkend="GksuContext"><type>GksuContext</type></link> from which to grab the information
191
183
</simpara></listitem></varlistentry>
192
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a string with the command or NULL if not set.
 
184
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a string with the command or NULL if not set.
193
185
</simpara></listitem></varlistentry>
194
186
</variablelist></refsect2>
195
187
<refsect2 id="gksu-context-set-keep-env" role="function">
196
188
<title>gksu_context_set_keep_env ()</title>
197
 
<indexterm zone="gksu-context-set-keep-env"><primary>gksu_context_set_keep_env</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_set_keep_env           (<link linkend="GksuContext">GksuContext</link> *context,
 
189
<indexterm zone="gksu-context-set-keep-env"><primary sortas="gksu_context_set_keep_env">gksu_context_set_keep_env</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_set_keep_env           (<link linkend="GksuContext">GksuContext</link> *context,
198
190
                                                         <link linkend="gboolean">gboolean</link> value);</programlisting>
199
191
<para>
200
192
Should the environment be kept as it is? Defaults to
201
193
TRUE. Notice that setting this to FALSE may cause the
202
194
X authorization stuff to fail.</para>
203
195
<para>
204
 
 
205
196
</para><variablelist role="params">
206
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
197
<varlistentry><term><parameter>context</parameter>&#160;:</term>
207
198
<listitem><simpara> the <link linkend="GksuContext"><type>GksuContext</type></link> you want to modify
208
199
</simpara></listitem></varlistentry>
209
 
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
 
200
<varlistentry><term><parameter>value</parameter>&#160;:</term>
210
201
<listitem><simpara> TRUE or FALSE
211
202
</simpara></listitem></varlistentry>
212
203
</variablelist></refsect2>
213
204
<refsect2 id="gksu-context-get-keep-env" role="function">
214
205
<title>gksu_context_get_keep_env ()</title>
215
 
<indexterm zone="gksu-context-get-keep-env"><primary>gksu_context_get_keep_env</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_context_get_keep_env           (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
 
206
<indexterm zone="gksu-context-get-keep-env"><primary sortas="gksu_context_get_keep_env">gksu_context_get_keep_env</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_context_get_keep_env           (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
216
207
<para>
217
208
Finds out if the environment in which the program will be
218
209
run will be reset.</para>
219
210
<para>
220
 
 
221
211
</para><variablelist role="params">
222
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
212
<varlistentry><term><parameter>context</parameter>&#160;:</term>
223
213
<listitem><simpara> the <link linkend="GksuContext"><type>GksuContext</type></link> from which to grab the information
224
214
</simpara></listitem></varlistentry>
225
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the environment is going to be kept,
 
215
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> TRUE if the environment is going to be kept,
226
216
FALSE otherwise.
227
217
</simpara></listitem></varlistentry>
228
218
</variablelist></refsect2>
229
219
<refsect2 id="gksu-context-get-description" role="function">
230
220
<title>gksu_context_get_description ()</title>
231
 
<indexterm zone="gksu-context-get-description"><primary>gksu_context_get_description</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              gksu_context_get_description        (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
 
221
<indexterm zone="gksu-context-get-description"><primary sortas="gksu_context_get_description">gksu_context_get_description</primary></indexterm><programlisting><link linkend="gchar">gchar</link> *             gksu_context_get_description        (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
232
222
<para>
233
223
Get the description that the window will have when the
234
224
default function for requesting the password is
235
225
called.</para>
236
226
<para>
237
 
 
238
227
</para><variablelist role="params">
239
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
228
<varlistentry><term><parameter>context</parameter>&#160;:</term>
240
229
<listitem><simpara> the <link linkend="GksuContext"><type>GksuContext</type></link> you want to get the description from.
241
230
</simpara></listitem></varlistentry>
242
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a string with the description or NULL if not set.
 
231
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a string with the description or NULL if not set.
243
232
</simpara></listitem></varlistentry>
244
233
</variablelist></refsect2>
245
234
<refsect2 id="gksu-context-set-description" role="function">
246
235
<title>gksu_context_set_description ()</title>
247
 
<indexterm zone="gksu-context-set-description"><primary>gksu_context_set_description</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_set_description        (<link linkend="GksuContext">GksuContext</link> *context,
 
236
<indexterm zone="gksu-context-set-description"><primary sortas="gksu_context_set_description">gksu_context_set_description</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_set_description        (<link linkend="GksuContext">GksuContext</link> *context,
248
237
                                                         <link linkend="gchar">gchar</link> *description);</programlisting>
249
238
<para>
250
239
Set the nice name for the action that is being run that the window
251
240
that asks for the password will have.  This is only meant to be
252
241
used if the default window is used, of course.</para>
253
242
<para>
254
 
 
255
243
</para><variablelist role="params">
256
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
244
<varlistentry><term><parameter>context</parameter>&#160;:</term>
257
245
<listitem><simpara> the <link linkend="GksuContext"><type>GksuContext</type></link> you want to modify
258
246
</simpara></listitem></varlistentry>
259
 
<varlistentry><term><parameter>description</parameter>&nbsp;:</term>
 
247
<varlistentry><term><parameter>description</parameter>&#160;:</term>
260
248
<listitem><simpara> a string to set the description for
261
249
</simpara></listitem></varlistentry>
262
250
</variablelist></refsect2>
263
251
<refsect2 id="gksu-context-set-message" role="function">
264
252
<title>gksu_context_set_message ()</title>
265
 
<indexterm zone="gksu-context-set-message"><primary>gksu_context_set_message</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_set_message            (<link linkend="GksuContext">GksuContext</link> *context,
 
253
<indexterm zone="gksu-context-set-message"><primary sortas="gksu_context_set_message">gksu_context_set_message</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_set_message            (<link linkend="GksuContext">GksuContext</link> *context,
266
254
                                                         <link linkend="gchar">gchar</link> *message);</programlisting>
267
255
<para>
268
256
Set the message that the window that asks for the password will have.
269
257
This is only meant to be used if the default window is used, of course.</para>
270
258
<para>
271
 
 
272
259
</para><variablelist role="params">
273
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
260
<varlistentry><term><parameter>context</parameter>&#160;:</term>
274
261
<listitem><simpara> the <link linkend="GksuContext"><type>GksuContext</type></link> you want to modify
275
262
</simpara></listitem></varlistentry>
276
 
<varlistentry><term><parameter>message</parameter>&nbsp;:</term>
 
263
<varlistentry><term><parameter>message</parameter>&#160;:</term>
277
264
<listitem><simpara> a string to set the message for
278
265
</simpara></listitem></varlistentry>
279
266
</variablelist></refsect2>
280
267
<refsect2 id="gksu-context-get-message" role="function">
281
268
<title>gksu_context_get_message ()</title>
282
 
<indexterm zone="gksu-context-get-message"><primary>gksu_context_get_message</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              gksu_context_get_message            (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
 
269
<indexterm zone="gksu-context-get-message"><primary sortas="gksu_context_get_message">gksu_context_get_message</primary></indexterm><programlisting><link linkend="gchar">gchar</link> *             gksu_context_get_message            (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
283
270
<para>
284
271
Get the message that the window will have when the
285
272
default function for requesting the password is
286
273
called.</para>
287
274
<para>
288
 
 
289
275
</para><variablelist role="params">
290
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
276
<varlistentry><term><parameter>context</parameter>&#160;:</term>
291
277
<listitem><simpara> the <link linkend="GksuContext"><type>GksuContext</type></link> you want to get the message from.
292
278
</simpara></listitem></varlistentry>
293
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a string with the message or NULL if not set.
 
279
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a string with the message or NULL if not set.
294
280
</simpara></listitem></varlistentry>
295
281
</variablelist></refsect2>
296
282
<refsect2 id="gksu-context-set-login-shell" role="function">
297
283
<title>gksu_context_set_login_shell ()</title>
298
 
<indexterm zone="gksu-context-set-login-shell"><primary>gksu_context_set_login_shell</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_set_login_shell        (<link linkend="GksuContext">GksuContext</link> *context,
 
284
<indexterm zone="gksu-context-set-login-shell"><primary sortas="gksu_context_set_login_shell">gksu_context_set_login_shell</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_set_login_shell        (<link linkend="GksuContext">GksuContext</link> *context,
299
285
                                                         <link linkend="gboolean">gboolean</link> value);</programlisting>
300
286
<para>
301
287
Should the shell in which the command will be run be
302
288
a login shell?</para>
303
289
<para>
304
 
 
305
290
</para><variablelist role="params">
306
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
291
<varlistentry><term><parameter>context</parameter>&#160;:</term>
307
292
<listitem><simpara> the <link linkend="GksuContext"><type>GksuContext</type></link> you want to modify
308
293
</simpara></listitem></varlistentry>
309
 
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
 
294
<varlistentry><term><parameter>value</parameter>&#160;:</term>
310
295
<listitem><simpara> TRUE or FALSE
311
296
</simpara></listitem></varlistentry>
312
297
</variablelist></refsect2>
313
298
<refsect2 id="gksu-context-get-login-shell" role="function">
314
299
<title>gksu_context_get_login_shell ()</title>
315
 
<indexterm zone="gksu-context-get-login-shell"><primary>gksu_context_get_login_shell</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_context_get_login_shell        (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
 
300
<indexterm zone="gksu-context-get-login-shell"><primary sortas="gksu_context_get_login_shell">gksu_context_get_login_shell</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_context_get_login_shell        (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
316
301
<para>
317
302
Finds out if the shell created by the underlying su process
318
303
will be a login shell.</para>
319
304
<para>
320
 
 
321
305
</para><variablelist role="params">
322
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
306
<varlistentry><term><parameter>context</parameter>&#160;:</term>
323
307
<listitem><simpara> the <link linkend="GksuContext"><type>GksuContext</type></link> from which to grab the information
324
308
</simpara></listitem></varlistentry>
325
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the shell will be a login shell, FALSE otherwise.
 
309
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> TRUE if the shell will be a login shell, FALSE otherwise.
326
310
</simpara></listitem></varlistentry>
327
311
</variablelist></refsect2>
328
312
<refsect2 id="gksu-context-set-grab" role="function">
329
313
<title>gksu_context_set_grab ()</title>
330
 
<indexterm zone="gksu-context-set-grab"><primary>gksu_context_set_grab</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_set_grab               (<link linkend="GksuContext">GksuContext</link> *context,
 
314
<indexterm zone="gksu-context-set-grab"><primary sortas="gksu_context_set_grab">gksu_context_set_grab</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_set_grab               (<link linkend="GksuContext">GksuContext</link> *context,
331
315
                                                         <link linkend="gboolean">gboolean</link> value);</programlisting>
332
316
<para>
333
 
 
334
317
</para><variablelist role="params">
335
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
318
<varlistentry><term><parameter>context</parameter>&#160;:</term>
336
319
<listitem><simpara>
337
320
</simpara></listitem></varlistentry>
338
 
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
 
321
<varlistentry><term><parameter>value</parameter>&#160;:</term>
339
322
<listitem><simpara>
340
 
 
341
 
 
342
323
</simpara></listitem></varlistentry>
343
324
</variablelist></refsect2>
344
325
<refsect2 id="gksu-context-get-grab" role="function">
345
326
<title>gksu_context_get_grab ()</title>
346
 
<indexterm zone="gksu-context-get-grab"><primary>gksu_context_get_grab</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_context_get_grab               (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
 
327
<indexterm zone="gksu-context-get-grab"><primary sortas="gksu_context_get_grab">gksu_context_get_grab</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_context_get_grab               (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
347
328
<para>
348
329
Returns TRUE if gksu has been asked to do a grab on keyboard and mouse
349
330
when asking for the password.</para>
350
331
<para>
351
 
 
352
332
</para><variablelist role="params">
353
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
333
<varlistentry><term><parameter>context</parameter>&#160;:</term>
354
334
<listitem><simpara> the <link linkend="GksuContext"><type>GksuContext</type></link> you want to ask whether a grab will be done.
355
335
</simpara></listitem></varlistentry>
356
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if yes, FALSE otherwise.
 
336
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> TRUE if yes, FALSE otherwise.
357
337
</simpara></listitem></varlistentry>
358
338
</variablelist></refsect2>
359
339
<refsect2 id="gksu-context-set-debug" role="function">
360
340
<title>gksu_context_set_debug ()</title>
361
 
<indexterm zone="gksu-context-set-debug"><primary>gksu_context_set_debug</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_set_debug              (<link linkend="GksuContext">GksuContext</link> *context,
 
341
<indexterm zone="gksu-context-set-debug"><primary sortas="gksu_context_set_debug">gksu_context_set_debug</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_set_debug              (<link linkend="GksuContext">GksuContext</link> *context,
362
342
                                                         <link linkend="gboolean">gboolean</link> value);</programlisting>
363
343
<para>
364
344
Set up if debuging information should be printed.</para>
365
345
<para>
366
 
 
367
346
</para><variablelist role="params">
368
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
347
<varlistentry><term><parameter>context</parameter>&#160;:</term>
369
348
<listitem><simpara> the <link linkend="GksuContext"><type>GksuContext</type></link> you want to modify
370
349
</simpara></listitem></varlistentry>
371
 
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
 
350
<varlistentry><term><parameter>value</parameter>&#160;:</term>
372
351
<listitem><simpara> TRUE or FALSE
373
352
</simpara></listitem></varlistentry>
374
353
</variablelist></refsect2>
375
354
<refsect2 id="gksu-context-get-debug" role="function">
376
355
<title>gksu_context_get_debug ()</title>
377
 
<indexterm zone="gksu-context-get-debug"><primary>gksu_context_get_debug</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_context_get_debug              (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
 
356
<indexterm zone="gksu-context-get-debug"><primary sortas="gksu_context_get_debug">gksu_context_get_debug</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_context_get_debug              (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
378
357
<para>
379
358
Finds out if the library is configured to print debuging
380
359
information.</para>
381
360
<para>
382
 
 
383
361
</para><variablelist role="params">
384
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
362
<varlistentry><term><parameter>context</parameter>&#160;:</term>
385
363
<listitem><simpara> the <link linkend="GksuContext"><type>GksuContext</type></link> from which to grab the information
386
364
</simpara></listitem></varlistentry>
387
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if it is, FALSE otherwise.
 
365
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> TRUE if it is, FALSE otherwise.
388
366
</simpara></listitem></varlistentry>
389
367
</variablelist></refsect2>
390
368
<refsect2 id="gksu-context-free" role="function">
391
369
<title>gksu_context_free ()</title>
392
 
<indexterm zone="gksu-context-free"><primary>gksu_context_free</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_free                   (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
 
370
<indexterm zone="gksu-context-free"><primary sortas="gksu_context_free">gksu_context_free</primary></indexterm><programlisting><link linkend="void">void</link>                gksu_context_free                   (<link linkend="GksuContext">GksuContext</link> *context);</programlisting>
393
371
<para>
394
372
Frees the given <link linkend="GksuContext"><type>GksuContext</type></link>.</para>
395
373
<para>
396
 
 
397
374
</para><variablelist role="params">
398
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
375
<varlistentry><term><parameter>context</parameter>&#160;:</term>
399
376
<listitem><simpara> the <link linkend="GksuContext"><type>GksuContext</type></link> to be freed.
400
377
</simpara></listitem></varlistentry>
401
378
</variablelist></refsect2>
402
379
<refsect2 id="gksu-run" role="function">
403
380
<title>gksu_run ()</title>
404
 
<indexterm zone="gksu-run"><primary>gksu_run</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_run                            (<link linkend="gchar">gchar</link> *command_line,
 
381
<indexterm zone="gksu-run"><primary sortas="gksu_run">gksu_run</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_run                            (<link linkend="gchar">gchar</link> *command_line,
405
382
                                                         <link linkend="GError">GError</link> **error);</programlisting>
406
383
<para>
407
384
This function is a wrapper for gksu_sudo/gksu_su. It will call one
409
386
behavior for gksu is su or sudo mode. This is the recommended way of
410
387
using the library functionality.</para>
411
388
<para>
412
 
 
413
389
</para><variablelist role="params">
414
 
<varlistentry><term><parameter>command_line</parameter>&nbsp;:</term>
 
390
<varlistentry><term><parameter>command_line</parameter>&#160;:</term>
415
391
<listitem><simpara> the command line that will be executed as other user
416
392
</simpara></listitem></varlistentry>
417
 
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
 
393
<varlistentry><term><parameter>error</parameter>&#160;:</term>
418
394
<listitem><simpara> a <link linkend="GError"><type>GError</type></link> to be set with the error condition, if an error
419
395
happens
420
396
</simpara></listitem></varlistentry>
421
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> FALSE if all went well, TRUE if an error happend.
 
397
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> FALSE if all went well, TRUE if an error happend.
422
398
</simpara></listitem></varlistentry>
423
399
</variablelist></refsect2>
424
400
<refsect2 id="gksu-run-full" role="function">
425
401
<title>gksu_run_full ()</title>
426
 
<indexterm zone="gksu-run-full"><primary>gksu_run_full</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_run_full                       (<link linkend="GksuContext">GksuContext</link> *context,
 
402
<indexterm zone="gksu-run-full"><primary sortas="gksu_run_full">gksu_run_full</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_run_full                       (<link linkend="GksuContext">GksuContext</link> *context,
427
403
                                                         <link linkend="GksuAskPassFunc">GksuAskPassFunc</link> ask_pass,
428
404
                                                         <link linkend="gpointer">gpointer</link> ask_pass_data,
429
405
                                                         <link linkend="GksuPassNotNeededFunc">GksuPassNotNeededFunc</link> pass_not_needed,
430
406
                                                         <link linkend="gpointer">gpointer</link> pass_not_needed_data,
431
407
                                                         <link linkend="GError">GError</link> **error);</programlisting>
432
408
<para>
433
 
This function is a wrapper for gksu_sudo_full/gksu_su_full. It will
434
 
call one of them, depending on the GConf key that defines whether
435
 
the default behavior for gksu is su or sudo mode. This is the
436
 
recommended way of using the library functionality.</para>
 
409
This is a compatibility shim over gksu_run_fuller, which, for
 
410
compatibility reasons, lacks the 'exit_status' argument.</para>
437
411
<para>
438
 
 
439
412
</para><variablelist role="params">
440
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
413
<varlistentry><term><parameter>context</parameter>&#160;:</term>
441
414
<listitem><simpara> a <link linkend="GksuContext"><type>GksuContext</type></link>
442
415
</simpara></listitem></varlistentry>
443
 
<varlistentry><term><parameter>ask_pass</parameter>&nbsp;:</term>
 
416
<varlistentry><term><parameter>ask_pass</parameter>&#160;:</term>
444
417
<listitem><simpara> a <link linkend="GksuAskPassFunc"><type>GksuAskPassFunc</type></link> to be called when the lib determines
445
418
requesting a password is necessary; it may be NULL, in which case
446
419
the standard password request dialog will be used
447
420
</simpara></listitem></varlistentry>
448
 
<varlistentry><term><parameter>ask_pass_data</parameter>&nbsp;:</term>
 
421
<varlistentry><term><parameter>ask_pass_data</parameter>&#160;:</term>
449
422
<listitem><simpara> a <link linkend="gpointer"><type>gpointer</type></link> with user data to be passed to the
450
423
<link linkend="GksuAskPasswordFunc"><type>GksuAskPasswordFunc</type></link>
451
424
</simpara></listitem></varlistentry>
452
 
<varlistentry><term><parameter>pass_not_needed</parameter>&nbsp;:</term>
 
425
<varlistentry><term><parameter>pass_not_needed</parameter>&#160;:</term>
453
426
<listitem><simpara> a <link linkend="GksuPassNotNeededFunc"><type>GksuPassNotNeededFunc</type></link> that will be called
454
427
when the command is being run without the need for requesting
455
428
a password; it will only be called if the display-no-pass-info
456
429
gconf key is enabled; NULL will have the standard dialog be shown
457
430
</simpara></listitem></varlistentry>
458
 
<varlistentry><term><parameter>pass_not_needed_data</parameter>&nbsp;:</term>
 
431
<varlistentry><term><parameter>pass_not_needed_data</parameter>&#160;:</term>
459
432
<listitem><simpara> a <link linkend="gpointer"><type>gpointer</type></link> with the user data to be passed to the
460
433
<link linkend="GksuPasswordNotNeededFunc"><type>GksuPasswordNotNeededFunc</type></link>
461
434
</simpara></listitem></varlistentry>
462
 
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
 
435
<varlistentry><term><parameter>error</parameter>&#160;:</term>
463
436
<listitem><simpara> a <link linkend="GError"><type>GError</type></link> object to be filled with the error code or NULL
464
437
</simpara></listitem></varlistentry>
465
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if all went fine, FALSE if failed
 
438
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> TRUE if all went fine, FALSE if failed
466
439
</simpara></listitem></varlistentry>
467
440
</variablelist></refsect2>
468
441
<refsect2 id="gksu-su" role="function">
469
442
<title>gksu_su ()</title>
470
 
<indexterm zone="gksu-su"><primary>gksu_su</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_su                             (<link linkend="gchar">gchar</link> *command_line,
 
443
<indexterm zone="gksu-su"><primary sortas="gksu_su">gksu_su</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_su                             (<link linkend="gchar">gchar</link> *command_line,
471
444
                                                         <link linkend="GError">GError</link> **error);</programlisting>
472
445
<para>
473
446
This function is a wrapper for gksu_su_run_full. It will call it
475
448
ones being called. A simple <link linkend="GksuContext"><type>GksuContext</type></link> is created to hold the
476
449
user name and the command.</para>
477
450
<para>
478
 
 
479
451
</para><variablelist role="params">
480
 
<varlistentry><term><parameter>command_line</parameter>&nbsp;:</term>
 
452
<varlistentry><term><parameter>command_line</parameter>&#160;:</term>
481
453
<listitem><simpara> the command line that will be executed as other user
482
454
</simpara></listitem></varlistentry>
483
 
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
 
455
<varlistentry><term><parameter>error</parameter>&#160;:</term>
484
456
<listitem><simpara> a <link linkend="GError"><type>GError</type></link> to be set with the error condition, if an error
485
457
happens
486
458
</simpara></listitem></varlistentry>
487
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if all went well, FALSE if an error happend.
 
459
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> TRUE if all went well, FALSE if an error happend.
488
460
</simpara></listitem></varlistentry>
489
461
</variablelist></refsect2>
490
462
<refsect2 id="gksu-su-full" role="function">
491
463
<title>gksu_su_full ()</title>
492
 
<indexterm zone="gksu-su-full"><primary>gksu_su_full</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_su_full                        (<link linkend="GksuContext">GksuContext</link> *context,
 
464
<indexterm zone="gksu-su-full"><primary sortas="gksu_su_full">gksu_su_full</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_su_full                        (<link linkend="GksuContext">GksuContext</link> *context,
493
465
                                                         <link linkend="GksuAskPassFunc">GksuAskPassFunc</link> ask_pass,
494
466
                                                         <link linkend="gpointer">gpointer</link> ask_pass_data,
495
467
                                                         <link linkend="GksuPassNotNeededFunc">GksuPassNotNeededFunc</link> pass_not_needed,
496
468
                                                         <link linkend="gpointer">gpointer</link> pass_not_needed_data,
497
469
                                                         <link linkend="GError">GError</link> **error);</programlisting>
498
470
<para>
499
 
This could be considered one of the main functions in GKSu.
500
 
it is responsible for doing the 'user changing' magic calling
501
 
the <link linkend="GksuAskPassFunc"><type>GksuAskPassFunc</type></link> function to request a password if needed.
502
 
and the <link linkend="GksuPassNotNeededFunc"><type>GksuPassNotNeededFunc</type></link> function if a password won't be
503
 
needed, so the application has the oportunity of warning the user
504
 
what it's doing.
505
 
</para>
506
 
<para>
507
 
This function uses su as backend.</para>
508
 
<para>
509
 
 
 
471
This is a compatibility shim over gksu_su_fuller, which, for
 
472
compatibility reasons, lacks the 'exit_status' argument. You should
 
473
check the documentation for gksu_su_fuller for information about
 
474
the arguments.</para>
 
475
<para>
510
476
</para><variablelist role="params">
511
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
477
<varlistentry><term><parameter>context</parameter>&#160;:</term>
512
478
<listitem><simpara> a <link linkend="GksuContext"><type>GksuContext</type></link>
513
479
</simpara></listitem></varlistentry>
514
 
<varlistentry><term><parameter>ask_pass</parameter>&nbsp;:</term>
 
480
<varlistentry><term><parameter>ask_pass</parameter>&#160;:</term>
515
481
<listitem><simpara> a <link linkend="GksuAskPassFunc"><type>GksuAskPassFunc</type></link> to be called when the lib determines
516
482
requesting a password is necessary; it may be NULL, in which case
517
483
the standard password request dialog will be used
518
484
</simpara></listitem></varlistentry>
519
 
<varlistentry><term><parameter>ask_pass_data</parameter>&nbsp;:</term>
 
485
<varlistentry><term><parameter>ask_pass_data</parameter>&#160;:</term>
520
486
<listitem><simpara> a <link linkend="gpointer"><type>gpointer</type></link> with user data to be passed to the
521
487
<link linkend="GksuAskPasswordFunc"><type>GksuAskPasswordFunc</type></link>
522
488
</simpara></listitem></varlistentry>
523
 
<varlistentry><term><parameter>pass_not_needed</parameter>&nbsp;:</term>
 
489
<varlistentry><term><parameter>pass_not_needed</parameter>&#160;:</term>
524
490
<listitem><simpara> a <link linkend="GksuPassNotNeededFunc"><type>GksuPassNotNeededFunc</type></link> that will be called
525
491
when the command is being run without the need for requesting
526
492
a password; it will only be called if the display-no-pass-info
527
493
gconf key is enabled; NULL will have the standard dialog be shown
528
494
</simpara></listitem></varlistentry>
529
 
<varlistentry><term><parameter>pass_not_needed_data</parameter>&nbsp;:</term>
 
495
<varlistentry><term><parameter>pass_not_needed_data</parameter>&#160;:</term>
530
496
<listitem><simpara> a <link linkend="gpointer"><type>gpointer</type></link> with the user data to be passed to the
531
497
<link linkend="GksuPasswordNotNeededFunc"><type>GksuPasswordNotNeededFunc</type></link>
532
498
</simpara></listitem></varlistentry>
533
 
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
 
499
<varlistentry><term><parameter>error</parameter>&#160;:</term>
534
500
<listitem><simpara> a <link linkend="GError"><type>GError</type></link> object to be filled with the error code or NULL
535
501
</simpara></listitem></varlistentry>
536
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if all went fine, FALSE if failed
 
502
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> TRUE if all went fine, FALSE if failed
537
503
</simpara></listitem></varlistentry>
538
504
</variablelist></refsect2>
539
505
<refsect2 id="gksu-sudo" role="function">
540
506
<title>gksu_sudo ()</title>
541
 
<indexterm zone="gksu-sudo"><primary>gksu_sudo</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_sudo                           (<link linkend="gchar">gchar</link> *command_line,
 
507
<indexterm zone="gksu-sudo"><primary sortas="gksu_sudo">gksu_sudo</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_sudo                           (<link linkend="gchar">gchar</link> *command_line,
542
508
                                                         <link linkend="GError">GError</link> **error);</programlisting>
543
509
<para>
544
510
This function is a wrapper for gksu_sudo_run_full. It will call it
546
512
ones being called. A simple <link linkend="GksuContext"><type>GksuContext</type></link> is created to hold the
547
513
user name and the command.</para>
548
514
<para>
549
 
 
550
515
</para><variablelist role="params">
551
 
<varlistentry><term><parameter>command_line</parameter>&nbsp;:</term>
 
516
<varlistentry><term><parameter>command_line</parameter>&#160;:</term>
552
517
<listitem><simpara> the command line that will be executed as other user
553
518
</simpara></listitem></varlistentry>
554
 
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
 
519
<varlistentry><term><parameter>error</parameter>&#160;:</term>
555
520
<listitem><simpara> a <link linkend="GError"><type>GError</type></link> to be set with the error condition, if an error
556
521
happens
557
522
</simpara></listitem></varlistentry>
558
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if all went well, FALSE if an error happend.
 
523
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> TRUE if all went well, FALSE if an error happend.
559
524
</simpara></listitem></varlistentry>
560
525
</variablelist></refsect2>
561
526
<refsect2 id="gksu-sudo-full" role="function">
562
527
<title>gksu_sudo_full ()</title>
563
 
<indexterm zone="gksu-sudo-full"><primary>gksu_sudo_full</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_sudo_full                      (<link linkend="GksuContext">GksuContext</link> *context,
 
528
<indexterm zone="gksu-sudo-full"><primary sortas="gksu_sudo_full">gksu_sudo_full</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gksu_sudo_full                      (<link linkend="GksuContext">GksuContext</link> *context,
564
529
                                                         <link linkend="GksuAskPassFunc">GksuAskPassFunc</link> ask_pass,
565
530
                                                         <link linkend="gpointer">gpointer</link> ask_pass_data,
566
531
                                                         <link linkend="GksuPassNotNeededFunc">GksuPassNotNeededFunc</link> pass_not_needed,
567
532
                                                         <link linkend="gpointer">gpointer</link> pass_not_needed_data,
568
533
                                                         <link linkend="GError">GError</link> **error);</programlisting>
569
534
<para>
570
 
This could be considered one of the main functions in GKSu.
571
 
it is responsible for doing the 'user changing' magic calling
572
 
the <link linkend="GksuAskPassFunc"><type>GksuAskPassFunc</type></link> function to request a password if needed.
573
 
and the <link linkend="GksuPassNotNeededFunc"><type>GksuPassNotNeededFunc</type></link> function if a password won't be
574
 
needed, so the application has the oportunity of warning the user
575
 
what it's doing.
576
 
</para>
577
 
<para>
578
 
This function uses the sudo backend.</para>
579
 
<para>
580
 
 
 
535
This is a compatibility shim over gksu_sudo_fuller, which, for
 
536
compatibility reasons, lacks the 'exit_status' argument. You should
 
537
check the documentation for gksu_sudo_fuller for information about
 
538
the arguments.</para>
 
539
<para>
581
540
</para><variablelist role="params">
582
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
541
<varlistentry><term><parameter>context</parameter>&#160;:</term>
583
542
<listitem><simpara> a <link linkend="GksuContext"><type>GksuContext</type></link>
584
543
</simpara></listitem></varlistentry>
585
 
<varlistentry><term><parameter>ask_pass</parameter>&nbsp;:</term>
 
544
<varlistentry><term><parameter>ask_pass</parameter>&#160;:</term>
586
545
<listitem><simpara> a <link linkend="GksuAskPassFunc"><type>GksuAskPassFunc</type></link> to be called when the lib determines
587
546
requesting a password is necessary; it may be NULL, in which case
588
547
the standard password request dialog will be used
589
548
</simpara></listitem></varlistentry>
590
 
<varlistentry><term><parameter>ask_pass_data</parameter>&nbsp;:</term>
 
549
<varlistentry><term><parameter>ask_pass_data</parameter>&#160;:</term>
591
550
<listitem><simpara> a <link linkend="gpointer"><type>gpointer</type></link> with user data to be passed to the
592
551
<link linkend="GksuAskPasswordFunc"><type>GksuAskPasswordFunc</type></link>
593
552
</simpara></listitem></varlistentry>
594
 
<varlistentry><term><parameter>pass_not_needed</parameter>&nbsp;:</term>
 
553
<varlistentry><term><parameter>pass_not_needed</parameter>&#160;:</term>
595
554
<listitem><simpara> a <link linkend="GksuPassNotNeededFunc"><type>GksuPassNotNeededFunc</type></link> that will be called
596
555
when the command is being run without the need for requesting
597
556
a password; it will only be called if the display-no-pass-info
598
557
gconf key is enabled; NULL will have the standard dialog be shown
599
558
</simpara></listitem></varlistentry>
600
 
<varlistentry><term><parameter>pass_not_needed_data</parameter>&nbsp;:</term>
 
559
<varlistentry><term><parameter>pass_not_needed_data</parameter>&#160;:</term>
601
560
<listitem><simpara> a <link linkend="gpointer"><type>gpointer</type></link> with the user data to be passed to the
602
561
<link linkend="GksuPasswordNotNeededFunc"><type>GksuPasswordNotNeededFunc</type></link>
603
562
</simpara></listitem></varlistentry>
604
 
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
 
563
<varlistentry><term><parameter>error</parameter>&#160;:</term>
605
564
<listitem><simpara> a <link linkend="GError"><type>GError</type></link> object to be filled with the error code or NULL
606
565
</simpara></listitem></varlistentry>
607
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if all went fine, FALSE if failed
 
566
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> TRUE if all went fine, FALSE if failed
608
567
</simpara></listitem></varlistentry>
609
568
</variablelist></refsect2>
610
569
<refsect2 id="gksu-ask-password" role="function">
611
570
<title>gksu_ask_password ()</title>
612
 
<indexterm zone="gksu-ask-password"><primary>gksu_ask_password</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              gksu_ask_password                   (<link linkend="GError">GError</link> **error);</programlisting>
 
571
<indexterm zone="gksu-ask-password"><primary sortas="gksu_ask_password">gksu_ask_password</primary></indexterm><programlisting><link linkend="gchar">gchar</link> *             gksu_ask_password                   (<link linkend="GError">GError</link> **error);</programlisting>
613
572
<para>
614
573
This function uses the gksu infra-structure to request for a
615
574
password, but instead of passing it to su or sudo to run a command
616
575
it simply returns the password. This is just a convenience wrapper
617
576
for gksu_ask_password_full.</para>
618
577
<para>
619
 
 
620
578
</para><variablelist role="params">
621
 
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
 
579
<varlistentry><term><parameter>error</parameter>&#160;:</term>
622
580
<listitem><simpara> a <link linkend="GError"><type>GError</type></link> to be set with the error condition, if an error
623
581
happens
624
582
</simpara></listitem></varlistentry>
625
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated string with the password;
 
583
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a newly allocated string with the password;
626
584
</simpara></listitem></varlistentry>
627
585
</variablelist></refsect2>
628
586
<refsect2 id="gksu-ask-password-full" role="function">
629
587
<title>gksu_ask_password_full ()</title>
630
 
<indexterm zone="gksu-ask-password-full"><primary>gksu_ask_password_full</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              gksu_ask_password_full              (<link linkend="GksuContext">GksuContext</link> *context,
 
588
<indexterm zone="gksu-ask-password-full"><primary sortas="gksu_ask_password_full">gksu_ask_password_full</primary></indexterm><programlisting><link linkend="gchar">gchar</link> *             gksu_ask_password_full              (<link linkend="GksuContext">GksuContext</link> *context,
631
589
                                                         <link linkend="gchar">gchar</link> *prompt,
632
590
                                                         <link linkend="GError">GError</link> **error);</programlisting>
633
591
<para>
635
593
password, but instead of passing it to su or sudo to run a command
636
594
it simply returns the password.</para>
637
595
<para>
638
 
 
639
596
</para><variablelist role="params">
640
 
<varlistentry><term><parameter>context</parameter>&nbsp;:</term>
 
597
<varlistentry><term><parameter>context</parameter>&#160;:</term>
641
598
<listitem><simpara> a <link linkend="GksuContext"><type>GksuContext</type></link>
642
599
</simpara></listitem></varlistentry>
643
 
<varlistentry><term><parameter>prompt</parameter>&nbsp;:</term>
 
600
<varlistentry><term><parameter>prompt</parameter>&#160;:</term>
644
601
<listitem><simpara> a prompt different from Password:
645
602
</simpara></listitem></varlistentry>
646
 
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
 
603
<varlistentry><term><parameter>error</parameter>&#160;:</term>
647
604
<listitem><simpara> a <link linkend="GError"><type>GError</type></link> object to be filled with the error code or NULL
648
605
</simpara></listitem></varlistentry>
649
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated string with the password;
 
606
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a newly allocated string with the password;
650
607
</simpara></listitem></varlistentry>
651
608
</variablelist></refsect2>
652
609