From: Todd C. Miller Date: Sat, 16 Jun 2007 11:31:56 +0000 (+0000) Subject: Remove an duplicate lock_file() call and add a comment. X-Git-Tag: SUDO_1_7_0~551 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db084676e5ad7456fe2e313673db3a358925c8d7;p=sudo Remove an duplicate lock_file() call and add a comment. --- diff --git a/visudo.c b/visudo.c index b05dc1af4..5d8b6bae0 100644 --- 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;