_cleanup_free_ char *k = NULL;
const char *e;
- /* If this is not a sealed memfd, and the peer is unknown or
- * unprivileged, then verify the path. */
+ /* If this is not a sealed memfd, and the peer is unknown or unprivileged, then verify the
+ * path. */
r = fd_get_path(fd, &k);
if (r < 0) {
return;
}
- /* Refuse operating on file systems that have
- * mandatory locking enabled, see:
+ /* Refuse operating on file systems that have mandatory locking enabled, see:
*
* https://github.com/systemd/systemd/issues/1822
*/
return;
}
- /* Make the fd non-blocking. On regular files this has
- * the effect of bypassing mandatory locking. Of
- * course, this should normally not be necessary given
- * the check above, but let's better be safe than
- * sorry, after all NFS is pretty confusing regarding
- * file system flags, and we better don't trust it,
- * and so is SMB. */
+ /* Make the fd non-blocking. On regular files this has the effect of bypassing mandatory
+ * locking. Of course, this should normally not be necessary given the check above, but let's
+ * better be safe than sorry, after all NFS is pretty confusing regarding file system flags,
+ * and we better don't trust it, and so is SMB. */
r = fd_nonblock(fd, true);
if (r < 0) {
log_ratelimit_error_errno(r, JOURNAL_LOG_RATELIMIT,
return;
}
- /* The file is not sealed, we can't map the file here, since
- * clients might then truncate it and trigger a SIGBUS for
- * us. So let's stupidly read it. */
+ /* The file is not sealed, we can't map the file here, since clients might then truncate it
+ * and trigger a SIGBUS for us. So let's stupidly read it. */
p = malloc(st.st_size);
if (!p) {