Bug 5142 - client configuration storage is race:y
Summary: client configuration storage is race:y
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Client (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Peter Åstrand
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-13 16:43 CEST by Pierre Ossman
Modified: 2023-02-28 09:25 CET (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2014-05-13 16:43:02 CEST
The client writes configuration changes directly to file (or the registry) without any locks. Two clients writing at the same time, or one client reading as another is writing, results in corruption.

We should either make things atomic (write to temp file and rename), or introduce locking.
Comment 1 Pierre Ossman cendio 2023-02-28 09:10:26 CET
Note that this is also partially true for known_hosts. When filtering the file, we open a temporary file and then rename it, but when just adding a key we simply open the file directly in append mode.

That might be safe enough, though, as it is very little data and is likely to only require a single write.

OpenSSH has the exact same model for adding and filtering.

Note You need to log in before you can comment on or make changes to this bug.