[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [BusyBox] my_getpw(u/g)id.....and call for helping to test new id
From: Tito <farmatito () tiscali ! it>
Date: 2004-08-30 19:48:01
Message-ID: 200408302151.00689.farmatito () tiscali ! it
[Download RAW message or body]
On Sunday 29 August 2004 OO:29, you wrote:
> On Sun, 29 Aug 2004 10:13pm -0000, Tito wrote:
>
> I'm attaching my `jumbo patch2'. All the busybox code is converted to my
> last e-mail's function. I intentionally didn't use `-b' or `-w' flags to
> diff :-) There is also a saving of codesize and no limit at all to values
> of username or groupname. No memory leaks. Sorry again for sending such
> a big diff.
It looks good to me even if I'dont like the my_getpw*id stuff so much.
But I don't think Erik will let this in before 1.0 ........
BTW I've seen that you have made some size optimisations like in passwd.c
- pw = getpwnam(name);
- if (!pw) {
- bb_error_msg_and_die("Unknown user %s\n", name);
- }
- if (!amroot && pw->pw_uid != getuid()) {
+
+ ruid = my_getpwnam(name);
+ if (!amroot && ruid != getuid()) {
syslog(LOG_WARNING, "can't change pwd for `%s'", name);
bb_error_msg_and_die("Permission denied.\n");
Maybe you should submit a patch with this optimizations only at the moment.
Ciao,
Tito
> --
> Felipe Kellermann
_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic