Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
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
isgphys
python
Commits
5b7a2248
Commit
5b7a2248
authored
6 years ago
by
Sven Mäder
Browse files
Options
Downloads
Patches
Plain Diff
Add bad permisison/owner count, add sengun exclude
parent
de2ab290
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/check-home-permissions.py
+2
-0
2 additions, 0 deletions
bin/check-home-permissions.py
bin/xymon-home.py
+5
-1
5 additions, 1 deletion
bin/xymon-home.py
with
7 additions
and
1 deletion
bin/check-home-permissions.py
+
2
−
0
View file @
5b7a2248
...
@@ -192,6 +192,8 @@ if __name__ == '__main__':
...
@@ -192,6 +192,8 @@ if __name__ == '__main__':
check_shares
()
check_shares
()
print
(
'
home dirs:
'
+
str
(
home_dirs
))
print
(
'
home dirs:
'
+
str
(
home_dirs
))
print
(
'
bad owner:
'
+
str
(
len
(
owner
)))
print
(
'
bad permission:
'
+
str
(
len
(
permission
)))
print
(
'
strange ldap users:
'
+
str
(
len
(
users
)))
print
(
'
strange ldap users:
'
+
str
(
len
(
users
)))
print
(
'
no blocked attr:
'
+
str
(
len
(
no_blocked
)))
print
(
'
no blocked attr:
'
+
str
(
len
(
no_blocked
)))
print
(
'
home not closed:
'
+
str
(
len
(
not_closed
)))
print
(
'
home not closed:
'
+
str
(
len
(
not_closed
)))
...
...
This diff is collapsed.
Click to expand it.
bin/xymon-home.py
+
5
−
1
View file @
5b7a2248
...
@@ -31,6 +31,7 @@ no_nis_map = []
...
@@ -31,6 +31,7 @@ no_nis_map = []
no_blocked
=
[]
no_blocked
=
[]
not_closed
=
[]
not_closed
=
[]
not_open
=
[]
not_open
=
[]
permission_exclude
=
[
'
sengun
'
]
class
Home
(
object
):
class
Home
(
object
):
...
@@ -124,7 +125,8 @@ def check_homes(top):
...
@@ -124,7 +125,8 @@ def check_homes(top):
owner
.
append
(
home
)
owner
.
append
(
home
)
if
bad_permission
(
home
):
if
bad_permission
(
home
):
permission
.
append
(
home
)
if
f
not
in
permission_exclude
:
permission
.
append
(
home
)
if
posix1e
.
has_extended
(
home
.
path
):
if
posix1e
.
has_extended
(
home
.
path
):
acl
.
append
(
home
)
acl
.
append
(
home
)
...
@@ -193,6 +195,8 @@ def run_check(xymon):
...
@@ -193,6 +195,8 @@ def run_check(xymon):
check_shares
()
check_shares
()
content
+=
'
home dirs:
'
+
str
(
home_dirs
)
+
'
<br/>
'
content
+=
'
home dirs:
'
+
str
(
home_dirs
)
+
'
<br/>
'
content
+=
'
bad owner:
'
+
str
(
len
(
owner
))
+
'
<br/>
'
content
+=
'
bad permission:
'
+
str
(
len
(
permission
))
+
'
<br/>
'
content
+=
'
strange ldap users:
'
+
str
(
len
(
users
))
+
'
<br/>
'
content
+=
'
strange ldap users:
'
+
str
(
len
(
users
))
+
'
<br/>
'
content
+=
'
no blocked attr:
'
+
str
(
len
(
no_blocked
))
+
'
<br/>
'
content
+=
'
no blocked attr:
'
+
str
(
len
(
no_blocked
))
+
'
<br/>
'
content
+=
'
home not closed:
'
+
str
(
len
(
not_closed
))
+
'
<br/>
'
content
+=
'
home not closed:
'
+
str
(
len
(
not_closed
))
+
'
<br/>
'
...
...
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