Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-2579

ssh_authorized_key does not handle options with escaped double quotes

    Details

    • Template:
    • Story Points:
      1
    • Sprint:
      Week 2014-6-11 to 2014-6-18

      Description

      With the following declaration:

      ssh_authorized_key { 'title':
          user    => 'root',
          ensure  => 'present',
          name    => 'mykey',
          options => [ 'command="/usr/local/bin/mybin \"$SSH_ORIGINAL_COMMAND\""' ],
          type    => 'ssh-rsa',
          key     => 'xxx',
      }
      

      It creates the following entry:

      command="/usr/local/bin/mybin \"$SSH_ORIGINAL_COMMAND\"" ssh-rsa xxx mykey

      It's OK.

      But at each run, puppet agent logs:

      Notice: /Stage[main]/Module/Ssh_authorized_key[title]/options: options changed 'command="/usr/local/bin/mybin \"' to 'command="/usr/local/bin/mybin \"$SSH_ORIGINAL_COMMAND\""'

      The attached patch solves that issue. It fixes the regexp by checking that there is no backslash before the closing double quote.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rledisez Romain
                QA Contact:
                Eric Thompson
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support