[uClibc]uClibc/login (libutil) (trying again)

Erik Andersen andersen at lineo.com
Tue May 8 19:59:51 UTC 2001


On Tue May 08, 2001 at 01:13:23PM -0400, Cory Visi wrote:
> Ok I got more code. I took Michael Shmulevich's libutil port and made it
> work with the Lineo CVS uClibc (Michael's is based on jungo's uClibc). I
> added pty.h to the includes, added logwtmp() to the library, and some
> other miscellaneous functions converted. This will compile the functions
> into the shared library libutil.so.0 (exactly like libcrypt).
> 
> This patch lets telnetd and others compile.
> 
> I didn't really check Michael's code, but it compiles cleanly and he's
> been using it, so I think this is ready to go.
> 
> This message originally had a patch attached, but it was over 40k so the
> list mailer blocked it. It's been some time, so I thought it would be
> faster just to make the patch available via ftp:
> 
> ftp://phear.lwz.org/pub/uClibc-login.patch

Got it.  Generally this looks ok, but since we are mimicing the structure
of glibc, we need to mimic the function exports as well:

[andersen at sage libutil]$ nm -D /lib/libutil-2.2.2.so|grep "\bT\b"
000018f0 T forkpty
00001340 T login
000014a0 T login_tty
00001520 T logout
00001620 T logwtmp
000017a0 T openpty
[andersen at sage libutil]$ nm -D ./libutil.so.0 |grep "\bT\b"
00000d28 T __bsd_getpt
00000fb0 T __ptsname_r
000012f0 T __unix_grantpt
00000c60 T getpt
000011c0 T grantpt
00001540 T logout
000015c8 T logwtmp
00000e7c T openpty
00001194 T ptsname
000014f0 T unlockpt
[andersen at sage libutil]$ 

It looks like getpt, grantpt, ptsname, unlockpt shold go into libc.so,
__bsd_getpt, __ptsname_r, and __unix_grantpt should not be exported,
and forkpty, login, and login_tty are still missing.

Mind checking out the stuff I just checked into CVS?  I reworked the code quite
a bit per the above comments.  The only caveat is that libutil/login.c is
currently a stub.

 -Erik

--
Erik B. Andersen   email:  andersen at lineo.com
--This message was written using 73% post-consumer electrons--





More information about the uClibc mailing list