4.3BSD-Reno/share/man/cat3/acl_check.0

Compare this file to the similar file:
Show the results in this format:




ACL_CHECK(3)		       4.0		     ACL_CHECK(3)



NNAAMMEE
     acl_canonicalize_principal, acl_check, acl_exact_match,
     acl_add, acl_delete, acl_initialize - Access control list
     routines

SSYYNNOOPPSSIISS
     cccc <<ffiilleess>> --llaaccll --llkkrrbb

     ##iinncclluuddee <<kkrrbb..hh>>

     aaccll__ccaannoonniiccaalliizzee__pprriinncciippaall((pprriinncciippaall,, bbuuff))
     cchhaarr **pprriinncciippaall;;
     cchhaarr **bbuuff;;

     aaccll__cchheecckk((aaccll,, pprriinncciippaall))
     cchhaarr **aaccll;;
     cchhaarr **pprriinncciippaall;;

     aaccll__eexxaacctt__mmaattcchh((aaccll,, pprriinncciippaall))
     cchhaarr **aaccll;;
     cchhaarr **pprriinncciippaall;;

     aaccll__aadddd((aaccll,, pprriinncciippaall))
     cchhaarr **aaccll;;
     cchhaarr **pprriinncciippaall;;

     aaccll__ddeelleettee((aaccll,, pprriinncciippaall))
     cchhaarr **aaccll;;
     cchhaarr **pprriinncciippaall;;

     aaccll__iinniittiiaalliizzee((aaccll__ffiillee,, mmooddee))
     cchhaarr **aaccll__ffiillee;;
     iinntt mmooddee;;

DDEESSCCRRIIPPTTIIOONN
     IInnttrroodduuccttiioonn

     An access control list (ACL) is a list of principals, where
     each principal is represented by a text string which cannot
     contain whitespace.  The library allows application programs
     to refer to named access control lists to test membership
     and to atomically add and delete principals using a natural
     and intuitive interface.  At present, the names of access
     control lists are required to be Unix filenames, and refer
     to human-readable Unix files; in the future, when a
     networked ACL server is implemented, the names may refer to
     a different namespace specific to the ACL service.

     PPrriinncciippaall NNaammeess

     Principal names have the form
	  <name>[.<instance>][@<realm>]



Printed 7/27/90             Kerberos				1






ACL_CHECK(3)		       4.0		     ACL_CHECK(3)



     e.g.:
	  asp
	  asp.root
	  asp@ATHENA.MIT.EDU
	  asp.@ATHENA.MIT.EDU
	  asp.root@ATHENA.MIT.EDU
     It is possible for principals to be underspecified.  If an
     instance is missing, it is assumed to be "".  If realm is
     missing, it is assumed to be the local realm as determined
     by _k_r_b__g_e_t__l_r_e_a_l_m(3).  The canonical form contains all of
     name, instance, and realm; the acl_add and acl_delete rou-
     tines will always leave the file in that form.  Note that
     the canonical form of asp@ATHENA.MIT.EDU is actually
     asp.@ATHENA.MIT.EDU.

     RRoouuttiinneess

     _a_c_l__c_a_n_o_n_i_c_a_l_i_z_e__p_r_i_n_c_i_p_a_l stores the canonical form of
     _p_r_i_n_c_i_p_a_l in _b_u_f.	_B_u_f must contain enough space 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 /_u_s_r/_i_n_c_l_u_d_e/_k_r_b._h.

     _a_c_l__c_h_e_c_k returns nonzero if _p_r_i_n_c_i_p_a_l appears in _a_c_l.
     Returns 0 if principal does not appear in acl, or if an
     error occurs.  Canonicalizes principal before checking, and
     allows the ACL to contain wildcards.  The only supported
     wildcards are entries of the form name.*@realm, *.*@realm,
     and *.*@*.  An asterisk matches any value for the its com-
     ponent field.  For example, "jtkohl.*@*" would match princi-
     pal jtkohl, with any instance and any realm.

     _a_c_l__e_x_a_c_t__m_a_t_c_h performs like _a_c_l__c_h_e_c_k, but does no canoni-
     calization or wildcard matching.

     _a_c_l__a_d_d atomically adds _p_r_i_n_c_i_p_a_l to _a_c_l.	Returns 0 if suc-
     cessful, nonzero otherwise.  It is considered a failure if
     _p_r_i_n_c_i_p_a_l is already in _a_c_l.  This routine will canonicalize
     _p_r_i_n_c_i_p_a_l, but will treat wildcards literally.

     _a_c_l__d_e_l_e_t_e atomically deletes _p_r_i_n_c_i_p_a_l from _a_c_l.	Returns 0
     if successful, nonzero otherwise.	It is considered a
     failure if _p_r_i_n_c_i_p_a_l is not already in _a_c_l.  This routine
     will canonicalize _p_r_i_n_c_i_p_a_l, but will treat wildcards
     literally.

     _a_c_l__i_n_i_t_i_a_l_i_z_e initializes _a_c_l__f_i_l_e.  If the file _a_c_l__f_i_l_e
     does not exist, _a_c_l__i_n_i_t_i_a_l_i_z_e creates it with mode _m_o_d_e.
     If the file _a_c_l__f_i_l_e exists, _a_c_l__i_n_i_t_i_a_l_i_z_e removes all
     members.  Returns 0 if successful, nonzero otherwise.  WARN-
     ING: Mode argument is likely to change with the eventual
     introduction of an ACL service.



Printed 7/27/90             Kerberos				2






ACL_CHECK(3)		       4.0		     ACL_CHECK(3)



NNOOTTEESS
     In the presence of concurrency, there is a very small chance
     that _a_c_l__a_d_d or _a_c_l__d_e_l_e_t_e could report success even though
     it would have had no effect.  This is a necessary side
     effect of using lock files for concurrency control rather
     than flock(2), which is not supported by NFS.

     The current implementation caches ACLs in memory in a hash-
     table format for increased efficiency in checking member-
     ship; one effect of the caching scheme is that one file
     descriptor will be kept open for each ACL cached, up to a
     maximum of 8.

SSEEEE AALLSSOO
     kerberos(3), krb_get_lrealm(3)

AAUUTTHHOORR
     James Aspnes (MIT Project Athena)





































Printed 7/27/90             Kerberos				3