Bugzilla – Bug 199
lecture file left open
Last modified: 2005-11-11 11:24:23 MST
The optional lecture file is left open and passed to the target program, at least in the case of "sudo su" on HP-UX 11.00. This is a problem if lecture is on a file system I later need to unmount without disturbing the program launched by sudo. Looks like check.c needs an fclose after line 131 (1.6.8p12). if (def_lecture_file && (fp = fopen(def_lecture_file, "r")) != NULL) { while ((nread = fread(buf, sizeof(char), sizeof(buf), fp)) != 0) fwrite(buf, nread, 1, stderr); # next line is proposed addition fclose(fp); } else {
Thanks, I've fixed this in the sudo cvs tree