Comment 8 for bug 346563

Revision history for this message
Xie Shaohu (shaohu-xie) wrote :

I produce the following steps, and then the bug happened.

step 1、$ sudo dpkg --purge ufw
step 2、$ sudo rm -rf /var/lib/ufw /etc/ufw
step 3、$ sudo apt-get install ufw
step 4、/etc/ufw/applications.d$ ls
step 5、/etc/ufw/applications.d$ sudo cp /home/leo/samba samba
step 6、/etc/ufw/applications.d$ sudo cp /home/leo/qq qq
step 7、/etc/ufw/applications.d$ sudo cp /home/leo/cups cups
step 8、/etc/ufw/applications.d$ sudo cp /home/leo/postfix postfix
step 9、/etc/ufw/applications.d$ sudo cp /home/leo/amule amule
step 10、/etc/ufw/applications.d$ ls
amule cups postfix qq samba
step 11、/etc/ufw/applications.d$ sudo ufw allow amule
防火墙规则已更新
step 12、/etc/ufw/applications.d$ sudo ufw allow CUPS
防火墙规则已更新
step 13、/etc/ufw/applications.d$ sudo ufw allow qq
防火墙规则已更新
step 14、/etc/ufw/applications.d$ sudo ufw allow Postfix
防火墙规则已更新
step 15、/etc/ufw/applications.d$ sudo ufw allow Samba
防火墙规则已更新
step 16、/etc/ufw/applications.d$ sudo ufw default deny
默认政策被更改为 'deny'
(请相应地更新你的防火墙规则)
step 17、/etc/ufw/applications.d$ sudo ufw status
Status: inactive
leo@leo-laptop:/etc/ufw/applications.d$ sudo ufw enable
Firewall is active and enabled on system startup
leo@leo-laptop:/etc/ufw/applications.d$ sudo ufw status
Traceback (most recent call last):
  File "/usr/sbin/ufw", line 115, in <module>
    res = ui.do_action(action, rule, ip_version)
  File "/usr/lib/python2.6/dist-packages/ufw/frontend.py", line 763, in do_action
    res = self.get_status()
  File "/usr/lib/python2.6/dist-packages/ufw/frontend.py", line 544, in get_status
    out = self.backend.get_status(verbose, show_count)
  File "/usr/lib/python2.6/dist-packages/ufw/backend_iptables.py", line 298, in get_status
    return _("Status: active%s") % (str)
TypeError: not all arguments converted during string formatting

--------------------------------------------
my locale:
$ locale
LANG=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=