📄 acl_check.3
字号:
.\" $Source: /mit/kerberos/src/man/RCS/acl_check.3,v $.\" $Author: jtkohl $.\" $Header: acl_check.3,v 4.1 89/01/23 11:06:54 jtkohl Exp $.\" Copyright 1989 by the Massachusetts Institute of Technology..\".\" For copying and distribution information,.\" please see the file <mit-copyright.h>..\".TH ACL_CHECK 3 "Kerberos Version 4.0" "MIT Project Athena".SH NAMEacl_canonicalize_principal, acl_check, acl_exact_match, acl_add,acl_delete, acl_initialize \- access control list routines.SH SYNOPSIS.nf.nj.ft Bcc <files> \-lacl \-lkrb.PP.ft B#include <krb.h>.PP.ft Bacl_canonicalize_principal(principal, buf)char *principal;char *buf;.PP.ft Bacl_check(acl, principal)char *acl;char *principal;.PP.ft Bacl_exact_match(acl, principal)char *acl;char *principal;.PP.ft Bacl_add(acl, principal)char *acl;char *principal;.PP.ft Bacl_delete(acl, principal)char *acl;char *principal;.PP.ft Bacl_initialize(acl_file, mode)char *acl_file;int mode;.fi.ft R.SH DESCRIPTION.SS Introduction.PPAn access control list (ACL) is a list of principals, where eachprincipal is represented by a text string which cannot containwhitespace. The library allows application programs to refer to namedaccess control lists to test membership and to atomically add anddelete principals using a natural and intuitive interface. Atpresent, the names of access control lists are required to be Unixfilenames, and refer to human-readable Unix files; in the future, whena networked ACL server is implemented, the names may refer to adifferent namespace specific to the ACL service..PP.SS Principal Names.PPPrincipal names have the form.nf.in +5n<name>[.<instance>][@<realm>].in -5ne.g.:.in +5naspasp.rootasp@ATHENA.MIT.EDUasp.@ATHENA.MIT.EDUasp.root@ATHENA.MIT.EDU.in -5n.fiIt is possible for principals to be underspecified. If an instance ismissing, it is assumed to be "". If realm is missing, it is assumedto be the local realm as determined by.IR krb_get_lrealm (3).The canonical form contains all of name, instance,and realm; the acl_add and acl_delete routines will alwaysleave the file in that form. Note that the canonical form ofasp@ATHENA.MIT.EDU is actually asp.@ATHENA.MIT.EDU..SS Routines.PP.I acl_canonicalize_principalstores the canonical form of .I principalin .IR buf ..I Bufmust contain enoughspace to store a principal, given the limits on the sizes of name,instance, and realm specified as ANAME_SZ, INST_SZ, and REALM_SZ,respectively, in.IR /usr/include/krb.h ..PP.I acl_checkreturns nonzero if.I principalappears in .IR acl .Returns 0 if principaldoes not appear in acl, or if an error occurs. Canonicalizesprincipal before checking, and allows the ACL to contain wildcards. Theonly supported wildcards are entries of the formname.*@realm, *.*@realm, and *.*@*. An asterisk matches any value forits component field. For example, "jtkohl.*@*" would match principaljtkohl, with any instance and any realm..PP.I acl_exact_matchperforms like .IR acl_check ,but does no canonicalization or wildcard matching..PP.I acl_addatomically adds .I principalto .IR acl .Returns 0 if successful, nonzero otherwise. It is considered a failureif.I principalis already in .IR acl .This routine will canonicalize.IR principal ,but will treat wildcards literally..PP.I acl_deleteatomically deletes .I principalfrom .IR acl .Returns 0 if successful,nonzero otherwise. It is considered a failure if .I principalis notalready in .IR acl .This routine will canonicalize .IR principal ,but will treat wildcards literally..PP.I acl_initializeinitializes.IR acl_file .If the file .I acl_filedoes not exist,.I acl_initializecreates it with mode.IR mode .If the file.I acl_fileexists,.I acl_initializeremoves all members. Returns 0 if successful,nonzero otherwise. WARNING: Mode argument is likely to change withthe eventual introduction of an ACL service. .SH NOTESIn the presence of concurrency, there is a very small chance that.I acl_addor.I acl_deletecould report success even though it would havehad no effect. This is a necessary side effect of using lock filesfor concurrency control rather than flock(2), which is not supportedby NFS..PPThe current implementation caches ACLs in memory in a hash-tableformat for increased efficiency in checking membership; one effect ofthe caching scheme is that one file descriptor will be kept open foreach ACL cached, up to a maximum of 8..SH SEE ALSOkerberos(3), krb_get_lrealm(3).SH AUTHORJames Aspnes (MIT Project Athena)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -