khemraj / sanlock

Forked from sanlock 2 years ago
Clone

b056455 sanlock: fix spaces in path names

Authored and Committed by teigland 10 years ago
1 file changed. 131 lines added. 62 lines removed.
    sanlock: fix spaces in path names
    
    When represented in string form, a resource or lockspace
    path name should have escaped colons and spaces, i.e.
    a backslash should precede the colon or space.
    
    When represented in a structure, a resource or lockspace
    path name should not contain escape chars so that the
    string can be passed to open(2).
    
    sanlock_path_export (sanlock_res_to_str)
    . add backslash before spaces in path (in addition to colons)
    
    sanlock_state_to_args
    . allow individual res strings to contain escaped spaces
    . detect when an unescaped space exists in an individual
      res string and insert a backslash before it
    
    Signed-off-by: David Teigland <teigland@redhat.com>
    
        
file modified
+131 -62