...
This non-compliant code example opens the file specified by the string "/home/rcsuser1/.conf" for read/write exclusive access, and then writes user supplied data to the file.
| Code Block | ||
|---|---|---|
| ||
const char* file_name = "/home/rcsuser1/.conf"; if ((fd = open(file_name, O_RDWR)) == -1) { /* handle error */ } write(fd, userbuf, userlen); |
...