Skip to content

Commit 7d414fe

Browse files
Enrico Usaienrico-usai
authored andcommitted
DCV: add explicit path for curl command
DCV connection script (pcluster_dcv_connect.sh) uses curl to generate auth tokens. This script should explicitly call "/usr/bin/curl" rather than just "curl". Without explicit path, the script can switch to user's custom curl version. Patch from @bollig Signed-off-by: Enrico Usai <[email protected]>
1 parent 9fec608 commit 7d414fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cookbooks/aws-parallelcluster-platform/files/dcv/pcluster_dcv_connect.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ main() {
144144

145145
# Retrieve Request Token and Access File name
146146
_log "Retrieving Request Token and Access File name.."
147-
user_token_request=$(curl --retry 3 --max-time 5 -s -k -X GET -G "https://localhost:${ext_auth_port}" -d action=requestToken -d authUser="${user}" -d sessionID="${sessionid}")
147+
user_token_request=$(/usr/bin/curl --retry 3 --max-time 5 -s -k -X GET -G "https://localhost:${ext_auth_port}" -d action=requestToken -d authUser="${user}" -d sessionID="${sessionid}")
148148
_validate_json "${user_token_request}" "Unable to obtain the Request Token from the NICE DCV external authenticator."
149149
request_token=$(echo "${user_token_request}" | jq -r .requestToken)
150150
access_file=$(echo "${user_token_request}" | jq -r .accessFile)
@@ -159,7 +159,7 @@ main() {
159159

160160
# Retrieve Session Token
161161
_log "Retrieving Session Token.."
162-
session_token_request=$(curl --retry 3 --max-time 5 -s -k -X GET -G "https://localhost:${ext_auth_port}" -d action=sessionToken -d requestToken="${request_token}")
162+
session_token_request=$(/usr/bin/curl --retry 3 --max-time 5 -s -k -X GET -G "https://localhost:${ext_auth_port}" -d action=sessionToken -d requestToken="${request_token}")
163163
_validate_json "${session_token_request}" "Unable to obtain the Session Token from the NICE DCV external authenticator."
164164
session_token=$(echo "${session_token_request}" | jq -r .sessionToken)
165165
_log "Session Token obtained successfully."

0 commit comments

Comments
 (0)