android application has 3 properties -------uid ,gid ,gids.  if
android has a permission has a permission
android.permission.INTERNET,it will in the permission group
android.permission-group.NETWORK.  So the native c could create a
socket.

android archieve permission check on native c through check
application's property gids??

Application's gids is are stored in Package.permissionGroups in core
\java\android\content\pm\PackageParser.java .

am i right??


On Apr 25, 12:45 am, Earlence <[email protected]> wrote:
> to connect to the internet, the process should have the internet gid.
> it is given this gid when the internet permission is granted to its
> surrounding apk.
> the check has been patched into the socket calls. you don't have to
> worry about requesting permission anywhere else than in your manifest
> file.
>
> -Earlence
>
> On Apr 24, 1:20 pm, 万朝新 <[email protected]> wrote:
>
>
>
>
>
>
>
> > ps:
> > For example,if i want to set up a socket connect ,how can i request
> > permission. And which part of android source code implementation the
> > permission check .
>
> > Thanks very much!
>
> > 2011/4/22 mytears <[email protected]>
>
> > > Hello All,
> > >        i know that the permissions of Applications are written in /data/
> > > system/packages.xml and the requests are checked by
> > > ActivityManagerService.java.  but i don't know if there is permission
> > > check by android while i am ececute Native C.  And how to implement
> > > the permission checks on Native C.
>
> > > Thanks a lot!!

-- 
You received this message because you are subscribed to the Google Groups 
"Android Security Discussions" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/android-security-discuss?hl=en.

Reply via email to