File: nis.xml

package info (click to toggle)
phpdoc 20020310-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 35,272 kB
  • ctags: 354
  • sloc: xml: 799,767; php: 1,395; cpp: 500; makefile: 200; sh: 140; awk: 51
file content (374 lines) | stat: -rw-r--r-- 12,199 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.11 $ -->
  <reference id="ref.nis">
  <title>NIS</title>
  <titleabbrev>NIS</titleabbrev>
  <partintro>
   <para>
    NIS (feu Yellow Pages / Pages jaunes) permet la gestion par le
    r&eacute;seau de fichiers d'administration importants (tel un
    fichier de mot de passe). Pour plus d'informations, reportez
    vous au manuel NIS, ou &agrave;
    <ulink url="&url.nis;">Introduction to YP/NIS</ulink>Introduction to YP/NIS
    (en anglais). Il existe un livre en anglais
    <ulink url="&url.nis.book;">Managing NFS and NIS</ulink>" par Hal Stern.
   </para>
   <para>
    Pour ajouter ces fonctionnalit&eacute;es, vous devez compiler PHP
    avec l'option <link linkend="install.configure.with-yp"><option role="configure">--with-yp</option></link>
    (PHP 3) ou <link linkend="install.configure.enable-yp"><option role="configure">--enable-yp</option></link>
    (PHP 4).
   </para>
  </partintro>
  <refentry id="function.yp-get-default-domain">
   <refnamediv>
    <refname>yp_get_default_domain</refname>
    <refpurpose>Retourne le domaine NIS par d&eacute;faut.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>yp_get_default_domain</methodname>
      <void/>
     </methodsynopsis>
    <para>
     <function>yp_get_default_domain</function> retourne le nom de domaine NIS
     par d&eacute;faut. Ce nom de domaine peut &ecirc;tre utilis&eacute; pour
     les futurs appels NIS.
    </para>
    <para>
     Un domaine NIS peut &ecirc;tre d&eacute;crit comme un regroupement
     de cartes NIS. Tous les h&ocirc;tes qui ont besoin d'informations,
     s'attachent &agrave; un domaine. R&eacute;f&eacute;rez-vous aux documents
     cit&eacute;s en d&eacute;but de document pour plus de d&eacute;tails.
    </para>
    <para>
     <example>
      <title>Exemple avec le domaine par d&eacute;faut</title>
      <programlisting role="php">
&lt;?php
    $domain = yp_get_default_domain();
    echo "Le domaine par d&eacute;faut est : " . $domain;
?&gt;
      </programlisting>
     </example>
    </para>
<!--
    <para>
     Voir aussi
     <link linkend="function.yp-errno">yp_errno</link> et
     <link linkend="function.yp-err-string">yp_err_string</link>.
    </para>
-->
   </refsect1>
  </refentry>
  <refentry id="function.yp-order">
   <refnamediv>
    <refname>yp_order</refname>
    <refpurpose>Retourne le num&eacute;ro d'ordre d'une carte.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>yp_order</methodname>
      <methodparam><type>string</type><parameter>domain</parameter></methodparam>
      <methodparam><type>string</type><parameter>map</parameter></methodparam>
     </methodsynopsis>
    <para>
     <function>yp_order</function> retourne le num&eacute;ro d'ordre d'une
     carte ou &false;.
    </para>
    <para>
     <example>
      <title>Exemple d'ordre NIS </title>
      <programlisting role="php">
&lt;?php
$number = yp_order($domain,$mapname);
echo "Le num&eacute;ro d'ordre de cette carte est : " . $number;
?&gt;
      </programlisting>
     </example>
    </para>
    <para>
     Voir aussi 
     <function>yp-get-default-domain</function>.
<!--
     linkend="function.yp-errno">yp_errno</link> et <link
     linkend="function.yp-err-string">yp_err_string</link>
-->
    </para>
   </refsect1>
  </refentry>
  <refentry id="function.yp-master">
   <refnamediv>
    <refname>yp_master</refname>
    <refpurpose>
     Retourne le nom de la machine ma&icirc;tre pour une carte.
   </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>yp_master</methodname>
      <methodparam><type>string</type><parameter>domain</parameter></methodparam>
      <methodparam><type>string</type><parameter>map</parameter></methodparam>
     </methodsynopsis>
    <para>
     <function>yp_master</function> retourne le nom de la machine ma&icirc;tre
     d'une carte.
    </para>
    <para>
     <example>
      <title>Exemple de ma&icirc;tre NIS</title>
      <programlisting role="php">
&lt;?php
    $number = yp_master($domain, $mapname);
    echo "Master for this map is: " . $master;
?&gt;
      </programlisting>
     </example>
    </para>
    <para>
     Voir aussi 
     <function>yp-get-default-domain</function>.
<!--
     linkend="function.yp-errno">yp_errno</link> et <link
     linkend="function.yp-err-string">yp_err_string</link>
-->
    </para>
   </refsect1>
  </refentry>
  <refentry id="function.yp-match">
   <refnamediv>
    <refname>yp_match</refname>
    <refpurpose>Retourne la ligne associ&eacute;e.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>yp_match</methodname>
      <methodparam><type>string</type><parameter>domain</parameter></methodparam>
      <methodparam><type>string</type><parameter>map</parameter></methodparam>
      <methodparam><type>string</type><parameter>key</parameter></methodparam>
     </methodsynopsis>
    <para>
     <function>yp_match</function> retourne la valeur associ&eacute;e
     &agrave; la cl&eacute; pass&eacute;e en argument, pour la carte
     sp&eacute;cifi&eacute;e, ou &false;. La cl&eacute; doit exister et
     &ecirc;tre exacte.
    </para>
    <para>
     <example>
      <title>Exemple de recherche NIS </title>
      <programlisting role="php">
&lt;?php
    $entry = yp_match($domain, "passwd.byname", "joe");
    echo "La valeur trouv&eacute;e est: " . $entry;
?&gt;
      </programlisting>
     </example>
    </para>
    <para>
      Dans le cas pr&eacute;sent, ce pourrait &ecirc;tre:
      joe:##joe:11111:100:Joe User:/home/j/joe:/usr/local/bin/bash
    </para>
    <para>
     Voir aussi 
     <function>yp-get-default-domain</function>.
<!--
     linkend="function.yp-errno">yp_errno</link> et <link
     linkend="function.yp-err-string">yp_err_string</link>
-->
    </para>
   </refsect1>
  </refentry>
  <refentry id="function.yp-first">
   <refnamediv>
    <refname>yp_first</refname>
    <refpurpose>
     Retourne le premier couple (cl&eacute; ; valeur) d'une carte donn&eacute;e.
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>yp_first</methodname>
      <methodparam><type>string</type><parameter>domain</parameter></methodparam>
      <methodparam><type>string</type><parameter>map</parameter></methodparam>
     </methodsynopsis>
    <para>
     <function>yp_first</function> retourne le premier couple
     (cl&eacute; ; valeur) d'une carte donn&eacute;e, ou &false;.
    </para>
    <para>
     <example>
      <title>Exemple avec <function>yp_first</function></title>
      <programlisting role="php">
&lt;?php
$entree = yp_first($domain, "passwd.byname");
$cle = $entry ["key"];
$valeur = $entry ["value"];
echo "La premi&egrave;re entr&eacute;e de cette carte est " . $key
     . " et sa valeur est " . $entry[$key];
?&gt;
      </programlisting>
     </example>
    </para>
    <para>
     Voir aussi 
     <function>yp-get-default-domain</function>.
<!--
     <link linkend="function.yp-errno">yp_errno</link> et <link
     linkend="function.yp-err-string">yp_err_string</link>
-->
    </para>
   </refsect1>
  </refentry>
  <refentry id="function.yp-next">
   <refnamediv>
    <refname>yp_next</refname>
    <refpurpose>
     Retourne le couple (cl&eacute; ; valeur) suivant d'une carte donn&eacute;e.
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>yp_next</methodname>
      <methodparam><type>string</type><parameter>domain</parameter></methodparam>
      <methodparam><type>string</type><parameter>map</parameter></methodparam>
      <methodparam><type>string</type><parameter>key</parameter></methodparam>
     </methodsynopsis>
    <para>
     <function>yp_next</function> retourne le couple (cl&eacute; ; valeur)
     suivant la cl&eacute; donn&eacute;e d'une carte donn&eacute;e ou &false;.
    </para>
    <para>
     <example>
      <title>Exemple avec <function>yp_next</function></title>
      <programlisting role="php">
&lt;?php
    $entry = yp_next($domain, "passwd.byname", "joe");
    if(!$entry) {
		echo "Plus d'autres entr&eacute;es.\n";
    <!-- echo yp_errno() . ": " . yp_err_string(); -->    }
    $key = key($entry);
    echo "L'entr&eacute;e suivante apr&egrave;s "joe" a la cl&eacute; " . $key
          . " et la valeur " . $entry[$key];
?&gt;
      </programlisting>
     </example>
    </para>
    <para>
     Voir aussi 
     <function>yp-get-default-domain</function>.
<!--
     <link linkend="function.yp-errno">yp_errno</link> et <link
     linkend="function.yp-err-string">yp_err_string</link>
-->
    </para>
   </refsect1>
  </refentry>
<!-- Function doesn't exist
  <refentry id="function.yp-errno">
   <refnamediv>
    <refname>yp_errno</refname>
      <refpurpose>Retourne le code d'erreur de la derni&egrave;re op&eacute;ration.
      </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>yp_errno</methodname>
      <void/>
     </methodsynopsis>
    <para>
     <function>yp_errno</function> retourne le code d'erreur de la
     derni&egrave;re op&eacute;ration.
    </para>
    <para>
     Les erreurs possibles sont :
    </para>
    <para>
     <simplelist>
      <member>1 Mauvais arguments</member>
      <member>2 Erreur RPC - Le domaine n'existe pas</member>
      <member>3 Impossible de se connecter &agrave; ce domaine</member>
      <member>4 Impossible de trouver cette carte sur le serveur </member>
      <member>5 Cette cl&eacute; n'existe pas</member>
      <member>6 Erreur yp interne ou erreur client </member>
      <member>7 Erreur d'allocation de ressources</member>
      <member>8 Il n'y a plus d'enregistrements dans cette carte</member>
      <member>9 Impossible de communiquer avec le portmapper</member>
      <member>10 Impossible de communiquer avec ypbind</member>
      <member>11 Impossible de communiquer avec ypserv</member>
      <member>12 Le nom de domaine local n'est pas assign&eacute;</member>
      <member>13 La base de donn&eacute;es yp n'est pas valide</member>
      <member>14 Erreur de version yp </member>
      <member>15 Acc&egrave;s interdit</member>
      <member>16 Base de donn&eacute;es occup&eacute;e</member>
     </simplelist>
    </para>
    <para>
     Voir aussi
     <link linkend="function.yp-err-string">yp_err_string</link>.
    </para>
   </refsect1>
  </refentry>
-->
<!-- Function doesn't exist
  <refentry id="function.yp-err-string">
   <refnamediv>
   <refname>yp_err_string</refname>
   <refpurpose>
    Retourne la cha&icirc;ne d'erreur associ&eacute;e &agrave; la derni&egrave;re op&eacute;ration.
   </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>yp_err_string</methodname>
      <methodparam><type>void</type><parameter/></methodparam>
     </methodsynopsis>
    <para>
     <function>yp_err_string</function> Retourne la cha&icirc;ne d'erreur
     associ&eacute;e &agrave; la derni&egrave;re op&eacute;ration. Tr&egrave;s
     pratique pour savoir exactement ce qui n'est pas all&eacute;.
    </para>
    <para>
     <example>
      <title>Exemple</title>
      <programlisting role="php">
&lt;?php
    echo "Error: " . yp_err_string();
?&gt;
      </programlisting>
     </example>
    </para>
    <para>
     Voir aussi
     <link linkend="function.yp-errno"> yp_errno</link>.
    </para>
   </refsect1>
  </refentry>
-->
 </reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->