Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
secrules
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenVMS
tools
secrules
Commits
2239bc839c80
Commit
2239bc839c80
authored
5 years ago
by
Jean-Francois Pieronne
Browse files
Options
Downloads
Patches
Plain Diff
secrules/rules03.py initial version
parent
1cdce16e9f0a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
secrules/rules03.py
+33
-0
33 additions, 0 deletions
secrules/rules03.py
with
33 additions
and
0 deletions
secrules/rules03.py
0 → 100644
+
33
−
0
View file @
2239bc83
# -*- coding: iso-8859-1 -*-
__version__
=
'
1.0
'
from
common
import
level_rule
from
FindFile
import
FindFile
from
get_security
import
get_security
@level_rule
(
2
)
def
rule0302
(
fo
,
fmt
):
"""
If the change was not approved by the system manager, then it
signifies an unauthorized change was made to the file, and represents an area
of vulnerability with regards to protection of critical files.
"""
if
not
fmt
:
print
>>
fo
print
>>
fo
,
'
Rule 0302
'
print
>>
fo
,
'
=========
'
with
FindFile
(
'
SYS$SYSROOT:[000000...]*.*
'
)
as
fi
:
for
fn
in
fi
:
id
=
get_security
(
fn
)[
0
]
if
(
id
!=
'
SYSTEM
'
)
and
(
id
!=
'
[1,1]
'
):
if
(
fn
!=
'
MOM$SYSTEM
'
)
and
(
id
!=
'
[376,375]
'
):
if
fmt
:
print
>>
fo
,
'
03022
'
,
fn
else
:
print
>>
fo
,
fn
print
>>
fo
,
'
'
*
10
,
id
if
__name__
==
'
__main__
'
:
import
sys
fo
=
open
(
sys
.
argv
[
1
],
'
w
'
)
if
len
(
sys
.
argv
)
>
1
else
sys
.
stdout
rule0302
(
fo
,
len
(
sys
.
argv
)
>
2
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment