This file is indexed.

/usr/sbin/globus-rvf-edit is in globus-gram-job-manager 14.36-2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#! /bin/sh
#
# Copyright 1999-2012 University of Chicago
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
# http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

prefix="${GLOBUS_LOCATION-/usr}"
exec_prefix="${prefix}"
sbindir="${exec_prefix}/sbin"
bindir="${exec_prefix}/bin"
sysconfdir="/etc"

PATH=${bindir}:${sbindir}:${PATH}

checker="globus-rvf-check"

usage()
{
    echo "Usage: $(basename $0) -s|-l LRM|-f PATH"
}

while getopts "vhsl:f:" i; do
    case $i in
        s)
            path="${sysconfdir}/globus/gram/job-manager.rvf"
            ;;
        l)
            path="${sysconfdir}/globus/gram/${OPTARG}.rvf"
            ;;
        f)
            path="$OPTARG"
            ;;
        h)
            usage
            exit 0
            ;;
        v)
            verbose=1
            ;;
        *)
            usage
            exit 1
            ;;
    esac
            
done

if [ -z "$path" ]; then
    usage
    exit 1
fi

if ! command -v "$checker" > /dev/null; then
    echo "Configuration error: Missing $checker" 1>&2
    exit 1
fi

if [ ! -w "$(dirname $path)" ]; then
    echo "Permission denied: unable to write to $(dirname $path)" 1>&2
    exit 1
fi

cleanup_tmp()
{
    if [ -n "$tmpdir" ] && [ -d "$tmpdir" ]; then
        rm -rf "$tmpdir"
    fi
}

trap "cleanup_tmp" 0

tmpdir="$(mktemp -d -t globus-rvf-edit.XXXXXX)"
if [ $? != 0 ]; then
    tmpdir="${TMPDIR-/tmp}/globus-rvf-edit.$$"
    mkdir "$tmpdir"
    if [ $? != 0 ]; then
        echo "Unable to create temporary directory" 1>&2
        exit 1
    fi
fi

tmpfile="${tmpdir}/rvf.temp"

if [ -r $path ]; then
    cp "$path" "${tmpfile}"
else
    cat <<EOF > "${tmpfile}"
#
# $(basename $path)
#
# RVF Record Format consists of the following without the leading #
# Records are separated by blank lines
#
# Attribute: RSL-attribute-name
# Description: "Description string" # string describing the attribute, within
#                                   # quotes, " must be escaped as \"
# Default: "default value"          # default value is an RSL value string
# DefaultWhen: when-value           # space-delimited sequence of zero or more
#                                   # of
#                                   # GLOBUS_GRAM_JOB_SUBMIT
#                                   # GLOBUS_GRAM_JOB_MANAGER_RESTART
#                                   # GLOBUS_GRAM_JOB_MANAGER_STDIO_UPDATE
# ValidWhen: when-value             # same as DefaultWhen values
# RequiredWhen: when-value          # same as DefaultWhen values
# Values:                           # space-delimited sequence of legal values
#                                   # for the rsl attribute (e.g. "yes no"
# Publish:                          # valid values true or false, indicating
#                                   # whether
#                                   # scripts/create-rsl-documentation.pl will 
#                                   # generate doc for this attribute
# 
EOF
fi

while true; do
    ${VISUAL:-vi} "${tmpfile}"
    if [ $? != 0 ]; then
        echo "Error editing temp file" 1>&2
        exit 1
    fi

    "${checker}" ${vebose:+"-d"} "${tmpfile}"
    if [ $? != 0 ]; then
        printf "Edit again [yn]: "
        read answer
        if [ "$answer" != "y" ] && [ "$answer" != "Y" ]; then
            exit 1
        fi
    else
        break
    fi
done

if [ -f "$path.bak" ]; then
    rm -f "$path.bak" 
fi
if [ -f "$path" ]; then
    mv "$path" "$path.bak"
fi
mv "$tmpfile" "$path"