Summary: | [patch] lpr(1): lpr -r flag has no effect | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | George Mitchell <george> | ||||
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | Open --- | ||||||
Severity: | Affects Only Me | Keywords: | patch | ||||
Priority: | Normal | ||||||
Version: | 5.3-RELEASE | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
George Mitchell
2006-07-08 00:50:16 UTC
In the example given of how to reproduce, I made a typo. The example should read as follows: cp <existing text file> foo.txt lpr -r foo.txt After file prints, observe that foo.txt still exists. -- George Mitchell To complete this fix, lprm also needs a patch as follows: --- usr.sbin/lpr/common_source/rmjob.c.orig Thu Dec 30 16:36:28 2004 +++ usr.sbin/lpr/common_source/rmjob.c Sun Jul 30 18:14:01 2006 @@ -206,7 +206,7 @@ while (getline(cfp)) { switch (line[0]) { case 'U': /* unlink associated files */ - if (strchr(line+1, '/') || strncmp(line+1, "df", 2)) + if (strncmp(line+1, "df", 2)) break; do_unlink(line+1); } Responsible Changed From-To: freebsd-bugs->gad gad requests review of lpr changes so pass to him. I will need to review the original code, and make sure this is the right fix. '-r' did used to work, but it was disabled for security reasons. See revision 1.5 at http://cvsweb.freebsd.org/src/usr.sbin/lpr/common_source/rmjob.c (it fixed a CERT advisory at the time, back in 1997). I *think* I made some other changes which should make this safer to do now, but I have to be sure about that. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped Keyword: patch or patch-ready – in lieu of summary line prefix: [patch] * bulk change for the keyword * summary lines may be edited manually (not in bulk). Keyword descriptions and search interface: <https://bugs.freebsd.org/bugzilla/describekeywords.cgi> Perhaps this bug should be closed due to lack of interest? |