Skip to content

Commit

Permalink
CDRIVER-2198 Check for O_NOFOLLOW
Browse files Browse the repository at this point in the history
  • Loading branch information
bjori committed Jul 18, 2017
1 parent 9a55c7e commit daa9c94
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mongoc/mongoc-counters.c
Expand Up @@ -166,6 +166,9 @@ mongoc_counters_alloc (size_t size)
pid = getpid ();
bson_snprintf (name, sizeof name, "/mongoc-%u", pid);

#ifndef O_NOFOLLOW
#define O_NOFOLLOW 0
#endif
if (-1 == (fd = shm_open (name,
O_CREAT | O_EXCL | O_RDWR,
S_IRUSR | S_IWUSR | O_NOFOLLOW))) {
Expand Down

0 comments on commit daa9c94

Please sign in to comment.