Ticket #89 (closed enhancement: fixed)
Patch to clean up vuurmuur_fopen
| Reported by: | matthijs | Owned by: | victor |
|---|---|---|---|
| Priority: | minor | Milestone: | undecided |
| Component: | libvuurmuur | Version: | |
| Keywords: | patch | Cc: |
Description
The attached patch cleans up vuurmuur_fopen a bit. It removes all checks from the function and instead calls stat_ok do do these checks. This has the following functional changes:
- vuurmuur_fopen now only works for regular files (non fifo's, character devices, etc.). This shouldn't be a problem, config files should be regular files anyway.
- vuurmuur_fopen now only works for existing files. This is because stat_ok fails when a stat call fails, without special case for a "File not found" error. The original vuurmuur_fopen function skipped all checks when lstat returned an error (which might have been wrong, since an error does not always mean "File not found").
However, I have checked all uses of the vuurmuur_fopen function, and all of them use it only on existing files (add_textdir uses plain fopen to create new files.
The patch is against svn r240.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
