Skip to content

Bug: using as function with group fails on centos 5.11 #315

Open
@pwaterz

Description

@pwaterz

When trying to use the as function on centos 5.11 I consistent get this bash error

DEBUG [a0994eb0]    sh: -c: line 0: unexpected EOF while looking for matching `"'
DEBUG [a0994eb0]    sh: -c: line 1: syntax error: unexpected end of file

simple test

on roles(:whatever) do
   as(user: 'someuser', group: 'somegroup' ) do    
     execute :ls
   end
do

Command that is being ran

sudo -u someuser -- sh -c 'sg somegroup -c \"/usr/bin/env ls\"'

From what I can tell it's properly escaped. It works fine when only suppling the user and not a group.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions