From: Todd C. Miller Date: Wed, 4 Apr 2001 17:17:04 +0000 (+0000) Subject: Fix a pasto in flock-style unlocking and include for flock X-Git-Tag: SUDO_1_6_4~198 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6b005f256383812d52f0a420c3034e59646cd92;p=sudo Fix a pasto in flock-style unlocking and include for flock on older systems; twetzel@gwdg.de --- diff --git a/fileops.c b/fileops.c index 3801cc235..78b05c679 100644 --- a/fileops.c +++ b/fileops.c @@ -42,6 +42,9 @@ #include #include #include +#ifdef HAVE_FLOCK +#include +#endif /* HAVE_FLOCK */ #ifdef HAVE_UTIME # ifdef HAVE_UTIME_H # include @@ -119,7 +122,7 @@ lock_file(fd, lockit) op = LOCK_EX | LOCK_NB; break; case SUDO_UNLOCK: - op = LOCK_EX; + op = LOCK_UN; break; } return(flock(fd, op) == 0);