[Fwd: Re: [BusyBox] my_getpw(u/g)id]

Vladimir N. Oleynik dzo at simtreas.ru
Mon Sep 6 08:07:18 UTC 2004


Tito,

> I've applied your patch to my tree this are the results with the same config file
>  (can send it if you want) :
> A)busybox-vodz
>    text         data       bss       dec     hex    filename
>  250879    2364   37492  290735      46faf busybox
>        394          0          0         394        18a coreutils/id.o
>        388          0           0        388       184 coreutils/id.o

My id must less size, but increase size is correction works effect.

>      3474          0          4       3478        d96  archival/tar.o
>      3462          0           4      3466       d8a archival/tar.o

Ok. I have idea for decrease size for this.

>          48          0           0           48        30 coreutils/whoami.o
>          48          0           0           48        30 coreutils/whoami.o

Hmm. Strange.

>         825         0        80         905        389 libbb/procps.o
>        818          0         80         898     382 libbb/procps.o

I see, GNU ps haven`t show uid as symbolicaly.
For "top" applet GNU show only 8 chars.
May be save pwuid for libbb/procps() is not good idea,
this can realized as "ls" method.

>       3448         0      160       3608        e18 loginutils/passwd.o
>      3448          0       160       3608     e18 loginutils/passwd.o

Hmm. Strange.

> There is not this big difference, but If I understand it right your 
> patch have made overall size bigger at least in the text part.
> Your my_get* stuff tough is cool, but not very intuitive to use,

;-)

> i will need a few weeks to understand it fully :-( .
> There is lot for me to learn there, thanks for your effort and patience
> with my newbie questions!!
> For the formatting errors and not needed includes you have spotted I'will send a patch in
> if Erik  doesn't apply yours. 
> Thanks again for that too.
> Just some more questions:
> 1) in tar you use:
> 	if(my_getpwuid(MY_GETPUG_RET_NULL_IF_IDNAME_NOT_EXIST |
> 			MY_GETPUG_BUF_SPECIFIED | sizeof(header.uname),
> 				statbuf->st_uid) == NULL)
> what happens in this case  if sizeof(buffer) has casually the same value of one of your flags?
> (I know they are quite big numbers.............)

But my max_buf_size(511) is > system(256).

> 2) 
> 
>>Your changes to "id" applet have many problem:
>>
>>this block:
>>
>>       /* This values could be overwritten later */
>>         uid = geteuid();
>>         gid = getegid();
>>         if (flags & PRINT_REAL) {
>>                 uid = getuid();
>>                 gid = getgid();
>>         }
>>
>>executed always, but not require if(argv[optind]) true.
> 
> What's wrong with this?
> I know It wastes some cpu but saves space.

Its have problem:
if use as show gid only:
$ id -ng
and currest uid not exist, your applet show:
id: uid not exist
always, and don`t show gid

> BTW: your mail server rejects my emails.

Yes. mail-relay-2.tiscali.it is spam-like.


--w
vodz




More information about the busybox mailing list