File: getgrent.3

package info (click to toggle)
manpages-pt 20040726-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,988 kB
  • sloc: sh: 45; makefile: 16
file content (56 lines) | stat: -rw-r--r-- 1,683 bytes parent folder | download | duplicates (6)
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
.TH GETGRENT 3  "4 de Abril 1993" "GNU" "Manual do Prgramador Linux"
.SH NOME
getgrent, setgrent, endgrent \- Retorna informaes sobre os grupos
.SH SINOPSE
.nf
.B #include <grp.h>
.B #include <sys/types.h>
.sp
.B struct group *getgrent(void);
.sp
.B void setgrent(void);
.sp
.B void endgrent(void);
.fi
.SH DESCRIO
A funo \fBgetgrent()\fP um ponteiro para uma estrutura que contm
as informaes dos grupos que esto no arquivo \fI/etc/group\fP.  A primeira
vez que a funo  chamada , ela retorna a primeira entrada do arquivo ; a 
partir da , retorna as entradas sucessivas.
.PP
A funo \fBsetgrent()\fP retorna o ponteiro do arquivo para o incio de 
\fI/etc/group\fP.
.PP
A funo \fBendgrent()\fP fecha o arquivo \fI/etc/group\fP.
.PP
A estrutura \fIgroup\fP est definida em \fI<grp.h>\fP conforme abaixo:
.sp
.RS
.nf
.ta 8n 16n 32n
struct group {
        char    *gr_name;        /* group name */
        char    *gr_passwd;      /* group password */
        gid_t   gr_gid;          /* group id */
        char    **gr_mem;        /* group members */
};
.ta
.fi
.RE
.SH "VALOR RETORNADO"
A funo \fBgetgrent()\fP retorna a estrutura com a informao dos grupos
ou NULL se no houver mais entradas no arquivo ou se ocorrer um erro.
.SH ERROS
.TP
.B ENOMEM
Memria insuficiente para alocar a estrutura de informao dos grupos.
.SH ARQUIVOS 
.TP
.I /etc/group
 Arquivo de base de dados dos grupos
.SH "EM CONFORMIDADE COM"
SVID 3, BSD 4.3
.SH "VER TAMBM"
.BR fgetgrent "(3), " getgrnam "(3), " getgrgid (3)
.SH "TRADUO PARA A LNGUA PORTUGUESA"
\&\fR\&\f(CWAntonio Belloni <abelloni@ig.com.br> (traduo)\fR