10Sstevel@tonic-gate /* 2*7934SMark.Phalan@Sun.COM * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 30Sstevel@tonic-gate * Use is subject to license terms. 40Sstevel@tonic-gate */ 50Sstevel@tonic-gate 60Sstevel@tonic-gate 70Sstevel@tonic-gate 80Sstevel@tonic-gate #ifdef __cplusplus 90Sstevel@tonic-gate extern "C" { 100Sstevel@tonic-gate #endif 110Sstevel@tonic-gate 120Sstevel@tonic-gate 130Sstevel@tonic-gate /* 140Sstevel@tonic-gate * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 150Sstevel@tonic-gate * 160Sstevel@tonic-gate * Openvision retains the copyright to derivative works of 170Sstevel@tonic-gate * this source code. Do *NOT* create a derivative of this 180Sstevel@tonic-gate * source code before consulting with your legal department. 190Sstevel@tonic-gate * Do *NOT* integrate *ANY* of this source code into another 200Sstevel@tonic-gate * product before consulting with your legal department. 210Sstevel@tonic-gate * 220Sstevel@tonic-gate * For further information, read the top-level Openvision 230Sstevel@tonic-gate * copyright which is contained in the top-level MIT Kerberos 240Sstevel@tonic-gate * copyright. 250Sstevel@tonic-gate * 260Sstevel@tonic-gate * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 270Sstevel@tonic-gate * 280Sstevel@tonic-gate */ 290Sstevel@tonic-gate 300Sstevel@tonic-gate 310Sstevel@tonic-gate /* 320Sstevel@tonic-gate * kadmin/v5server/kadm5_defs.h 330Sstevel@tonic-gate * 340Sstevel@tonic-gate * Copyright 1995 by the Massachusetts Institute of Technology. 350Sstevel@tonic-gate * All Rights Reserved. 360Sstevel@tonic-gate * 370Sstevel@tonic-gate * Export of this software from the United States of America may 380Sstevel@tonic-gate * require a specific license from the United States Government. 390Sstevel@tonic-gate * It is the responsibility of any person or organization contemplating 400Sstevel@tonic-gate * export to obtain such a license before exporting. 410Sstevel@tonic-gate * 420Sstevel@tonic-gate * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 430Sstevel@tonic-gate * distribute this software and its documentation for any purpose and 440Sstevel@tonic-gate * without fee is hereby granted, provided that the above copyright 450Sstevel@tonic-gate * notice appear in all copies and that both that copyright notice and 460Sstevel@tonic-gate * this permission notice appear in supporting documentation, and that 470Sstevel@tonic-gate * the name of M.I.T. not be used in advertising or publicity pertaining 480Sstevel@tonic-gate * to distribution of the software without specific, written prior 490Sstevel@tonic-gate * permission. Furthermore if you modify this software you must label 500Sstevel@tonic-gate * your software as modified software and not distribute it in such a 510Sstevel@tonic-gate * fashion that it might be confused with the original M.I.T. software. 520Sstevel@tonic-gate * M.I.T. makes no representations about the suitability of 530Sstevel@tonic-gate * this software for any purpose. It is provided "as is" without express 540Sstevel@tonic-gate * or implied warranty. 550Sstevel@tonic-gate * 560Sstevel@tonic-gate */ 570Sstevel@tonic-gate 58*7934SMark.Phalan@Sun.COM #ifndef SERVER_ACL_H__ 59*7934SMark.Phalan@Sun.COM #define SERVER_ACL_H__ 60*7934SMark.Phalan@Sun.COM 610Sstevel@tonic-gate #include <admin.h> /* SUNWresync121 XXX */ 620Sstevel@tonic-gate 630Sstevel@tonic-gate /* 640Sstevel@tonic-gate * Debug definitions. 650Sstevel@tonic-gate */ 660Sstevel@tonic-gate #define DEBUG_SPROC 1 670Sstevel@tonic-gate #define DEBUG_OPERATION 2 680Sstevel@tonic-gate #define DEBUG_HOST 4 690Sstevel@tonic-gate #define DEBUG_REALM 8 700Sstevel@tonic-gate #define DEBUG_REQUESTS 16 710Sstevel@tonic-gate #define DEBUG_ACL 32 720Sstevel@tonic-gate #define DEBUG_PROTO 64 730Sstevel@tonic-gate #define DEBUG_CALLS 128 740Sstevel@tonic-gate #define DEBUG_NOSLAVES 256 750Sstevel@tonic-gate #ifdef DEBUG 760Sstevel@tonic-gate #define DPRINT(l1, cl, al) if ((cl & l1) != 0) printf al 770Sstevel@tonic-gate #else /* DEBUG */ 780Sstevel@tonic-gate #define DPRINT(l1, cl, al) 790Sstevel@tonic-gate #endif /* DEBUG */ 800Sstevel@tonic-gate #define DLOG(l1, cl, msg) if ((cl & l1) != 0) \ 810Sstevel@tonic-gate com_err(programname, 0, msg) 820Sstevel@tonic-gate 830Sstevel@tonic-gate /* 840Sstevel@tonic-gate * Access control bits. 850Sstevel@tonic-gate */ 860Sstevel@tonic-gate #define ACL_INQUIRE 1 /* GET */ 870Sstevel@tonic-gate #define ACL_ADD 2 880Sstevel@tonic-gate #define ACL_MODIFY 4 890Sstevel@tonic-gate #define ACL_DELETE 8 900Sstevel@tonic-gate #define ACL_LIST 16 910Sstevel@tonic-gate #define ACL_CHANGEPW 32 920Sstevel@tonic-gate /* #define ACL_CHANGE_OWN_PW 16 */ 930Sstevel@tonic-gate /* #define ACL_EXTRACT 64 */ 940Sstevel@tonic-gate #define ACL_SETKEY 256 950Sstevel@tonic-gate #define ACL_MIGRATE 512 /* pam_krb5_migrate */ 960Sstevel@tonic-gate #define ACL_IPROP 65536 /* SUNW IProp */ 970Sstevel@tonic-gate #define ACL_RENAME (ACL_ADD+ACL_DELETE) 980Sstevel@tonic-gate 990Sstevel@tonic-gate #define ACL_ALL_MASK (ACL_ADD | \ 1000Sstevel@tonic-gate ACL_DELETE | \ 1010Sstevel@tonic-gate ACL_MODIFY | \ 1020Sstevel@tonic-gate ACL_CHANGEPW | \ 1030Sstevel@tonic-gate ACL_INQUIRE | \ 1040Sstevel@tonic-gate ACL_LIST | \ 1050Sstevel@tonic-gate ACL_IPROP | \ 1060Sstevel@tonic-gate ACL_MIGRATE | \ 1070Sstevel@tonic-gate ACL_SETKEY) 1080Sstevel@tonic-gate 1090Sstevel@tonic-gate typedef struct _restriction { 1100Sstevel@tonic-gate long mask; 1110Sstevel@tonic-gate krb5_flags require_attrs; 1120Sstevel@tonic-gate krb5_flags forbid_attrs; 1130Sstevel@tonic-gate krb5_deltat princ_lifetime; 1140Sstevel@tonic-gate krb5_deltat pw_lifetime; 1150Sstevel@tonic-gate krb5_deltat max_life; 1160Sstevel@tonic-gate krb5_deltat max_renewable_life; 1170Sstevel@tonic-gate long aux_attributes; 1180Sstevel@tonic-gate char *policy; 1190Sstevel@tonic-gate } restriction_t; 1200Sstevel@tonic-gate 1212881Smp153739 krb5_error_code kadm5int_acl_init 122781Sgtb (krb5_context, 1230Sstevel@tonic-gate int, 124781Sgtb char *); 1252881Smp153739 void kadm5int_acl_finish 126781Sgtb (krb5_context, 127781Sgtb int); 1282881Smp153739 krb5_boolean kadm5int_acl_check 129781Sgtb (krb5_context, 1300Sstevel@tonic-gate gss_name_t, 1310Sstevel@tonic-gate krb5_int32, 1320Sstevel@tonic-gate krb5_principal, 133781Sgtb restriction_t **); 1342881Smp153739 krb5_error_code kadm5int_acl_impose_restrictions 135781Sgtb (krb5_context, 1360Sstevel@tonic-gate kadm5_principal_ent_rec *, 1370Sstevel@tonic-gate long *, 138781Sgtb restriction_t *); 139*7934SMark.Phalan@Sun.COM #endif /* SERVER_ACL_H__ */ 1400Sstevel@tonic-gate #ifdef __cplusplus 1410Sstevel@tonic-gate } 1420Sstevel@tonic-gate #endif 1430Sstevel@tonic-gate 144