2017-05-02 2 views
0

동일한 문제로 돌아 가기. semanage 규칙을 추가 할 때 파이썬에 약간의 오류가 발생하고있다 : 일부 판독 후CentOS 7.4 audit2allow 반환 복수 형식 표현이 위험 할 수 있음

# 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를 추가했는데, 여전히 도움이되지 않는다. 나는

# 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을 확인하려고 ...의/var/로그/메시지 또는 dmesg를 특별 아무것도 볼 수 있지만 얻을 오류 :

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= 

그 밖의 유용한 정보가 있습니까? 나는 무엇인가 놓친 것을 알고있다. 그러나 무엇?

답변

0

다른 출처에서 나는 an answer을 받았습니다.

인용 Michael Hampton :

It appears you have found a program which is not fully translated into your language. Try running it as:

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

I was able to reproduce your problem by changing my language to yours, i.e.:

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

But when i use a different language, it works:

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