|
Bugzilla – Full Text Bug Listing |
| Summary: | lecture file left open | ||
|---|---|---|---|
| Product: | Sudo | Reporter: | Jerry Brown <gerald.brown> |
| Component: | Sudo | Assignee: | Todd C. Miller <Todd.Miller> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | normal | ||
| Version: | 1.6.8 | ||
| Hardware: | All | ||
| OS: | All | ||
Thanks, I've fixed this in the sudo cvs tree |
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 {