[Toybox] New toy: login

Elie De Brauwer eliedebrauwer at gmail.com
Tue May 1 01:20:25 PDT 2012


On 04/29/2012 03:13 AM, Rob Landley wrote:
> On 04/28/2012 08:35 AM, Elie De Brauwer wrote:
>>
>> Attached is a patch which make login depend on probing crypt.h and
>> shadow.h following the unshare example.  I turned these into two probes,
>> just to keep things a bit more understandable, and i suspect that some
>> future toys might depend on either shadow or crypt.
>
> Um, can we wait to split them until something _does_ need them split?  I
> hate having infrastructure awaiting a user, it tends to accumulate and
> then not fit right if somebody _does_ need it. (Yes, I have seen code
> _preemptively_ bit-rot.)
>
>> Regarding the --as-needed. I can update make.sh to contain something as
>>   -Wl,--as-needed,${REQUIRED_LIBS},--no-as-needed but what would be a
>> sensible way to populate the $REQUIRED_LIBS variable ?
>
> Have each test do:
>
>    REQUIRED_LIBS="$REQUIRED_LIBS,fruitbasket"
>
> And then at the end:
>
>    [ ! -z "$REQUIRED_LIBS" ]&&
>      REQUIRED_LIBS="-Wl,--as-needed$REQUIRED_LIBS,--no-as-needed"
>
> (Note the missing comma before $REQUIRED_LIBS since each addition starts
> with one.)

Modified, see patch in attach. I put the required variable in a separate 
generated file, which gets sourced/cleaned by the main make.

The patch also includes the detection of crpyt.h and shadow.h but now 
combined into a single variable.

For now -lutil still lives as it was before, I haven't got a clue 
whether this needs to be aligned or whether it's always there (nor what 
might depend on it, but if somebody can give me a pointer I can also 
align this).

my 2 cents
E.


-- 
Elie De Brauwer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: login_probe.patch
Type: text/x-patch
Size: 3974 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20120501/773655a8/attachment-0006.bin>


More information about the Toybox mailing list