diff options
| author | Veeren Mandalia <v.mandalia@sta.samsung.com> | 2012-08-02 15:20:49 -0700 |
|---|---|---|
| committer | Colin Cross <ccross@android.com> | 2012-08-03 13:16:05 -0700 |
| commit | 4f97fd91e361c8fc2f5fbcab0fa34e2bd68d3218 (patch) | |
| tree | abce01c71828c365255bec1388c635ffee6bd230 /init | |
| parent | b35e36e5a92ac984a57ec15b14dc6ad3b0ecf1c5 (diff) | |
| download | system_core-4f97fd91e361c8fc2f5fbcab0fa34e2bd68d3218.tar.gz system_core-4f97fd91e361c8fc2f5fbcab0fa34e2bd68d3218.tar.bz2 system_core-4f97fd91e361c8fc2f5fbcab0fa34e2bd68d3218.zip | |
init: fix return value for android uid/gid check
Now get_android_id function returns -EINVAL if the uid/gid is not in the list
of android ids. This will allow ueventd to catch invalid ids and report the
error.
Change-Id: I943b04dd64d518891623e1ee2d561b8061af4863
Signed-off-by: Veeren Mandalia <v.mandalia@sta.samsung.com>
Diffstat (limited to 'init')
| -rw-r--r-- | init/ueventd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/init/ueventd.c b/init/ueventd.c index a89e0677..a41c31e2 100644 --- a/init/ueventd.c +++ b/init/ueventd.c @@ -105,7 +105,7 @@ static int get_android_id(const char *id) for (i = 0; i < ARRAY_SIZE(android_ids); i++) if (!strcmp(id, android_ids[i].name)) return android_ids[i].aid; - return 0; + return -1; } void set_device_permission(int nargs, char **args) |
