tzplatform_get: fix to support numeric user id
[platform/core/system/tizen-platform-wrapper.git] / src / tzplatform_get.c
index b190c34..b37a5eb 100644 (file)
@@ -181,7 +181,7 @@ int main(int argc, char **argv)
                if (user[i])
                        getpwnam_r(user, &pwd, buf, sizeof(buf), &spw);
                else
-                       getpwuid_r(user, &pwd, buf, sizeof(buf), &spw);
+                       getpwuid_r((uid_t)atoi(user), &pwd, buf, sizeof(buf), &spw);
                if (!spw) {
                        fprintf( stderr, "error! %s isn't standing for a valid user.\n", user);
                        if (!cont)