1 | .\" $Id: al_get_access.3,v 1.1 1998-05-07 17:11:25 ghudson Exp $ |
---|
2 | .\" |
---|
3 | .\" Copyright 1998 by the Massachusetts Institute of |
---|
4 | .\" Technology. |
---|
5 | .\" |
---|
6 | .\" Permission to use, copy, modify, and distribute this |
---|
7 | .\" software and its documentation for any purpose and without |
---|
8 | .\" fee is hereby granted, provided that the above copyright |
---|
9 | .\" notice appear in all copies and that both that copyright |
---|
10 | .\" notice and this permission notice appear in supporting |
---|
11 | .\" documentation, and that the name of M.I.T. not be used in |
---|
12 | .\" advertising or publicity pertaining to distribution of the |
---|
13 | .\" software without specific, written prior permission. |
---|
14 | .\" M.I.T. makes no representations about the suitability of |
---|
15 | .\" this software for any purpose. It is provided "as is" |
---|
16 | .\" without express or implied warranty. |
---|
17 | .\" |
---|
18 | .TH AL_GET_ACCESS 3 "5 May 1998" |
---|
19 | .SH NAME |
---|
20 | al_get_access \- Read access bits and text for a user in the access file |
---|
21 | .SH SYNOPSIS |
---|
22 | .nf |
---|
23 | .B #include <al.h> |
---|
24 | .PP |
---|
25 | .B int al_get_access(const char *\fIusername\fP, char **\fIaccess\fP, |
---|
26 | .B char **\fItext\fP) |
---|
27 | .PP |
---|
28 | .B cc file.c -lal -lhesiod |
---|
29 | .fi |
---|
30 | .SH DESCRIPTION |
---|
31 | This function reads the access bits and explanatory text for a user |
---|
32 | in the Athena access control file |
---|
33 | .I /etc/athena/access |
---|
34 | (see access(5)). On successful return, the variable pointed to by |
---|
35 | .I access |
---|
36 | is set to the string of access bits for |
---|
37 | .IR username , |
---|
38 | and the variable pointed to by |
---|
39 | .I text |
---|
40 | is set to the explanatory text, or to NULL if no explanatory text is |
---|
41 | given on the appropriate line. The caller may pass NULL for either |
---|
42 | .I access |
---|
43 | or |
---|
44 | .I text |
---|
45 | if it does not care about one or the other piece of information. The |
---|
46 | caller must free the returned strings when it is done using them. |
---|
47 | .SH RETURN VALUES |
---|
48 | .I al_get_access |
---|
49 | may return the following values: |
---|
50 | .TP 15 |
---|
51 | .I AL_SUCCESS |
---|
52 | Access information was successfully read. |
---|
53 | .TP 15 |
---|
54 | .I AL_ENOENT |
---|
55 | The access file does not exist. |
---|
56 | .TP 15 |
---|
57 | .I AL_EPERM |
---|
58 | The access file could not be read due to a permissions problem. |
---|
59 | .TP 15 |
---|
60 | .I AL_ENOUSER |
---|
61 | There is no entry for |
---|
62 | .I username |
---|
63 | in the access file. |
---|
64 | .TP 15 |
---|
65 | .I AL_ENOMEM |
---|
66 | Memory was exhausted. |
---|
67 | .SH SEE ALSO |
---|
68 | al_login_allowed(3), al_is_local_acct(3) |
---|
69 | .SH AUTHOR |
---|
70 | Greg Hudson, MIT Information Systems |
---|
71 | .br |
---|
72 | Copyright 1998 by the Massachusetts Institute of Technology. |
---|