=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sudo/Attic/fileops.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.6.1 diff -u -r1.1.1.1 -r1.1.1.1.6.1 --- src/usr.bin/sudo/Attic/fileops.c 1999/11/18 16:29:01 1.1.1.1 +++ src/usr.bin/sudo/Attic/fileops.c 2002/01/18 17:20:23 1.1.1.1.6.1 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999 Todd C. Miller + * Copyright (c) 1999, 2001 Todd C. Miller * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,26 +34,29 @@ #include "config.h" +#include +#include +#ifdef HAVE_FLOCK +# include +#endif /* HAVE_FLOCK */ #include #ifdef HAVE_UNISTD_H -#include +# include #endif /* HAVE_UNISTD_H */ #include #include -#include -#include #ifdef HAVE_UTIME # ifdef HAVE_UTIME_H # include # endif /* HAVE_UTIME_H */ #else -# include "emul/utime.h" +# include "emul/utime.h" #endif /* HAVE_UTIME */ #include "sudo.h" #ifndef lint -static const char rcsid[] = "$Sudo: fileops.c,v 1.1 1999/08/07 09:59:43 millert Exp $"; +static const char rcsid[] = "$Sudo: fileops.c,v 1.3 2001/12/14 19:52:47 millert Exp $"; #endif /* lint */ /* @@ -119,7 +122,7 @@ op = LOCK_EX | LOCK_NB; break; case SUDO_UNLOCK: - op = LOCK_EX; + op = LOCK_UN; break; } return(flock(fd, op) == 0);