|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T a
Length: 1907 (0x773) Types: TextFile Names: »acl_info.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« └─⟦d3ac74d73⟧ └─⟦this⟧ »isode-5.0/quipu/acl_info.c«
/* acl_info.c - ? */ #ifndef lint static char *rcsid = "$Header: /f/osi/quipu/RCS/acl_info.c,v 6.0 89/03/18 23:41:01 mrose Rel $"; #endif /* * $Header: /f/osi/quipu/RCS/acl_info.c,v 6.0 89/03/18 23:41:01 mrose Rel $ * * * $Log: acl_info.c,v $ * Revision 6.0 89/03/18 23:41:01 mrose * Release 5.0 * */ /* * NOTICE * * Acquisition, use, and distribution of this module and related * materials are subject to the restrictions of a license agreement. * Consult the Preface in the User's Manual for the full terms of * this agreement. * */ #include "quipu/util.h" #include "quipu/entry.h" extern DN super_user; extern LLog * log_dsap; extern int dn_print (); check_acl (who,mode,acl,node) register DN who; register int mode; struct acl_info *acl; DN node; { register struct acl_info *ptr; /* pslog (log_dsap,LLOG_DEBUG,"User is ",dn_print,(caddr_t)who); pslog (log_dsap,LLOG_DEBUG,"Node is ",dn_print,(caddr_t)node); */ dn_decode (who); dn_decode (node); for (ptr=acl; ptr!= NULLACL_INFO; ptr=ptr->acl_next) { switch (ptr->acl_selector_type) { case ACL_ENTRY: if ( mode <= ptr->acl_categories ) { if (who == NULLDN) { break; } if (dn_cmp (who,node) == OK) return (OK); } break; case ACL_OTHER: if ( mode <= ptr->acl_categories ) return (OK); break; case ACL_PREFIX: if ( mode <= ptr->acl_categories ) { if ( who == NULLDN) break; if (check_dnseq_prefix (ptr->acl_name,who) == OK) return (OK); } break; case ACL_GROUP: if ( mode <= ptr->acl_categories ) { if ( who == NULLDN) { break; } if (check_dnseq (ptr->acl_name,who) == OK) return (OK); } break; } } /* one last try for access */ if (dn_cmp (who,super_user) == OK) return (OK); LLOG (log_dsap,LLOG_NOTICE,("acl - access denied")); return (NOTOK); }