BUG #12755: pg_upgrage creates potentially dangerous delete_old_cluster.bat

Started by Toni Heleniusabout 11 years ago3 messagesbugs
Jump to latest
#1Toni Helenius
Toni.Helenius@syncrontech.com

The following bug has been logged on the website:

Bug reference: 12755
Logged by: Toni Helenius
Email address: toni.helenius@syncrontech.com
PostgreSQL version: 9.4.1
Operating system: Windows 7
Description:

pg_upgrage creates potentially dangerous delete_old_cluster.bat. RMDIR
without quotes.

RMDIR /s/q C:\Program Files\PostgreSQL\9.3\data

Executes as:
RMDIR /s/q C:\Program

Needs quotes!!

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#2Bruce Momjian
bruce@momjian.us
In reply to: Toni Helenius (#1)
Re: BUG #12755: pg_upgrage creates potentially dangerous delete_old_cluster.bat

On Tue, Feb 10, 2015 at 10:44:41AM +0000, toni.helenius@syncrontech.com wrote:

The following bug has been logged on the website:

Bug reference: 12755
Logged by: Toni Helenius
Email address: toni.helenius@syncrontech.com
PostgreSQL version: 9.4.1
Operating system: Windows 7
Description:

pg_upgrage creates potentially dangerous delete_old_cluster.bat. RMDIR
without quotes.

RMDIR /s/q C:\Program Files\PostgreSQL\9.3\data

Executes as:
RMDIR /s/q C:\Program

Needs quotes!!

Wow, very good point. Not sure why this problem was not reported
before. Patch attached.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

Attachments:

pg_upgrade_rm.difftext/x-diff; charset=us-asciiDownload+6-6
#3Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#2)
Re: BUG #12755: pg_upgrage creates potentially dangerous delete_old_cluster.bat

On Tue, Feb 10, 2015 at 01:11:16PM -0500, Bruce Momjian wrote:

Executes as:
RMDIR /s/q C:\Program

Needs quotes!!

Wow, very good point. Not sure why this problem was not reported
before. Patch attached.

Patch applied and backpatched through 9.0. Thanks for the report.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs