PHP :: Bug #68941 :: mod_files.sh is a bash-script

Bug #68941 mod_files.sh is a bash-script
Submitted: 2015-01-28 23:15 UTC Modified: 2015-01-29 09:38 UTC
From: bugzilla at ii dot nl Assigned: yohgaki (profile)
Status: Closed Package: Session related
PHP Version: Irrelevant OS: linux
Private report: No CVE-ID: None

 [2015-01-28 23:15 UTC] bugzilla at ii dot nl

Description:
------------
The script references in the session.save-path documentation, mod_files.sh, found at https://github.com/php/php-src/blob/master/ext/session/mod_files.sh
says #!/bin/sh at the top (and in the middle), but it uses [[ extensively which is a bashism.

If your default shell isn't bash but dash, you end up with an quite deep subdirectory (0/0/0/0/0/.....) because the recursion won't stop.

Fix is quite easy: change #!/bin/sh (and the call for sh later on) to #!/bin/bash.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports

 [2015-01-29 09:07 UTC] bugzilla at ii dot nl

Fix is incomplete, you forgot the 'sh' call at the bottom (I fell for this at first too)

 [2015-01-29 09:29 UTC] bugzilla at ii dot nl

-Status: Closed +Status: Assigned

 [2015-01-29 09:29 UTC] bugzilla at ii dot nl

Apologies if you read my comment already, got no feedback from the UI to whom my comment got sent so I reopened.

 [2015-01-29 09:38 UTC] yohgaki@php.net

-Status: Assigned +Status: Closed -Assigned To: +Assigned To: yohgaki