Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Files should be created with appropriate access permissions. Creating a file with insufficient file access permissions may allow unintended access to program-critical files. File permissions are heavily dependent on the underlying operating system.   This recommendation provides examples of how to specify access permissions for newly created files using well known file creation functionsHowever, many file creation functions provide a way to influence access permissions. Setting appropriate access permissions on newly created files prevents unintended access to those files.

Non-Compliant Code Example: fopen()

...