Bug 29445 - Error in the documentation of OPEN
Summary: Error in the documentation of OPEN
Status: RESOLVED MOVED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.35
: P2 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-04 00:37 UTC by rm beer
Modified: 2022-08-04 08:01 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rm beer 2022-08-04 00:37:36 UTC
After reading and doing some tests to be sure, I have verified that the documentation of open (man 2 open) is not correct.

- Make read only (O_RDONLY) don't give read and write mode (O_RDWR).
- Using O_CREAT don't modify again the modes of the file after being created.
- Omit the third parameter, the mode get any garbage is make for the file.
- Write mode only work in the first time where the file is create, don't matter if the file are create in no write mode.

I'm not sure how it should be fixed, or if any standard should be followed. Perhaps only the modification of the operating details in the documentation is needed.
Comment 1 Florian Weimer 2022-08-04 08:01:43 UTC
The manual pages are not maintained by the glibc project. Please report issues with them to the linux-man mailing list: <https://www.kernel.org/doc/man-pages/linux-man-ml.html>