summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authordavidn <davidn@FreeBSD.org>1999-01-08 10:52:38 +0000
committerdavidn <davidn@FreeBSD.org>1999-01-08 10:52:38 +0000
commit43bf26e477ddb791d8a93b925edcb454e4793e2b (patch)
tree68b6a577674d0c2b21f196efebde322a678cefd5 /usr.sbin
parent1331b5988565c1f08a0b714a44b26b327b73d980 (diff)
downloadFreeBSD-src-43bf26e477ddb791d8a93b925edcb454e4793e2b.zip
FreeBSD-src-43bf26e477ddb791d8a93b925edcb454e4793e2b.tar.gz
Remove bogus file locking in main().
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pw/pw.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/usr.sbin/pw/pw.c b/usr.sbin/pw/pw.c
index 3dc9276..f862cbe 100644
--- a/usr.sbin/pw/pw.c
+++ b/usr.sbin/pw/pw.c
@@ -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)
OpenPOWER on IntegriCloud