This is not necessary here. Additionally we can use O_CLOEXEC to make sure the file descriptors are not leaked by accident.
Details
Details
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Comment Actions
have you tried this? because i have just tried it and it failed.
Aren't you missing a O_CREAT ?
Comment Actions
O_CREAT was missing, as well as the file mode. O_CLOEXEC is available for a long time, there should be no need for the compat define.
pam_kwallet.c | ||
---|---|---|
696 | It is how it really works. Think of as a handle value, you're promising not to assign that handle value to point somewhere else, not that you won't change the value it points to. Why i want this const? Because when you see that you can be sure that the rest of the file there's no other fd = open() or similar, and thus you're sure that the rest of the operations in this function that use fd are over "path". |