Commit Graph

1306 Commits

Author SHA1 Message Date
peter
20d7a03f75 CACHE_LINE_SIZE is 64 on athlon and amd64 chips, not 32. This should
probably be 128 since that is what the hardware prefetch fill size is
on both the p3, p4 and athlon* cpus.
2003-12-11 04:47:53 +00:00
sobomax
dced91d8f3 Fix a bug which causes wrong filename being written into the syslog
in the case when client sends request with RFC2347 options.

Approved by:	re
MFC After:	2 weeks
2003-11-20 13:36:31 +00:00
harti
91fb8e3f9c Replace all uses of the old netgraph constants NG_*LEN by the new
constants NG_*SIZ that include the trailing NUL byte. This change
is mostly mechanical except for the replacement of a couple of snprintf()
and sprintf() calls with strlcpy.
2003-11-15 15:26:35 +00:00
yar
759577e793 If a file to send in ASCII mode already has CRLF as end-of-line,
don't add excessive CR on the wire.

PR:		bin/59285
Submitted by:	Andrey Beresovsky <and at rsu.ru>
MFC after:	1 week
2003-11-15 11:08:26 +00:00
tobez
0105a2bc6c Sync comment with code's reality.
MFC after:	1 week
2003-11-14 12:56:56 +00:00
peter
b35f301d40 Tidy up some xdrproc_t related warnings. 2003-10-26 04:32:53 +00:00
peter
9e4da6dd3b Pacify gcc warning with a Douglas Adams reference. 2003-10-26 04:30:05 +00:00
tjr
971569170c Make the warning message stand out more. 2003-10-11 07:37:55 +00:00
tjr
20b1e12f1f Warn users that makekey may disappear in a future release now that the
last in-tree consumer has gone.
2003-10-09 10:06:30 +00:00
tjr
e6d1ceacac Use the new style struct sockaddr instead of osockaddr in system calls
so that talkd works without COMPAT_43.

Obtained from:	NetBSD (christos), Rumi Szabolcs
2003-09-28 09:16:09 +00:00
ume
d25cb60913 Don't depend on IPv4-mapped IPv6 address to bind to both IPv4
and IPv6.

Wrote at:	Hakone.
Powered by:	Warner Losh's scotch whisky.
Requested by:	nork
2003-09-14 16:42:46 +00:00
mdodd
2641112114 Retire the WITH_LIBMAP compile knob; libmap is now a standard feature. 2003-09-13 21:50:36 +00:00
mdodd
df4cd81882 Change libmap.c:lm_init() to return a status value; 0 for success
(libmap available) and 1 for failure.  Assign this return to the
global 'libmap_disable' variable in rtld.c.

This totally prevents any libmap functions from being called after
lm_init() if no config file is present.
2003-09-13 21:43:08 +00:00
obrien
507c61e256 Deal with the LOGIN_NAME_MAX issue in the NetBSD->FreeBSD
translation^H^H^Hhack layer.
2003-09-11 03:28:21 +00:00
obrien
d98e23fbe8 Add a dependancy on 'nbsd2fbsd.h' 2003-09-10 19:03:48 +00:00
ru
1c23ef339b mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
kan
80babb4e26 Eliminate last three uses of varargs.h in the tree. These three files
were including varargs.h file but did not use any of its macros,
so they escaped the clean-up before.
2003-09-01 04:12:18 +00:00
ceri
d4a07597ca Add a note that the -u option can be overridden by settings in login.conf(5).
PR:		docs/56017
Submitted by:	Josef El-Rayes <j.el-rayes@daemon.li>
2003-08-31 07:45:48 +00:00
obrien
fb9845a19e Remove a useless '/'. 2003-08-24 17:35:52 +00:00
imp
6ff48acf08 Very minor style nit: sort include files alphabetically. 2003-08-22 02:22:59 +00:00
gordon
6d7920ab73 Forgot one instance of ld-elf.so.1. Convert to ${PROG}
Pointed out by:	obrien
2003-08-17 22:12:26 +00:00
gordon
bda0840bfc Don't forget to honor DESTDIR. Also switch over to using PROG instead of
the binary name directly.
2003-08-17 18:59:30 +00:00
gordon
649bbcf5e8 Don't forget to chflags noschg the existing binary so we can symlink
over it safely.

Pointed out by:	yosimoto@waishi.jp
2003-08-17 18:50:56 +00:00
gordon
1d5cce0fc0 As long threatened, stage 2 of making a dynamically-linked root a reality.
Install rtld into /libexec.
2003-08-17 08:06:00 +00:00
gordon
9c31ae1833 Prepend /lib to the builtin library search path in rtld. 2003-08-17 07:55:17 +00:00
markm
c26205b553 Make sure that a "make release" (more accurately the bit that makes
the crunched binary) get a non-cryptographic telnet. This is overkill
in that it covers stuff that is not normally used in a crunched binary.
2003-07-24 17:19:15 +00:00
markm
c0c9eb00ee Ensure that for the cryptographic instances of *telnet*, the "crypto"
distribution is used. This only affects release-building.
2003-07-24 07:19:55 +00:00
markm
284105499b Test correct macro for "without crypto" option(s). 2003-07-20 23:29:46 +00:00
yar
cd9f8ef58b Prototype defttymode() instead of just declaring it. 2003-07-18 16:25:55 +00:00
markm
d6aec2b6d6 Very big makeover in the way telnet, telnetd and libtelnet are built.
Previously, there were two copies of telnet; a non-crypto version
that lived in the usual places, and a crypto version that lived in
crypto/telnet/. The latter was built in a broken manner somewhat akin
to other "contribified" sources. This meant that there were 4 telnets
competing with each other at build time - KerberosIV, Kerberos5,
plain-old-secure and base. KerberosIV is no longer in the running, but
the other three took it in turns to jump all over each other during a
"make buildworld".

As the crypto issue has been clarified, and crypto _calls_ are not
a problem, crypto/telnet has been repo-copied to contrib/telnet,
and with this commit, all telnets are now "contribified". The contrib
path was chosen to not destroy history in the repository, and differs
from other contrib/ entries in that it may be worked on as "normal"
BSD code. There is no dangerous crypto in these sources, only a
very weak system less strong than enigma(1).

Kerberos5 telnet and Secure telnet are now selected by using the usual
macros in /etc/make.conf, and the build process is unsurprising and
less treacherous.
2003-07-16 20:59:15 +00:00
yar
beedaf29a1 Block SIGURG while reading from the control channel.
Rationale:

SIGURG is configured by ftpd to interrupt system calls, which is useful
during data transfers.  However, SIGURG could interrupt I/O on the
control channel as well, which was mistaken for the end of the session.

A practical example could be aborting the download of a tiny file,
when the abort sequence reached ftpd after ftpd had passed the file
data to the system and returned to its command loop.

Reported by:	ceri
MFC after:	1 week
2003-07-09 13:54:33 +00:00
yar
94167f7347 Improve error handling in getline():
- always check the return value from getc(3) for EOF;
- if the attempt to read the TELNET command byte has
  returned EOF, exit from the loop instead of using
  the EOF value as a normal character.

MFC after:	1 week
2003-07-09 13:15:32 +00:00
yar
72eaf383f4 Make a malloced copy of "chrootdir" even if it points to an absolute
pathname inside "residue" so "chrootdir" can be simply freed later.

PR:		bin/53435
Submitted by:	Yutaka Ishihara <yutaka at fandc.co.jp>
MFC after:	1 week
2003-07-09 12:46:24 +00:00
gshapiro
e95dd66c1f Remove MAINTAINER= lines from individual Makefiles in favor of the
MAINTAINER file (which already had entries for sendmail).
2003-07-07 03:54:04 +00:00
jake
151e14e2da Avoid using the global offset table to get the address of _DYNAMIC in
rtld.  When _DYNAMIC is referenced normally from C the global offset
table is used implicitly, but newer versions of binutils don't initialize
it statically in the binary, so this doesn't work until rtld is relocated,
which _DYNAMIC is needed for...  So, as on other systems with the same
problem, we disassemble a call instruction to _DYNAMIC in order to get
its address.
2003-07-04 00:05:15 +00:00
yar
3b7c9bf6da Don't declare unneeded extern variables,
leave alone specifying a wrong type for one of them.
2003-06-21 10:45:38 +00:00
mdodd
51b79512bb Fix warnings on 64 bit platforms.
Noticed by:	 jake
2003-06-19 16:09:18 +00:00
mdodd
9e70570ef3 Add function prototypes. 2003-06-19 05:28:26 +00:00
mdodd
ddf3836c5b LD_DUMP_REL_PRE and LD_DUMP_REL_POST don't output to stderr; don't
claim that they do.
2003-06-19 04:34:09 +00:00
mdodd
ca4dc26350 Provide a mechanism for dumping relocation information.
Setting the LD_DUMP_REL_PRE or LD_DUMP_REL_POST environment variables
cause rtld-elf to output a table of all relocations.

This is useful for debugging.
2003-06-19 03:55:38 +00:00
mdodd
5a91e1d61c Move MD function prototypes together. 2003-06-19 02:42:04 +00:00
mdodd
891d6a9a98 Fix warnings; no parameters in function prototypes. 2003-06-19 02:39:37 +00:00
mdodd
af80699b54 Avoid a NULL pointer dereference. 2003-06-18 16:17:13 +00:00
yar
7673764aa8 - Use the initial terminal mode instead of the current mode
as the source of defaults for terminal device parameters.

- Do duplucate code reduction and simplification enabled by
  the above.

Reviewed by:	green
MFC after:	1 month
2003-06-18 13:22:44 +00:00
mdodd
39e51d22ff Include libmap.h for prototypes. 2003-06-18 05:31:08 +00:00
mdodd
b466954d4e - Add support for DT_FLAGS.
- Define various things from the most recent ELF spec.
2003-06-18 03:34:29 +00:00
dougb
0f32441f35 More correctly spell "-static" as "NOSHARED?=YES" 2003-06-17 20:07:49 +00:00
yar
aa7c2defa2 Improve the manpage language a bit.
A PPP login program is started _automatically_ (i.e., without
human intervention) even with the "pl" capability unset, as soon
as a PPP frame is detected.  But with "pl" set, a PPP login program
is started independently of the result of PPP detection (which is
rendered unnecessary then,) i.e. _unconditionally_.
2003-06-17 12:29:36 +00:00
dougb
9d0a07cbbd Link named-xfer -static. This is the only binary that needs to be
statically compiled for named to work chroot'ed, and we'd like
to be able to do that from /etc/rc.d without additional user
intervention.
2003-06-17 08:53:27 +00:00
yar
478d73b235 If ftpd is run with an -h option (hide host-specific info,)
don't reveal the info in reply to the SYST command.

Get rid of using the "unix" macro at the same time.  It was a rather
poor way to check if the system was Unix since there were quite a
few Unix clones out there whose cc didn't define "unix" (e.g.,
NetBSD.)  It was also sensitive to the C standard used, which caused
unnecessary trouble:  With -std=c99, it should have been "__unix__",
and so on.

PR:		bin/50690
Submitted by:	Alex Semenyaka <alexs _at_ snark.ratmir.ru>
MFC after:	1 week
2003-06-16 11:30:23 +00:00
jmg
80728f5713 fix a couple typos in the comments
From NetBSD's bootpd (in src/usr.sbin/bootp)
2003-06-15 03:08:37 +00:00
jmg
215585360b fix bootpd to use fd_set. For some reason on Sparc, using int with
select is broken.
2003-06-15 03:05:14 +00:00
obrien
7ea86c6d90 Remove MAINTAINER lines. 2003-06-14 19:32:52 +00:00
green
d4b26c1142 In the last clean-up of this code, the fact that the default tty mode
information could only be gleaned from the the tty descriptor itself
was neglected, so never did the tty's default settings get copied from
the kernel.  Specifically, this caused all manner of ctrl-keys to not
work.  Fix this by calling dogettytab() in all the proper places, and
retrieving the terminfo temporarily in dogettytab().
2003-06-14 08:26:47 +00:00
yar
957fe1b56f Read gettytab(5) soon enough to fill in all necessary values.
Re-read gettytab(5) only if needed.

This fixes bugs introduced as long ago as in getty/main.c rev.1.15.

PR:		bin/18181
MFC after:	1 month
2003-06-10 18:30:41 +00:00
yar
e46b9f99ca Spot one more place where boolean variables were incremented
instead of just being assigned a truth value.
2003-06-10 16:34:03 +00:00
yar
151ea28b4a Coding style fix: Use "foo = 1" instead of "foo++" to assign
the truth value to a boolean variable, especially when inside
a loop.  The variable can overflow otherwise, at least in theory.
2003-06-10 15:38:35 +00:00
yar
1e04cff15e Break sentences.
MFC after:	1 week
2003-06-10 15:03:35 +00:00
yar
e02d96106b General mdoc(7) markup fixes:
- Use .Va, not .Em, to mark up variable-like identifiers
  (capability and database entry names.)
- Stop abusing .Tn (trademark) to emphasize general phrases.
- Spot unmarked capability references.
- Add a missing line break.

Discussed with:	ru
MFC after:	1 week
2003-06-10 14:46:43 +00:00
yar
e23db6df64 Improve the language and markup of the description of the pp and pl
capabilities:

- Mark up capability identifiers.
- Don't squeeze much text into the capability table given the options
  will be described below in detail.
- Keep the capability table sorted.
- Use a consistent term for a PPP login program.

MFC after:	1 week
2003-06-10 14:20:38 +00:00
charnier
eeb46390af Add section number to .Xr 2003-06-08 12:40:50 +00:00
charnier
04bdd1fc48 The .Xr utility 2003-06-08 12:38:18 +00:00
marcel
f5de8effa1 Don't fail if we encounter a relocation of type "none". Just ignore
it. It's a no-op relocation.

Trigger case: ports/x11-toolkits/pango
2003-06-07 07:52:17 +00:00
yar
ed74f4db3d Fix some minor bugs, namely:
- Initialize "rval", which would be used uninitialized
  if al or pl options were set.

- Don't pass an empty string to login(1) as a user name
  (this could be triggered by entering a name and then killing it
  with backspace or ^U.)

- Don't loop endlessly if the al option specifies a bogus (i.e.,
  not alphanumeric) auto-login name.

- Don't pass a bogus user name to login(1) if a good name were
  entered and then killed with ^U.

- Exit with status 0, not 1, on receiving an EOF character,
  since it's not a error condition.

MFC after:	1 week
2003-06-06 14:36:41 +00:00
markm
96556bceb3 Drop MAINTAINER Bit. Not needed any more. 2003-06-04 15:59:13 +00:00
obrien
1646a714c5 Set CSTD to gnu99. We can only use on of the gnu?9 C languages.
We can't use c89 due to use of 'inline', and c99 produces bad code.
2003-06-04 05:42:04 +00:00
ru
29f9643911 Assorted mdoc(7) fixes. 2003-06-02 15:02:06 +00:00
obrien
e6934e172e Best we can do with this is c89. 2003-06-02 02:35:58 +00:00
obrien
60184b4b7e Include stdlib.h to get exit()'s prototype. 2003-06-02 02:35:18 +00:00
obrien
f40f81aa0c Add the variable's type to the declaration. 2003-06-02 02:34:36 +00:00
ru
d727dda421 Assorted mdoc(7) fixes. 2003-06-01 19:52:36 +00:00
mdodd
73a7f529f4 - use issetugid()
- be paranoid about honoring LD_LIBMAP_DISABLE.

Suggested by:	 rwatson
2003-05-31 15:24:29 +00:00
mdodd
49fb693df9 Simplify map_object() by breaking out the ELF header validation bits
into a separate function.
2003-05-31 14:48:59 +00:00
mdodd
59d2c4e02e Provide function entry debugging messages. 2003-05-31 14:46:38 +00:00
mdodd
f365a266e1 Use the environment variable LD_LIBMAP_DISABLE to disable
libmap.conf(5) functionality.
2003-05-31 14:45:11 +00:00
mdodd
de8f54e71e Don't post-increment pointers inside a loop conditional.
While I'm here:
- Let lm_add() call strdup() on its own behalf.
- Use a temporary pointer when parsing constraints; only set the
  constraint pointer on a totally successful match.

PR:		 bin/52783
Submitted by:	 David P. Reese Jr. <daver@gomerbud.com>
Approved by:	 re (rwatson)
2003-05-30 00:49:16 +00:00
kan
949c40c5fd Allow threading libraries to register their own locking
implementation in case default one provided by rtld is
not suitable.

Consolidate various identical MD lock implementation into
a single file using appropriate machine/atomic.h.

Approved by:	re (scottl)
2003-05-29 22:58:26 +00:00
peter
469c0a1ad7 Do not exclude amd64 from rtld-elf builds.
Approved by:  re  (safe amd64 support commits)
2003-05-24 17:38:45 +00:00
peter
0c9262fefa Initial pass at supporting shared libraries on amd64. There are still
a few missing relocation types in amd64/reloc.c, but I have not found
any of them in use yet. :-)

Approved by:  re (amd64/* blanket)
2003-05-24 17:37:51 +00:00
des
e5d2d778eb Retire the useless NOSECURE knob.
Approved by:	re (scottl)
2003-05-19 15:52:01 +00:00
mdodd
221bfcf450 - Use xmalloc() and xstrdup() instead of malloc() and strdup().
- Add a global mapping if we have a successful constrained match.

Approved by:	re
2003-05-19 07:10:12 +00:00
rwatson
320fc630d4 Since libmap.conf is referenced in rtld.1, include it in the references
section.

Approved by:	re (scottl)
2003-05-17 19:46:49 +00:00
ru
d51b17e639 mdoc(7) police: Properly markup the previous revision.
Approved by:	re (blanket)
2003-05-16 21:36:10 +00:00
ru
d09772e6f4 mdoc(7) police: Normalize the FILES section.
Approved by:	re (blanket)
2003-05-16 21:34:21 +00:00
markm
64cd7ea15d Allow a NOPIC "make world" to complete.
OK'ed by:	re(scottl)
2003-05-11 18:48:29 +00:00
markm
fc4822f39a Mrege from crypto telnet with "make unifdef". This gets a bunch of
$FreeBSD$ tags and some debug variable safety belts.
2003-05-11 18:27:49 +00:00
peter
10cba42d09 Exclude rtld-elf for amd64. More porting is still needed.
Approved by:  re (scottl)
2003-05-08 06:37:12 +00:00
kan
c47ebbd98f Rethink the way we count module references. Simply following
DT_NEEDED links is not flexible enough for cases where dynamically
loaded modules form a dependency cycle.

This should fix an infinite recursion problem encountered by Yahoo.

Approved by:	re (jhb)
2003-05-08 01:31:36 +00:00
markm
ee63e7dc15 Turn MAKE_KERBEROS5 into NO_KERBEROS by negating the logic. Some extra
cleanups were necessary in release/Makefile, and the tinderbox code
was syntax checked, not run checked.
2003-05-05 07:58:44 +00:00
obrien
e6de895e83 Use __FBSDID vs. rcsid[]. 2003-05-04 00:59:13 +00:00
obrien
43ecc39077 Fix signed/unsigned comparison warnings. 2003-05-04 00:56:00 +00:00
obrien
bef29d279b Fix a sign/unsigned comparison. 2003-05-04 00:43:39 +00:00
ru
0deec148ba Build non-crypto telnet(1) and telnetd(8) if NO_OPENSSL is defined.
Submitted by:	Marius Strobl <marius@alchemy.franken.de>
2003-05-01 19:38:15 +00:00
peter
c03c53916e Remove 80386 bandaids from code repocopied from i386. rtld_start.S still
todo.
2003-04-30 21:09:06 +00:00
kan
75fd435e27 Remove redundant strlen checks, do not check the same
symbol twice.
2003-04-30 19:05:53 +00:00
ru
13592a9888 Don't clobber Kerberos5 telnet(1) and telnetd(8) with non-crypto versions. 2003-04-30 07:24:35 +00:00
imp
2bde9db9c2 Add back # accidentally deleted in 1.54 2003-04-27 06:16:52 +00:00
imp
733bde7ebe This is no longer needed after tw is gone.
Approved by: re@ (scottl)
2003-04-27 05:43:42 +00:00
billf
614e371cc3 properly refuse a connection in the -c case if the client ip's subdirectory
does not exist.

PR:		bin/38303
Submitted by:	Woei-Luen, Shyu <m8535@cn.ee.ccu.edu.tw>
the committed patch differs from the submitted one, any inaccuracies are mine.
2003-04-19 10:14:43 +00:00
mdodd
55f9c171d4 Code cleanups and sanity checking for config file parser. 2003-04-10 01:44:19 +00:00