【问题标题】:CentOS 7.4 audit2allow return plural forms expression could be dangerousCentOS 7.4 audit2allow 返回复数表达式可能很危险
【发布时间】:2017-09-30 12:05:59
【问题描述】:

回到同样的问题。 添加 semanage 规则时,我在 python 中收到一些错误:

# semanage port -a -t http_port_t -p tcp 29200
Traceback (most recent call last):
  File "/sbin/semanage", line 32, in <module>
    import seobject
  File "/usr/lib64/python2.7/site-packages/seobject/__init__.py", line 36, in <module>
    import sepolicy
  File "/usr/lib64/python2.7/site-packages/sepolicy/__init__.py", line 21, in <module>
    codeset='utf-8')
  File "/usr/lib64/python2.7/gettext.py", line 495, in install
    t = translation(domain, localedir, fallback=True, codeset=codeset)
  File "/usr/lib64/python2.7/gettext.py", line 480, in translation
    t = _translations.setdefault(key, class_(fp))
  File "/usr/lib64/python2.7/gettext.py", line 180, in __init__
    self._parse(fp)
  File "/usr/lib64/python2.7/gettext.py", line 317, in _parse
    self.plural = c2py(plural)
  File "/usr/lib64/python2.7/gettext.py", line 93, in c2py
    raise ValueError, 'plural forms expression could be dangerous'
ValueError: plural forms expression could be dangerous

在阅读了一些资料后,我发现了一些主题,即统计数据,添加交换会有所帮助。我已经添加了 700MB,不,没有帮助,然后添加了 4GiB,但仍然没有帮助。 我在 /var/log/messages 或 dmesg 中没有看到任何特别之处...

# free -t -m
              total        used        free      shared  buff/cache   available
Mem:          23948         250       23343          16         355       23355
Swap:          4095           0        4095
Total:        28044         250       27439
# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.4.1708 (Core) 
Release:        7.4.1708
Codename:       Core
# uname -a
Linux hostname 3.10.0-693.17.1.el7.x86_64 #1 SMP Thu Jan 25 20:13:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
# yum check-update
Įkelti įskiepiai: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.vpsnet.com
 * epel: mirror.vpsnet.com
 * extras: mirror.vpsnet.com
 * updates: mirror.vpsnet.com
#

我也尝试检查 audit2why 或 audit2allow 但我收到错误:

cat /var/log/audit/audit.log | audit2why 
plural forms expression could be dangerous

语言环境:

# locale
LANG=lt_LT.UTF-8
LC_CTYPE="lt_LT.UTF-8"
LC_NUMERIC="lt_LT.UTF-8"
LC_TIME="lt_LT.UTF-8"
LC_COLLATE="lt_LT.UTF-8"
LC_MONETARY="lt_LT.UTF-8"
LC_MESSAGES="lt_LT.UTF-8"
LC_PAPER="lt_LT.UTF-8"
LC_NAME="lt_LT.UTF-8"
LC_ADDRESS="lt_LT.UTF-8"
LC_TELEPHONE="lt_LT.UTF-8"
LC_MEASUREMENT="lt_LT.UTF-8"
LC_IDENTIFICATION="lt_LT.UTF-8"
LC_ALL=

还有什么有用的? 我知道我错过了什么,但是什么?

【问题讨论】:

    标签: python centos7 selinux


    【解决方案1】:

    在另一个来源我收到了an answer

    引用Michael Hampton

    您似乎找到了一个未完全翻译成的程序 你的语言。尝试运行它:

    LANG=en_US.UTF-8 semanage port -a -t http_port_t -p tcp 29200 
    

    我能够通过将我的语言更改为您的语言来重现您的问题, 即:

    # LANG=lt_LT.UTF-8 audit2why < /var/log/audit/audit.log
    plural forms expression could be dangerous
    

    但是当我使用不同的语言时,它可以工作:

    # LANG=en_US.UTF-8 audit2why < /var/log/audit/audit.log
    Nothing to do
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-02-20
      • 2014-11-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多