Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidSystemCore
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidSystemCore
Commits
7e723498
Commit
7e723498
authored
12 years ago
by
Matthew Xie
Committed by
Android (Google) Code Review
12 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Add permission for bluetooth app in non-primary users" into jb-mr2-dev
parents
49be2407
40a91a28
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
init/property_service.c
+8
-0
8 additions, 0 deletions
init/property_service.c
with
8 additions
and
0 deletions
init/property_service.c
+
8
−
0
View file @
7e723498
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include
<cutils/misc.h>
#include
<cutils/misc.h>
#include
<cutils/sockets.h>
#include
<cutils/sockets.h>
#include
<cutils/multiuser.h>
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#include
<sys/_system_properties.h>
#include
<sys/_system_properties.h>
...
@@ -270,12 +271,19 @@ static int check_control_perms(const char *name, unsigned int uid, unsigned int
...
@@ -270,12 +271,19 @@ static int check_control_perms(const char *name, unsigned int uid, unsigned int
static
int
check_perms
(
const
char
*
name
,
unsigned
int
uid
,
unsigned
int
gid
,
char
*
sctx
)
static
int
check_perms
(
const
char
*
name
,
unsigned
int
uid
,
unsigned
int
gid
,
char
*
sctx
)
{
{
int
i
;
int
i
;
unsigned
int
app_id
;
if
(
!
strncmp
(
name
,
"ro."
,
3
))
if
(
!
strncmp
(
name
,
"ro."
,
3
))
name
+=
3
;
name
+=
3
;
if
(
uid
==
0
)
if
(
uid
==
0
)
return
check_mac_perms
(
name
,
sctx
);
return
check_mac_perms
(
name
,
sctx
);
app_id
=
multiuser_get_app_id
(
uid
);
if
(
app_id
==
AID_BLUETOOTH
)
{
uid
=
app_id
;
}
for
(
i
=
0
;
property_perms
[
i
].
prefix
;
i
++
)
{
for
(
i
=
0
;
property_perms
[
i
].
prefix
;
i
++
)
{
if
(
strncmp
(
property_perms
[
i
].
prefix
,
name
,
if
(
strncmp
(
property_perms
[
i
].
prefix
,
name
,
strlen
(
property_perms
[
i
].
prefix
))
==
0
)
{
strlen
(
property_perms
[
i
].
prefix
))
==
0
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment