Project

General

Profile

Actions

Bug #7369

closed

internal.sudo: sed expression must be raw string

Added by Dan Mick about 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 #1

Updated by Dan Mick about 10 years ago

The only thing that confuses me about this is why it doesn't appear to affect vps creation, but I guess it doesn't really matter.

Actions #2

Updated by Zack Cerza about 10 years ago

  • Status changed from 12 to Fix Under Review
  • Assignee set to Dan Mick
Actions #3

Updated by Dan Mick about 10 years ago

  • Status changed from Fix Under Review to 7
  • Assignee changed from Dan Mick to Zack Cerza

LGTM. Would still like to see validation of the new file before installation as discussed in IRC (with visudo -c -f <name>)

Actions #4

Updated by Zack Cerza about 10 years ago

  • Status changed from 7 to Resolved

Fix merged here: 31c27e139f9faaa83f5652d81d4446a176fa1bda

Actions #5

Updated by Zack Cerza about 10 years ago

Ticket for validation feature: http://tracker.ceph.com/issues/7522

Actions

Also available in: Atom PDF