On 06/30/2018 09:45 PM, Rob Landley wrote: > Sigh, but I might as well keep the two functions matching in case I do work > out > a way to collapse them together later.
Question, which requires some context first: I've been triaging pending/ and looking at the 4 groupadd/groupdel/useradd/userdel commands, which use lib/password.c. Specifically, they use code that parses /etc/passwd and /etc/shadow files, which android doesn't have. Way back when busybox had its own code to read/write these files without depending on libc to do it, then Kyungwan Han and Ashwini Sharma sent me a lot of code to do this sort of thing, much of it at least stylistically copying busybox. And way back when the bionic stubs for the user account functions returned variants of "not implemented", so doing it directly made sense at the time. Now android has its own user account stuff, in some sort of database last I checked, so using the libc functions makes sense. And this thread is about a google patch making more complete use of the libc functions, so... Is there a way I can implement userdel/passwd/su and so on that will be of use to android, or should I stick with the /etc/files approach and assume that I'm running in a container that a range of UIDs and GIDs have been delegated to and I'm just locally managing them for a build environment? Rob _______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net