Bug 1147272 - iptables.init fails with /bin/dash as /bin/sh
Summary: iptables.init fails with /bin/dash as /bin/sh
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: iptables
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Thomas Woerner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-28 18:47 UTC by Wolfgang Rupprecht
Modified: 2014-11-10 06:11 UTC (History)
3 users (show)

Fixed In Version: iptables-1.4.21-13.fc21
Clone Of:
Environment:
Last Closed: 2014-09-29 12:13:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Wolfgang Rupprecht 2014-09-28 18:47:25 UTC
Description of problem:
iptables.init and ip6tables.init fails when dash is installed as /bin/sh .   The problem is that both files require bash to be the shell, but both files start out with #!/bin/sh implying that any posix shell will work.

Version-Release number of selected component (if applicable):

bash.x86_64                   4.2.48-2.fc20         @updates                    
dash.x86_64                   0.5.7-8.fc20          @fedora                     
iptables.x86_64               1.4.19.1-1.fc20       @koji-override-0/$releasever
iptables-services.x86_64      1.4.19.1-1.fc20       @fedora                     

How reproducible:
always

Steps to Reproduce:
1. yum install dash
2. cd /bin ; ln -sf dash sh
3. systemd restart iptables ; systemd restart ip6tables

Actual results:
iptables loading fails

Expected results:
iptables loading doesn't fail

Additional info:

diff -c /usr/libexec/iptables/iptables.init\~ /usr/libexec/iptables/iptables.in\
it                                                                              
*** /usr/libexec/iptables/iptables.init~        2013-07-31 11:39:16.000000000 -\
0700                                                                            
--- /usr/libexec/iptables/iptables.init 2014-09-28 03:02:26.693176459 -0700     
***************
*** 1,4 ****
! #!/bin/sh                                                                     
  #                                                                             
  # iptables    Start iptables firewall                                         
  #                                                                             
--- 1,4 ----
! #!/bin/bash                                                                   
  #                                                                             
  # iptables    Start iptables firewall                                         
  #                                                                             
                                                                                
Diff finished.  Sun Sep 28 11:45:52 2014                                        

diff -c /usr/libexec/iptables/ip6tables.init\~ /usr/libexec/iptables/ip6tables.\
init                                                                            
*** /usr/libexec/iptables/ip6tables.init~       2013-07-31 11:39:16.000000000 -\
0700                                                                            
--- /usr/libexec/iptables/ip6tables.init        2014-09-28 03:04:43.213630168 -\
0700                                                                            
***************
*** 1,4 ****
! #!/bin/sh                                                                     
  #                                                                             
  # ip6tables   Start ip6tables firewall                                        
  #                                                                             
--- 1,4 ----
! #!/bin/bash                                                                   
  #                                                                             
  # ip6tables   Start ip6tables firewall                                        
  #                                                                             
                                                                                
Diff finished.  Sun Sep 28 11:45:24 2014

Comment 1 Jiri Popelka 2014-09-29 12:13:09 UTC
Thanks.

Comment 2 Fedora Update System 2014-11-06 11:10:37 UTC
iptables-1.4.21-13.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/iptables-1.4.21-13.fc21

Comment 3 Fedora Update System 2014-11-10 06:11:13 UTC
iptables-1.4.21-13.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.