Closed Bug 53244 Opened 24 years ago Closed 23 years ago

[RFE] Recursive directory creation in Unix installer

Categories

(SeaMonkey :: Installer, enhancement, P1)

x86
Linux
enhancement

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.0

People

(Reporter: agracebush, Assigned: slogan)

References

Details

Attachments

(3 files)

Installer does not allow 2 (or more) levels of directory creation during installation process Linux installer, unlike Win Installer, only allows user to enter one level of directory creation. ie you can select /u/user/test2/test1 (assuming /u/user/exists) - installer will prompt to create but will only create test2 and not next level test1
rassigning to Samir.
Assignee: ssu → sgehani
This is by design, i.e., non-recursive dir creation. Grace, does the installer display a different dir than is created (e.g., does it display /u/user/test2/test1/ when in fact it only created /u/user/test2 or does the display not lie)? At any rate, we can fix this to do recursive dir creation; next release though.
Status: NEW → ASSIGNED
Summary: Installer does not allow 2 (or more) levels of directory creation during installation process → [RFE] Recursive directory creation in Unix installer
Target Milestone: --- → Future
QA Contact: gemal → gbush
Installer displays path I set, asks me if I want to create, when I say yes- it gives me error (-624)(only problem is it does not remove this dialog) It does not allow me to install so I change to one level of creation and I am able to install successfully.
I see the problem. When you click OK on the error dialog it doesn't go away but the OK button disappears. This is poor UE that should get fixed next release too.
Priority: P3 → P1
*** Bug 97897 has been marked as a duplicate of this bug. ***
nominating this simple change
Assignee: sgehani → syd
Status: ASSIGNED → NEW
Keywords: mozilla0.9.6
Target Milestone: Future → ---
sounds like fun
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.6
Attached patch recursive mkdir (deleted) — Splinter Review
+ memcpy(path, gCtx->opt->mDestination, (pathLen > PATH_MAX) ? PATH_MAX : pathLen); + path[pathLen] = '/'; // for uniform handling So, you copy PATHMAX if pathLen is greater than PATHMAX. At first glance, that appears ok. But, let pathLen == PATHMAX * 2. You will then be setting path[PATHMAX * 2] to '/', exceeding the array bounds because you are using pathLen in that second statement. How about : if ( pathLen > MAXPATH) pathLen = MAXPATH; memcpy( path, gCtx->opt->mDestination, pathLen ); path[pathLen] = '/'; path[pathLen + 1] = '\0'; this is simpler, eliminates the potential buffer overflow. Note also I added the NULL ('\0') that you forgot to add to the end of the buffer (can't assume the memory is filled with NULLs). I notice you check for errs but do nothing with them. What happens if you fail a mkdir?
> You will then be setting path[PATHMAX * 2] to '/', exceeding > the array bounds because you are using pathLen in that second > statement. Oops, sorry, missed that > path[pathLen + 1] = '\0'; > NULL ('\0') that you forgot to add to the end of the buffer (can't assume the > memory is filled with NULLs). Actually, I don't need terminate array with '\0', because I'll replace '/' with '\0' inside the loop and I don't rely on '\0' in loop condition ( for (int i = 1; !err && i <= pathLen; i++) ) > I notice you check for errs but do nothing with them. What happens if you fail a > mkdir? Those lines didn't fit into diff, look a copule of lines below: if (err != 0) { ErrorHandler(E_MKDIR_FAIL); return; }
Attached patch fixed buffer overflow (deleted) — Splinter Review
Attached patch fix case typos in prev patch (deleted) — Splinter Review
Target Milestone: mozilla0.9.6 → mozilla0.9.8
Comment on attachment 56242 [details] [diff] [review] fix case typos in prev patch looks ok, thanks for the patch
Attachment #56242 - Flags: review+
Keywords: mozilla0.9.6
Comment on attachment 56242 [details] [diff] [review] fix case typos in prev patch sr=dveditz
Attachment #56242 - Flags: superreview+
Keywords: nsbeta1+
Target Milestone: mozilla0.9.8 → mozilla1.0
fixed
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
verified in build 2002020809
Status: RESOLVED → VERIFIED
[RFE] is deprecated in favor of severity: enhancement. They have the same meaning.
Severity: normal → enhancement
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: