StageUtils.pm should mkdir with "0775" permissions, not "775"

RESOLVED FIXED in mozilla1.7final

Status

SeaMonkey
Installer
RESOLVED FIXED
14 years ago
13 years ago

People

(Reporter: Andreas Kunz, Assigned: Andreas Kunz)

Tracking

({fixed1.7})

Trunk
mozilla1.7final
x86
Windows XP
fixed1.7

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-aviary1.0)

Attachments

(1 attachment)

2.92 KB, patch
Benjamin Smedberg
: review+
Daniel (Leaf) Nunes
: superreview+
Daniel (Leaf) Nunes
: approval1.7+
Details | Diff | Splinter Review
(Assignee)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040514
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040514

Running the installer packager creates directories with invalid permissions on
NTFS. This means you cannot enter them with the Windows Explorer and packaging
fails.
I found the reason being the usage of 
  mkdir("$aDestDir", 755) || die "\n mkdir(\"$aDestDir\", 755): $!\n";
and similar commands in StageUtils.pm. Replace 755 with 0755 (octal numbers) and
everything works fine.
On FAT32 partitions 755 does work, but not on XP's NTFS.

Reproducible: Always
Steps to Reproduce:
1. run a perl script containing |mkdir("test", 0755);| on a NTFS partition
2. try to access the new directory

Actual Results:  
explorer.exe opens an alert box; when looking at the security properties of this
folder it says the access privs are out of order and gives choices how to
rebuild them.

Expected Results:  
Created proper access control settings.

  find | grep "\.p[lm]" | xargs grep mkdir
executed in the source tree root returns lots of hits, 83 of them set the access
mode. 74 do it the proper way (octal numbers), 9 not. All of those 9 are in
StageUtils.pm.
Patch follows.
(Assignee)

Comment 1

14 years ago
Created attachment 149694 [details] [diff] [review]
patch

After applying this patch, also on NTFS packaging works.
Assignee: general → durbacher
Status: NEW → ASSIGNED
(Assignee)

Comment 2

14 years ago
Comment on attachment 149694 [details] [diff] [review]
patch

Hehe, bug 242037 was about exactly the same issue. Unfortunately it only
changed *.pl files, not *.pm. So this one file has not been fixed.

The query from bug 242037 comment #1 does not find any hits apart from those
fixed here.

Requesting r= from bsmedberg who also reviewed that other bug. Is here also no
sr= needed like in that other bug??
Attachment #149694 - Flags: review?(bsmedberg)

Comment 3

14 years ago
Comment on attachment 149694 [details] [diff] [review]
patch

r=me, no sr needed. a=me for the aviary1.0 branch, and requesting approval for
the 1.7 branch.
Attachment #149694 - Flags: review?(bsmedberg)
Attachment #149694 - Flags: review+
Attachment #149694 - Flags: approval1.7?
checked in on trunk
Checking in xpinstall/packager/StageUtils.pm;
/cvsroot/mozilla/xpinstall/packager/StageUtils.pm,v  <--  StageUtils.pm
new revision: 1.6; previous revision: 1.5
done

Comment 5

14 years ago
Comment on attachment 149694 [details] [diff] [review]
patch

sr, a=leaf
Attachment #149694 - Flags: superreview+
Attachment #149694 - Flags: approval1.7?
Attachment #149694 - Flags: approval1.7+
fixed on aviary branch
Whiteboard: fixed-aviary1.0
(Assignee)

Comment 7

14 years ago
Ok, this is now FIXED on the 1.7 branch, the aviary1.0 branch and on trunk.
Resolving.
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Keywords: fixed1.7
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.7final
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.