瀏覽代碼

Specify bash shell when validating sudo snippet

Since we are using bash specific features and sometimes you can end up getting /bin/sh - see https://github.com/saltstack-formulas/users-formula/pull/30#issuecomment-44224106
tags/v0.45.0
Ash Berlin 10 年之前
父節點
當前提交
d5923d82e6
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. +1
    -0
      users/init.sls

+ 1
- 0
users/init.sls 查看文件

@@ -135,6 +135,7 @@ sudoer-{{ name }}:
"validate {{ name }} sudo rule {{ loop.index0 }} {{ name }} {{ rule }}":
cmd.run:
- name: 'visudo -cf - <<<"$rule"'
- shell: /bin/bash
- env:
# Specify the rule via an env var to avoid shell quoting issues.
- rule: "{{ name }} {{ rule }}"

Loading…
取消
儲存