]> granicus.if.org Git - sudo/commitdiff
Remove an duplicate lock_file() call and add a comment.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 16 Jun 2007 11:31:56 +0000 (11:31 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 16 Jun 2007 11:31:56 +0000 (11:31 +0000)
visudo.c

index b05dc1af4bf930ba650d20b22e81e786c295f4c5..5d8b6bae0b178e26b85d013ff7f4fa459571e093 100644 (file)
--- a/visudo.c
+++ b/visudo.c
@@ -205,8 +205,6 @@ main(argc, argv)
      */
     if ((yyin = open_sudoers(sudoers_path, NULL)) == NULL)
        error(1, "%s", sudoers_path);
-    if (!lock_file(fileno(yyin), SUDO_TLOCK))
-       errorx(1, "%s busy, try again later", sudoers_path);
     init_parser(sudoers_path, 0);
     yyparse();
     (void) update_defaults(SKIP_CMND);
@@ -700,6 +698,10 @@ check_syntax(sudoers_path, quiet)
     return(parse_error == TRUE);
 }
 
+/*
+ * Used to open (and lock) the initial sudoers file and to also open
+ * any subsequent files #included via a callback from the parser.
+ */
 FILE *
 open_sudoers(path, keepopen)
     const char *path;