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
|
<html lang="en">
<head>
<title>Group Database Functions - Untitled</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Untitled">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="System-Utilities.html#System-Utilities" title="System Utilities">
<link rel="prev" href="Password-Database-Functions.html#Password-Database-Functions" title="Password Database Functions">
<link rel="next" href="System-Information.html#System-Information" title="System Information">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Group-Database-Functions"></a>
Next: <a rel="next" accesskey="n" href="System-Information.html#System-Information">System Information</a>,
Previous: <a rel="previous" accesskey="p" href="Password-Database-Functions.html#Password-Database-Functions">Password Database Functions</a>,
Up: <a rel="up" accesskey="u" href="System-Utilities.html#System-Utilities">System Utilities</a>
<hr>
</div>
<h3 class="section">34.10 Group Database Functions</h3>
<p>Octave's group database functions return information in a structure
with the following fields.
<dl>
<dt><code>name</code><dd>The user name.
<br><dt><code>passwd</code><dd>The encrypted password, if available.
<br><dt><code>gid</code><dd>The numeric group id.
<br><dt><code>mem</code><dd>The members of the group.
</dl>
<p>In the descriptions of the following functions, this data structure is
referred to as a <var>grp_struct</var>.
<!-- ./DLD-FUNCTIONS/getgrent.cc -->
<p><a name="doc_002dgetgrent"></a>
<div class="defun">
— Loadable Function: <var>grp_struct</var> = <b>getgrent</b> ()<var><a name="index-getgrent-2437"></a></var><br>
<blockquote><p>Return an entry from the group database, opening it if necessary.
Once the end of the data has been reached, <code>getgrent</code> returns 0.
</p></blockquote></div>
<!-- ./DLD-FUNCTIONS/getgrent.cc -->
<p><a name="doc_002dgetgrgid"></a>
<div class="defun">
— Loadable Function: <var>grp_struct</var> = <b>getgrgid</b> (<var>gid</var>)<var>.<a name="index-getgrgid-2438"></a></var><br>
<blockquote><p>Return the first entry from the group database with the group ID
<var>gid</var>. If the group ID does not exist in the database,
<code>getgrgid</code> returns 0.
</p></blockquote></div>
<!-- ./DLD-FUNCTIONS/getgrent.cc -->
<p><a name="doc_002dgetgrnam"></a>
<div class="defun">
— Loadable Function: <var>grp_struct</var> = <b>getgrnam</b> (<var>name</var>)<var><a name="index-getgrnam-2439"></a></var><br>
<blockquote><p>Return the first entry from the group database with the group name
<var>name</var>. If the group name does not exist in the database,
<code>getgrnam</code> returns 0.
</p></blockquote></div>
<!-- ./DLD-FUNCTIONS/getgrent.cc -->
<p><a name="doc_002dsetgrent"></a>
<div class="defun">
— Loadable Function: <b>setgrent</b> ()<var><a name="index-setgrent-2440"></a></var><br>
<blockquote><p>Return the internal pointer to the beginning of the group database.
</p></blockquote></div>
<!-- ./DLD-FUNCTIONS/getgrent.cc -->
<p><a name="doc_002dendgrent"></a>
<div class="defun">
— Loadable Function: <b>endgrent</b> ()<var><a name="index-endgrent-2441"></a></var><br>
<blockquote><p>Close the group database.
</p></blockquote></div>
</body></html>
|