Commit Graph

1313 Commits

Author SHA1 Message Date
ru
161c3c9b9d - Build things in pure dictionary order (see sort(1)).
- Unify the conditional assignments section so that architectural
  exclusions come first, then options and !options, sorted by the
  option name, also in directory order, then architecture specific
  sections, sorted by the architecture name, with i386 being a
  traditional exception.

Prodded by:	bde
2004-01-16 15:23:19 +00:00
anholt
562b81d63c man ftpd says that "by default, anonymous users cannot modify existing files."
However, the code did allow deletion of files.  Make deleting require the -m
flag, too.

PR:		bin/60809
Submitted by:	Alexander Melkov <melkov@comptek.ru>
2004-01-07 19:28:31 +00:00
dfr
543c01c2ab Initialise some uninitialised variables.
Thanks to: valgrind
2003-12-31 15:10:41 +00:00
obrien
9eed3f1ce1 Document what the PAM believers failed to do (and should have),
which is how to rsh as root into a machine.
2003-12-17 22:38:57 +00:00
peter
ea0d44276a Fix dynamic linking a bit more.. enough that mozilla-firebird works if you
dig up the patches for amd64 support for it.

Note to self: do not put a 64 bit value in a 32 bit space.
2003-12-12 01:12:41 +00:00
peter
b763cd9224 Revert last change. ../rtld.c uses CACHE_LINE_SIZE too.
Change it to 64 while here.

Reported by:  ps
2003-12-11 18:42:51 +00:00
peter
3fe5380487 Only define CACHE_LINE_SIZE in one place.. 2003-12-11 04:49:37 +00:00
peter
e9480214e3 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
d5c19fb6ac 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
e62a6014bb 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
95a0b9680c 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
9141d79efb Sync comment with code's reality.
MFC after:	1 week
2003-11-14 12:56:56 +00:00
peter
055f7ba082 Tidy up some xdrproc_t related warnings. 2003-10-26 04:32:53 +00:00
peter
068963df90 Pacify gcc warning with a Douglas Adams reference. 2003-10-26 04:30:05 +00:00
tjr
18187a86da Make the warning message stand out more. 2003-10-11 07:37:55 +00:00
tjr
72da8cf688 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
ebf1f53a6d 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
5bf130a4c4 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
c7354c7f82 Retire the WITH_LIBMAP compile knob; libmap is now a standard feature. 2003-09-13 21:50:36 +00:00
mdodd
4e5f690a9b 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
353a628ec9 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
235e5bcd5b Add a dependancy on 'nbsd2fbsd.h' 2003-09-10 19:03:48 +00:00
ru
b8e742a388 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
kan
b4fd3d4025 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
31d73d3c9e 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
8dcb7b4782 Remove a useless '/'. 2003-08-24 17:35:52 +00:00
imp
33d56012b3 Very minor style nit: sort include files alphabetically. 2003-08-22 02:22:59 +00:00
gordon
49885b2819 Forgot one instance of ld-elf.so.1. Convert to ${PROG}
Pointed out by:	obrien
2003-08-17 22:12:26 +00:00
gordon
49e2a43b7e 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
61391bcbeb 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
be400d4426 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
efd7f66313 Prepend /lib to the builtin library search path in rtld. 2003-08-17 07:55:17 +00:00
markm
c62efd08ea 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
74ab377728 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
020ca0be81 Test correct macro for "without crypto" option(s). 2003-07-20 23:29:46 +00:00
yar
c4a65a6cff Prototype defttymode() instead of just declaring it. 2003-07-18 16:25:55 +00:00
markm
ccc6829966 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
06a1f59c63 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
6fbb3e2bf8 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
d3ba445436 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
ca7f48dde3 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
2c49e73f21 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
4050edb36f 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
20d7944ad4 Fix warnings on 64 bit platforms.
Noticed by:	 jake
2003-06-19 16:09:18 +00:00
mdodd
bbb16e4ff4 Add function prototypes. 2003-06-19 05:28:26 +00:00
mdodd
56a3b80499 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
dc3a54bf50 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
c5c4b10876 Move MD function prototypes together. 2003-06-19 02:42:04 +00:00
mdodd
68a944aa1c Fix warnings; no parameters in function prototypes. 2003-06-19 02:39:37 +00:00
mdodd
584abbc210 Avoid a NULL pointer dereference. 2003-06-18 16:17:13 +00:00
yar
1b73e33c70 - 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
2e2e4bab22 Include libmap.h for prototypes. 2003-06-18 05:31:08 +00:00
mdodd
8cf32c2c60 - Add support for DT_FLAGS.
- Define various things from the most recent ELF spec.
2003-06-18 03:34:29 +00:00
dougb
202e604e2d More correctly spell "-static" as "NOSHARED?=YES" 2003-06-17 20:07:49 +00:00
yar
6184178ec0 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
72d1da0bbc 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
c54b222f81 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
5fcec22982 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
36a3392be2 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
747094f260 Remove MAINTAINER lines. 2003-06-14 19:32:52 +00:00
green
a17db41523 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
9a1189f505 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
65ed9a6efd 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
63bba2b727 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
3b8b8f13ff Break sentences.
MFC after:	1 week
2003-06-10 15:03:35 +00:00
yar
b057ed0b90 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
2e9b8171a1 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
28c1746547 Add section number to .Xr 2003-06-08 12:40:50 +00:00
charnier
7b5e505f89 The .Xr utility 2003-06-08 12:38:18 +00:00
marcel
b7d139306d 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
4ccd671ad2 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
f75636f8d6 Drop MAINTAINER Bit. Not needed any more. 2003-06-04 15:59:13 +00:00
obrien
c5767466c8 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
f04f7b0ee1 Assorted mdoc(7) fixes. 2003-06-02 15:02:06 +00:00
obrien
6a37c23542 Best we can do with this is c89. 2003-06-02 02:35:58 +00:00
obrien
33f1f121d6 Include stdlib.h to get exit()'s prototype. 2003-06-02 02:35:18 +00:00
obrien
fb36949058 Add the variable's type to the declaration. 2003-06-02 02:34:36 +00:00
ru
38efffd415 Assorted mdoc(7) fixes. 2003-06-01 19:52:36 +00:00
mdodd
3e8acf4a1e - use issetugid()
- be paranoid about honoring LD_LIBMAP_DISABLE.

Suggested by:	 rwatson
2003-05-31 15:24:29 +00:00
mdodd
857c69a959 Simplify map_object() by breaking out the ELF header validation bits
into a separate function.
2003-05-31 14:48:59 +00:00
mdodd
a69147e2f0 Provide function entry debugging messages. 2003-05-31 14:46:38 +00:00
mdodd
90c75987d0 Use the environment variable LD_LIBMAP_DISABLE to disable
libmap.conf(5) functionality.
2003-05-31 14:45:11 +00:00
mdodd
d66dad7f53 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
d490844ff9 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
f8452db5b7 Do not exclude amd64 from rtld-elf builds.
Approved by:  re  (safe amd64 support commits)
2003-05-24 17:38:45 +00:00
peter
0f0fd96bcb 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
f57ad275c4 Retire the useless NOSECURE knob.
Approved by:	re (scottl)
2003-05-19 15:52:01 +00:00
mdodd
114f5c4d82 - 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
b799688dc7 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
4c3fd5b0b7 mdoc(7) police: Properly markup the previous revision.
Approved by:	re (blanket)
2003-05-16 21:36:10 +00:00
ru
6a6b3c172a mdoc(7) police: Normalize the FILES section.
Approved by:	re (blanket)
2003-05-16 21:34:21 +00:00
markm
bd48a806b6 Allow a NOPIC "make world" to complete.
OK'ed by:	re(scottl)
2003-05-11 18:48:29 +00:00
markm
e52487c22c 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
74a10abba7 Exclude rtld-elf for amd64. More porting is still needed.
Approved by:  re (scottl)
2003-05-08 06:37:12 +00:00
kan
0b6c2ddc22 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
e230a8af54 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
b707cfbc2e Use __FBSDID vs. rcsid[]. 2003-05-04 00:59:13 +00:00
obrien
cae8a53d46 Fix signed/unsigned comparison warnings. 2003-05-04 00:56:00 +00:00
obrien
129ca2bfbb Fix a sign/unsigned comparison. 2003-05-04 00:43:39 +00:00
ru
366b043164 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