Re: /proc/parport/x/autoprobe lets you peek into userspace mem.

Tim Waugh (tim@cyberelk.demon.co.uk)
Mon, 27 Jul 1998 00:13:10 +0100 (BST)


On Sat, 25 Jul 1998, Carsten Gross wrote:

> If you use 'strace', this problem should be a lot more obvious. If there is
> no printer attachted the first read should return 0(?) because the autoprobe
> file is empty? Yes, this is a question, but IMHO it makes sense, that the
> autoprobe file is empty, if there is no printer attachted.

This was indeed the intention - sorry!

Tim.
*/

--- linux/drivers/misc/parport_procfs.c~ Wed Jul 22 00:33:47 1998
+++ linux/drivers/misc/parport_procfs.c Mon Jul 27 00:12:35 1998
@@ -182,6 +182,8 @@
int len = 0;
const char *str;

+ page[0] = '\0';
+
if ((str = pp->probe_info.class_name) != NULL)
len += sprintf (page+len, "CLASS:%s;\n", str);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html