Sdiff server_acl.c
  1 /*
  2  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  3  * Use is subject to license terms.
  4  */
  5 
  6 #pragma ident   "@(#)server_acl.c       1.7     04/09/08 SMI" 
  7 
  8 /*
  9  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 
 10  *
 11  *      Openvision retains the copyright to derivative works of
 12  *      this source code.  Do *NOT* create a derivative of this
 13  *      source code before consulting with your legal department.
 14  *      Do *NOT* integrate *ANY* of this source code into another
 15  *      product before consulting with your legal department.
 16  *
 17  *      For further information, read the top-level Openvision
 18  *      copyright which is contained in the top-level MIT Kerberos
 19  *      copyright.
 20  *
 21  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
 22  *
 23  */
 24 
 25 
 26 /*


75 char *ae_name; 76 krb5_boolean ae_name_bad; 77 krb5_principal ae_principal; 78 krb5_int32 ae_op_allowed; 79 char *ae_target; 80 krb5_boolean ae_target_bad; 81 krb5_principal ae_target_princ; 82 char *ae_restriction_string; 83 /* eg: "-maxlife 3h -service +proxiable" */ 84 krb5_boolean ae_restriction_bad; 85 restriction_t *ae_restrictions; 86 } aent_t; 87 88 static const aop_t acl_op_table[] = { 89 { 'a', ACL_ADD }, 90 { 'd', ACL_DELETE }, 91 { 'm', ACL_MODIFY }, 92 { 'c', ACL_CHANGEPW }, 93 { 'i', ACL_INQUIRE }, 94 { 'l', ACL_LIST }, 95 { 's', ACL_SETKEY }, 96 { 'u', ACL_MIGRATE }, /* pam_krb5_migrate */ 97 { 'x', ACL_ALL_MASK }, 98 { '*', ACL_ALL_MASK }, 99 { '\0', 0 } 100 }; 101 102 typedef struct _wildstate { 103 int nwild; 104 krb5_data *backref[9]; 105 } wildstate_t; 106 107 static aent_t *acl_list_head = (aent_t *) NULL; 108 static aent_t *acl_list_tail = (aent_t *) NULL; 109 110 static const char *acl_acl_file = (char *) NULL; 111 static int acl_inited = 0; 112 static int acl_debug_level = 0; 113 /* 114 * This is the catchall entry. If nothing else appropriate is found, or in
  1 /*
  2  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  3  * Use is subject to license terms.
  4  */
  5 
  6 #pragma ident   "@(#)server_acl.c       1.6     04/04/01 SMI" 
  7 
  8 /*
  9  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 
 10  *
 11  *      Openvision retains the copyright to derivative works of
 12  *      this source code.  Do *NOT* create a derivative of this
 13  *      source code before consulting with your legal department.
 14  *      Do *NOT* integrate *ANY* of this source code into another
 15  *      product before consulting with your legal department.
 16  *
 17  *      For further information, read the top-level Openvision
 18  *      copyright which is contained in the top-level MIT Kerberos
 19  *      copyright.
 20  *
 21  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
 22  *
 23  */
 24 
 25 
 26 /*


75 char *ae_name; 76 krb5_boolean ae_name_bad; 77 krb5_principal ae_principal; 78 krb5_int32 ae_op_allowed; 79 char *ae_target; 80 krb5_boolean ae_target_bad; 81 krb5_principal ae_target_princ; 82 char *ae_restriction_string; 83 /* eg: "-maxlife 3h -service +proxiable" */ 84 krb5_boolean ae_restriction_bad; 85 restriction_t *ae_restrictions; 86 } aent_t; 87 88 static const aop_t acl_op_table[] = { 89 { 'a', ACL_ADD }, 90 { 'd', ACL_DELETE }, 91 { 'm', ACL_MODIFY }, 92 { 'c', ACL_CHANGEPW }, 93 { 'i', ACL_INQUIRE }, 94 { 'l', ACL_LIST }, 95 { 'p', ACL_IPROP }, /* SUNW IProp */ 96 { 's', ACL_SETKEY }, 97 { 'u', ACL_MIGRATE }, /* pam_krb5_migrate */ 98 { 'x', ACL_ALL_MASK }, 99 { '*', ACL_ALL_MASK }, 100 { '\0', 0 } 101 }; 102 103 typedef struct _wildstate { 104 int nwild; 105 krb5_data *backref[9]; 106 } wildstate_t; 107 108 static aent_t *acl_list_head = (aent_t *) NULL; 109 static aent_t *acl_list_tail = (aent_t *) NULL; 110 111 static const char *acl_acl_file = (char *) NULL; 112 static int acl_inited = 0; 113 static int acl_debug_level = 0; 114 /* 115 * This is the catchall entry. If nothing else appropriate is found, or in