mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 19:08:58 +00:00
Remove bogus file locking in main().
This commit is contained in:
parent
1a180222e0
commit
08fe832b6e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=42394
@ -26,7 +26,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$Id: pw.c,v 1.8 1998/07/16 17:18:25 nate Exp $";
|
||||
"$Id: pw.c,v 1.10 1998/08/04 22:31:26 nate Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "pw.h"
|
||||
@ -50,7 +50,6 @@ static struct cargs arglist;
|
||||
|
||||
static int getindex(const char *words[], const char *word);
|
||||
static void cmdhelp(int mode, int which);
|
||||
static void filelock(const char *filename);
|
||||
|
||||
|
||||
int
|
||||
@ -150,12 +149,6 @@ main(int argc, char *argv[])
|
||||
*/
|
||||
cnf = read_userconfig(getarg(&arglist, 'C') ? getarg(&arglist, 'C')->val : NULL);
|
||||
|
||||
/*
|
||||
* Try to lock the master passowrd and group files right away (we
|
||||
* don't care if it works, since this is just advisory locking.
|
||||
*/
|
||||
filelock(_PATH_GROUP);
|
||||
filelock(_PATH_MASTERPASSWD);
|
||||
ch = funcs[which] (cnf, mode, &arglist);
|
||||
|
||||
/*
|
||||
@ -186,11 +179,6 @@ main(int argc, char *argv[])
|
||||
return ch;
|
||||
}
|
||||
|
||||
static void
|
||||
filelock(const char *filename)
|
||||
{
|
||||
open(filename, O_RDONLY | O_EXLOCK, 0);
|
||||
}
|
||||
|
||||
static int
|
||||
getindex(const char *words[], const char *word)
|
||||
|
Loading…
Reference in New Issue
Block a user