Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Context Sensitive Group
freedombone
Commits
73316797
Commit
73316797
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Change rule to exclude nonexistent directory
parent
8dfaa5d9
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
src/freedombone-utils-setup
+24
-0
24 additions, 0 deletions
src/freedombone-utils-setup
tests/check-uniq-names.sh
+1
-1
1 addition, 1 deletion
tests/check-uniq-names.sh
with
25 additions
and
1 deletion
src/freedombone-utils-setup
+
24
−
0
View file @
73316797
...
...
@@ -425,6 +425,7 @@ function set_sticky_bits {
}
function
lockdown_permissions
{
# All commands owned by root
if
[
-d
/bin
]
;
then
chown
root:root /bin/
*
fi
...
...
@@ -448,6 +449,7 @@ function lockdown_permissions {
chmod
-R
+r /usr/share/
${
PROJECT_NAME
}
fi
# All libraries owned by root
if
[
-d
/lib
]
;
then
chown
-R
root:root /lib/
*
fi
...
...
@@ -461,10 +463,12 @@ function lockdown_permissions {
chown
-R
root:root /usr/lib64/
*
fi
# sudo permissions
chmod
4755 /usr/bin/sudo
chmod
4755 /usr/lib/sudo/sudoers.so
chown
root:root /etc/sudoers
# permissions on email commands
if
[
-f
/usr/bin/procmail
]
;
then
chmod
6755 /usr/bin/procmail
fi
...
...
@@ -476,6 +480,26 @@ function lockdown_permissions {
fi
set_sticky_bits
# Create some directories to correspond with users in passwords file
if
[
!
-d
/var/spool/lpd
]
;
then
mkdir
/var/spool/lpd
fi
if
[
!
-d
/var/spool/news
]
;
then
mkdir
/var/spool/news
fi
if
[
!
-d
/var/spool/uucp
]
;
then
mkdir
/var/spool/uucp
fi
if
[
!
-d
/var/list
]
;
then
mkdir
/var/list
fi
if
[
!
-d
/var/lib/gnats
]
;
then
mkdir
/var/lib/gnats
fi
if
[
!
-d
/var/lib/saned
]
;
then
mkdir
/var/lib/saned
fi
}
function
disable_core_dumps
{
...
...
This diff is collapsed.
Click to expand it.
tests/check-uniq-names.sh
+
1
−
1
View file @
73316797
#!/bin/bash
if
[
$(
pwck
-r
q
|
wc
-l
)
-ne
0
]
;
then
if
[
$(
pwck
-r
|
sed
'/nonexist/d'
|
sed
'/\/home\//d'
|
sed
'/\/run\//d'
|
sed
'/no changes/d'
|
wc
-l
)
-ne
0
]
;
then
exit
1
fi
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