openbsd-ports/net/pure-ftpd/patches/patch-ftpwho_update_c
brad 23ab1fba32 Oneliner to add use of msync().
"On OpenBSD, data read from a mmap()ed file through read() is not in sync
unless msync() is explicitely called.

In pure-ftpd it breaks the -y option that restricts the number of sessions
an account can open. This oneliner seems to fix it."

ok pvalchev@
--
From: Frank Denis <j at pureftpd dot org>
2004-03-08 03:57:16 +00:00

11 lines
311 B
Plaintext

--- src/ftpwho-update.c.orig Sat Mar 6 21:32:18 2004
+++ src/ftpwho-update.c Sat Mar 6 21:33:39 2004
@@ -61,6 +61,7 @@
void ftpwho_unlock(void)
{
+ (void) msync(shm_data_cur, NULL, MS_ASYNC);
lock.l_type = F_UNLCK;
while (fcntl(mmap_fd, F_SETLK, &lock) < 0) {
if (errno != EINTR) {