Initial import from FreeBSD RELENG_4:
[dragonfly.git] / crypto / kerberosIV / man / kuserok.3
1 .\" $Id: kuserok.3,v 1.3 1996/10/13 17:51:18 bg Exp $
2 .\" Copyright 1989 by the Massachusetts Institute of Technology.
3 .\"
4 .\" For copying and distribution information,
5 .\" please see the file <mit-copyright.h>.
6 .\"
7 .TH KUSEROK 3 "Kerberos Version 4.0" "MIT Project Athena"
8 .SH NAME
9 kuserok \- Kerberos version of ruserok
10 .SH SYNOPSIS
11 .nf
12 .nj
13 .ft B
14 #include <krb.h>
15 .PP
16 .ft B
17 kuserok(kdata, localuser)
18 AUTH_DAT *auth_data;
19 char   *localuser;
20 .fi
21 .ft R
22 .SH DESCRIPTION
23 .I kuserok
24 determines whether a Kerberos principal described by the structure
25 .I auth_data
26 is authorized to login as user
27 .I localuser
28 according to the authorization file
29 ("~\fIlocaluser\fR/.klogin" by default).  It returns 0 (zero) if authorized,
30 1 (one) if not authorized.
31 .PP
32 If there is no account for 
33 .I localuser
34 on the local machine, authorization is not granted.
35 If there is no authorization file, and the Kerberos principal described
36 by 
37 .I auth_data
38 translates to 
39 .I localuser
40 (using 
41 .IR krb_kntoln (3)),
42 authorization is granted.
43 If the authorization file
44 can't be accessed, or the file is not owned by
45 .IR localuser,
46 authorization is denied.  Otherwise, the file is searched for
47 a matching principal name, instance, and realm.  If a match is found,
48 authorization is granted, else authorization is denied.
49 .PP
50 The file entries are in the format:
51 .nf
52 .in +5n
53         name.instance@realm
54 .in -5n
55 .fi
56 with one entry per line.
57
58 For convenience ~localuser@LOCALREALM is
59 always considered to be an entry in the file even when there is no
60 file or the file is unreadable.
61 .SH SEE ALSO
62 kerberos(3), ruserok(3), krb_kntoln(3)
63 .SH FILES
64 .TP 20n
65 ~\fIlocaluser\fR/.klogin
66 authorization list