The GNU Bourne-Again SHell - Patches: patch #9836, Fix cd to . or .. in removed...
You are not allowed to post comments on this tracker with your current authentication level.
patch #9836: Fix cd to . or .. in removed directories
Submitter: | Tomasz Gorochowik <tkgk> | ||
Submitted: | Thu 25 Jul 2019 12:46:36 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Need Info | Privacy: | Public |
Assigned to: | None | Open/Closed: | Open |
Thu 25 Jul 2019 06:27:18 PM UTC, comment #4: |
Chet Ramey <chet> |
Thu 25 Jul 2019 04:08:25 PM UTC, comment #3: You are right that this patch doesn't solve this properly yet, it needs some more work.
|
Tomasz Gorochowik <tkgk> |
Thu 25 Jul 2019 03:57:42 PM UTC, comment #2: How does this help things? If you're in a removed directory, where `..' doesn't exist, trying to cd into another removed directory (so pathname canonicalization doesn't help you), PWD
|
Chet Ramey <chet> |
Thu 25 Jul 2019 02:52:00 PM UTC, comment #1: I am sorry for the noise here, be I just realized there was another issue with the patch.
|
Tomasz Gorochowik <tkgk> |
Thu 25 Jul 2019 12:46:36 PM UTC, original submission:
Without this patch it is possible to create a path with lots of "." or ".." in CWD.
|
Tomasz Gorochowik <tkgk> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2019-07-25 | chet | Status | None | Need Info | |
2019-07-25 | tkgk | Attached File | - | Added 0001-Fix-cd-to-.-or-.-in-removed-directories.patch, #47259 | |
2019-07-25 | tkgk | Attached File | - | Added 0001-Fix-cd-to-.-or-.-in-removed-directories.patch, #47257 | |
2019-07-25 | tkgk | Attached File | - | Added 0001-Fix-cd-to-.-or-.-in-removed-directories.patch, #47256 |
Powered by Savane 3.13-f8d8.
Corresponding source code
If the shell finds itself in an orphaned directory like that, no answer is correct. PWD will be set to something bogus (or unset) -- behavior varies between shells.
A straight pwd is basically equivalent to `echo "$PWD"'; `pwd -P' will attempt to use getcwd() to walk the file hierarchy and will produce an error.
I like the current behavior better than unsetting PWD, and certainly more than leaving it set to something really wrong.