Skip to content

Commit

Permalink
* shmem/unix/shm.c (APR_PERMS_SET_IMPLEMENT): Implement for the
Browse files Browse the repository at this point in the history
  "Classic mmap" case (APR_USE_SHMEM_MMAP_TMP).
  • Loading branch information
notroj committed Aug 6, 2024
1 parent 1852baa commit b509853
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions shmem/unix/shm.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,20 @@ APR_PERMS_SET_IMPLEMENT(shm)
if (fchmod(fd, apr_unix_perms2mode(perms)))
return errno;

return APR_SUCCESS;
#elif APR_USE_SHMEM_MMAP_TMP
apr_shm_t *shm = (apr_shm_t *)theshm;
int fd;

if (!shm->filename)
return APR_ENOTIMPL;

if (chown(shm->filename, uid, gid))
return errno;

if (chmod(shm->filename, apr_unix_perms2mode(perms)))
return errno;

return APR_SUCCESS;
#else
return APR_ENOTIMPL;
Expand Down

0 comments on commit b509853

Please sign in to comment.