Project

General

Profile

Actions

Bug #7369

closed

internal.sudo: sed expression must be raw string

Added by Dan Mick over 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Crash signature (v1):
Crash signature (v2):

Description

internal.py's sudo task has sed strings for execution that contain Python metacharacters and get mangled; the result is not good. They should be declared as 'raw' strings.

    tty_expr = 's/^\([^#]*\) \(requiretty\)/\1 !\2/g'
    pw_expr = 's/^\([^#]*\) !\(visiblepw\)/\1 \2/g'

should be

    tty_expr = r's/^\([^#]*\) \(requiretty\)/\1 !\2/g'
    pw_expr = r's/^\([^#]*\) !\(visiblepw\)/\1 \2/g'
Actions

Also available in: Atom PDF