Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
argotest
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Reis
argotest
Commits
c7cc3f56
Commit
c7cc3f56
authored
Dec 20, 2018
by
Valentin Reis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a check for the output directory not being mounted with nosuid.
parent
3da201bc
Pipeline
#4739
passed with stage
in 44 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
argo/src/Argo/Stack.hs
argo/src/Argo/Stack.hs
+16
-2
No files found.
argo/src/Argo/Stack.hs
View file @
c7cc3f56
{-# LANGUAGE ScopedTypeVariables,
{-# LANGUAGE
ScopedTypeVariables,
LambdaCase,
RecordWildCards,
OverloadedStrings,
...
...
@@ -36,6 +37,7 @@ import Data.ByteString.Char8 as C8
hiding
(
empty
)
import
Control.Exception.Base
import
Data.Maybe
import
Control.Foldl
as
Fold
cleanLeftoverProcesses
::
Shell
()
...
...
@@ -69,10 +71,22 @@ cleanLeftovers StackArgs {..} = do
printInfo
"Cleaning leftover sockets.
\n
"
CM
.
mapM_
cleanSocket
[
"/tmp/nrm-downstream-in"
,
"/tmp/nrm-upstream-in"
]
checkFsAttributes
::
StackArgs
->
Shell
()
checkFsAttributes
StackArgs
{
..
}
=
do
let
x
=
case
toText
workingDirectory
of
Left
x
->
x
Right
x
->
x
let
findmnt
=
inproc
"findmnt"
[
"-T"
,
x
,
"-o"
,
"OPTIONS"
]
empty
b
<-
liftIO
$
Turtle
.
Shell
.
fold
(
grep
(
has
"nosuid"
)
findmnt
)
Fold
.
length
when
(
b
>
0
)
$
dieRed
$
format
(
"The output directory, "
%
fp
%
", must not mounted with
\"
nosuid
\"
"
)
workingDirectory
prepareDaemon
::
StackArgs
->
Shell
(
IO
(
Either
PatternMatched
(
ExitCode
,
()
,
()
)))
prepareDaemon
StackArgs
{
..
}
=
do
prepareDaemon
sa
@
StackArgs
{
..
}
=
do
mktree
workingDirectory
checkFsAttributes
sa
cd
workingDirectory
myWhich
"daemon"
confPath
<-
myWhich
"argo_nodeos_config"
...
...
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