source: trunk/athena/lib/al/al_get_access.3 @ 11484

Revision 11484, 2.2 KB checked in by ghudson, 26 years ago (diff)
Document new functions.
Line 
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
20al_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
31This function reads the access bits and explanatory text for a user
32in 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
36is set to the string of access bits for
37.IR username ,
38and the variable pointed to by
39.I text
40is set to the explanatory text, or to NULL if no explanatory text is
41given on the appropriate line.  The caller may pass NULL for either
42.I access
43or
44.I text
45if it does not care about one or the other piece of information.  The
46caller must free the returned strings when it is done using them.
47.SH RETURN VALUES
48.I al_get_access
49may return the following values:
50.TP 15
51.I AL_SUCCESS
52Access information was successfully read.
53.TP 15
54.I AL_ENOENT
55The access file does not exist.
56.TP 15
57.I AL_EPERM
58The access file could not be read due to a permissions problem.
59.TP 15
60.I AL_ENOUSER
61There is no entry for
62.I username
63in the access file.
64.TP 15
65.I AL_ENOMEM
66Memory was exhausted.
67.SH SEE ALSO
68al_login_allowed(3), al_is_local_acct(3)
69.SH AUTHOR
70Greg Hudson, MIT Information Systems
71.br
72Copyright 1998 by the Massachusetts Institute of Technology.
Note: See TracBrowser for help on using the repository browser.