Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: privilege violation caused by HP printer



Just a thought...

Does the HP printer have a HID interface that their software might be grabbing (some newer print/scan devices have extra buttons implemented as HID devices)? If so, maybe their software is inadvertently grabbing your device too?

Dave

On Feb 28, 2005, at 10:47 AM, Raleigh Ledet wrote:

Hi Rob,
I am quite sure the privileges are correct.
a) My driver is typically launched as root. It changes it's id to the logged in user's id very early in the process. Either way, it should be the correct ID.
b) My test user is an admin user.
c) I added test code that tries to open the interface on this specific failure. I have a one second wait interval. I open th device somewhare around the 4 to 6th try. That's a 4 to 6 second wait. This is not an acceptable wait period.
d) I don't get the privilege violation on most Macs. This ONLY happens once I have attached an hp printer and software installed. It still occurs now that I have detached the printer, removed it from the print center, and attempted to uninstall the hp software.
e) Safe Boot works fine. Though I was surprised that SafeBoot launched my driver and the console app which I set as a login item for the user.
I will install the usb logger to see if I can gather any more data.
-raleigh
On Feb 27, 2005, at 11:46 AM, Rob Yepez wrote:
Hi Raleigh,
The HID Manager will only allow a process to open an interface to a HID device if either the process is run by an admin user or by the currently logged in user.
Can you verify your process privileges before you issue an open on the HID device?
- Rob
On Feb 25, 2005, at 5:17 PM, Raleigh Ledet wrote:
Hello,
I've got a userland driver that tries to seize my HID device. Normally, this works perfectly. However, I have some users complaining that when they boot with automatic login turned on, my driver fails to grab the device. It reports an kIOReturnNotPrivileged error from the OpenInterface call. My driver then quits but, oddly enough, if the user double-clicks my driver, it works just fine.
I finally tracked the problem down to an hp printer. The only way I can duplicate tis problem was to attach an hp deskjet printer and install the software that came with it.
It seems that something is going on during boot w/ auto login that is not letting me seize/open my device from HID. What the heck is the HP printer software doing that doesn't allow me to open my device? How do I work around this problem in my driver.
More background:
1) Driver launched via SystemStartupItems
2) On a user login from the current user into the root user, the driver relaunches itself. Note: We have made extra careful sure that the initial driver closes all interfaces that it has open before launching a new copy of itself. (This is done to load the logged-in user's prefs.)
3) The driver switches to the user's id to run with their privileges very early in the launch process.
4) The exact call that returns the error is:
kr = (*hDevice122Interface)->open(hDevice122Interface, kIOHIDOptionsTypeSeizeDevice);
5) Booting into the login window works. Logging in from the login window works
6) No Kext for my device. Its primary usage page is a HID mouse.
7) iMac G5, Mac OS X 10.3.8 (7U16)
8) Other devices attached:
USB: Apple Extended USB Keyboard, deskjet 5550, Wacom Tablet
Thanks,
raleigh
--------------------------------------------------------------------- --
Raleigh Ledet email@hidden
Wacom Technology Corp. Towards the Harmonious
Mac Software Engineer Development Between
Human and Computer.
--------------------------------------------------------------------- ---
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden
This email sent to email@hidden
-----------------------------------------------------------------------
Raleigh Ledet email@hidden
Wacom Technology Corp. Towards the Harmonious
Mac Software Engineer Development Between
Human and Computer.
----------------------------------------------------------------------- -
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Usb mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden
References: 
 >privilege violation caused by HP printer (From: Raleigh Ledet <email@hidden>)
 >Re: privilege violation caused by HP printer (From: Rob Yepez <email@hidden>)
 >Re: privilege violation caused by HP printer (From: Raleigh Ledet <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.