busybox/coreutils
Eric Andersen 7eb79fff10 Tito writes:
Hi Erik,
Hi to all,
This is part five of the my_get*id story.
I've tweaked a bit this two functions to make them more flexible,
but this changes will not affect existing code.
Now they work so:
1) my_getpwuid( char *user, uid_t uid, int bufsize)

   if bufsize is > 0 char *user cannot be set to NULL
                     on success username is written on static allocated buffer
                     on failure uid as string is written to buffer and NULL is returned
   if bufsize is = 0 char *user can be set to NULL
                     on success username is returned
                     on failure NULL is returned
   if bufsize is < 0 char *user can be set to NULL
                     on success username is returned
                     on failure an error message is printed and the program exits

  2) 1) my_getgrgid( char *group, uid_t uid, int bufsize)

   if bufsize is > 0 char *group cannot be set to NULL
                     on success groupname is written on static allocated buffer
                     on failure gid as string is written to buffer and NULL is returned
   if bufsize is = 0 char *group can be set to NULL
                     on success groupname is returned
                     on failure NULL is returned
   if bufsize is < 0 char *group can be set to nULL
                     on success groupname is returned
                     on failure an error message is printed and the program exits

This changes were needed mainly for my new id applet.
It is somewhat bigger then the previous but matches the behaviour of GNU id
and is capable to handle usernames of whatever length.
BTW: at a first look it seems to me that it will integrate well (with just a few changes)
with the pending patch  in patches/id_groups_alias.patch.
The increase in size is balanced by the removal of my_getpwnamegid.c
from libbb as this was used only in previous id applet and by size optimizations
made possible in whoami.c and in passwd.c.
I know that we are in feature freeze but I think that i've tested it enough
(at least I hope so.......).
2004-09-02 22:21:41 +00:00
..
libcoreutils Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
basename.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
cal.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
cat.c As we no longer use function pointers for read in common archiving code 2003-11-21 22:24:57 +00:00
chgrp.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
chmod.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
chown.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
chroot.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
cmp.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
Config.in Patch from Bastian Blank to add 64 bit support to the test command. 2004-08-11 02:45:47 +00:00
cp.c Add the -r option as a synonym of -R 2004-01-25 05:50:28 +00:00
cut.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
date.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
dd.c Avoid symbol naming conflict with libm 2004-01-30 22:24:32 +00:00
df.c Tito, farmatito at tiscali dot it writes: 2004-08-03 00:14:02 +00:00
dirname.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
dos2unix.c Steve Grubb writes: 2004-05-05 19:39:21 +00:00
du.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
echo.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
env.c Thats odd. I guess this was cut-n-paste error, but vodz 2004-04-16 15:02:10 +00:00
expr.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
false.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
fold.c Update my email address, document some of my tasks in the AUTHORS file 2004-04-25 05:11:19 +00:00
head.c Major coreutils update. 2003-03-19 09:13:01 +00:00
hostid.c Major coreutils update. 2003-03-19 09:13:01 +00:00
id.c Tito writes: 2004-09-02 22:21:41 +00:00
install.c Update my email address, document some of my tasks in the AUTHORS file 2004-04-25 05:11:19 +00:00
length.c Major coreutils update. 2003-03-19 09:13:01 +00:00
ln.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
logname.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
ls.c Tito writes: 2004-08-26 22:18:59 +00:00
Makefile Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Makefile.in Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
md5_sha1_sum.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
mkdir.c last_patch89 from vodz: 2003-06-20 09:01:58 +00:00
mkfifo.c Major coreutils update. 2003-03-19 09:13:01 +00:00
mknod.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
mv.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
od.c Felipe Kellermann writes, 2004-07-23 01:42:28 +00:00
printf.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
pwd.c Major coreutils update. 2003-03-19 09:13:01 +00:00
realpath.c Major coreutils update. 2003-03-19 09:13:01 +00:00
rm.c last_patch89 from vodz: 2003-06-20 09:01:58 +00:00
rmdir.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
seq.c Patch from Felipe Kellermann, fix endless loop when first > last and 2004-07-23 06:43:29 +00:00
sleep.c Major coreutils update. 2003-03-19 09:13:01 +00:00
sort.c Major coreutils update. 2003-03-19 09:13:01 +00:00
stty.c last_patch89 from vodz: 2003-06-20 09:01:58 +00:00
sync.c Major coreutils update. 2003-03-19 09:13:01 +00:00
tail.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
tee.c If read were to return with an error, bad things would happen. Fix it. 2004-05-26 15:21:19 +00:00
test.c Patch from Bastian Blank to add 64 bit support to the test command. 2004-08-11 02:45:47 +00:00
touch.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
tr.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
true.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
tty.c Major coreutils update. 2003-03-19 09:13:01 +00:00
uname.c Major coreutils update. 2003-03-19 09:13:01 +00:00
uniq.c Fixup some warnings 2004-08-28 00:43:07 +00:00
usleep.c Major coreutils update. 2003-03-19 09:13:01 +00:00
uudecode.c Update my email address, document some of my tasks in the AUTHORS file 2004-04-25 05:11:19 +00:00
uuencode.c Pascal Brisset writes: 2004-01-26 07:17:30 +00:00
watch.c Major coreutils update. 2003-03-19 09:13:01 +00:00
wc.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
who.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
whoami.c Tito writes: 2004-09-02 22:21:41 +00:00
yes.c Major coreutils update. 2003-03-19 09:13:01 +00:00