17c478bd9Sstevel@tonic-gate /* 2*159d09a2SMark Phalan * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 37c478bd9Sstevel@tonic-gate * Use is subject to license terms. 47c478bd9Sstevel@tonic-gate */ 57c478bd9Sstevel@tonic-gate 67c478bd9Sstevel@tonic-gate 77c478bd9Sstevel@tonic-gate 87c478bd9Sstevel@tonic-gate #ifdef __cplusplus 97c478bd9Sstevel@tonic-gate extern "C" { 107c478bd9Sstevel@tonic-gate #endif 117c478bd9Sstevel@tonic-gate 127c478bd9Sstevel@tonic-gate 137c478bd9Sstevel@tonic-gate /* 147c478bd9Sstevel@tonic-gate * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 157c478bd9Sstevel@tonic-gate * 167c478bd9Sstevel@tonic-gate * Openvision retains the copyright to derivative works of 177c478bd9Sstevel@tonic-gate * this source code. Do *NOT* create a derivative of this 187c478bd9Sstevel@tonic-gate * source code before consulting with your legal department. 197c478bd9Sstevel@tonic-gate * Do *NOT* integrate *ANY* of this source code into another 207c478bd9Sstevel@tonic-gate * product before consulting with your legal department. 217c478bd9Sstevel@tonic-gate * 227c478bd9Sstevel@tonic-gate * For further information, read the top-level Openvision 237c478bd9Sstevel@tonic-gate * copyright which is contained in the top-level MIT Kerberos 247c478bd9Sstevel@tonic-gate * copyright. 257c478bd9Sstevel@tonic-gate * 267c478bd9Sstevel@tonic-gate * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 277c478bd9Sstevel@tonic-gate * 287c478bd9Sstevel@tonic-gate */ 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate /* 327c478bd9Sstevel@tonic-gate * kadmin/v5server/kadm5_defs.h 337c478bd9Sstevel@tonic-gate * 347c478bd9Sstevel@tonic-gate * Copyright 1995 by the Massachusetts Institute of Technology. 357c478bd9Sstevel@tonic-gate * All Rights Reserved. 367c478bd9Sstevel@tonic-gate * 377c478bd9Sstevel@tonic-gate * Export of this software from the United States of America may 387c478bd9Sstevel@tonic-gate * require a specific license from the United States Government. 397c478bd9Sstevel@tonic-gate * It is the responsibility of any person or organization contemplating 407c478bd9Sstevel@tonic-gate * export to obtain such a license before exporting. 417c478bd9Sstevel@tonic-gate * 427c478bd9Sstevel@tonic-gate * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 437c478bd9Sstevel@tonic-gate * distribute this software and its documentation for any purpose and 447c478bd9Sstevel@tonic-gate * without fee is hereby granted, provided that the above copyright 457c478bd9Sstevel@tonic-gate * notice appear in all copies and that both that copyright notice and 467c478bd9Sstevel@tonic-gate * this permission notice appear in supporting documentation, and that 477c478bd9Sstevel@tonic-gate * the name of M.I.T. not be used in advertising or publicity pertaining 487c478bd9Sstevel@tonic-gate * to distribution of the software without specific, written prior 497c478bd9Sstevel@tonic-gate * permission. Furthermore if you modify this software you must label 507c478bd9Sstevel@tonic-gate * your software as modified software and not distribute it in such a 517c478bd9Sstevel@tonic-gate * fashion that it might be confused with the original M.I.T. software. 527c478bd9Sstevel@tonic-gate * M.I.T. makes no representations about the suitability of 537c478bd9Sstevel@tonic-gate * this software for any purpose. It is provided "as is" without express 547c478bd9Sstevel@tonic-gate * or implied warranty. 557c478bd9Sstevel@tonic-gate * 567c478bd9Sstevel@tonic-gate */ 577c478bd9Sstevel@tonic-gate 58*159d09a2SMark Phalan #ifndef SERVER_ACL_H__ 59*159d09a2SMark Phalan #define SERVER_ACL_H__ 60*159d09a2SMark Phalan 617c478bd9Sstevel@tonic-gate #include <admin.h> /* SUNWresync121 XXX */ 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gate /* 647c478bd9Sstevel@tonic-gate * Debug definitions. 657c478bd9Sstevel@tonic-gate */ 667c478bd9Sstevel@tonic-gate #define DEBUG_SPROC 1 677c478bd9Sstevel@tonic-gate #define DEBUG_OPERATION 2 687c478bd9Sstevel@tonic-gate #define DEBUG_HOST 4 697c478bd9Sstevel@tonic-gate #define DEBUG_REALM 8 707c478bd9Sstevel@tonic-gate #define DEBUG_REQUESTS 16 717c478bd9Sstevel@tonic-gate #define DEBUG_ACL 32 727c478bd9Sstevel@tonic-gate #define DEBUG_PROTO 64 737c478bd9Sstevel@tonic-gate #define DEBUG_CALLS 128 747c478bd9Sstevel@tonic-gate #define DEBUG_NOSLAVES 256 757c478bd9Sstevel@tonic-gate #ifdef DEBUG 767c478bd9Sstevel@tonic-gate #define DPRINT(l1, cl, al) if ((cl & l1) != 0) printf al 777c478bd9Sstevel@tonic-gate #else /* DEBUG */ 787c478bd9Sstevel@tonic-gate #define DPRINT(l1, cl, al) 797c478bd9Sstevel@tonic-gate #endif /* DEBUG */ 807c478bd9Sstevel@tonic-gate #define DLOG(l1, cl, msg) if ((cl & l1) != 0) \ 817c478bd9Sstevel@tonic-gate com_err(programname, 0, msg) 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gate /* 847c478bd9Sstevel@tonic-gate * Access control bits. 857c478bd9Sstevel@tonic-gate */ 867c478bd9Sstevel@tonic-gate #define ACL_INQUIRE 1 /* GET */ 877c478bd9Sstevel@tonic-gate #define ACL_ADD 2 887c478bd9Sstevel@tonic-gate #define ACL_MODIFY 4 897c478bd9Sstevel@tonic-gate #define ACL_DELETE 8 907c478bd9Sstevel@tonic-gate #define ACL_LIST 16 917c478bd9Sstevel@tonic-gate #define ACL_CHANGEPW 32 927c478bd9Sstevel@tonic-gate /* #define ACL_CHANGE_OWN_PW 16 */ 937c478bd9Sstevel@tonic-gate /* #define ACL_EXTRACT 64 */ 947c478bd9Sstevel@tonic-gate #define ACL_SETKEY 256 957c478bd9Sstevel@tonic-gate #define ACL_MIGRATE 512 /* pam_krb5_migrate */ 967c478bd9Sstevel@tonic-gate #define ACL_IPROP 65536 /* SUNW IProp */ 977c478bd9Sstevel@tonic-gate #define ACL_RENAME (ACL_ADD+ACL_DELETE) 987c478bd9Sstevel@tonic-gate 997c478bd9Sstevel@tonic-gate #define ACL_ALL_MASK (ACL_ADD | \ 1007c478bd9Sstevel@tonic-gate ACL_DELETE | \ 1017c478bd9Sstevel@tonic-gate ACL_MODIFY | \ 1027c478bd9Sstevel@tonic-gate ACL_CHANGEPW | \ 1037c478bd9Sstevel@tonic-gate ACL_INQUIRE | \ 1047c478bd9Sstevel@tonic-gate ACL_LIST | \ 1057c478bd9Sstevel@tonic-gate ACL_IPROP | \ 1067c478bd9Sstevel@tonic-gate ACL_MIGRATE | \ 1077c478bd9Sstevel@tonic-gate ACL_SETKEY) 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gate typedef struct _restriction { 1107c478bd9Sstevel@tonic-gate long mask; 1117c478bd9Sstevel@tonic-gate krb5_flags require_attrs; 1127c478bd9Sstevel@tonic-gate krb5_flags forbid_attrs; 1137c478bd9Sstevel@tonic-gate krb5_deltat princ_lifetime; 1147c478bd9Sstevel@tonic-gate krb5_deltat pw_lifetime; 1157c478bd9Sstevel@tonic-gate krb5_deltat max_life; 1167c478bd9Sstevel@tonic-gate krb5_deltat max_renewable_life; 1177c478bd9Sstevel@tonic-gate long aux_attributes; 1187c478bd9Sstevel@tonic-gate char *policy; 1197c478bd9Sstevel@tonic-gate } restriction_t; 1207c478bd9Sstevel@tonic-gate 12156a424ccSmp153739 krb5_error_code kadm5int_acl_init 122505d05c7Sgtb (krb5_context, 1237c478bd9Sstevel@tonic-gate int, 124505d05c7Sgtb char *); 12556a424ccSmp153739 void kadm5int_acl_finish 126505d05c7Sgtb (krb5_context, 127505d05c7Sgtb int); 12856a424ccSmp153739 krb5_boolean kadm5int_acl_check 129505d05c7Sgtb (krb5_context, 1307c478bd9Sstevel@tonic-gate gss_name_t, 1317c478bd9Sstevel@tonic-gate krb5_int32, 1327c478bd9Sstevel@tonic-gate krb5_principal, 133505d05c7Sgtb restriction_t **); 13456a424ccSmp153739 krb5_error_code kadm5int_acl_impose_restrictions 135505d05c7Sgtb (krb5_context, 1367c478bd9Sstevel@tonic-gate kadm5_principal_ent_rec *, 1377c478bd9Sstevel@tonic-gate long *, 138505d05c7Sgtb restriction_t *); 139*159d09a2SMark Phalan #endif /* SERVER_ACL_H__ */ 1407c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1417c478bd9Sstevel@tonic-gate } 1427c478bd9Sstevel@tonic-gate #endif 1437c478bd9Sstevel@tonic-gate 144