forked from s1th/system_i_audit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAS4AnzProfiles_AttnKey.pm
92 lines (78 loc) · 2.68 KB
/
AS4AnzProfiles_AttnKey.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
package AS4AnzProfiles_AttnKey;
require Exporter;
use strict;
use warnings;
our (@ISA, @EXPORT);
@ISA = qw(Exporter);
@EXPORT= qw($sheet_name);
#=================
# Global Variables
#=================
our $sheet_name = "UP.AttnKey";
#================
# Local Variables
#================
my $purpose; #ppc
my $procedure; # |
my $domain; # |
my $reference; # v
#===============================
# Analyze user profile ownership
#===============================
sub analyze
{
#add w/p
AS4XL::add_sheet($sheet_name);
#add title and column headings
AS4XL::add_header("Attn Key Programs","ID","Name","Status","PassNone","AttnKeyProgram","AttnKeyLibrary");
#add ppc to audit program
$purpose = "To ensure that user profile attention key programs are appropriate. The attention " .
"key program is called when a user presses the F1 key. Thus this should be the IBM help " .
"assistance program (*ASSIST - QEZMAIN). Any other value should be confirmed as appropriate.";
$procedure = "Run: audusrprf or dspusrprf. Next, execute this query on outfile:\n\n" .
"select trim(upuprf),\n" .
"trim(uptext),\n" .
"trim(upstat),\n" .
"trim(uppwon),\n" .
"trim(upatpg),\n" .
"trim(upatpl)\n" .
"from [OUTFILE]\n" .
"where trim(upatpg) != '*NONE'\n" .
"order by upuprf\n\n" .
"The output of this query will be all user profiles with their name, status, " .
"sign-on ability and the attention key program and library.";
$domain = "User Profiles";
$reference = $sheet_name;
AS4XL::add_ppc($purpose,$domain,$procedure,$reference);
my $sv = "QATNPGM";
my $sv_setting = "QEZMAIN QSYS";
for my $id ( sort keys %AS4Data::usrprf )
{
my $attnpg = $AS4Data::usrprf{$id}->{attn_prog};
if ($attnpg eq "*SYSVAL")
{
#specified at the system value level
if ( ($AS4Data::sv{$sv}->{current} ne $sv_setting ) && ( $AS4Data::sv{$sv}->{current} ne "*NONE") )
{
#system value is something other than the assist program (or nothing)
$attnpg = $AS4Data::sv{$sv}->{current};
}
else
{
next;
}
}
elsif ( ($attnpg eq $sv_setting) || ($attnpg eq "*NONE") )
{
#set appropriately at user profile level
next;
}
AS4XL::write_row($id,$AS4Data::usrprf{$id}->{name},$AS4Data::usrprf{$id}->{status},$AS4Data::usrprf{$id}->{pass_none},$attnpg,$AS4Data::usrprf{$id}->{attn_prog_lib});
} #end $id for()
#link to audit program
AS4XL::add_ap_link($sheet_name);
}
#=============
# Return value
#=============
return 1;