Date: Mon, 15 Sep 2008 20:39:09 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 149823 for review Message-ID: <200809152039.m8FKd9M0097560@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=149823 Change 149823 by hselasky@hselasky_laptop001 on 2008/09/15 20:39:06 Make sure the real access information is returned and not the effective access information. Affected files ... .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_dev.c#33 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb2/core/usb2_dev.c#33 (text+ko) ==== @@ -351,7 +351,6 @@ (pdst->iface_index >= USB_IFACE_MAX)) { return (EINVAL); } -retry: if (level == 1) devloc = USB_BUS_MAX; /* use root-HUB to access bus */ else @@ -403,21 +402,18 @@ pdst->user_id = psrc->uid; pdst->group_id = psrc->gid; pdst->mode = psrc->mode; - error = 0; } else { - error = EINVAL; + /* access entry at this level and location is not active */ + pdst->user_id = 0; + pdst->group_id = 0; + pdst->mode = 0; } mtx_unlock(&usb2_ref_lock); if ((level > 0) && (level < 4)) { usb2_unref_device(&loc); - if (error) { - /* try to find the permission one level down */ - level--; - goto retry; - } } - return (error); + return (0); } /*------------------------------------------------------------------------*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809152039.m8FKd9M0097560>