]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
actually unlock files, rather that just locking them again :(
authorMatthew Newton <matthew-git@newtoncomputing.co.uk>
Tue, 24 Jul 2018 16:02:26 +0000 (17:02 +0100)
committerMatthew Newton <matthew-git@newtoncomputing.co.uk>
Tue, 24 Jul 2018 16:02:26 +0000 (17:02 +0100)
src/lib/util/misc.c

index 99e9887f73d8c1ed8b5ecc2d03831fda036e312d..7a7d82003ac4520b164f8a159a9726cd378b0410 100644 (file)
@@ -189,10 +189,10 @@ int rad_unlockfd(int fd, int lock_len)
        fl.l_start = 0;
        fl.l_len = lock_len;
        fl.l_pid = getpid();
-       fl.l_type = F_WRLCK;
+       fl.l_type = F_UNLCK;
        fl.l_whence = SEEK_CUR;
 
-       return fcntl(fd, F_UNLCK, (void *)&fl);
+       return fcntl(fd, F_SETLK, (void *)&fl);
 #else
 #error "missing definition for F_WRLCK, all file locks will fail"