Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
11c52cb4
Unverified
Commit
11c52cb4
authored
Jul 24, 2018
by
Wolfgang Bumiller
Committed by
Christian Brauner
Jul 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: lxc-test-apparmor-mount: check environment early
don't kill all my processes when running it as user... Signed-off-by:
Wolfgang Bumiller
<
w.bumiller@proxmox.com
>
parent
7d08ed65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
lxc-test-apparmor-mount
src/tests/lxc-test-apparmor-mount
+10
-10
No files found.
src/tests/lxc-test-apparmor-mount
View file @
11c52cb4
...
@@ -23,6 +23,16 @@
...
@@ -23,6 +23,16 @@
set
-e
set
-e
# Only run on a normally configured ubuntu lxc system
if
[
!
-d
/sys/class/net/lxcbr0
]
;
then
echo
"lxcbr0 is not configured."
exit
1
fi
if
[
"
$(
id
-u
)
"
!=
"0"
]
;
then
echo
"ERROR: Must run as root."
exit
1
fi
if
[
-f
/proc/self/ns/cgroup
]
;
then
if
[
-f
/proc/self/ns/cgroup
]
;
then
default_profile
=
"lxc-container-default-cgns (enforce)"
default_profile
=
"lxc-container-default-cgns (enforce)"
else
else
...
@@ -74,16 +84,6 @@ clear_log() {
...
@@ -74,16 +84,6 @@ clear_log() {
trap
cleanup
exit
trap
cleanup
exit
# Only run on a normally configured ubuntu lxc system
if
[
!
-d
/sys/class/net/lxcbr0
]
;
then
echo
"lxcbr0 is not configured."
exit
1
fi
if
[
"
$(
id
-u
)
"
!=
"0"
]
;
then
echo
"ERROR: Must run as root."
exit
1
fi
chmod
0666
"
$logfile
"
chmod
0666
"
$logfile
"
# This would be much simpler if we could run it as
# This would be much simpler if we could run it as
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment