# MCetcx.ctl:285: Collects Extended etc Information # $Id: MCetcx.ctl,v 1.4 2014/07/17 12:33:59 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/EXPLORER/MCetcx.ctl,v 1.4 2014/07/17 12:33:59 RDA Exp $ # # Change History # 20140710 PRA Add zones documentation. =head1 NAME EXPLORER:MCetcx - Collects Extended etc Information =head1 DESCRIPTION This module collects extended etc information. =cut use Mrc # Initialization var $VALIDATE = true keep $VALIDATE section begin var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' run EXPLORER:XPLRlib('etcextended') #------------------------------------------------------------------------------ # XPLR_etcx section #------------------------------------------------------------------------------ section XPLR_etcx call log_run('Processing ETCX sections ...') =head2 etcx - /etc/security Files Collects the files from the F directory structure, except from the F and F subdirectories. =cut pretoc '2:/etc/security Files' # Perform the collections loop $rec (get_zones(false)) {if $loc = defined($nam = $rec->[0]) {var ($ttl,$pre,$exe) = (concat('From Zone ',$nam),\ concat('zones/',$nam),\ concat('/usr/sbin/zlogin ',$nam)) call log_info(concat('etcx: RUNNING: zone ',$nam),\ concat(' Inside ETCX collection, collecting from zone ',$nam)) } else var ($ttl,$pre,$exe) = ('From Global Zone') var $top = $rec->[1] var @fil = () report concat('etcx_z_',nvl($nam,'global')) title '---+!! ',$ttl title $TOC prefix {write '---+!! /etc/security files' write ' * ``audit`` and ``dev`` directories are skipped.' write ' * Links point to files that have been collected in their original \ format. Opening them directly in your browser can present risks. \ To prevent them, access the file outside the browser or use the \ link to save them and use an adequate viewer.' write '|*File Path*| *Size*|*Last Modified Date*|' } loop $fil (grepDir(catDir($top,'etc','security'),'^(\.+|audit|dev)$','nv')) call push(@fil,\ ['B',concat('etc/security/',$fil),catFile('/etc/security',$fil),\ testDir('d',catFile($top,'etc','security',$fil))]) call do_collect_rem($pre,$top,@fil) if hasOutput(true) write $TOP # Add the report to the table of content if isCreated(true) toc '3:[[',getFile(),'][rda_report][',$ttl,']]' } unpretoc =head2 Zones =for zone begin etcextended By default, collects information from the global zone only. When local zone collections are requested explicitly, collects the files from the F directory structure, except from the F and F subdirectories from the selected local zones. =for zone end =head1 SEE ALSO L, L, L =begin credits =over 10 =item RDA 4.25: Chris Beal. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. =head1 TRADEMARK NOTICE Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. =cut