~ubuntu-branches/ubuntu/saucy/slurm-llnl/saucy

« back to all changes in this revision

Viewing changes to testsuite/slurm_unit/slurmctld/security_2_1.bash

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2008-12-03 11:56:28 UTC
  • mfrom: (1.1.8 upstream) (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20081203115628-93t417da6wkazmo5
Tags: 1.3.11-1
New upstream release 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
# Define location of slurm executables (if not in default search path)
 
3
#slurm_bin="/home/jette/slurm.way/bin/"
 
4
 
 
5
# Create private config file
 
6
# Set AuthType=auth/dummy
 
7
file_orig=`${slurm_bin}scontrol show config | awk '{ if ( $1 ~ /SLURM_CONFIG_FILE/ ) { print $3 } }'`
 
8
grep -iv AuthType <$file_orig >tmp.$$
 
9
echo "AuthType=auth/dummy" >>tmp.$$
 
10
 
 
11
# Run srun using this config file
 
12
export SLURM_CONF=tmp.$$
 
13
touch tmp.o.$$
 
14
${slurm_bin}srun /bin/id --output=tmp.o.$$
 
15
 
 
16
grep --quiet uid tmp.o.$$
 
17
if [ "$?" == 1 ] ; then
 
18
  echo "srun errors above are expected"
 
19
  echo "SUCCESS"
 
20
else
 
21
  echo "FAILURE"
 
22
fi
 
23
 
 
24
# Clean up
 
25
rm -f tmp.$$ tmp.o.$$