瀏覽代碼

Merge pull request #102 from 0xf10e/mitigate_salt_29004

Mitigate Salt issue #29004, fixes "expire" on *BSD
tags/v0.45.0
puneet kandhari 9 年之前
父節點
當前提交
a93f97fb3d
共有 1 個檔案被更改,包括 10 行新增0 行删除
  1. +10
    -0
      users/init.sls

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

@@ -113,7 +113,17 @@ users_{{ name }}_user:
- createhome: False
{% endif %}
{% if 'expire' in user -%}
{% if grains['kernel'].endswith('BSD') and
user['expire'] < 157766400 %}
{# 157762800s since epoch equals 01 Jan 1975 00:00:00 UTC #}
- expire: {{ user['expire'] * 86400 }}
{% elif grains['kernel'] == 'Linux' and
user['expire'] > 84006 %}
{# 2932896 days since epoch equals 9999-12-31 #}
- expire: {{ (user['expire'] / 86400) | int}}
{% else %}
- expire: {{ user['expire'] }}
{% endif %}
{% endif -%}
- remove_groups: {{ user.get('remove_groups', 'False') }}
- groups:

Loading…
取消
儲存