python - 可靠的 : You should rebuild using libgmp >= 5 to avoid timing attack vulnerability

标签 python python-2.7 ansible

我正在使用 centos-ansible,我面临如下问题。

仅供引用,当我使用 ubuntu -ansible 我没有收到以下警告,我可以继续使用相同的剧本。但是在 centos 中我失败了相同的 yml 文件。

[root@jenkins-server ~]# ansible-playbook deploy-ws.yml

播放 [开发] ******************************************* ****************** /usr/lib64/python2.6/dist-packages/Crypto/Util/number.py:57: PowmInsecureWarning: 不使用 mpz_powm_sec。您应该使用 libgmp >= 5 进行重建以避免定时攻击漏洞。 _warn("不使用 mpz_powm_sec。您应该使用 libgmp >= 5 进行重建以避免时序攻击漏洞。", PowmInsecureWarning)

任务 [设置] ******************************************* *************************** 好的:[10.0.2.56]

任务 [解压缩 zip 文件] ****************************************** ********** 致命的:[10.0.2.56]:失败! => {"changed": false, "failed": true, "msg": "python isn't present on the system. Unable to compute checksum"} 要重试,请使用:--limit @/root/deploy-ws.retry

播放回顾 ********************************************* *************************** 10.0.2.56 : ok=1 changed=0 unreachable=0 failed=1

[root@jenkins-server ~]# python
Python 2.7.9 (default, Apr  1 2015, 18:18:03)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

我点击了以下链接:

https://ask.openstack.org/en/question/28335/you-should-rebuild-using-libgmp-5-to-avoid-timing-attack-vulnerability-_warnnot-using-mpz_powm_sec-you-should-rebuild-using-libgmp-5-to-avoid-timing/

http://devnumbertwo.com/you-should-rebuild-using-libgmp-5/

但同样的错误仍然存​​在。

我的 yml 代码:

---
 - hosts: Dev
   user: www-upload
   vars:
    Doc_base: /var/www
    Env: dev
    Release: MM-MM-1
    Symlink_var: /data/assets/var
    Symlink_media: /data/assets/media
    Local_xml: app/etc/local.xml
    CACHE_TYPE: "{{cache_type}}"
   tasks:

    - name: unarchiving zip files
      unarchive: src=/tmp/{{Release}}.tar.gz dest=/var/www/{{Env}}/deployments/ owner=www group=www    

最佳答案

这只是一个警告信息,看起来很难看。 您可以评论导致警告的两行。

例如:

$ vi /usr/lib64/python2.6/site-packages/Crypto/Util/number.py
#if _fastmath is not None and not _fastmath.HAVE_DECL_MPZ_POWM_SEC:
#    _warn("Not using mpz_powm_sec.  You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning)

关于python - 可靠的 : You should rebuild using libgmp >= 5 to avoid timing attack vulnerability,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41691444/

相关文章:

linux - 无法在ansible yml脚本中执行 block 模块

python - ansible 剧本 : the python mysqldb module is required 出错

python - 缺失属性总数

python - 我可以获得分配给项目的用户列表吗?

python - 将列表作为参数传递给 Python C 模块?

python - 将变量注入(inject)调用者的范围?

python - 在 Python 中构建字符串的最佳方法

python - os.path.isfile() 为网络驱动器上的文件返回 false

python - Windows 上的 GUI 应用程序中的子进程失败

linux - 在输出和捕获结果时在 bash 脚本中运行命令