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



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

_______________________________________________ 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>)



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.