#303 closed defect (fixed)
violation of 'node_access' copy semantics
Reported by: | strauman | Owned by: | Jennifer Averett |
---|---|---|---|
Priority: | normal | Milestone: | 2 |
Component: | fs | Version: | unknown |
Severity: | major | Keywords: | |
Cc: | bugs@…, joel.sherrill@… | Blocked By: | |
Blocking: |
Description
The 'privateenv' code simply copies the 'current' and 'root' nodes when creating a private environment.
This is illegal, as the node_access field might reference
private FS data who must be properly copied also.
The fix makes such copies and releases them when the task variable associated with the userenv is destroyed.
The patch also DISABLES the 'share_userenv' routine unless the userenv structure is enhanced by a 'refcnt' field. The use of a shared userenv is discouraged (race conditions, refcnt).
The patch also removes the temporary reassignment of the
'current' and 'root' nodes during getpwent() & friends calls. IMO, the race condition resulting as a side effect is not tolerable. It must not be possible for a thread who just reads the password file to implicitely change the root location of everybody.
I'm aware that this may break existing code but IMHO, another (thread-safe) solution needs to be found.
An obvious solution to many of these problems would be a variant of rtems_filesystem_evaluate_path() who can be passed a 'node' pointer as a starting point rather than a character string.
Release:
ss-20020301
Attachments (1)
Change History (3)
comment:1 Changed on 11/13/02 at 23:08:44 by Joel Sherrill
Owner: | changed from mayes to jennifer |
---|
comment:2 Changed on 01/03/03 at 17:28:16 by Jennifer Averett
Status: | assigned → closed |
---|
State-Changed-From-To: open->closed
State-Changed-Why: applied patch.