OSDN Git Service

Fix android_id_from_name to accept "app_0" as a valid ID.
authorDavid 'Digit' Turner <digit@google.com>
Fri, 12 Feb 2010 19:35:38 +0000 (11:35 -0800)
committerDavid 'Digit' Turner <digit@google.com>
Fri, 12 Feb 2010 19:35:38 +0000 (11:35 -0800)
This fixes getpwnam and getpwgrp which returned NULL for "app_0".
"app_0" corresponds to uid/gid 10000 and is perfectly valid.

libc/bionic/stubs.c

index 586d497..d495674 100644 (file)
@@ -185,7 +185,7 @@ app_id_from_name( const char*  name )
         goto FAIL;
 
     id = strtoul(name+4, &end, 10);
-    if (id == 0 || *end != '\0')
+    if (*end != '\0')
         goto FAIL;
 
     id += AID_APP;