Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
fca7f6fe
Commit
fca7f6fe
authored
18 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Add security test for strigger command
parent
7648b2e6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
testsuite/slurm_unit/slurmctld/security_2_7.sh
+38
-0
38 additions, 0 deletions
testsuite/slurm_unit/slurmctld/security_2_7.sh
with
38 additions
and
0 deletions
testsuite/slurm_unit/slurmctld/security_2_7.sh
0 → 100755
+
38
−
0
View file @
fca7f6fe
#!/bin/sh
# Define location of slurm executables (if not in default search path)
#slurm_bin="/home/jette/slurm.mdev/bin/"
# Build the script
wd
=
`
pwd
`
tst_in
=
$wd
/security_2_7_in
tst_out
=
$wd
/security_2_7_out
rm
-f
$tst_in
$tst_out
echo
'#!/bin/sh'
>
$tst_in
echo
"id >
$tst_out
"
>>
$tst_in
chmod
700
$tst_in
# Set the trigger
echo
"Executing:"
echo
"
${
slurm_bin
}
strigger --set --idle --offset=0 --program=
$tst_in
"
echo
""
${
slurm_bin
}
strigger
--set
--idle
--offset
=
0
--program
=
$tst_in
# Wait for trigger event and test the results
if
[
"
$?
"
-eq
0
]
then
echo
"Waiting for trigger event, this take 20 seconds"
sleep
20
if
[
-f
$tst_out
]
then
echo
"Trigger ran as this user:"
cat
$tst_out
echo
"If that's not your user and group id, this is a failure"
else
echo
"FAILURE: No output file generated for trigger event"
fi
else
echo
"If this failure is a security violation, that's fine"
fi
# Clean up
rm
-f
$tst_in
$tst_out
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