Commit Graph

785 Commits

Author SHA1 Message Date
mpp
02b18f847f Add $FreeBSD$ lines to man pages that are missing them to make it
easier for translation teams.

PR:		docs/13418
Submitted by:	Alexey Zelkin <phantom@cris.net>
1999-08-28 23:10:20 +00:00
peter
76f0c923fe $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
peter
b658a57c22 unifdef -DINTERNAL_LS - it's too useful to be off by default. If anyone
really dislikes this, we could add a switch to disable it at runtime and
check in popen.c.
1999-08-26 00:45:36 +00:00
imp
b9bf7187d1 Ufff. cflags -> chflags. I could have sworn this change has been in
my last three successful make buildworlds...

Noticed by: phk
1999-08-21 20:54:40 +00:00
imp
6d45c2c683 Remove all flags from devices before we try to assert ownership and
set permissions.

Bug not fixed:
	We silently ignore failures of chflags, chmod and chown.
1999-08-21 18:15:55 +00:00
jdp
ed94658ad9 Add a NULL pointer check whose absence could cause segmentation
violations in certain obscure cases involving failed dlopens.  Many
thanks to Archie Cobbs for providing me with a good test case.

Eliminate a block that existed only to localize a declaration.
1999-08-20 22:33:44 +00:00
jkh
f0f8bd1b55 Back out previous commit - it's not necessary now that tty.h properly includes
the queue macros.
1999-08-09 07:51:03 +00:00
green
518ce45aad Add a missing include (sys/queue.h for sys/tty.h SLIST usage.) 1999-08-09 02:19:38 +00:00
stark
c8630dca70 Correction to previous commit. 1999-08-08 07:23:12 +00:00
stark
bc22ab3c1b Corrected mistake that was causing daemon to loop without serving
user requests.  Note that nothing can be said about the value of 'user'
unless User != NULL.
1999-08-08 07:05:46 +00:00
jdp
d0a94902b2 Change many asserts into normal errors. They were all for conditions
caused by invalid shared objects rather than by internal errors.

Enable format string mismatch checking for _rtld_error().
1999-07-18 00:02:19 +00:00
jdp
564861ba7c Change the symbol used to find the end of an object's address space
from "end" to "_end".  The former does not exist in most shared
libraries.  This fixes problems in dladdr() and dlsym(RTLD_NEXT, ...).
1999-07-14 04:09:11 +00:00
mpp
258f51ed77 Fix a couple of typos.
PR:		12610
Submitted by:	Seth <seth@freebie.dp.ny.frb.org>
1999-07-12 18:37:48 +00:00
dfr
7b13a6e6f9 Add code to 'handle' R_ALPHA_NONE relocations by ignoring them. 1999-07-12 07:54:45 +00:00
jdp
2090a850c6 Add a MAINTAINER line naming myself. We control the vertical. We
control the horizontal.
1999-07-09 16:27:43 +00:00
jdp
5587b52c75 Fix bug: if a dlopen() failed (e.g., because of undefined symbols),
the dynamic linker didn't clean up properly.  A subsequent dlopen()
of the same object would appear to succeed.

Another excellent fix from Max Khon.

PR:		bin/12471
Submitted by:	Max Khon <fjoe@iclub.nsu.ru>
1999-07-09 16:22:55 +00:00
jdp
5360158df2 Shake hands with GDB a little bit earlier so that it is possible to
debug the init functions.

Submitted by:	dfr
1999-07-03 23:54:02 +00:00
mpp
f90c97ac2f Update the SYNOPSIS to reflect that the -l option can be specified
more than once.

Pointed-out-by: sheldonh
1999-06-28 10:50:47 +00:00
jdp
3ff496fa33 Fix a reference counting problem when using dlopen(NULL, ...).
PR:		bin/12129
1999-06-25 04:50:06 +00:00
jdp
2be78ea16b Fix a serious performance bug for large programs on the Alpha,
discovered by Hidetoshi Shimokawa.  Large programs need multiple
GOTs.  The lazy binding stub in the PLT can be reached from any of
these GOTs, but the dynamic linker only has enough information to
fix up the first GOT entry.  Thus calls through the other GOTs went
through the time-consuming lazy binding process on every call.

This fix rewrites the PLT entries themselves to bypass the lazy
binding.

Tested by Hidetoshi Shimokawa and Steve Price.

Reviewed by:	Doug Rabson <dfr@freebsd.org>
1999-06-25 02:53:59 +00:00
peter
f2cbc8ce7a Identify illegal switches, don't print them as '?' in the error.. 1999-05-18 05:51:09 +00:00
wpaul
7901189d75 Fix ypxfr so that it can be run from cron.
Patch submitted by: Dan Nelson <dnelson@emsphone.com>
1999-05-10 20:55:29 +00:00
ghelmer
78f6c49fe5 Add missing -A option to SYNOPSIS.
PR:		docs/10771
1999-05-04 19:42:01 +00:00
imp
8b33b875ef More egcs warning fixes:
o main returns int not void
	o use return 0 at end of main when needed
	o use braces to avoid potentially ambiguous else
	o don't default to type int (and also remove a useless register
	  modifier).

Reviewed by: obrien and chuckr
1999-04-25 22:23:38 +00:00
jdp
e206feb881 Back out my change from 6 April PDT that added a new dlversion()
function.  It was an ill-considered feature.  It didn't solve the
problem I wanted it to solve.   And it added Yet Another Version
Number that would have to be maintained at every release point.
I'm nuking it now before anybody grows too fond of it.
1999-04-22 01:54:38 +00:00
jdp
d93b4012a3 After relocating the main program, but before calling any of the
_init() functions, initialize the global variables "__progname" and
"environ".  This makes it possible for the _init() functions to call
things like getenv() and err().
1999-04-21 04:06:57 +00:00
jdp
9dd48e58c3 The ELF specification says that the RPATH in the executable or
shared object takes precedence over LD_LIBRARY_PATH.  Make the
dynamic linker do it that way.
1999-04-09 06:42:00 +00:00
jdp
e595dd9e79 Eliminate all machine-dependent code from the main source body and
the Makefile, and move it down into the architecture-specific
subdirectories.

Eliminate an asm() statement for the i386.

Make the dynamic linker work if it is built as an executable instead
of as a shared library.  See i386/Makefile.inc to find out how to
do it.  Note, this change is not enabled and it might never be
enabled.  But it might be useful in the future.  Building the
dynamic linker as an executable should make it start up faster,
because it won't have any relocations.  But in practice I suspect
the difference is negligible.
1999-04-09 00:28:43 +00:00
brian
ee8f7b8bf0 Determine the host name using an array size of
MAXHOSTNAMELEN and call trimdomain() before implementing
the -u option.

This allows local hosts of a lan with a long domain name to
appear properly in utmp by base host name (w/o domain) rather
than by IP number.
1999-04-08 21:36:27 +00:00
brian
68437b1a0e Really fix -u.... 1999-04-07 08:39:54 +00:00
brian
c6c6c7de65 Ensure that things returned by gethostname() and
friends are terminated and allow for a maximum
host name length of MAXHOSTNAMELEN - 1.
Put parenthesis around sizeof args.
Make some variables static.
Fix telnetd -u (broken by my last commit)

Prompted by: bde
1999-04-07 08:27:45 +00:00
brian
61dd45edb4 Fix the size of rhost, don't forget to NUL terminate
it and use brackets for sizeof.
Requested by: bde
1999-04-07 06:00:22 +00:00
jdp
829fcc9602 Fix a couple of typos in comments. 1999-04-07 02:48:43 +00:00
jdp
fd4074472e Add a new function dlversion() which returns the version number of
the dynamic linker in the same form as __FreeBSD_version.  This is
mainly intended for checking the dynamic linker version during a make
world.
1999-04-07 02:43:11 +00:00
brian
213baed96f Link with libutil 1999-04-06 23:40:25 +00:00
brian
a77173a7cd Use realhostname() rather than various combinations of
gethostbyaddr() & gethostbyname().

Remove brokeness in ftpd for hosts of MAXHOSTNAMELEN length.
1999-04-06 23:06:00 +00:00
brian
5aa9166dba After receiving a connection and doing a reverse
lookup on the incoming IP, do a forward lookup on
the result and make sure that the IP is in the
resulting list.  If it's not, put the IP number
in utmp/wtmp instead of the rogue name.

Stolen from: rlogind
Suggested by: sef
1999-04-06 00:29:41 +00:00
jdp
da5cbf3e76 Resolve undefined weak references to a value of 0. This solves the
"__deregister_frame_info" problem that was seen when combining a
program linked using the old gcc with shared libraries that were
built using egcs.
1999-04-05 02:36:40 +00:00
peter
d352c94070 If somebody does an execv("foo", NULL) (which theoretically is an error),
avoid crashing inside rtld (since it's easy) since everything else handles
it.  Of course, if the target program checks argv[], it'll fall over.

Reviewed by:	jdp
1999-04-04 06:01:09 +00:00
peter
df68fc891e Add an 'al' (autologin username) capability to getty/gettytab. This is a
damn useful thing for using with serial consoles in clusters etc or secure
console locations.  Using a custom gettytab entry for console with
an entry like 'al=root' means that there is *always* a root login ready on
the console.  This should replace hacks like those which go with conserver
etc.  (This is a loaded gun, watch out for those feet!)

Submitted by:  "Andrew J. Korty" <ajk@purdue.edu>
1999-04-04 04:36:50 +00:00
joerg
ae5a3098bc Ignore empty usernames, and repeat the login: prompt in this case.
There's not much point in having uucpd behave differently than
login(1) for this, and now uucpd is compatible to the default chat
script of Taylor UUCP which sends a single \r at first.

While i was at it, added a few strategic ``errno = 0;''s, so at least
an `Undefined error 0' will be returned for things like a closed
connection while reading the login ID or password, as opposed to an
even more bogus thing like `No such file or directory'.
1999-03-30 10:23:35 +00:00
nate
aef7a6313e - Commit the correct dladdr() implementation.
Reviewed by:	jdp@FreeBSD.org <This is the version he reviewed!>
1999-03-24 23:47:29 +00:00
nate
49744ae917 - Added dladdr(3) support.
Reviewed by:	jdp@FreeBSD.org
1999-03-24 23:37:35 +00:00
brian
a9dd71bbfc Set the CPU resource limit back to infinity before exec()ing PP.
PR:	10399
1999-03-09 22:04:44 +00:00
fenner
1fff269456 Clean up some .Os macro uses: quotes are not needed, multiple arguments
don't really work if the first one isn't "FreeBSD", and "FreeBSD-Experimental"
isn't an OS name.
1999-02-15 08:34:14 +00:00
nate
12bcba6646 - Set the system immutable flag when installing ld.so to avoid people
accidentally clobbering it.

Submitted by:	numberous people on -current
1999-02-15 05:02:54 +00:00
asami
7df90d6ad0 Oops, I missed a few more /etc/nologin references yesterday. It appears
my check of the tree was incomplete.  Sorry guys.

Reported by:	Ben Smithurst <ben@scientia.demon.co.uk>
1999-01-12 14:09:23 +00:00
peter
b811a3806f As previously threatened, clean up the rshd -a option and make it default
on rshd and rlogind.  However, note that:
1: rshd used to drop a connection with -a if the hostname != ip address.
   This is unneeded, because iruserok() does it's own checking.
   It was also wrong if .rhosts had an explicit IP address in it,
   connections would be dropped from that host solely because the DNS was
   mismatched even though it was explicitly intended to work by IP address.
2: rlogind and rshd check the hostname mappings by default now because that
   is what goes into the utmp/wtmp and logs.  If the hostname != ip address,
   then it uses the IP address for logging/utmp/wtmp purposes.  There isn't
   much point logging ficticious hostnames.
3: rshd -a is now accepted (but ignored) for compatability.  If you really
   want to make life miserable for people with bad reverse DNS, use tcpd in
   paranoid mode (which is questionable anyway, given DNS ttl tweaking).
1998-12-16 07:20:45 +00:00
peter
4b96ed957d Old stuff laying around: Don't use a function called getstr(), that has
nasty consequences when the system curses is ncurses as this conflicts
with a ncurses funciton and causes recursion.
1998-12-16 06:04:29 +00:00
eivind
c07885f31e Block for buffer overflow. 1998-12-13 21:02:28 +00:00
dillon
4a5ab955ca PR: bin/9031
Changed unbounded strcpy() to snprintf() to fix buffer overrun exploit
1998-12-12 20:56:53 +00:00
bde
1ece6223be Fixed long line in previous commit. 1998-12-03 05:45:18 +00:00
billf
a6fb6a2c8e Update to correctly reflect the default values of
net.inet.ip.portrange.hifirst and net.inet.ip.portrange.hilast

PR:		docs/6745
Submitted by:	Masachika Ishizuka <ishizuka@ish.org>
1998-12-02 22:11:02 +00:00
dg
24689f2c76 Added a -D option to turn on TCP_NODELAY. 1998-12-01 23:27:24 +00:00
dillon
c4e01c66b0 Reviewed by: freebsd-current, freebsd-security
Removed getuid() root check so ntalkd can be run from a tty sandbox.
    It isn't suid root anyway, who knows why the getuid() check was even
    in there in the first place!
1998-12-01 21:12:57 +00:00
dfr
6c22f92d39 Use the runpath of the main program for locating libraries loaded by
dlopen().

Reviewed by: jdp
1998-11-27 21:19:52 +00:00
jdp
7e9c3df2e6 Find "klogin.c" in "src/lib/libpam/modules/pam_kerberosIV" instead
of in "src/usr.bin/login".  The latter instance is going away.  As
soon as ftpd is PAMized, it won't need to use klogin.c at all.
1998-11-21 02:11:16 +00:00
dima
e6c0ad874c Enable named-xfer and rbootd for alpha. 1998-11-10 06:50:35 +00:00
jdp
65a1e124be Fix a bug in the handling of minor version numbers. Formerly, the
rtld would accept the first shared library it found with the right
major version number, even if the minor version number was too low.
If a different version of the shared library with an adequate minor
version number appeared later in the search path, it would not be
found.

Now the rtld searches all locations first looking for a library
with a minor version that is high enough.  Only if such a library
is not found will it fall back to accepting a minor version number
that is too low.  As before, a warning comes out in that case.

This solves some problems encountered when building an older world
on a -current system.
1998-11-07 01:59:39 +00:00
dg
49185b19a8 Rename a function name so that it doesn't conflict with a future system call. 1998-10-30 16:17:50 +00:00
des
e1957bff39 Set the user context correctly so that cd ~ does the right thing.
PR:		bin/7943 bin/8293
Submitted by:	Bill Fenner <fenner@parc.xerox.com>
Approved by:	jkh
1998-10-13 20:42:01 +00:00
jdp
1c595710fd Fix a bug in dlclose that broke the apache13 port. The list of
loaded objects wasn't being maintained properly.
1998-10-13 03:31:59 +00:00
jkh
28dc6bbbea This thing has its own puts function, so use it.
Submitted by:	Matthew Jacob <mjacob@nas.nasa.gov>
1998-10-08 23:14:02 +00:00
ken
0754b967d8 Fix a memory leak in rpc.rstatd that shows up when it's run in standalone
mode.  (i.e., not from inetd)

PR:		bin/8212
1998-10-08 19:59:40 +00:00
alex
a04d0a21b8 Added double quotes around CHMOD description to prevent garbled output.
PR:		8094
Submitted by:	Christoph Weber-Fahr <wefa@callcenter.systemhaus.net>
1998-09-29 22:02:06 +00:00
jdp
c50bd3ff4b Make LD_PRELOAD work for ELF. 1998-09-22 02:09:56 +00:00
obrien
18dba2fe21 Remove useless `BINOWN=root' now that it is the default. 1998-09-19 22:42:06 +00:00
dfr
0cc253cb74 Work around an alpha compiler bug.
Reviewed by: Kenneth D. Merry <ken@plutotech.com>
1998-09-16 21:33:14 +00:00
jdp
7bf4199b5f Fix a bug that showed up when debugging dynamically linked programs.
References from GDB to "printf" and various other functions would
find the versions in the dynamic linker itself, rather than the
versions in the program's libc.  This fix moves the GDB link map
entry for the dynamic linker to the end of the search list, where
its symbols will be found only if they are not found anywhere else.
It was suggested by Doug Rabson, though I implemented it a little
differently.

I personally would prefer to leave the dynamic linker's entry out
of the GDB search list altogether.  But Doug argues that it is
handy there for such things as setting breakpoints on dlopen().
So it stays for now, at least.

Note, if we ever integrate the dynamic linker with libc (which has
several important benefits to recommend it), this whole problem
goes away.
1998-09-16 02:54:08 +00:00
jdp
2d0810fe03 Make the pathname pointed to by the Obj_Entry structure for the
dynamic linker itself dynamically allocated.  All of them are
supposed to be dynamically allocated, but we cheated before.  It
made gdb unhappy under some circumstances.
1998-09-15 21:07:52 +00:00
gibbs
1bb65e0d8a Update system to new device statistics code.
Submitted by:	"Kenneth D. Merry" <ken@plutotech.com>
		mike@smith.net.au (Mike Smith)
1998-09-15 08:15:30 +00:00
dfr
e7ebeff9f3 Update to the binutils-2.9.1 PLT format. 1998-09-11 18:31:55 +00:00
dfr
206d048a70 Add the r_addend of the relocation when processing GLOB_DAT relocations. 1998-09-11 18:30:55 +00:00
dfr
4f35de094d Fix a cut&paste error which prevented LD_BIND_NOW from working. 1998-09-08 09:47:35 +00:00
jdp
2b7c06f6c8 Don't recognize a file as an a.out shared library unless it has at
least 2 version numbers.  This fixes the bug where the dynamic
linker would try to load an ELF shared library if it found one.

Note, this change also fixes the same thing in "ld", because the
code is shared.

For "ld" there is still a problem with ".a" libraries, which cannot
be distinguished by name.  I haven't decided what, if anything, to
do about that.
1998-09-05 20:28:48 +00:00
jb
9e041297f2 Chaneg MACHINE to MACHINE_ARCH to support MACHINE=pc98.
Remove a couple of unsupported machines.
1998-09-05 08:33:10 +00:00
jb
3e545efab0 Chaneg MACHINE to MACHINE_ARCH to support MACHINE=pc98. 1998-09-05 08:31:10 +00:00
jdp
6c76bd6d54 Implement ldconfig functionality for ELF. The hints are stored in
a different file than the a.out hints, namely, "/var/run/ld-elf.so.hints".
These hints consist only of the directory search path.  There is
no hash table as in the a.out hints, because ELF doesn't have to
search for the file with the highest minor version number.  (It
doesn't have minor version numbers at all.)

A single run of ldconfig updates either the a.out hints or the ELF
hints, but not both.  The set of hints to process is selected in
the usual way, via /etc/objformat, or ${OBJFORMAT}, or the "-aout"
or "-elf" command line option.  The rationale is that you probably
want to search different directories for ELF than for a.out.

"ldconfig -r" is faked up to produce output like we are used to,
except that for ELF there are no minor version numbers.  This should
enable "ldconfig -r" to be used for checking LIB_DEPENDS in ports
even for ELF.

I implemented the ELF functionality in a new source file, with an
eye toward eliminating the a.out code entirely at some point in
the future.
1998-09-05 03:31:00 +00:00
jb
b3bc350baa Add -lcrypt when building kerberos. 1998-09-05 00:32:27 +00:00
jb
b2f4b022d2 Enable rtld-elf for build on alpha too. We now have support for shared
libraries on alpha!
1998-09-04 22:55:17 +00:00
dfr
b5ab30c0dc Add alpha support.
Submitted by: John Birrell <jb@cimlogic.com.au> (with extra hacks by me)
Obtained from: Probably NetBSD
1998-09-04 19:03:57 +00:00
jdp
45eff87b42 Suppress duplicate entries in ldd output. 1998-09-02 02:51:12 +00:00
jdp
6bd2d04608 Style fixes. If it seems like a lot of lines of changes, it's
because I moved some functions.  Mr. Tidy likes them to be in
alphabetical order.
1998-09-02 02:00:20 +00:00
jdp
81ca502a92 Handle dlsym(NULL, ...) properly, by searching in the caller's
shared object.  Note, this searches _only_ that object, and not its
needed objects, in accordance with the documentation.

Also fix dlopen(NULL, ...) so that the executable's needed objects
are searched as well as the executable itself.
1998-09-02 01:09:34 +00:00
wosch
68cda92e4a Sort cross references. 1998-08-31 16:41:09 +00:00
jb
e6edac6dac BINFORMAT -> OBJFORMAT ready for E-day. 1998-08-30 01:57:55 +00:00
mckay
bb26cf57dc Pass me the pointy hat with the extra sequins. Just a moment, while I get
it to sit right...

The __error() hack gave out the wrong address.  It returned the address of
errno in ld.so instead of the address of errno in the main program.  Oops.

The hack is now correct, just in time to be obsoleted by elf.
1998-08-22 15:51:41 +00:00
jb
c237eaa035 Update this header to use the revamped elf headers which select Elf32
or Elf64 based on the inclusion of the machine dependent header.

I've left the addition of the extra fields to handle the relocation
structures with addend for a separate commit after jdp has had a chance
to review what I've done. The current change is needed to compile
csu/alpha/crt1.c
1998-08-21 03:29:40 +00:00
jdp
0d5b915ae3 Add "-C" to INSTALLFLAGS to install atomically. An elf->elf
installworld dies at this point otherwise, leaving the system
without a dynamic linker.
1998-08-17 04:59:15 +00:00
markm
ec4dc9550e Fix LIBDIR (for aout/ELF). 1998-08-06 21:41:13 +00:00
peter
5aa396da7f Build mail.local and smrsh (when building sendmail) 1998-08-04 15:32:43 +00:00
peter
48e49c7164 Build sendmail-8.9.1 smrsh 1998-08-04 15:31:31 +00:00
peter
082d9275b1 Use sendmail-8.9.1 mail.local (with our changes). It has LMTP support. 1998-08-04 15:30:17 +00:00
bde
1d56e79a13 Fixed printf format errors. 1998-08-02 16:44:18 +00:00
phk
a08d63f654 Getty is missing the speed table entry for 230400 baud.
PR:		7280
Reviewed by:	phk
Submitted by:	Craig Leres <leres@ee.lbl.gov>
1998-07-22 05:57:22 +00:00
steve
b85e472e7e Remove no longer needed FreeBSD specific code.
PR:		5497
Submitted by:	Jacob Bohn Lorensen <jacob@jblhome.ping.mk>
Obtained from:	OpenBSD (indirectly it seems so just to be safe)
1998-07-20 04:52:26 +00:00
jkoshy
2d02bdedf2 Document the use of lines beginning with a '#' as comment lines.
PR: 5676
1998-07-09 11:38:21 +00:00
jkoshy
4025ef571e Clean up grammar. Provide proper pathnames for spool directories.
Document dependency on current load average for starting new batch jobs.

PR: 7109
1998-07-01 05:47:58 +00:00
bde
a468add075 Fixed printf format errors. 1998-06-30 15:19:51 +00:00
bde
122886a1e0 Don't assume that time_t is long. 1998-06-29 17:06:00 +00:00
bde
0b0c5d1c4e Don't assume that time_t is long. Fixed printf format errors. 1998-06-29 16:47:08 +00:00
mckay
446517db81 Since I got no objections to this patch, and no one has offered any
alternative, I present .. ta! da! .. the __error() hack.

This patch to the a.out dynamic loader provides old a.out binaries
with __error() if they are linked with an older libc that lacks it,
but are also linked against a library that needs it.

There is a smaller, tricker hack that takes advantage of the fact
that ld.so has __error() too, courtesy of the new libc, but this
hack is the straightforward version.
1998-06-21 14:22:29 +00:00
peter
c5010eaee8 Fix stupid typo, I had only tested this in elf mode. 1998-06-12 19:45:14 +00:00
peter
d24603db7b Only build rtld-aout if we're in an a.out build environment. 1998-06-12 16:09:33 +00:00
peter
69c5433237 Activate libbind 1998-06-11 09:17:58 +00:00
phk
7a64d46ca3 Spelling fixes.
PR:		6903
Reviewed by:	phk
Submitted by:	Josh Gilliam <josh@quick.net>
1998-06-10 12:34:27 +00:00
brian
e484ff1d7f Search for libraries in dlopen() when the specified path
contains no ``/''s.
Elf already searches it seems.
Mostly submitted by: Mike Smith <mike@smith.net.au>
1998-06-07 03:53:08 +00:00
jb
065357c971 named-xfer can't be linked static due to the duplicated symbols in
libc and libbind.

rpc.rstatd required libkvm.

Only try to build these on i386 for the time being.
1998-06-06 07:09:01 +00:00
jkoshy
8d35690221 Mention that syslog.conf(5) does not log LOG_FTP messages by default.
PR: 5287
1998-06-05 10:31:24 +00:00
joerg
76360747fe Use gethostname(3) to obtain the local host name, as opposed to uname(3).
Otherwise the length of the name is limited to 32 characters only.
1998-06-03 20:01:28 +00:00
jb
cb304595fc signal() returns SIG_ERR on error, not int.
time() requires a time_t pointer, not a long.
1998-06-03 11:33:44 +00:00
jkoshy
15683e67b6 Spelling corrections.
PR: 6829
Submitted by: Josh Gilliam <josh@quick.net>
1998-06-03 04:21:41 +00:00
peter
d78a63321d SUBDIR += rtld-aout 1998-06-01 14:33:06 +00:00
peter
afda9795b1 Seperate the Paul Kranenburg a.out rtld stuff into a stand-alone area away
from the gpl ld code.  This is part 2 of something that I began in 1996.
A repository copy has happened behind cvs's back.
1998-06-01 13:00:32 +00:00
sos
bc60c8025e ELF preparation step 2:
Move a.out libraries to /usr/lib/aout to make space for ELF libs.
Make rtld usr /usr/lib/aout as default library path.
Make ldconfig reject /usr/lib as an a.out library path.
Fix various Makefiles for LIBDIR!=/usr/lib breakage.

This will after a make world & reboot give a system that no
longer uses /usr/lib/*, infact one could remove all the old
libraries there, they are not used anymore.

We are getting close to an ELF make world, but I'll let this
all settle for a week or two...
1998-05-26 20:12:56 +00:00
steve
247dc5c8d3 Make ftpd(8) honor its default group setting in the config files.
PR:		6682
Submitted by:	Max Euston <meuston@jmrodgers.com>
1998-05-25 03:45:35 +00:00
ache
66c1e653c8 Back out "always UTC" fix since some people want visually identical 'ls'
output for local users. FTP protocol RFC also says that 'ls' output is
not machine-readable. "always UTC" still possible with TZ= in ftpd
environment by price of having UTC in log files too.

Fix INTERNAL_LS to sense new /etc/localtime after chroot
1998-05-18 00:06:28 +00:00
ache
649e775fd2 Return back initial tzset() must be before first chroot 1998-05-16 21:23:33 +00:00
ache
ac3cdb08ee Return back vfork and use execve with TZ="" environment in vfork case 1998-05-15 16:51:06 +00:00
ache
2a9d8c7d6f Use fork instead of vfork since setenv clobber parent environment
Fork already used for INTERNAL_LS in anycase
1998-05-15 16:30:09 +00:00
ache
89d1578492 Move TZ="" assignment just before exec to not touch other time stuff 1998-05-15 16:08:52 +00:00
ache
9ab1a03565 Do TZ= as first thing, since FTP protocol is unable to tell zone offset in
any case.

It makes no difference for anon account (since chroot already makes it GMT),
but if you do mirror with special non-anon login, in old variant
your mirror will be wholy retransmitted twice in the year due to
time zone changes (/etc/localtime plays bad role here)
1998-05-15 15:06:58 +00:00
jb
deddb75e12 NetBSD kernels don't support TCP_NOPUSH, so on alpha don't try setting
this socket option. This is temporary code while the alpha still uses
NetBSD socket code in the kernel.
1998-05-15 03:23:28 +00:00
jb
c7a5604130 Remove a bogus prototype for time() and let time.h do that.
Change pointer casts from int to long. The code that looks to index -1
of argv is still broken on alpha.
1998-05-14 10:07:29 +00:00
bde
3325f91b7d Fixed missing dependencies on headers generated by rpcgen, as usual.
Removed bogus dependencies of generated .c files on generated headers.
Sorted sources lists.
1998-05-10 16:01:36 +00:00
rnordier
9eefc374c7 Replace _exit() with exit()
Pointed out by: Nathan Torkington <gnat@prometheus.frii.com> PR 5585
1998-05-05 00:28:51 +00:00
rnordier
0539b2c31e Fix typo.
Pointed out by: Junji SAKAI <sakai.jp.freebsd.org> PR 5621
1998-05-05 00:12:01 +00:00
bde
1f573458e3 Simplified by using new yacc rules and by not generating y.tab.h. 1998-05-04 18:20:18 +00:00
peter
3d32748b33 Argh, forgot to commit the update here for bind-8.. Sorry folks...
Prompted by:	John Hay <jhay@mikom.csir.co.za>
1998-05-04 05:12:49 +00:00
steve
869ef5d1be Clarify use of 'if' capability.
PR:		6499
Submitted by:	Doug Barton <Studded@san.rr.com>
1998-05-04 02:37:29 +00:00
steve
f074da4f3e Avoid stairstep effect on output of 'if=...' file.
PR:		part of 6492
Submitted by:	Chip Norkus via Doug White <studded@san.rr.com>
1998-05-03 16:29:06 +00:00
dfr
ac67dd4e68 Add support for ldd. 1998-05-01 08:39:27 +00:00
dfr
ff6b56dce1 Add GDB support. The method and some of the code came from NetBSD's elf
runtime linker.
1998-04-30 07:48:02 +00:00
dg
3f47a3231d Set TCP_NODELAY on the control channel to improve performance a bit. 1998-04-28 03:37:23 +00:00
dg
1c811baafb Fixed a bug where if MAXUSRARGS amount of args were passed in, the argv[]
array would end up without the NULL pointer termination, causing the glob
code to glob whatever garbage happend to follow on the stack.
1998-04-27 10:51:26 +00:00
phk
01c6cd5a65 telnetd does not recognize the if (display file before login) gettytab flag.
PR:		6365
Reviewed by:	phk
Submitted by:	Jason Garman <init@risen.org>
1998-04-26 06:51:36 +00:00
stark
97401dfce3 PR: misc/4679
Submitted by:	Glen Foster (gfoster@gfoster.com)
Fix missing "/" in dump file pathname.
1998-04-18 13:37:24 +00:00
phk
1e9e791cf2 openlog() needs to have LOG_NDELAY added, or else the syslog() calls after
the chroot will not get sent to syslogd.

PR:		4910
Reviewed by:	phk
Submitted by:	Jim Mercer <jim@komodo.reptiles.org>
1998-04-12 11:15:54 +00:00
charnier
77878782d5 .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq. 1998-03-19 07:37:43 +00:00
charnier
2406be2171 .Sh AUTHOR -. .Sh AUTHORS. Use .An/.Aq. 1998-03-19 07:37:22 +00:00
jdp
e147a203c2 Enable rtld-elf when building an ELF system on the i386. 1998-03-07 19:43:48 +00:00
jdp
0627b813cd This commit was generated by cvs2svn to compensate for changes in r34192,
which included commits to RCS files with non-trunk default branches.
1998-03-07 19:24:35 +00:00
jdp
0e58850b93 Import the ELF dynamic linker. This is the ElfKit version with
quite a few enhancements and bug fixes.  There are still some known
deficiencies, but it should be adequate to get us started with ELF.

Submitted by:	John Polstra <jdp@polstra.com>
1998-03-07 19:24:35 +00:00
jdp
350f58aa8f Import the ELF dynamic linker. This is the ElfKit version with
quite a few enhancements and bug fixes.  There are still some known
deficiencies, but it should be adequate to get us started with ELF.

Submitted by:	John Polstra <jdp@polstra.com>
1998-03-07 19:24:35 +00:00
danny
b58c846db6 PR: 5812
Pointed-in-the-right-driection-by: Mike Smith and Steve Price

Close syslogging before calling ls_main()
1998-02-25 07:10:57 +00:00
eivind
e3cd6b581b Make ftpd log IP-addresses in addition to hostnames. 1998-02-24 08:45:57 +00:00
obrien
55c0d527fe MFS. 1998-02-18 10:53:16 +00:00
jdp
d5b09c81ec Implement dladdr. 1998-02-06 16:46:46 +00:00
charnier
2d7475f455 Convert to mdoc. Header -> Id. Typo. 1998-02-03 07:30:22 +00:00
phk
0625623e3d Remove lfs_cleanerd 1998-01-30 12:36:10 +00:00
phk
3397ec7106 Disable lfs_cleanerd 1998-01-30 12:35:10 +00:00
bde
2a7d26ca78 Merged just enough files from Lite2 in lfs_cleanerd to convert from
MOUNT_LFS to "lfs" in one place.  The merge was painful because it
conflicted with cosmetic FreeBSD changes.  lfs_cleanerd still compiles
cleanly but has aproximately the same chance of working as before (0).
1998-01-20 14:41:53 +00:00
wpaul
29e43466ca Make these programs compile and work correctly now that /usr/include/rpcsvc
has been ANSI-fied.

Pointed out by: bde
1998-01-19 23:13:38 +00:00
bde
1e40ca3634 Removed most unused includes of <net/if_var.h> outside the kernel. 1998-01-16 17:38:56 +00:00
charnier
8bd0a515dd Add missing dot. 1998-01-07 07:56:15 +00:00
charnier
7d9a2cfbe3 Remove unused #includes and make it compile again with -DDEBUG. Use syslog()
instead of errx() when being a daemon.
1998-01-07 07:54:18 +00:00
charnier
4cc8746553 Remove unused #include. Display if inetd started us in case of failure. 1998-01-07 07:51:00 +00:00
charnier
7dfb53a951 Typos. 1998-01-07 07:44:01 +00:00
max
841d24202d Typo fix: bootgw -> bootpgw 1997-12-29 13:59:28 +00:00
imp
cde9945828 style(9) nits
Submitted by:	bde
1997-12-26 23:36:43 +00:00
imp
37887cee9a sprintf->snprintf paranoia
Obtained from: OpenBSD (?)
1997-12-24 19:39:57 +00:00
imp
66fd98fe99 Be extra paranoid about the length of data returned from gethostbyaddr or
gethostbyname.
Submitted by:	Julian Assange
1997-12-24 19:38:18 +00:00
imp
ed2ffa32c0 sprintf->snprintf paranoia. The one thing that looks like a hole in
the diff is in an ifdef that isn't enabled for FreeBSD.
Obtained from:	OpenBSD(?)
1997-12-24 19:21:09 +00:00
imp
2dee7f5729 Various sprintf -> snprintf fixes.
Minor style fix (strcpy(foo,"") -> *foo = '\0')
Obtained from:	OpenBSD(?)
1997-12-24 19:13:23 +00:00
imp
604bcde61e Use snprintf rather than printf out of paranoia
Obtained from:	OpenBSD
1997-12-24 18:56:03 +00:00
charnier
8a27726113 Typo. 1997-12-18 07:39:27 +00:00
charnier
1cbbc7f487 Cosmetic in usage string. 1997-12-15 07:19:41 +00:00
charnier
689d237056 Use full path in synopsis. Sort #includes. Use .Tn for NIS. 1997-12-08 07:49:56 +00:00
charnier
9a016c78e2 Sync with diffs I found in kerberised versions: -Wall, no `;' in macros. 1997-12-08 07:46:53 +00:00
jdp
6301239883 Make emacs work again. This is a workaround for the fact that the
emacs a.out file, self-generated by emacs's "unexec" function in
"unexsunos4.c", is invalid.  In particular, its "_end" symbol has
the wrong value.  The dynamic linker was using the value of that
symbol to initialize its sbrk break level.

The workaround is to peek at the executable's a.out header in
memory, and calculate what "_end" should be based on the segment
sizes.

I will work out a fix for emacs and send it to the FSF.  This
dynamic linker workaround is still worthwhile, if only to avoid
forcing all emacs users to build a new version.

Note: xemacs gives a bogus warning at startup, for related reasons.
The warning is harmless and can safely be ignored.  I will send a
patch to the xemacs maintainers to get rid of it, and meanwhile
add a patch file to our port.
1997-12-05 02:06:37 +00:00
charnier
4731a2caff Use err(3). Add prototypes. Document that startup scripts are rc.i386 and
rc.conf (enable/disable) not rc.local.
Use full pathname in SYNOPSIS section.
1997-12-04 07:25:19 +00:00
charnier
4fcce00669 Sort #includes. Add rcsid. Use full pathname in SYNOPSIS section. 1997-12-04 07:20:45 +00:00
steve
0bf80e493d FTP_INTERNAL_LS -> FTPD_INTERNAL_LS
Pointed out by:	Jaye Mathisen <mrcpu@cdsnet.net>
1997-12-04 03:58:02 +00:00
charnier
82c7f870ed Use full path in synopsis. Syslog will add trailing \n. 1997-12-03 07:19:58 +00:00
charnier
4fb0a742b1 Use err(3). Remove progname and trailing \n in syslog strings. 1997-12-03 07:16:08 +00:00
charnier
fa82bf4e17 Use err(3). Add protos for -Wall. 1997-12-02 12:33:42 +00:00
charnier
a3ea3db575 No \n in syslog() strings. Add man page to Xrefs. Change null byte to NUL byte. 1997-12-02 12:30:04 +00:00
charnier
9f2efa4db9 Do not terminate syslog() messages with a dot, as others daemons do. 1997-12-02 12:25:39 +00:00
charnier
5ea1ba746e Document -n flag. Use err(3). Add usage.
Add syslog capability.
1997-12-02 12:20:17 +00:00
jdp
e61aa81fab Get rid of the dynamic linker's internal malloc package, and arrange
things so that it uses the same malloc as is used by the program
being executed.  This has several advantages, the big one being
that you can now debug core dumps from dynamically linked programs
and get useful information out of them.  Until now, that didn't
work.  The internal malloc package placed the tables describing
the loaded shared libraries in a mapped region of high memory that
was not written to core files.  Thus the debugger had no way of
determining what was loaded where in memory.  Now that the dynamic
linker uses the application's malloc package (normally, but not
necessarily, the system malloc), its tables end up in the regular
heap area where they will be included in core dumps.  The debugger
now works very well indeed, thank you very much.

Also ...

Bring the program a little closer to conformance with style(9).
There is still a long way to go.

Add minimal const correctness changes to get rid of compiler warnings
caused by the recent const changes in <dlfcn.h> and <link.h>.

Improve performance by eliminating redundant calculations of symbols'
hash values.
1997-11-29 03:32:48 +00:00
charnier
2053d9365e Use err(3). -Wall cleaning. cosmetics in man page. 1997-11-26 07:36:51 +00:00
charnier
a1752dee71 Remove \n at end of syslog string. -Wall cleaning. Cosmetics in man page. 1997-11-26 07:34:56 +00:00
charnier
0a4b753b28 Cosmetics in man page. Add rcsid and sort #includes. 1997-11-26 07:31:14 +00:00
charnier
d61a5ed6ec Use err(3). -Wall cleaning. Use Pa for file names and add section in Xrefs. 1997-11-26 07:29:04 +00:00
charnier
4f3f135e7c Sort #includes. Add rcsid. Add man page section in .Xrefs. 1997-11-25 07:17:15 +00:00
charnier
a8f4ef9a1d Use warn(3). Hardcode progname instead of using argv[0]. Use Pa for file
name.
1997-11-25 07:14:34 +00:00
charnier
c1ff1b0c01 Add usage(), rcsids. 1997-11-24 07:33:42 +00:00
charnier
402f3974e3 Cosmetics in usage() and man page. 1997-11-24 07:31:31 +00:00
charnier
8029befc43 Key is 8 bytes according to code, not 10 as stated in man page. Add rcsid. 1997-11-24 07:29:12 +00:00
charnier
2066ba97cf Use err(3) instead of local redefinition. Add usage. -Wall cleaning. 1997-11-24 07:27:06 +00:00
charnier
f2586e9eab Correct incompletes .Xrs. Remove duplicate #includes and unused variables. 1997-11-21 07:43:53 +00:00
charnier
8191848c3f Use err(3). -Wall cleaning. 1997-11-21 07:40:48 +00:00
charnier
17df8f3da3 Cosmetics in man page. Exit(-1) -> exit(1). 1997-11-21 07:38:43 +00:00
charnier
7a938e0797 Add const to copyright string. Put sccsid under #if 0/#endif control. 1997-11-20 07:26:04 +00:00
charnier
8eed1042a3 Use err(3). exit(-1) -> exit(1). 1997-11-20 07:23:44 +00:00
charnier
5cce247300 Cosmetic in error strings. Sort Xrefs. Add usage (with syslog capability). 1997-11-20 07:21:55 +00:00
sef
8f194113d3 Log the request from the remote side, in addition to it having happened.
Reviewed by:	julian
1997-11-14 04:39:38 +00:00
alex
3dc202d85a Switch the effective uid to that of the user when writing mail files,
allowing quotas to be enforced on mail spools.

PR:             1111
Submitted by:   Charles Henrich <henrich@crh.cl.msu.edu>
1997-11-13 23:14:34 +00:00
wosch
6614e4891f Store temporary files in /var/tmp instead /tmp. This should avoid
a possible disk overflow for enormous large mails.
Submitted by:	grog
1997-10-11 22:05:44 +00:00
uhclem
a278a3be16 PR: bin/771 and bin/1037 are resolved by this change
This change changes the default handling of linemode so that older and/or
stupider telnet clients can still get wakeup characters like <ESC> and
<CTRL>D to work correctly multiple times on the same line, as in csh
"set filec" operations.   It also causes CR and LF characters to be read by
apps in certain terminal modes consistently, as opposed to returning
CR sometimes and LF sometimes, which broke existing apps.  The change
was shown to fix the problem demonstrated in the FreeBSD telnet client,
along with the telnet client in Solaris, SCO, Windows '95 & NT, DEC OSF,
NCSA, and others.

A similar change will be incorporated in the crypto version of telnetd.

This resolves bin/771 and bin/1037.
1997-10-08 03:10:32 +00:00