Print this page
OS-208 DTrace needs to use zone_did to match zone-limited enablings


 712 const auditinfo_addr_t *
 713 crgetauinfo(const cred_t *cr)
 714 {
 715         return ((const auditinfo_addr_t *)CR_AUINFO(cr));
 716 }
 717 
 718 auditinfo_addr_t *
 719 crgetauinfo_modifiable(cred_t *cr)
 720 {
 721         return (CR_AUINFO(cr));
 722 }
 723 
 724 zoneid_t
 725 crgetzoneid(const cred_t *cr)
 726 {
 727         return (cr->cr_zone == NULL ?
 728             (cr->cr_uid == -1 ? (zoneid_t)-1 : GLOBAL_ZONEID) :
 729             cr->cr_zone->zone_id);
 730 }
 731 








 732 projid_t
 733 crgetprojid(const cred_t *cr)
 734 {
 735         return (cr->cr_projid);
 736 }
 737 
 738 zone_t *
 739 crgetzone(const cred_t *cr)
 740 {
 741         return (cr->cr_zone);
 742 }
 743 
 744 struct ts_label_s *
 745 crgetlabel(const cred_t *cr)
 746 {
 747         return (cr->cr_label ?
 748             cr->cr_label :
 749             (cr->cr_zone ? cr->cr_zone->zone_slabel : NULL));
 750 }
 751 




 712 const auditinfo_addr_t *
 713 crgetauinfo(const cred_t *cr)
 714 {
 715         return ((const auditinfo_addr_t *)CR_AUINFO(cr));
 716 }
 717 
 718 auditinfo_addr_t *
 719 crgetauinfo_modifiable(cred_t *cr)
 720 {
 721         return (CR_AUINFO(cr));
 722 }
 723 
 724 zoneid_t
 725 crgetzoneid(const cred_t *cr)
 726 {
 727         return (cr->cr_zone == NULL ?
 728             (cr->cr_uid == -1 ? (zoneid_t)-1 : GLOBAL_ZONEID) :
 729             cr->cr_zone->zone_id);
 730 }
 731 
 732 zoneid_t
 733 crgetzonedid(const cred_t *cr)
 734 {
 735         return (cr->cr_zone == NULL ?
 736             (cr->cr_uid == -1 ? (zoneid_t)-1 : GLOBAL_ZONEID) :
 737             cr->cr_zone->zone_did);
 738 }
 739 
 740 projid_t
 741 crgetprojid(const cred_t *cr)
 742 {
 743         return (cr->cr_projid);
 744 }
 745 
 746 zone_t *
 747 crgetzone(const cred_t *cr)
 748 {
 749         return (cr->cr_zone);
 750 }
 751 
 752 struct ts_label_s *
 753 crgetlabel(const cred_t *cr)
 754 {
 755         return (cr->cr_label ?
 756             cr->cr_label :
 757             (cr->cr_zone ? cr->cr_zone->zone_slabel : NULL));
 758 }
 759