This file is indexed.

/usr/share/arc/create-inforeg-config is in nordugrid-arc-ldap-infosys 4.0.0-1.

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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
#!/bin/bash

# Create info registration config for the NorduGrid/ARC information system

ARC_LOCATION=${ARC_LOCATION:-/usr}
if [ ! -d "$ARC_LOCATION" ]; then
    echo "ARC_LOCATION ($ARC_LOCATION) not found"
    exit 1
fi

# Source the config parsing routines
if [ -r "$ARC_LOCATION/share/arc/config_parser_compat.sh" ]; then
    . $ARC_LOCATION/share/arc/config_parser_compat.sh || exit $?
else
    echo "Could not find $ARC_LOCATION/share/arc/config_parser_compat.sh"
    exit 1
fi

ARC_CONFIG=${ARC_CONFIG:-/etc/arc.conf}
if [ ! -r "$ARC_CONFIG" ]; then
    echo "ARC configuration file ($ARC_CONFIG) not found"
    echo "If this file is in a non-standard place it can be set with the"
    echo "  ARC_CONFIG environment variable"
    exit 1
fi

# Read arc.conf
config_parse_file $ARC_CONFIG || exit $?

# Check for infosys-block
if ! config_match_section infosys; then
    echo "Missing infosys configuration block"
    exit 1
fi

config_hide_all
config_import_section common
config_import_section cluster

# These options need to come from the infosys-block, not from common
unset CONFIG_logfile
unset CONFIG_user
unset CONFIG_port

config_import_section infosys

# Get ldap user from passwd
ldap_user=`getent passwd | grep ldap | sed 's/\([az]*\):.*/\1/g'`
if [ ! "xldap" = "x$ldap_user" ] && [ ! "xopenldap" = "x$ldap_user" ]; then
    echo "Could not find ldap or openldap user, using root"
    ldap_user=root
fi
bdii_user=${CONFIG_user:-$ldap_user}

# directories
registrationlog=${CONFIG_registrationlog:-/var/log/arc/inforegistration.log}
mkdir -p `dirname $registrationlog`
touch ${registrationlog}
chown ${bdii_user}: ${registrationlog}

arc_runtime_config="/var/run/arc/infosys"
mkdir -p ${arc_runtime_config}
chown ${bdii_user}: ${arc_runtime_config}

registrationconf=$arc_runtime_config/grid-info-resource-register.conf

printregldif () {
    cat <<-EOF

	# Registration "$rootdn" -> "$targetsuffix"
	dn: Mds-Vo-Op-name=register, $targetsuffix
	regtype: mdsreg2
	reghn: $reghn
	regport: $regport
	regperiod: $regperiod
	type: ldap
	hn: $hn
	port: $port
	rootdn: $rootdn
	ttl: $ttl
	timeout: $timeout
	mode: cachedump
	cachettl: $cachettl
	bindmethod: $bindmethod
	EOF
}

echo "# This file was automatically generated by $0." > $registrationconf
echo "# Do not modify." >> $registrationconf
echo >> $registrationconf

(
    config_hide_all
    config_import_section common
    config_import_section cluster
    config_import_section infosys

    # Cluster registration blocks
    for p in `config_subsections infosys/cluster/registration`; do
	(
	    config_import_section infosys/cluster/registration/$p

	    targetsuffix=${CONFIG_targetsuffix:-"Mds-Vo-name=$p,o=Grid"}
	    reghn=${CONFIG_targethostname:-"targethostname.not.set"}
	    regport=${CONFIG_targetport:-2135}
	    hn=${CONFIG_registranthostname:-$CONFIG_hostname}
	    port=${CONFIG_registrantport:-$CONFIG_port}
	    rootdn=${CONFIG_registrantsuffix:-"nordugrid-cluster-name=$hn,Mds-Vo-name=local,o=Grid"}
	    regperiod=${CONFIG_regperiod:-120}
	    ttl=${CONFIG_ttl:-$(( $regperiod * 2 ))}
	    timeout=${CONFIG_timeout:-45}
	    cachettl=${CONFIG_cachettl:-0}
	    sizelimit=${CONFIG_sizelimit:-0}
	    bindmethod=${CONFIG_bindmethod:-ANONYM-ONLY}

	    printregldif >> $registrationconf
	)
    done

    # SE registration blocks
    for seentry in `config_subsections infosys/se`; do
	(
	    CONFIG_name=
	    config_import_section se/$seentry
	    sename=${CONFIG_name:-$seentry}
	    config_import_section infosys/se/$seentry

	    for p in `config_subsections infosys/se/$seentry/registration`; do
		(
		    config_import_section infosys/se/$seentry/registration/$p

		    targetsuffix=${CONFIG_targetsuffix:-"Mds-Vo-name=$p,o=Grid"}
		    reghn=${CONFIG_targethostname:-"targethostname.not.set"}
		    regport=${CONFIG_targetport:-2135}
		    hn=${CONFIG_registranthostname:-$CONFIG_hostname}
		    port=${CONFIG_registrantport:-$CONFIG_port}
		    rootdn=${CONFIG_registrantsuffix:-"nordugrid-se-name=$sename:$hn,Mds-Vo-name=local,o=Grid"}
		    regperiod=${CONFIG_regperiod:-120}
		    ttl=${CONFIG_ttl:-$(( $regperiod * 2 ))}
		    timeout=${CONFIG_timeout:-45}
		    cachettl=${CONFIG_cachettl:-0}
		    sizelimit=${CONFIG_sizelimit:-0}
		    bindmethod=${CONFIG_bindmethod:-ANONYM-ONLY}

		    printregldif >> $registrationconf
		)
	    done
	)
    done

    # Registrations of the Index Services
    for vo in `config_subsections infosys/index`; do
	(
	    CONFIG_name=
	    config_import_section infosys/index/$vo
	    indexname=${CONFIG_name:-$vo}

	    for r in `config_subsections infosys/index/$vo/registration`; do
		(
		    config_import_section infosys/index/$vo/registration/$r

		    targetsuffix=${CONFIG_targetsuffix:-"Mds-Vo-name=$r,o=Grid"}
		    reghn=${CONFIG_targethostname:-"targethostname.not.set"}
		    regport=${CONFIG_targetport:-2135}
		    hn=${CONFIG_registranthostname:-$CONFIG_hostname}
		    port=${CONFIG_registrantport:-$CONFIG_port}
		    rootdn=${CONFIG_registrantsuffix:-"Mds-Vo-name=$indexname,o=Grid"}
		    regperiod=${CONFIG_regperiod:-120}
		    ttl=${CONFIG_ttl:-$(( $regperiod * 2 ))}
		    timeout=${CONFIG_timeout:-120}
		    cachettl=${CONFIG_cachettl:-0}
		    sizelimit=${CONFIG_sizelimit:-0}
		    bindmethod=${CONFIG_bindmethod:-ANONYM-ONLY}

		    printregldif >> $registrationconf
		)
	    done
	)
    done
)

exit 0