koush / Superuser

Other
1.48k stars 1k forks source link

is there a bug in dameon.c line 567 #272

Open xue138711049 opened 9 years ago

xue138711049 commented 9 years ago

in line 567 int mount_storage = getenv("MOUNT_EMULATED_STORAGE") != NULL; and line 630 to 639 write args according "mount_storage". in those code it del first argument. so su_main how to parse it.

// Number of command line arguments
write_int(socketfd, mount_storage ? argc - 1 : argc);

// Command line arguments
int i;
for (i = 0; i < argc; i++) {
    if (i == 1 && mount_storage) {
        continue;
    }
    write_string(socketfd, argv[i]);
}
unforgettableid commented 9 years ago

I can't understand your English.