Project

General

Profile

Bug #4099

Bug in set_var() in condor_startup for short values

Added by Burt Holzman over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Factory
Target version:
Start date:
06/13/2013
Due date:
% Done:

0%

Estimated time:
First Occurred:
Occurs In:
Stakeholders:
Duration:

Description

We have:
var_val=`grep "^$var_name " $config_file | awk '{if (NF>1) print substr($0,index($0,$2))}'`

This is supposed to take a key and value (where the key and value are separated by whitespace) and set them equal. This works fine, even for values with whitespace. Unfortunately, index takes the first match (and there's no rindex in awk), so the following expression gets the wrong result:

FOO_BAR_1 1

It gets var_val=1 1 instead of var_val=1.

This bug has been around since 9ae54d958 -- nearly 7 years! Guess it's hard to trigger!

History

#1 Updated by Burt Holzman over 7 years ago

  • Status changed from Assigned to Closed

Parag reviewed this and gave the OK via IM.

Fixed in commit:722d903f and commit:712acfb6

Merged to master and branch_v2plus.

Also available in: Atom PDF