Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Dec 1998 01:11:09 -0500 (EST)
From:      "John W. DeBoskey" <jwd@unx.sas.com>
To:        freebsd-current@FreeBSD.ORG
Subject:   telnetd again (Kerberos & make release == very strange)
Message-ID:  <199812050611.BAA03726@bb01f39.unx.sas.com>

next in thread | raw e-mail | index | archive | help
Hi,

   Following up my own mail concerning telnetd.... which still
doesn't explain the uname() function not being called, but does
help explain where telnetd came from... :-(

   The installed version of telnetd:

-r-xr-xr-x  1 root  wheel  61352 Dec  2 11:01 /usr/libexec/telnetd

   If I then 'cd /usr/src/libexec/telnetd && make all install' :

-r-xr-xr-x  1 root  wheel  35328 Dec  5 00:36 /usr/libexec/telnetd


   So, why the difference?  Let's go back to our 'make release' log
and figure out where telnetd came from... [to summarize everything
below, our -SNAP systems are comprised of the Kerberose versions
of all the programs (where there is one), which are then themselves
overwritten by the regular versions of the programs when the first
make world is done].


   First, some info from the head of the log:

---> Wed Dec  2 06:26:18 EST 1998 - make release
mkdir -p /snap/release 
cd /usr/src/release/../etc && make distrib-dirs DESTDIR=/snap/release
mtree -deU -f /usr/src/etc/mtree/BSD.root.dist -p /snap/release/


   A little while later we install everything:

--------------------------------------------------------------
>>> Installing everything..
--------------------------------------------------------------
cd /usr/src; /usr/obj/elf/usr/src/tmp/usr/bin/make -f Makefile.inc1 install

   Install the live version into the release area:

===> libexec/telnetd
install -c -s -o root -g wheel -m 555   telnetd /snap/release/usr/libexec


   This is the 'normal' version of telnetd.

We then checkout the different versions of telnetd: (U statements left off)

cvs checkout: Updating src/crypto/telnet/telnetd
cvs checkout: Updating src/eBones/libexec/telnetd
cvs checkout: Updating src/kerberosIV/libexec/telnetd
cvs checkout: Updating src/libexec/telnetd
cvs checkout: Updating src/secure/libexec/telnetd


We cleanout the objects and related derived files (even though
we haven't actually built anything yet and these are not present).

===> libexec/telnetd
rm -f telnetd global.o slc.o state.o sys_term.o telnetd.o termstat.o utility.o t
elnetd.8.gz telnetd.8.cat.gz
rm -f .depend /usr/src/libexec/telnetd/GRTAGS /usr/src/libexec/telnetd/GSYMS /us
r/src/libexec/telnetd/GTAGS



We generate the object directory (so what did we cleanout above?)

===> libexec/telnetd
/usr/obj/elf/usr/src/libexec/telnetd created for /usr/src/libexec/telnetd

Hey! We're building telnetd!

===> libexec/telnetd
...
cc -nostdinc -O -pipe -DLINEMODE -DUSE_TERMIO -DDIAGNOSTICS -DOLD_ENVIRON -DENV_
HACK -I/usr/src/libexec/telnetd/../../lib   -I/usr/obj/elf/usr/src/tmp/usr/inclu
de -c /usr/src/libexec/telnetd/utility.c
cc -nostdinc -O -pipe -DLINEMODE -DUSE_TERMIO -DDIAGNOSTICS -DOLD_ENVIRON -DENV_
HACK -I/usr/src/libexec/telnetd/../../lib   -I/usr/obj/elf/usr/src/tmp/usr/inclu
de  -o telnetd global.o slc.o state.o sys_term.o telnetd.o termstat.o utility.o
 -lutil -ltermcap -ltelnet
gzip -cn /usr/src/libexec/telnetd/telnetd.8 > telnetd.8.gz


Ok, now we're generated an aout object tree:

===> libexec/telnetd
/usr/obj/aout/usr/src/libexec/telnetd created for /usr/src/libexec/telnetd


Now we install the telnetd we just created:

===> libexec/telnetd
install -c -s -o root -g wheel -m 555   telnetd /usr/libexec
install -c -o root -g wheel -m 444 telnetd.8.gz  /usr/share/man/man8


and install it into the stage tree:

===> libexec/telnetd
cd /usr/src/libexec/telnetd ; make install DESTDIR=/R/stage/trees/bin SHARED=cop
ies
install -c -s -o root -g wheel -m 555   telnetd /R/stage/trees/bin/usr/libexec


Hey, we're cleaning out a kerberos version of telnetd...

===> libexec/telnetd
rm -f /usr/src/kerberosIV/libexec/telnetd/../../lib/libkadm/kadm_err.h /usr/src/
kerberosIV/libexec/telnetd/../../lib/libkadm/kadm_err.c /usr/src/kerberosIV/libe
xec/telnetd/../../lib/libkadm/kadm_err.et /usr/src/kerberosIV/libexec/telnetd/..
/../lib/libkrb/krb_err.h /usr/src/kerberosIV/libexec/telnetd/../../lib/libkrb/kr
b_err.c /usr/src/kerberosIV/libexec/telnetd/../../lib/libkrb/krb_err.et telnetd
global.o slc.o state.o sys_term.o telnetd.o termstat.o utility.o authenc.o telne
td.8.gz telnetd.8.cat.gz
rm -f .depend /usr/src/kerberosIV/libexec/telnetd/GRTAGS /usr/src/kerberosIV/lib
exec/telnetd/GSYMS /usr/src/kerberosIV/libexec/telnetd/GTAGS


Cool, we're creating the object tree for the kerberos version:

===> libexec/telnetd
/usr/obj/usr/src/kerberosIV/libexec/telnetd created for /usr/src/kerberosIV/libe
xec/telnetd


And now we run mkdep for the kerberos version:

===> libexec/telnetd
rm -f .depend
mkdep -f .depend -a    -DLINEMODE -DUSE_TERMIO -DDIAGNOSTICS -DOLD_ENVIRON -DENV


and now we build the kerberos version:

===> libexec/telnetd
...
cc -O -pipe -DLINEMODE -DUSE_TERMIO -DDIAGNOSTICS -DOLD_ENVIRON  -DENV_HACK -DAU
THENTICATION -DENCRYPTION  -I/usr/src/kerberosIV/libexec/telnetd/../../../crypto
/telnet -I/usr/src/kerberosIV/libexec/telnetd/../../include -Wall -DHAVE_CONFIG_
H  -I/usr/obj/usr/src/kerberosIV/libexec/telnetd/../../include -DBINDIR=\"/usr/b
in\" -DSBINDIR=\"/usr/sbin\"    -o telnetd global.o slc.o state.o sys_term.o tel
netd.o termstat.o utility.o authenc.o  -lutil -ltermcap -L/usr/obj/usr/src/kerbe
rosIV/libexec/telnetd/../../lib/libtelnet -ltelnet -ldes  -L/usr/obj/usr/src/ker
berosIV/libexec/telnetd/../../lib/libkrb -lkrb

gzip -cn /usr/src/kerberosIV/libexec/telnetd/../../../crypto/telnet/telnetd/teln
etd.8 > telnetd.8.gz


Hey! Wow! What's this?

===> libexec/telnetd
install -c -s -o root -g wheel -m 555   telnetd /usr/libexec
install -c -o root -g wheel -m 444 telnetd.8.gz  /usr/share/man/man8


We just wrote the kerberos version into /usr/libexec!! (the chroot'd tree)

And now we turn around and install it into the stage tree under krb:

===> libexec/telnetd  
cd /usr/src/kerberosIV/libexec/telnetd ; make install DESTDIR=/R/stage/trees/krb
 SHARED=copies
install -c -s -o root -g wheel -m 555   telnetd /R/stage/trees/krb/usr/libexec



   So, our little stroll through 'make release' shows that the default
version of telnetd (and other programs) are all the kerberos versions.


   Can someone verify that this is how the release system should work? A
make world does not build the kerberos code by default, so the first
make world done an an installed system will overwrite all the kerberos
versions of the executables. Also note the kerberos versions of the code
are much larger than their counter-parts (save some space on those cd's!).


Comments?
John

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812050611.BAA03726>