~ubuntu-branches/ubuntu/quantal/libgksu1.2/quantal

« back to all changes in this revision

Viewing changes to docs/html/libgksu12-GksuContext.html

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2005-11-10 22:41:26 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051110224126-qas4smtk4w5gcgfr
Tags: 1.3.6-1ubuntu1
merged with debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>GksuContext - run programs as other users with su or sudo</title><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="index.html" title="LibGKSu Reference Manual"><link rel="up" href="ch01.html" title="Main Reference"><link rel="prev" href="ch01.html" title="Main Reference"><meta name="generator" content="GTK-Doc V1.3 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="chapter" href="ch01.html" title="Main Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">LibGKSu Reference Manual</th></tr></table><div class="refentry" lang="en"><a name="libgksu12-GksuContext"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><span class="refentrytitle">GksuContext - run programs as other users with su or sudo</span></h2><p>GksuContext - run programs as other users with su or sudo &#8212; Handler that contains all the necessary information for a 
2
 
program to be run by the libgksu library.</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
 
1
<html>
 
2
<head>
 
3
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 
4
<title>GksuContext - run programs as other users with su or sudo</title>
 
5
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
 
6
<link rel="start" href="index.html" title="LibGKSu Reference Manual">
 
7
<link rel="up" href="ch01.html" title="Main Reference">
 
8
<link rel="prev" href="ch01.html" title="Main Reference">
 
9
<meta name="generator" content="GTK-Doc V1.4 (XML mode)">
 
10
<link rel="stylesheet" href="style.css" type="text/css">
 
11
<link rel="chapter" href="ch01.html" title="Main Reference">
 
12
</head>
 
13
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
14
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
 
15
<td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
16
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
17
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
18
<th width="100%" align="center">LibGKSu Reference Manual</th>
 
19
</tr></table>
 
20
<div class="refentry" lang="en">
 
21
<a name="libgksu12-GksuContext"></a><div class="titlepage"></div>
 
22
<div class="refnamediv"><table width="100%"><tr>
 
23
<td valign="top">
 
24
<h2><span class="refentrytitle">GksuContext - run programs as other users with su or sudo</span></h2>
 
25
<p>GksuContext - run programs as other users with su or sudo &#8212; Handler that contains all the necessary information for a 
 
26
program to be run by the libgksu library.</p>
 
27
</td>
 
28
<td valign="top" align="right"></td>
 
29
</tr></table></div>
 
30
<div class="refsynopsisdiv">
 
31
<h2>Synopsis</h2>
 
32
<pre class="synopsis">
3
33
 
4
34
 
5
35
 
27
57
void        <a href="libgksu12-GksuContext.html#gksu-context-set-ssh-fwd">gksu_context_set_ssh_fwd</a>        (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
28
58
                                             gboolean value);
29
59
gboolean    <a href="libgksu12-GksuContext.html#gksu-context-get-ssh-fwd">gksu_context_get_ssh_fwd</a>        (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);
 
60
gboolean    <a href="libgksu12-GksuContext.html#gksu-context-sudo-try-need-password">gksu_context_sudo_try_need_password</a>
 
61
                                            (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);
30
62
gboolean    <a href="libgksu12-GksuContext.html#gksu-context-try-need-password">gksu_context_try_need_password</a>  (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);
 
63
gboolean    <a href="libgksu12-GksuContext.html#gksu-context-run-full">gksu_context_run_full</a>           (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
 
64
                                             GksuAskPasswordFunc ask_pass,
 
65
                                             gpointer user_data,
 
66
                                             GksuPasswordNotNeededFunc pass_not_needed,
 
67
                                             gpointer pnn_user_data,
 
68
                                             GError **error);
31
69
gboolean    <a href="libgksu12-GksuContext.html#gksu-context-run">gksu_context_run</a>                (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
32
70
                                             GError **error);
 
71
gboolean    <a href="libgksu12-GksuContext.html#gksu-context-sudo-run-full">gksu_context_sudo_run_full</a>      (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
 
72
                                             GksuAskPasswordFunc ask_pass,
 
73
                                             gpointer user_data,
 
74
                                             GksuPasswordNotNeededFunc pass_not_needed,
 
75
                                             gpointer pnn_user_data,
 
76
                                             GError **error);
33
77
gboolean    <a href="libgksu12-GksuContext.html#gksu-context-sudo-run">gksu_context_sudo_run</a>           (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
34
78
                                             GError **error);
35
 
</pre></div><div class="refsect1" lang="en"><a name="id2553918"></a><h2>Description</h2><p>
 
79
</pre>
 
80
</div>
 
81
<div class="refsect1" lang="en">
 
82
<a name="id2534208"></a><h2>Description</h2>
 
83
<p>
36
84
Everything that is done by libgksu needs to know a lot of stuff
37
85
about what to run, as what user to run and some more information,
38
86
as X authentication information and such. All that information is
39
87
contained in a GksuContext.
40
 
</p></div><div class="refsect1" lang="en"><a name="id2553932"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2553937"></a><h3><a name="GksuContext"></a>GksuContext</h3><a class="indexterm" name="id2553945"></a><pre class="programlisting">typedef struct {
 
88
</p>
 
89
</div>
 
90
<div class="refsect1" lang="en">
 
91
<a name="id2534223"></a><h2>Details</h2>
 
92
<div class="refsect2" lang="en">
 
93
<a name="id2534229"></a><h3>
 
94
<a name="GksuContext"></a>GksuContext</h3>
 
95
<a class="indexterm" name="id2534239"></a><pre class="programlisting">typedef struct {
41
96
  GObject parent;
42
97
 
43
98
  gchar *xauth;
55
110
  gboolean debug;
56
111
  gboolean ssh_fwd;
57
112
} GksuContext;
58
 
</pre><p>
 
113
</pre>
 
114
<p>
59
115
Object that holds all configuration information, some
60
116
important environment variables and some meta-information
61
 
about mainly x authentication.</p><p>
 
117
about mainly x authentication.</p>
 
118
<p>
62
119
 
63
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term">GObject�<em class="structfield"><code>parent</code></em>;</span></td><td> <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> is based on <span class="type">GObject</span>
64
 
</td></tr><tr><td><span class="term">gchar�*<em class="structfield"><code>xauth</code></em>;</span></td><td> the X authorization token
65
 
</td></tr><tr><td><span class="term">gchar�*<em class="structfield"><code>dir</code></em>;</span></td><td> the directory where the .Xauthority file is created in sudo
 
120
</p>
 
121
<div class="variablelist"><table border="0">
 
122
<col align="left" valign="top">
 
123
<tbody>
 
124
<tr>
 
125
<td>
 
126
<span class="term">GObject&#160;<em class="structfield"><code>parent</code></em>;</span></td>
 
127
<td> <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> is based on <span class="type">GObject</span>
 
128
</td>
 
129
</tr>
 
130
<tr>
 
131
<td>
 
132
<span class="term">gchar&#160;*<em class="structfield"><code>xauth</code></em>;</span></td>
 
133
<td> the X authorization token
 
134
</td>
 
135
</tr>
 
136
<tr>
 
137
<td>
 
138
<span class="term">gchar&#160;*<em class="structfield"><code>dir</code></em>;</span></td>
 
139
<td> the directory where the .Xauthority file is created in sudo
66
140
mode
67
 
</td></tr><tr><td><span class="term">gchar�*<em class="structfield"><code>display</code></em>;</span></td><td> storage for the DISPLAY environment variable
68
 
</td></tr><tr><td><span class="term">gchar�*<em class="structfield"><code>user</code></em>;</span></td><td> user gksu will switch to
69
 
</td></tr><tr><td><span class="term">gchar�*<em class="structfield"><code>password</code></em>;</span></td><td> the password that should be passed to su or sudo
70
 
</td></tr><tr><td><span class="term">gchar�*<em class="structfield"><code>command</code></em>;</span></td><td> which command to run with su
71
 
</td></tr><tr><td><span class="term">gboolean�<em class="structfield"><code>login_shell</code></em>;</span></td><td> should run a login shell?
72
 
</td></tr><tr><td><span class="term">gboolean�<em class="structfield"><code>keep_env</code></em>;</span></td><td> should the current environment be kept?
73
 
</td></tr><tr><td><span class="term">gboolean�<em class="structfield"><code>debug</code></em>;</span></td><td> show debug information?
74
 
</td></tr><tr><td><span class="term">gboolean�<em class="structfield"><code>ssh_fwd</code></em>;</span></td><td> are we running inside a ssh X11 forwarding
 
141
</td>
 
142
</tr>
 
143
<tr>
 
144
<td>
 
145
<span class="term">gchar&#160;*<em class="structfield"><code>display</code></em>;</span></td>
 
146
<td> storage for the DISPLAY environment variable
 
147
</td>
 
148
</tr>
 
149
<tr>
 
150
<td>
 
151
<span class="term">gchar&#160;*<em class="structfield"><code>user</code></em>;</span></td>
 
152
<td> user gksu will switch to
 
153
</td>
 
154
</tr>
 
155
<tr>
 
156
<td>
 
157
<span class="term">gchar&#160;*<em class="structfield"><code>password</code></em>;</span></td>
 
158
<td> the password that should be passed to su or sudo
 
159
</td>
 
160
</tr>
 
161
<tr>
 
162
<td>
 
163
<span class="term">gchar&#160;*<em class="structfield"><code>command</code></em>;</span></td>
 
164
<td> which command to run with su
 
165
</td>
 
166
</tr>
 
167
<tr>
 
168
<td>
 
169
<span class="term">gboolean&#160;<em class="structfield"><code>login_shell</code></em>;</span></td>
 
170
<td> should run a login shell?
 
171
</td>
 
172
</tr>
 
173
<tr>
 
174
<td>
 
175
<span class="term">gboolean&#160;<em class="structfield"><code>keep_env</code></em>;</span></td>
 
176
<td> should the current environment be kept?
 
177
</td>
 
178
</tr>
 
179
<tr>
 
180
<td>
 
181
<span class="term">gboolean&#160;<em class="structfield"><code>debug</code></em>;</span></td>
 
182
<td> show debug information?
 
183
</td>
 
184
</tr>
 
185
<tr>
 
186
<td>
 
187
<span class="term">gboolean&#160;<em class="structfield"><code>ssh_fwd</code></em>;</span></td>
 
188
<td> are we running inside a ssh X11 forwarding
75
189
tunnel?
76
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2471669"></a><h3><a name="gksu-context-new"></a>gksu_context_new ()</h3><a class="indexterm" name="id2471677"></a><pre class="programlisting"><a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a>* gksu_context_new               ();</pre><p>
 
190
</td>
 
191
</tr>
 
192
</tbody>
 
193
</table></div>
 
194
</div>
 
195
<hr>
 
196
<div class="refsect2" lang="en">
 
197
<a name="id2469818"></a><h3>
 
198
<a name="gksu-context-new"></a>gksu_context_new ()</h3>
 
199
<a class="indexterm" name="id2469828"></a><pre class="programlisting"><a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a>* gksu_context_new               ();</pre>
 
200
<p>
77
201
Creates a new context to use gksu with. You must
78
202
manually free the context with gksu_context_free
79
 
after use.</p><p>
80
 
 
81
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> a new <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>.
82
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2471716"></a><h3><a name="gksu-context-free"></a>gksu_context_free ()</h3><a class="indexterm" name="id2471724"></a><pre class="programlisting">void        gksu_context_free               (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
83
 
Frees the provided <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>.</p><p>
84
 
 
85
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> to be freed.
86
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2471774"></a><h3><a name="gksu-context-set-user"></a>gksu_context_set_user ()</h3><a class="indexterm" name="id2471782"></a><pre class="programlisting">void        gksu_context_set_user           (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
87
 
                                             gchar *username);</pre><p>
 
203
after use.</p>
 
204
<p>
 
205
 
 
206
</p>
 
207
<div class="variablelist"><table border="0">
 
208
<col align="left" valign="top">
 
209
<tbody><tr>
 
210
<td>
 
211
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
212
<td> a new <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>.
 
213
</td>
 
214
</tr></tbody>
 
215
</table></div>
 
216
</div>
 
217
<hr>
 
218
<div class="refsect2" lang="en">
 
219
<a name="id2558889"></a><h3>
 
220
<a name="gksu-context-free"></a>gksu_context_free ()</h3>
 
221
<a class="indexterm" name="id2558898"></a><pre class="programlisting">void        gksu_context_free               (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
 
222
<p>
 
223
Frees the provided <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>.</p>
 
224
<p>
 
225
 
 
226
</p>
 
227
<div class="variablelist"><table border="0">
 
228
<col align="left" valign="top">
 
229
<tbody><tr>
 
230
<td>
 
231
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
232
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> to be freed.
 
233
</td>
 
234
</tr></tbody>
 
235
</table></div>
 
236
</div>
 
237
<hr>
 
238
<div class="refsect2" lang="en">
 
239
<a name="id2558953"></a><h3>
 
240
<a name="gksu-context-set-user"></a>gksu_context_set_user ()</h3>
 
241
<a class="indexterm" name="id2558962"></a><pre class="programlisting">void        gksu_context_set_user           (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
 
242
                                             gchar *username);</pre>
 
243
<p>
88
244
Sets up what user the command will be run as. The default
89
 
is root, but you can run the command as any user.</p><p>
 
245
is root, but you can run the command as any user.</p>
 
246
<p>
90
247
 
91
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
92
 
</td></tr><tr><td><span class="term"><em class="parameter"><code>username</code></em>�:</span></td><td> the target username
93
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2471844"></a><h3><a name="gksu-context-get-user"></a>gksu_context_get_user ()</h3><a class="indexterm" name="id2471853"></a><pre class="programlisting">const gchar* gksu_context_get_user          (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
 
248
</p>
 
249
<div class="variablelist"><table border="0">
 
250
<col align="left" valign="top">
 
251
<tbody>
 
252
<tr>
 
253
<td>
 
254
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
255
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
 
256
</td>
 
257
</tr>
 
258
<tr>
 
259
<td>
 
260
<span class="term"><em class="parameter"><code>username</code></em>&#160;:</span></td>
 
261
<td> the target username
 
262
</td>
 
263
</tr>
 
264
</tbody>
 
265
</table></div>
 
266
</div>
 
267
<hr>
 
268
<div class="refsect2" lang="en">
 
269
<a name="id2559033"></a><h3>
 
270
<a name="gksu-context-get-user"></a>gksu_context_get_user ()</h3>
 
271
<a class="indexterm" name="id2559042"></a><pre class="programlisting">const gchar* gksu_context_get_user          (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
 
272
<p>
94
273
Gets the user the command will be run as, as set 
95
 
by gksu_context_set_user.</p><p>
96
 
 
97
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
98
 
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> a pointer to the string containing the username.
99
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2585860"></a><h3><a name="gksu-context-set-command"></a>gksu_context_set_command ()</h3><a class="indexterm" name="id2585869"></a><pre class="programlisting">void        gksu_context_set_command        (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
100
 
                                             gchar *command);</pre><p>
101
 
Sets up what command will run with the target user.</p><p>
102
 
 
103
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
104
 
</td></tr><tr><td><span class="term"><em class="parameter"><code>command</code></em>�:</span></td><td> the command that shall be ran
105
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2585930"></a><h3><a name="gksu-context-get-command"></a>gksu_context_get_command ()</h3><a class="indexterm" name="id2585938"></a><pre class="programlisting">const gchar* gksu_context_get_command       (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
 
274
by gksu_context_set_user.</p>
 
275
<p>
 
276
 
 
277
</p>
 
278
<div class="variablelist"><table border="0">
 
279
<col align="left" valign="top">
 
280
<tbody>
 
281
<tr>
 
282
<td>
 
283
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
284
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
 
285
</td>
 
286
</tr>
 
287
<tr>
 
288
<td>
 
289
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
290
<td> a pointer to the string containing the username.
 
291
</td>
 
292
</tr>
 
293
</tbody>
 
294
</table></div>
 
295
</div>
 
296
<hr>
 
297
<div class="refsect2" lang="en">
 
298
<a name="id2559112"></a><h3>
 
299
<a name="gksu-context-set-command"></a>gksu_context_set_command ()</h3>
 
300
<a class="indexterm" name="id2559121"></a><pre class="programlisting">void        gksu_context_set_command        (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
 
301
                                             gchar *command);</pre>
 
302
<p>
 
303
Sets up what command will run with the target user.</p>
 
304
<p>
 
305
 
 
306
</p>
 
307
<div class="variablelist"><table border="0">
 
308
<col align="left" valign="top">
 
309
<tbody>
 
310
<tr>
 
311
<td>
 
312
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
313
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
 
314
</td>
 
315
</tr>
 
316
<tr>
 
317
<td>
 
318
<span class="term"><em class="parameter"><code>command</code></em>&#160;:</span></td>
 
319
<td> the command that shall be ran
 
320
</td>
 
321
</tr>
 
322
</tbody>
 
323
</table></div>
 
324
</div>
 
325
<hr>
 
326
<div class="refsect2" lang="en">
 
327
<a name="id2559199"></a><h3>
 
328
<a name="gksu-context-get-command"></a>gksu_context_get_command ()</h3>
 
329
<a class="indexterm" name="id2559208"></a><pre class="programlisting">const gchar* gksu_context_get_command       (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
 
330
<p>
106
331
Gets the command that will be run, as set by 
107
 
gksu_context_set_command.</p><p>
108
 
 
109
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
110
 
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> a pointer to the string containing the command.
111
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2585995"></a><h3><a name="gksu-context-set-password"></a>gksu_context_set_password ()</h3><a class="indexterm" name="id2586004"></a><pre class="programlisting">void        gksu_context_set_password       (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
112
 
                                             gchar *password);</pre><p>
113
 
Sets up what is the password to be passed to su/sudo. *</p><p>
114
 
 
115
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
116
 
</td></tr><tr><td><span class="term"><em class="parameter"><code>password</code></em>�:</span></td><td> the password
117
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586066"></a><h3><a name="gksu-context-get-password"></a>gksu_context_get_password ()</h3><a class="indexterm" name="id2586074"></a><pre class="programlisting">const gchar* gksu_context_get_password      (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
 
332
gksu_context_set_command.</p>
 
333
<p>
 
334
 
 
335
</p>
 
336
<div class="variablelist"><table border="0">
 
337
<col align="left" valign="top">
 
338
<tbody>
 
339
<tr>
 
340
<td>
 
341
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
342
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
 
343
</td>
 
344
</tr>
 
345
<tr>
 
346
<td>
 
347
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
348
<td> a pointer to the string containing the command.
 
349
</td>
 
350
</tr>
 
351
</tbody>
 
352
</table></div>
 
353
</div>
 
354
<hr>
 
355
<div class="refsect2" lang="en">
 
356
<a name="id2559279"></a><h3>
 
357
<a name="gksu-context-set-password"></a>gksu_context_set_password ()</h3>
 
358
<a class="indexterm" name="id2559288"></a><pre class="programlisting">void        gksu_context_set_password       (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
 
359
                                             gchar *password);</pre>
 
360
<p>
 
361
Sets up what is the password to be passed to su/sudo. *</p>
 
362
<p>
 
363
 
 
364
</p>
 
365
<div class="variablelist"><table border="0">
 
366
<col align="left" valign="top">
 
367
<tbody>
 
368
<tr>
 
369
<td>
 
370
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
371
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
 
372
</td>
 
373
</tr>
 
374
<tr>
 
375
<td>
 
376
<span class="term"><em class="parameter"><code>password</code></em>&#160;:</span></td>
 
377
<td> the password
 
378
</td>
 
379
</tr>
 
380
</tbody>
 
381
</table></div>
 
382
</div>
 
383
<hr>
 
384
<div class="refsect2" lang="en">
 
385
<a name="id2559366"></a><h3>
 
386
<a name="gksu-context-get-password"></a>gksu_context_get_password ()</h3>
 
387
<a class="indexterm" name="id2559376"></a><pre class="programlisting">const gchar* gksu_context_get_password      (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
 
388
<p>
118
389
Gets the password that is set for calling the su/sudo
119
 
programs.</p><p>
 
390
programs.</p>
 
391
<p>
120
392
 
121
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
122
 
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> a pointer to the string containing the password.
123
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586131"></a><h3><a name="gksu-context-set-login-shell"></a>gksu_context_set_login_shell ()</h3><a class="indexterm" name="id2586139"></a><pre class="programlisting">void        gksu_context_set_login_shell    (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
124
 
                                             gboolean value);</pre><p>
 
393
</p>
 
394
<div class="variablelist"><table border="0">
 
395
<col align="left" valign="top">
 
396
<tbody>
 
397
<tr>
 
398
<td>
 
399
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
400
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
 
401
</td>
 
402
</tr>
 
403
<tr>
 
404
<td>
 
405
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
406
<td> a pointer to the string containing the password.
 
407
</td>
 
408
</tr>
 
409
</tbody>
 
410
</table></div>
 
411
</div>
 
412
<hr>
 
413
<div class="refsect2" lang="en">
 
414
<a name="id2559446"></a><h3>
 
415
<a name="gksu-context-set-login-shell"></a>gksu_context_set_login_shell ()</h3>
 
416
<a class="indexterm" name="id2546881"></a><pre class="programlisting">void        gksu_context_set_login_shell    (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
 
417
                                             gboolean value);</pre>
 
418
<p>
125
419
Should the shell in which the command will be run be
126
 
a login shell?</p><p>
 
420
a login shell?</p>
 
421
<p>
127
422
 
128
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
129
 
</td></tr><tr><td><span class="term"><em class="parameter"><code>value</code></em>�:</span></td><td> TRUE or FALSE
130
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586201"></a><h3><a name="gksu-context-get-login-shell"></a>gksu_context_get_login_shell ()</h3><a class="indexterm" name="id2586210"></a><pre class="programlisting">gboolean    gksu_context_get_login_shell    (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
 
423
</p>
 
424
<div class="variablelist"><table border="0">
 
425
<col align="left" valign="top">
 
426
<tbody>
 
427
<tr>
 
428
<td>
 
429
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
430
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
 
431
</td>
 
432
</tr>
 
433
<tr>
 
434
<td>
 
435
<span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></td>
 
436
<td> TRUE or FALSE
 
437
</td>
 
438
</tr>
 
439
</tbody>
 
440
</table></div>
 
441
</div>
 
442
<hr>
 
443
<div class="refsect2" lang="en">
 
444
<a name="id2559514"></a><h3>
 
445
<a name="gksu-context-get-login-shell"></a>gksu_context_get_login_shell ()</h3>
 
446
<a class="indexterm" name="id2559524"></a><pre class="programlisting">gboolean    gksu_context_get_login_shell    (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
 
447
<p>
131
448
Finds out if the shell created by the underlying su process
132
 
will be a login shell.</p><p>
 
449
will be a login shell.</p>
 
450
<p>
133
451
 
134
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
135
 
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE if the shell will be a login shell, FALSE otherwise.
136
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586268"></a><h3><a name="gksu-context-set-keep-env"></a>gksu_context_set_keep_env ()</h3><a class="indexterm" name="id2586277"></a><pre class="programlisting">void        gksu_context_set_keep_env       (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
137
 
                                             gboolean value);</pre><p>
 
452
</p>
 
453
<div class="variablelist"><table border="0">
 
454
<col align="left" valign="top">
 
455
<tbody>
 
456
<tr>
 
457
<td>
 
458
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
459
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
 
460
</td>
 
461
</tr>
 
462
<tr>
 
463
<td>
 
464
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
465
<td> TRUE if the shell will be a login shell, FALSE otherwise.
 
466
</td>
 
467
</tr>
 
468
</tbody>
 
469
</table></div>
 
470
</div>
 
471
<hr>
 
472
<div class="refsect2" lang="en">
 
473
<a name="id2559588"></a><h3>
 
474
<a name="gksu-context-set-keep-env"></a>gksu_context_set_keep_env ()</h3>
 
475
<a class="indexterm" name="id2559597"></a><pre class="programlisting">void        gksu_context_set_keep_env       (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
 
476
                                             gboolean value);</pre>
 
477
<p>
138
478
Should the environment be kept as it is? Defaults to
139
479
TRUE. Notice that setting this to FALSE may cause the
140
 
X authorization stuff to fail.</p><p>
 
480
X authorization stuff to fail.</p>
 
481
<p>
141
482
 
142
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
143
 
</td></tr><tr><td><span class="term"><em class="parameter"><code>value</code></em>�:</span></td><td> TRUE or FALSE
144
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586340"></a><h3><a name="gksu-context-get-keep-env"></a>gksu_context_get_keep_env ()</h3><a class="indexterm" name="id2586350"></a><pre class="programlisting">gboolean    gksu_context_get_keep_env       (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
 
483
</p>
 
484
<div class="variablelist"><table border="0">
 
485
<col align="left" valign="top">
 
486
<tbody>
 
487
<tr>
 
488
<td>
 
489
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
490
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
 
491
</td>
 
492
</tr>
 
493
<tr>
 
494
<td>
 
495
<span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></td>
 
496
<td> TRUE or FALSE
 
497
</td>
 
498
</tr>
 
499
</tbody>
 
500
</table></div>
 
501
</div>
 
502
<hr>
 
503
<div class="refsect2" lang="en">
 
504
<a name="id2559668"></a><h3>
 
505
<a name="gksu-context-get-keep-env"></a>gksu_context_get_keep_env ()</h3>
 
506
<a class="indexterm" name="id2559677"></a><pre class="programlisting">gboolean    gksu_context_get_keep_env       (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
 
507
<p>
145
508
Finds out if the environment in which the program will be
146
 
run will be reset.</p><p>
 
509
run will be reset.</p>
 
510
<p>
147
511
 
148
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
149
 
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE if the environment is going to be kept, 
 
512
</p>
 
513
<div class="variablelist"><table border="0">
 
514
<col align="left" valign="top">
 
515
<tbody>
 
516
<tr>
 
517
<td>
 
518
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
519
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
 
520
</td>
 
521
</tr>
 
522
<tr>
 
523
<td>
 
524
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
525
<td> TRUE if the environment is going to be kept, 
150
526
FALSE otherwise.
151
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586407"></a><h3><a name="gksu-context-set-debug"></a>gksu_context_set_debug ()</h3><a class="indexterm" name="id2586415"></a><pre class="programlisting">void        gksu_context_set_debug          (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
152
 
                                             gboolean value);</pre><p>
153
 
Set up if debuging information should be printed.</p><p>
 
527
</td>
 
528
</tr>
 
529
</tbody>
 
530
</table></div>
 
531
</div>
 
532
<hr>
 
533
<div class="refsect2" lang="en">
 
534
<a name="id2559740"></a><h3>
 
535
<a name="gksu-context-set-debug"></a>gksu_context_set_debug ()</h3>
 
536
<a class="indexterm" name="id2559749"></a><pre class="programlisting">void        gksu_context_set_debug          (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
 
537
                                             gboolean value);</pre>
 
538
<p>
 
539
Set up if debuging information should be printed.</p>
 
540
<p>
154
541
 
155
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
156
 
</td></tr><tr><td><span class="term"><em class="parameter"><code>value</code></em>�:</span></td><td> TRUE or FALSE
157
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586477"></a><h3><a name="gksu-context-get-debug"></a>gksu_context_get_debug ()</h3><a class="indexterm" name="id2586485"></a><pre class="programlisting">gboolean    gksu_context_get_debug          (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
 
542
</p>
 
543
<div class="variablelist"><table border="0">
 
544
<col align="left" valign="top">
 
545
<tbody>
 
546
<tr>
 
547
<td>
 
548
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
549
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
 
550
</td>
 
551
</tr>
 
552
<tr>
 
553
<td>
 
554
<span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></td>
 
555
<td> TRUE or FALSE
 
556
</td>
 
557
</tr>
 
558
</tbody>
 
559
</table></div>
 
560
</div>
 
561
<hr>
 
562
<div class="refsect2" lang="en">
 
563
<a name="id2559819"></a><h3>
 
564
<a name="gksu-context-get-debug"></a>gksu_context_get_debug ()</h3>
 
565
<a class="indexterm" name="id2559827"></a><pre class="programlisting">gboolean    gksu_context_get_debug          (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
 
566
<p>
158
567
Finds out if the library is configured to print debuging
159
 
information.</p><p>
 
568
information.</p>
 
569
<p>
160
570
 
161
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
162
 
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE if it is, FALSE otherwise.
163
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586542"></a><h3><a name="gksu-context-set-ssh-fwd"></a>gksu_context_set_ssh_fwd ()</h3><a class="indexterm" name="id2586550"></a><pre class="programlisting">void        gksu_context_set_ssh_fwd        (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
164
 
                                             gboolean value);</pre><p>
 
571
</p>
 
572
<div class="variablelist"><table border="0">
 
573
<col align="left" valign="top">
 
574
<tbody>
 
575
<tr>
 
576
<td>
 
577
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
578
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
 
579
</td>
 
580
</tr>
 
581
<tr>
 
582
<td>
 
583
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
584
<td> TRUE if it is, FALSE otherwise.
 
585
</td>
 
586
</tr>
 
587
</tbody>
 
588
</table></div>
 
589
</div>
 
590
<hr>
 
591
<div class="refsect2" lang="en">
 
592
<a name="id2559889"></a><h3>
 
593
<a name="gksu-context-set-ssh-fwd"></a>gksu_context_set_ssh_fwd ()</h3>
 
594
<a class="indexterm" name="id2559898"></a><pre class="programlisting">void        gksu_context_set_ssh_fwd        (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
 
595
                                             gboolean value);</pre>
 
596
<p>
165
597
Set up if we are running inside a sshd forwarding
166
598
session. That's because the X authorization semantics
167
599
differ a bit.
168
 
-&gt; THIS SETTING IS CURRENTLY USED FOR NOTHING</p><p>
 
600
-&gt; THIS SETTING IS CURRENTLY USED FOR NOTHING</p>
 
601
<p>
169
602
 
170
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
171
 
</td></tr><tr><td><span class="term"><em class="parameter"><code>value</code></em>�:</span></td><td> TRUE or FALSE
172
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586614"></a><h3><a name="gksu-context-get-ssh-fwd"></a>gksu_context_get_ssh_fwd ()</h3><a class="indexterm" name="id2586622"></a><pre class="programlisting">gboolean    gksu_context_get_ssh_fwd        (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
 
603
</p>
 
604
<div class="variablelist"><table border="0">
 
605
<col align="left" valign="top">
 
606
<tbody>
 
607
<tr>
 
608
<td>
 
609
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
610
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> you want to modify
 
611
</td>
 
612
</tr>
 
613
<tr>
 
614
<td>
 
615
<span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></td>
 
616
<td> TRUE or FALSE
 
617
</td>
 
618
</tr>
 
619
</tbody>
 
620
</table></div>
 
621
</div>
 
622
<hr>
 
623
<div class="refsect2" lang="en">
 
624
<a name="id2559970"></a><h3>
 
625
<a name="gksu-context-get-ssh-fwd"></a>gksu_context_get_ssh_fwd ()</h3>
 
626
<a class="indexterm" name="id2559978"></a><pre class="programlisting">gboolean    gksu_context_get_ssh_fwd        (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
 
627
<p>
173
628
Finds out if the library is configured as being run inside a
174
629
ssh X11 forwarding tunnel.
175
 
-&gt; THIS SETTING IS CURRENTLY USED FOR NOTHING</p><p>
176
 
 
177
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
178
 
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE if it is, FALSE otherwise.
179
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586680"></a><h3><a name="gksu-context-try-need-password"></a>gksu_context_try_need_password ()</h3><a class="indexterm" name="id2586691"></a><pre class="programlisting">gboolean    gksu_context_try_need_password  (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre><p>
180
 
Checks if we need to ask for a password or if we have ways of
181
 
getting the password for ourselves or we simply don't need it.</p><p>
182
 
 
183
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
184
 
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE if requesting a password is needed, FALSE otherwise.
185
 
 
186
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586749"></a><h3><a name="gksu-context-run"></a>gksu_context_run ()</h3><a class="indexterm" name="id2586757"></a><pre class="programlisting">gboolean    gksu_context_run                (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
187
 
                                             GError **error);</pre><p>
188
 
This could be considered one of the main functions in GKSu.
189
 
it is responsible for doing the 'user changing' magic.</p><p>
190
 
 
191
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
192
 
</td></tr><tr><td><span class="term"><em class="parameter"><code>error</code></em>�:</span></td><td> a <span class="type">GError</span> object to be filled with the error code or NULL
193
 
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> the child's error status, 0 if all went fine, -1 if failed
194
 
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2586838"></a><h3><a name="gksu-context-sudo-run"></a>gksu_context_sudo_run ()</h3><a class="indexterm" name="id2586846"></a><pre class="programlisting">gboolean    gksu_context_sudo_run           (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
195
 
                                             GError **error);</pre><p>
 
630
-&gt; THIS SETTING IS CURRENTLY USED FOR NOTHING</p>
 
631
<p>
 
632
 
 
633
</p>
 
634
<div class="variablelist"><table border="0">
 
635
<col align="left" valign="top">
 
636
<tbody>
 
637
<tr>
 
638
<td>
 
639
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
640
<td> the <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a> from which to grab the information
 
641
</td>
 
642
</tr>
 
643
<tr>
 
644
<td>
 
645
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
646
<td> TRUE if it is, FALSE otherwise.
 
647
</td>
 
648
</tr>
 
649
</tbody>
 
650
</table></div>
 
651
</div>
 
652
<hr>
 
653
<div class="refsect2" lang="en">
 
654
<a name="id2560042"></a><h3>
 
655
<a name="gksu-context-sudo-try-need-password"></a>gksu_context_sudo_try_need_password ()</h3>
 
656
<a class="indexterm" name="id2560053"></a><pre class="programlisting">gboolean    gksu_context_sudo_try_need_password
 
657
                                            (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
 
658
<p>
 
659
Checks if we need to ask for a password or if we have ways of
 
660
getting the password for ourselves or we simply don't need it.
 
661
Since 1.3.1.</p>
 
662
<p>
 
663
 
 
664
</p>
 
665
<div class="variablelist"><table border="0">
 
666
<col align="left" valign="top">
 
667
<tbody>
 
668
<tr>
 
669
<td>
 
670
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
671
<td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
 
672
</td>
 
673
</tr>
 
674
<tr>
 
675
<td>
 
676
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
677
<td> TRUE if requesting a password is needed, FALSE otherwise.
 
678
 
 
679
</td>
 
680
</tr>
 
681
</tbody>
 
682
</table></div>
 
683
</div>
 
684
<hr>
 
685
<div class="refsect2" lang="en">
 
686
<a name="id2560117"></a><h3>
 
687
<a name="gksu-context-try-need-password"></a>gksu_context_try_need_password ()</h3>
 
688
<a class="indexterm" name="id2560127"></a><pre class="programlisting">gboolean    gksu_context_try_need_password  (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context);</pre>
 
689
<p>
 
690
Checks if we need to ask for a password or if we have ways of
 
691
getting the password for ourselves or we simply don't need it.
 
692
Since 1.3.0.</p>
 
693
<p>
 
694
 
 
695
</p>
 
696
<div class="variablelist"><table border="0">
 
697
<col align="left" valign="top">
 
698
<tbody>
 
699
<tr>
 
700
<td>
 
701
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
702
<td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
 
703
</td>
 
704
</tr>
 
705
<tr>
 
706
<td>
 
707
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
708
<td> TRUE if requesting a password is needed, FALSE otherwise.
 
709
 
 
710
</td>
 
711
</tr>
 
712
</tbody>
 
713
</table></div>
 
714
</div>
 
715
<hr>
 
716
<div class="refsect2" lang="en">
 
717
<a name="id2560191"></a><h3>
 
718
<a name="gksu-context-run-full"></a>gksu_context_run_full ()</h3>
 
719
<a class="indexterm" name="id2560199"></a><pre class="programlisting">gboolean    gksu_context_run_full           (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
 
720
                                             GksuAskPasswordFunc ask_pass,
 
721
                                             gpointer user_data,
 
722
                                             GksuPasswordNotNeededFunc pass_not_needed,
 
723
                                             gpointer pnn_user_data,
 
724
                                             GError **error);</pre>
 
725
<p>
 
726
This could be considered one of the main functions in GKSu.
 
727
it is responsible for doing the 'user changing' magic calling
 
728
the <span class="type">GksuAskPasswordFunc</span> function to request a password if needed.
 
729
and the <span class="type">GksuPasswordNotNeededFunc</span> function if a password won't be
 
730
needed, so the application has the oportunity of warning the user
 
731
what it's doing.
 
732
Since 1.3.3.</p>
 
733
<p>
 
734
 
 
735
</p>
 
736
<div class="variablelist"><table border="0">
 
737
<col align="left" valign="top">
 
738
<tbody>
 
739
<tr>
 
740
<td>
 
741
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
742
<td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
 
743
</td>
 
744
</tr>
 
745
<tr>
 
746
<td>
 
747
<span class="term"><em class="parameter"><code>ask_pass</code></em>&#160;:</span></td>
 
748
<td> a <span class="type">GksuAskPasswordFunc</span>
 
749
</td>
 
750
</tr>
 
751
<tr>
 
752
<td>
 
753
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
 
754
<td> a <span class="type">gpointer</span> with user data to be passed to the
 
755
<span class="type">GksuAskPasswordFunc</span>
 
756
</td>
 
757
</tr>
 
758
<tr>
 
759
<td>
 
760
<span class="term"><em class="parameter"><code>pass_not_needed</code></em>&#160;:</span></td>
 
761
<td> a <span class="type">GksuPasswordNotNeededFunc</span>
 
762
</td>
 
763
</tr>
 
764
<tr>
 
765
<td>
 
766
<span class="term"><em class="parameter"><code>pnn_user_data</code></em>&#160;:</span></td>
 
767
<td> a <span class="type">gpointer</span> with the user data to be passed to the
 
768
<span class="type">GksuPasswordNotNeededFunc</span>
 
769
</td>
 
770
</tr>
 
771
<tr>
 
772
<td>
 
773
<span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
 
774
<td> a <span class="type">GError</span> object to be filled with the error code or NULL
 
775
</td>
 
776
</tr>
 
777
<tr>
 
778
<td>
 
779
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
780
<td> the child's error status, 0 if all went fine, -1 if failed
 
781
</td>
 
782
</tr>
 
783
</tbody>
 
784
</table></div>
 
785
</div>
 
786
<hr>
 
787
<div class="refsect2" lang="en">
 
788
<a name="id2560420"></a><h3>
 
789
<a name="gksu-context-run"></a>gksu_context_run ()</h3>
 
790
<a class="indexterm" name="id2560428"></a><pre class="programlisting">gboolean    gksu_context_run                (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
 
791
                                             GError **error);</pre>
 
792
<p>
 
793
This could be considered one of the main functions in GKSu.
 
794
it is responsible for doing the 'user changing' magic.</p>
 
795
<p>
 
796
 
 
797
</p>
 
798
<div class="variablelist"><table border="0">
 
799
<col align="left" valign="top">
 
800
<tbody>
 
801
<tr>
 
802
<td>
 
803
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
804
<td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
 
805
</td>
 
806
</tr>
 
807
<tr>
 
808
<td>
 
809
<span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
 
810
<td> a <span class="type">GError</span> object to be filled with the error code or NULL
 
811
</td>
 
812
</tr>
 
813
<tr>
 
814
<td>
 
815
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
816
<td> the child's error status, 0 if all went fine, -1 if failed
 
817
</td>
 
818
</tr>
 
819
</tbody>
 
820
</table></div>
 
821
</div>
 
822
<hr>
 
823
<div class="refsect2" lang="en">
 
824
<a name="id2560517"></a><h3>
 
825
<a name="gksu-context-sudo-run-full"></a>gksu_context_sudo_run_full ()</h3>
 
826
<a class="indexterm" name="id2560526"></a><pre class="programlisting">gboolean    gksu_context_sudo_run_full      (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
 
827
                                             GksuAskPasswordFunc ask_pass,
 
828
                                             gpointer user_data,
 
829
                                             GksuPasswordNotNeededFunc pass_not_needed,
 
830
                                             gpointer pnn_user_data,
 
831
                                             GError **error);</pre>
 
832
<p>
 
833
This could be considered one of the main functions in GKSu.
 
834
it is responsible for doing the 'user changing' magic calling
 
835
the <span class="type">GksuAskPasswordFunc</span> function to request a password if needed.
 
836
and the <span class="type">GksuPasswordNotNeededFunc</span> function if a password won't be
 
837
needed, so the application has the oportunity of warning the user
 
838
what it's doing.
 
839
Since 1.3.3.</p>
 
840
<p>
 
841
 
 
842
</p>
 
843
<div class="variablelist"><table border="0">
 
844
<col align="left" valign="top">
 
845
<tbody>
 
846
<tr>
 
847
<td>
 
848
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
849
<td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
 
850
</td>
 
851
</tr>
 
852
<tr>
 
853
<td>
 
854
<span class="term"><em class="parameter"><code>ask_pass</code></em>&#160;:</span></td>
 
855
<td> a <span class="type">GksuAskPasswordFunc</span>
 
856
</td>
 
857
</tr>
 
858
<tr>
 
859
<td>
 
860
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
 
861
<td> a <span class="type">gpointer</span> with user data to be passed to the
 
862
<span class="type">GksuAskPasswordFunc</span>
 
863
</td>
 
864
</tr>
 
865
<tr>
 
866
<td>
 
867
<span class="term"><em class="parameter"><code>pass_not_needed</code></em>&#160;:</span></td>
 
868
<td> a <span class="type">GksuPasswordNotNeededFunc</span>
 
869
</td>
 
870
</tr>
 
871
<tr>
 
872
<td>
 
873
<span class="term"><em class="parameter"><code>pnn_user_data</code></em>&#160;:</span></td>
 
874
<td> a <span class="type">gpointer</span> with the user data to be passed to the
 
875
<span class="type">GksuPasswordNotNeededFunc</span>
 
876
</td>
 
877
</tr>
 
878
<tr>
 
879
<td>
 
880
<span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
 
881
<td> a <span class="type">GError</span> object to be filled with the error code or NULL
 
882
</td>
 
883
</tr>
 
884
<tr>
 
885
<td>
 
886
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
887
<td> the child's error status, 0 if all went fine, -1 if failed
 
888
</td>
 
889
</tr>
 
890
</tbody>
 
891
</table></div>
 
892
</div>
 
893
<hr>
 
894
<div class="refsect2" lang="en">
 
895
<a name="id2560746"></a><h3>
 
896
<a name="gksu-context-sudo-run"></a>gksu_context_sudo_run ()</h3>
 
897
<a class="indexterm" name="id2560754"></a><pre class="programlisting">gboolean    gksu_context_sudo_run           (<a href="libgksu12-GksuContext.html#GksuContext">GksuContext</a> *context,
 
898
                                             GError **error);</pre>
 
899
<p>
196
900
This could be considered one of the main functions in GKSu.
197
901
it is responsible for doing the 'user changing' magic by
198
902
calling <code class="function">gksu_ask_password()</code> if it needs the user's password
199
 
it behaves like sudo.</p><p>
 
903
it behaves like sudo.</p>
 
904
<p>
200
905
 
201
 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>�:</span></td><td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
202
 
</td></tr><tr><td><span class="term"><em class="parameter"><code>error</code></em>�:</span></td><td> a <span class="type">GError</span> object to be filled with the error code or NULL
203
 
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> the child's error status, 0 if all went fine, -1 if failed
204
 
</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id2586936"></a><h2>See Also</h2><p>
 
906
</p>
 
907
<div class="variablelist"><table border="0">
 
908
<col align="left" valign="top">
 
909
<tbody>
 
910
<tr>
 
911
<td>
 
912
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
 
913
<td> a <a href="libgksu12-GksuContext.html#GksuContext"><span class="type">GksuContext</span></a>
 
914
</td>
 
915
</tr>
 
916
<tr>
 
917
<td>
 
918
<span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
 
919
<td> a <span class="type">GError</span> object to be filled with the error code or NULL
 
920
</td>
 
921
</tr>
 
922
<tr>
 
923
<td>
 
924
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
925
<td> the child's error status, 0 if all went fine, -1 if failed
 
926
</td>
 
927
</tr>
 
928
</tbody>
 
929
</table></div>
 
930
</div>
 
931
</div>
 
932
<div class="refsect1" lang="en">
 
933
<a name="id2560854"></a><h2>See Also</h2>
 
934
<p>
205
935
For convenience Gtk+2.0 widgets to request the user's password take a
206
936
look at libgksuui1.0 and its API reference.
207
 
</p></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="ch01.html"><b>&lt;&lt;�Main Reference</b></a></td><td align="right"></td></tr></table></body></html>
 
937
</p>
 
938
</div>
 
939
</div>
 
940
<table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle">
 
941
<td align="left"><a accesskey="p" href="ch01.html"><b>&lt;&lt;&#160;Main Reference</b></a></td>
 
942
<td align="right"></td>
 
943
</tr></table>
 
944
</body>
 
945
</html>