[Prev][Next][Index][Thread]
Re: QCAM 0.1 now available
Scott Laird writes:
> What worried me was a malicious user doing something like 'qcam -p
> 0x1f0' and taking out a hard drive. I figure someone logged in as root
> was more likely to be careful. Now that I have a configuration file, I
> should be able to disable the -p option for everyone but root and run
> SUID without too many problems. Thanks, I'll add this for 0.2, which
> should be out sometime before the weekend, depending on how much time I
> have to work on this.
I think the best thing to do is autodetect the parallel port. Have to
do something like this:
if (q->port == 0) {
int *portptr = {0x378, 0x278, 0x3bc, 0};
while(*portptr) {
q->port = *portptr++;
if (qc_open(q)) {
if (qc_detect(q))
break;
qc_close(q);
}
if (*portptr) {
fprintf(stderr, "Can't autodetect the QuickCam -- you may need"
"to explicitly set the parallel port address.\n");
exit(1);
}
}
-russ <nelson@crynwr.com> http://www.crynwr.com/~nelson
Crynwr Software | Crynwr Software sells packet driver support | PGP ok
11 Grant St. | +1 315 268 1925 voice | Good government is a contradiction
Potsdam, NY 13676 | +1 315 268 9201 FAX | in terms. Ask me for details.
References: