Commit Graph

2562 Commits

Author SHA1 Message Date
christos 8b0637156f No need for stack_protector.o if USE_FORT is no.
XXX: compiling a binary with -Wl,--dynamic-linker,${NETBSDSRCDIR}/libexec/...
results in stack overflow. Investigate!
2007-12-26 21:11:52 +00:00
christos 5ad1b72097 print the symbol we are seaching for [when debugging] 2007-12-26 21:10:03 +00:00
perry 9dfe283011 remove cdefs.h at mrg's request 2007-12-16 02:38:24 +00:00
perry 8b0f9554ff convert __attribute__s to applicable cdefs.h macros 2007-12-15 19:44:37 +00:00
perry 36c7456d7c include sys/cdefs.h so that __attribute__ can be fixed later 2007-12-15 16:32:05 +00:00
ad 558a5ffd0f rtld changes for PR bin/37347:
- Apply patch from J.T. Conklin to execute .init/.fini functions in order.
- Support DF_1_INITFIRST and mark libc with DF_1_INITFIRST. Shared libs
  should be recording a dependency on libc, but it's too late to do that.

Ok christos@.
2007-12-07 20:34:04 +00:00
isaki 5b22b72692 white space fix. 2007-12-03 09:54:24 +00:00
wiz 04cd5014b6 filetypes -> file types. 2007-12-02 19:15:07 +00:00
christos 496f9be3e8 support %z 2007-11-24 18:32:26 +00:00
ad 71ac015ebf stack_protector.c has moved. 2007-11-13 15:34:51 +00:00
jmmv 9d5a9c0d86 Add the atf tools
This adds reachover Makefiles to build and install the atf tools.
Some are public, thus installed in /usr/bin, and others are internal
and therefore installed in /usr/libexec.
2007-11-12 15:00:00 +00:00
rtr 3aa5278c3a - remove const from h_header, this pointer is occasionally free'd
- remove unused write_str var
+ move header parsing to new function separation of parsing vs processing
+ alter some variable names to avoid confusion between header value and
  header name (caused breakage with previous rev)
2007-11-04 15:20:11 +00:00
rtr 6dc1829962 + don't free strdup()'d ptr that was manipulated.
(i.e. free(): warning: modified (chunk-) pointer))
+ don't leak memory for ptr actually returned from strdup()
+ don't strdup() if we don't have to
+ don't break without free() if we did strdup()
+ as well as freeing h_value also free the header.
2007-11-04 06:07:52 +00:00
skrll 29353f93e2 Build a local copy of exit that doesn't call __cxa_finalize. It's not
needed and drags in a lot of libc via free.
2007-10-30 17:19:59 +00:00
christos ed1a8fea8d build stack protector locally so that we don't call syslog_ss that results
in 1/2 of libc dragged in.
2007-10-29 20:36:31 +00:00
ad bc89ba23ac Make the dir indexes less ugly (horizontal rules were out of place). 2007-10-18 18:53:59 +00:00
he a9cf29f812 A build for sun2 reveals that we also need -lcrypt, as auth-bozo.c
otherwise gets an unsatisfied reference to crypt().
2007-10-18 17:43:02 +00:00
tls 18c80b6525 RCS IDs 2007-10-17 18:47:59 +00:00
tls 13d3c473b0 Fix two memory leaks noted by Coverity (CID-4694, CIT-4695) and use
SIMPLEQ_FOREACH where possible.  Patch from Arnaud Lacombe.
2007-10-17 18:43:46 +00:00
reed 15823ba9ad Document .htpasswd / HTTP "Basic" authentication support.
Update date of man page too.
2007-10-17 13:55:46 +00:00
reed 7c5821fbe4 Fix typo in EXAMPLES (unknown service).
While there mention inetd.conf(5) again (since in a new section of man page).
2007-10-17 13:33:18 +00:00
reed dbfaed2362 Fix typo on Makefile which causes HTTP Authentication support
to not be used.

Now fix auth-bozo.c to not have warnings "may be used uninitialized"
and pointer targets "differ in signedness".
2007-10-17 13:27:19 +00:00
reed ca8ed3ab02 Remove extra period. 2007-10-16 22:50:01 +00:00
tls 215e50961e Add httpd to the build. Add _httpd to passwd and groups and postinstall.
Add /var/www to mtree, add example line to inetd.conf.
2007-10-16 02:47:12 +00:00
tls 1d63366b2d Get httpd ready for inclusion in build. 2007-10-16 01:31:03 +00:00
tls ba6eac50dd Move bozohttpd.8 to httpd.8 2007-10-16 01:29:44 +00:00
tls 60dbe74596 Import of bozohttpd for its originally intended purpose: a small (~30k)
simple run-from-inetd httpd suitable for small systems (and some large
ones).
2007-10-16 01:14:01 +00:00
ad 9c5739f1c6 brelse() now takes two arguments. 2007-10-08 21:41:12 +00:00
ad bf4b000d16 - Don't use the names malloc/free/etc, since we can end up pulling in libc's
malloc which is not what we want.
- Remove ancient memory compaction hack. Realloc on free memory is now an
  error again (from joerg@).

Ok christos@.
2007-10-05 22:21:07 +00:00
christos 596c6ec5db provide xrealloc, and don't cast and use malloc and realloc directly. 2007-09-27 17:52:16 +00:00
christos 2cce1500a2 If we are using SSP, compile in a separate copy of the stack protector
functions so that we don't end up calling syslog_ss() which drags in
a large portion of libc. Found by skrll...
2007-09-27 17:51:40 +00:00
christos 6f875d32e2 Don't trust AT_SUN_EXECNAME, if we are set{u,g}id. 2007-09-21 13:57:09 +00:00
christos 6eac115581 delete debug printf
make regress compile again.
2007-09-20 19:42:53 +00:00
christos 40cfdb5e3a Use AT_SUN_EXECPATH instead of argv[0] for the executable name. This needs
kernel support, which is not there yet, thus $ORIGIN is broken at this time.
This is ok, nothing uses it yet.
2007-09-20 14:14:25 +00:00
cube f7779133cd Don't remove the last component of filename before calling
_rtld_digest_dynamic:  it is done in expand(), and doing it twice is once
too much.  This fixes $ORIGIN expansion for dependencies.
2007-09-20 07:50:32 +00:00
tnn ea0fc2f827 5 is not a valid version for .Nx, so change it to 5.0. 2007-09-13 21:32:14 +00:00
joerg ad61ac15d2 Don't define bool, false and true. Use stdbool.h. 2007-09-02 09:57:16 +00:00
tls b8360b28b0 Oops. USE_FORT needs to be in Makefile.inc, not Makefile, to cause the
programs in subdirectories here to get -D_FORTIFY_SOURCE.
2007-08-16 18:36:46 +00:00
lukem f21ab048da Rename cred_t to ftpd_cred_t; the former causes a nameclash on Solaris. 2007-07-23 10:41:05 +00:00
lukem 0def0e3a66 Rename HAVE_SOCKADDR_SA_LEN to HAVE_STRUCT_SOCKADDR_SA_LEN.
Use defined(HAVE_foo) instead of just testing HAVE_foo.
2007-07-22 05:06:45 +00:00
christos 2ffe4b875f Use an elf note to handle pax arguments. This is a temporary solution to
avoid wasting OS flag bits. In the future we'll probably use fileassoc to
achieve this (once there is a way to make fileassoc persistent) or in the
shorter term libelf, so that we can add and remove the note on demand instead
of burning bits on each binary. Of course since this is a tool, this means
that we'll need to think about how to handle libelf...
2007-06-24 20:35:36 +00:00
christos b7c1cbea43 PR/36468: Andreas Wrede: ftpd(8) always logs hostnames. Add -n option to display
addresses.
2007-06-10 20:24:31 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
christos 3b320420fe fix a comment. 2007-05-18 21:46:39 +00:00
christos 04ee85ad50 Support Solaris-like $ORIGIN etc. expansions in paths. 2007-05-18 21:44:08 +00:00
lukem aeb5730de8 Replace references from draft-ietf-ftpext-mlst-NN to RFC 3659. 2007-05-10 05:59:30 +00:00
christos 8cb0a31f67 PR/36266: David A. Holland: Don't read and write sig_atomic_t variables in
signal handlers; only write them.
2007-05-03 15:09:41 +00:00
lukem 0f13d99318 Expand documentation on numeric argument suffix parsing, and convert
to IEC 60027-2 prefixes for 2^n multiples ("KiB" instead of "KB", etc.)
2007-04-13 01:36:10 +00:00
scw 596a371d09 Remove a test for defined(__SH5__). 2007-04-08 10:02:35 +00:00
scw 5764a76889 Remove support for NetBSD/{,evb}sh5. 2007-04-08 09:35:21 +00:00
matt 549524f84f Deal with MKPICLIB != no. 2007-03-15 17:27:15 +00:00
matt ee98d74a6b Remove MD COMBRELOC support since it's now MI.
Enable COMBRELOC for all arches
2007-02-23 01:17:11 +00:00
matt 364993dede Don't use cached results for plt lookups (nor save them). 2007-02-23 01:16:32 +00:00
matt 4d10e5e667 Make the COMBRELOC support generic. 2007-02-22 18:57:48 +00:00
hubertf 9c23f96c50 Move ctype.h from headers to files which really need it
From: Slava Semushin <slava.semushin@gmail.com>
2007-02-21 21:14:07 +00:00
hubertf ee68ca46c0 Remove unnecessary ctype.h from libexec/comsat/comsat.c file
From: Slava Semushin <slava.semushin@gmail.com>
2007-02-21 21:06:26 +00:00
martin 3cc1de3d7b Add COMBRELOC support 2007-02-15 19:42:13 +00:00
skrll 1fddd99f52 Provide COMBRELOC support for amd64 in answer to PR/35589.
Some statistics:

base + COMBRELOC
$ time (for i in `seq 100`;do noatun --help>/dev/null;done)
(; for i in `seq 100`; do; noatun --help > /dev/null; done; )  148.64s
user 4.82s system 99% cpu 2:33.93 total

base + DF caching:
$ time (for i in `seq 100`;do noatun --help>/dev/null;done)
(; for i in `seq 100`; do; noatun --help > /dev/null; done; )  151.15s
user 5.53s system 99% cpu 2:37.23 total

base:
$ time (for i in `seq 100`;do noatun --help>/dev/null;done)
(; for i in `seq 100`; do; noatun --help > /dev/null; done; )  492.36s user
5.34s system 99% cpu 8:19.17 total
2007-02-15 15:44:28 +00:00
christos 8fdab46bcc PR/35449: Shigeya Suzuki: ftpd does not register socket address into PAM +FIX 2007-01-20 17:26:32 +00:00
hubertf d405d8ca2b Remove duplicated #includes and some trailing whitespace while here.
From Slava Semushin <slava.semushin@gmail.com>
2007-01-17 21:44:50 +00:00
christos 129c516e3b - use getnameinfo instead of gethostbyaddr
- add tsa2sa and use it
2007-01-08 17:51:34 +00:00
wiz fc86b06120 Bump date for previous. 2006-12-23 07:21:34 +00:00
christos aca8873558 fix volatile and initialization issues, from Anon Ymous 2006-12-17 20:04:09 +00:00
he 0a97c3f688 Complete the move of string_to_flags() and flags_to_string() from the
bin/ls sources to libutil:
 o Bump libutil minor version number
 o Fix uses to include <util.h> to pick up the function definitions
 o Fix most uses of flags_to_string() to release the now-malloc()ed result
2006-12-14 20:09:35 +00:00
jdolecek 20480d6fc5 allow compilation without SUPPORT_UTMP 2006-12-04 21:13:22 +00:00
wiz 09cb1d6f1c s/existance/existence/, from Zafer. 2006-11-24 22:52:16 +00:00
christos 1665d5e960 fix spelling of accommodate; from Zapher. 2006-11-24 19:46:58 +00:00
christos aac134252a From defend dot the dot world at gmail dot com: Sanitize environment variables
for set{u,g}id binaries, so that in case they are playing with set{u,g}id
and exec'ing other binaries they don't get affected by the
LD_{PRELOAD,DEBUG,LIBRARY_PATH} environment setup. We leave LD_BIND_NOW alone.
There are no binaries affected in the base system.
2006-11-22 21:46:36 +00:00
tls 86c7b9ff84 Temporarily disable -c (file coalescing) until data corruption issues can
be resolved.
2006-11-18 18:43:25 +00:00
atatat bade8c3805 remove stray links 2006-11-16 04:43:32 +00:00
christos 2343154519 pass lint 2006-11-16 04:31:24 +00:00
christos f8013c3836 fix gcc4 sign issues. 2006-11-16 04:15:13 +00:00
christos a682c5bf65 - remove stray mlinks
- remove gcc4 hacks
2006-11-16 04:14:50 +00:00
christos 96a58b2a60 more uucp cleanup 2006-11-16 00:49:20 +00:00
christos bc2479d202 no more rmail. 2006-11-12 01:27:29 +00:00
jmmv 2947e73b43 Move lfs_cleanerd from /usr/libexec to /libexec. This is to allow putting
the root file system on a LFS volume.

Addresses PR bin/30407.  No objections in tech-userlevel@.
2006-11-11 14:47:27 +00:00
christos 161813f9e4 eliminate alloca for ssp. 2006-11-09 19:45:57 +00:00
skrll 6f388cd224 Create _rtld_relocate_plt_object and use it in _rtld_bind and
_rtld_relocate_plt_objects.

No functional change.
2006-10-17 08:33:36 +00:00
skrll 152e43d87a Support unaligned DIR32 relocs.
Closes PR 18293
2006-10-17 08:28:06 +00:00
skrll edf13fb5fb Reformat a comment. 2006-10-16 13:53:09 +00:00
skrll 78b8583054 Correct the frame size for a couple of ENTRYs 2006-10-16 13:52:47 +00:00
wiz 818a1c08a3 Fix typo in macro. 2006-10-13 20:28:06 +00:00
wiz f10fc51879 Sort SEE ALSO. 2006-10-13 20:27:42 +00:00
peter e263dfd62f WFORMAT is no more... 2006-10-08 17:52:28 +00:00
elad 7d7720ce94 Don't print uninitialized errno, from David A. Holland on #NetBSD-code 2006-10-07 18:26:40 +00:00
elad 516c371048 PR/13478: Greg A. Woods: some tty-related documentation fixes
Patch applied with "minor tweaks" from me, thanks!
2006-10-06 22:07:44 +00:00
christos a0feefba6a Avoid buffer overflow. 2006-09-29 17:02:04 +00:00
christos 36ac62d963 PR/34658: der Mouse: identd truncates queries to first segment 2006-09-29 15:49:29 +00:00
christos fec1382c1e Coverity CID 3931: Fix memory leak. 2006-09-27 17:15:20 +00:00
lukem c7e71f1d87 Fix -ULOGIN_CAP compile. 2006-09-26 06:47:20 +00:00
lukem 6dd25eb757 Update to 20060923 for the following changes:
20060201
debug -> ftpd_debug
xstrdup -> ftpd_strdup

20060317
* Make sure that "su" is initialized before dereferencing it.
  Fixes Coverity CID 1075.
* Set file to NULL after calling fclose().
  Fixes Coverity CID 2669.
* Remove unreachable code (res could never be NULL here).
  Fixes Coverity CID 712.

20060509
change (mostly) int to socklen_t.  GCC 4 doesn't like that int and
socklen_t are different signness.

20060923
Apply patch from PR bin/33261 sent by FUKAOMI Naoki:
"ftpd does not update wtmpx".
2006-09-25 06:30:55 +00:00
xtraeme 47e7cfa9b7 Apply patch from PR bin/33261 sent by FUKAOMI Naoki:
"ftpd does not update wtmpx".

Thanks.
2006-09-23 16:03:50 +00:00
hubertf 5163058672 Handle .br - this makes processing of the netbsd-4
src/dist/bzip2/bzip2.1 file work:

Before:
	% getNAME /usr/cvs/src-4/dist/bzip2/bzip2.1
	bzip2, bunzip2 (1) - a block-sorting file compressor, v1.0.2 .br bzcat (1) - decompresses files to stdout .br bzip2recover (1) - recovers data from damaged bzip2 files

After:
	% getNAME /usr/cvs/src-4/dist/bzip2/bzip2.1
	bzip2, bunzip2 (1) - a block-sorting file compressor, v1.0.2
	bzcat (1) - decompresses files to stdout
	bzip2recover (1) - recovers data from damaged bzip2 files

Verified with code from src/share/man/man0 that nothing else was
broken by this change.
2006-09-12 21:56:43 +00:00
perseant a2ecf39b35 Pay attention to the new LFS_CLEANER_MUST_CLEAN flag in the Ifile. 2006-09-01 19:43:51 +00:00
christos e3b62f5882 Only include libutil if !HOSTPROG 2006-08-30 12:11:40 +00:00
simonb 676a630d08 Simplify multiple MACHINE_ARCH endian checks with single MACHINE_CPU
checks.
2006-08-27 07:22:02 +00:00
christos 5a7156cc58 use efun(3) 2006-08-26 18:18:16 +00:00
martin b4cb63a646 Make filehandles opaque to userland 2006-07-31 16:34:42 +00:00
martin a3b5baed42 Fix alignement problems for fhandle_t, exposed by gcc4.1.
While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.

Discussed on tech-kern, with lots of help from yamt (thanks!).
2006-07-13 12:00:24 +00:00
perseant 21393db687 Place an upper bound on the number of segments to clean at one time, no
matter how empty they are.

Note that if two blocks have the same inode and block number, they sort
the same (this should never happen, but if it does there's no reason to
have qsort scramble the list).

Add some diagnostic syslog messages for unusual cases.
2006-07-07 18:19:30 +00:00
skrll a238470b22 Add (back) -Wl,-static to the link. 2006-06-29 19:30:59 +00:00
simonb 428d37fad6 Fix unaligned loads and stores generated by gcc4. Problem described in
http://mail-index.NetBSD.org/tech-toolchain/2006/06/27/0001.html.
This cleaner version of the patch from Christos - thanks!
2006-06-28 16:48:38 +00:00
simonb 7d5684f475 Use .previous at the end of the NetBSD ident note so that we switch
back to the previous section.  Fixes build problems on MIPS with gcc4
and -g.
2006-06-13 13:55:58 +00:00
mrg 0f0f2b4e93 in _rtld_bind() initialise new_value for GCC4. 2006-05-23 16:27:41 +00:00
drochner eb92277cd7 sprinkle some __noreturn__ attributes, saves gcc4 warnings elsewhere 2006-05-22 19:49:09 +00:00
mrg d677e4a13a avoid more GCC4 uninitialised variable problems. (sh3 known, vax guessed.) 2006-05-21 04:17:35 +00:00
dan b995f58933 appease gcc4 uninitialiased warning
ok mrg.
2006-05-20 23:38:27 +00:00
mrg 82f7733046 in _rtld_bind() initialise result to appease GCC4. 2006-05-20 07:09:44 +00:00
christos df73c1693c Coverity CID 3766: Avoid null pointer deref 2006-05-19 14:46:17 +00:00
perseant 45dc123d6e Be more careful about checking return value of {m,re}alloc().
In determining when to stop reading segments when counting bytes (-b flag),
total the sizes of the blocks we're actually writing instead of assuming
they are all full blocks: many could be fragments or inode blocks.  This
increases the number of segments per Ifile write, markedly improving the
efficiency of the cleaner in the small file case.
2006-05-12 19:33:02 +00:00
mrg aadd7d4847 sprinkle some -fno-strict-aliasing and -Wno-pointer-sign with GCC4. 2006-05-11 23:16:28 +00:00
mrg 6daaa2e383 use a u_char[] when it is expected. 2006-05-11 12:27:21 +00:00
mrg bb50bce731 avoid some char * vs. u_char * issues. 2006-05-11 12:26:38 +00:00
mrg 4bc6feceb6 end the argument list to exec*(3) with a NULL instead of a bare '0', as
the latter isn't a pointer context in these varargs functions.
2006-05-11 00:22:52 +00:00
mrg 084c052803 quell GCC 4.1 uninitialised variable warnings.
XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
2006-05-10 21:53:14 +00:00
mrg 0c37c63edc change (mostly) int to socklen_t. GCC 4 doesn't like that int and
socklen_t are different signness.
2006-05-09 20:18:05 +00:00
blymn d791be4b46 New io statistics 2006-04-14 13:19:03 +00:00
perseant 0cdeebe9fa When checking hidden cleaning costs, don't erroneously add the first
indirect block when considering the cleaning of block numbers less
than NDADDR (which do not use indirect blocks).

Also, note the loss of only half a block per segment to fragmentation
when considering the benefit function, rather than a whole block.
2006-04-14 00:58:32 +00:00
chuck d09fe2c467 modified man(1):
- avoid double slashes when displaying man pages (got tired
   of '/usr/share/man//cat1/man.0').
 - got rid of __P() while working on it.
 - incorporate some of my old notes explaining how manpath works into the
   comments of the code itself.
 - renamed some of the vars so that the code is consistent throughout
   (and hopefully clearer and easier to understand)
 - fixed relative man paths for multiple man pages (man did a chdir()
   on the first man page it had to format --- this broke any remaining
   relative path man pages left to process).   save old directory and
   fchdir() back to it after formatting.
 - improved doc on "man -h" which does more than just whatis(1) [e.g.
   "man -h fopen" prints the required include files and the prototypes
   rather than just the one-liner you get with whatis(1)]
 - manconf.c now fills in the "len" length field in the TAG/ENTRY
   structures (man now uses len).

revise man.conf file reading stuff to return error on failure in
addentry/gettag (fka getlist) rather than just err()ing out.   this
allows man(1) to call cleanup and delete its tmp files rather than
just leave them floating.  revise other apps using this code
(makewhatis, apropos, catman, whatis) to expect this.  also remove
__P on updated files.
2006-04-10 14:39:06 +00:00
perseant 1b08b7c6a1 Look for the inode pointers in the right place if lfs_bsize != lfs_fsize. 2006-04-05 21:42:49 +00:00
perseant 2c3f7b46ba Handle the case of inode blocks misidentified by the segment headers
correctly, a problem reported by Kurt Schreiner; as well as similar
error cases (realloc returning NULL or no cleanable segments found).
2006-04-05 20:29:40 +00:00
skrll c965f60a50 Remove empty lines. 2006-04-03 13:23:15 +00:00
christos bfe8a650d3 Coverity CID 2792: Fix memory leaks 2006-04-01 23:53:11 +00:00
christos 2b955dc8fb Coverity CID 2846: Don't use LIST_FOREACH if you are going to free the cursor 2006-04-01 23:50:50 +00:00
christos f1e970a046 Coverity CID 2847: Don't use LIST_FOREACH if you are going to free the
current pointer!
2006-04-01 23:48:56 +00:00
perseant 260a2c76af Document -i option, update date; at the request of wiz@. 2006-04-01 08:44:57 +00:00
perseant 9c75397609 A new version of the cleaner. In general, works about as well as the old
cleaner, but with more legible code.

Includes code for reading and writing to the raw disk device (so that an
unmounted fs could be cleaned), for the use of a single daemon to clean
multiple filesystems to save on resources, and for recording the old
contents of cleaned segments to offline storage for regression testing of
the LFS system as a whole; though these new features are not properly
tested at this point.
2006-03-30 19:10:13 +00:00
wiz 2bb817a755 Remove more references to kerberosIV. 2006-03-23 20:14:16 +00:00
christos 0339fe6614 Coverity CID 2749: Fix another double free. Instead of removing that last
free() call, change the allocation policy to leave the responsibility for
allocation/freeing the pathname to _rtld_map_object(), instead of having
the caller allocate it and _rtld_map_object() free it. This simplifies the
code a lot and it is more efficient.
2006-03-21 17:48:10 +00:00
christos 85e611dd01 Goodbye KerberosIV 2006-03-20 04:03:10 +00:00
christos 458b13dee7 Coverity CID 923: Avoid NULL deref. 2006-03-18 23:09:34 +00:00
matt ba8a81077b Fix some double frees / missing frees / use after freed all
relating to _rtld_load_object.  Fix Coverity CID 2601, 2600.
2006-03-18 02:34:30 +00:00
peter 9665e92dcd Remove unreachable code (res could never be NULL here).
Fixes Coverity CID 712.
Ok by lukem@.
2006-03-17 21:28:21 +00:00
peter ee7f54fae4 Set file to NULL after calling fclose().
Fixes Coverity CID 2669.
Ok by lukem@.
2006-03-17 21:26:55 +00:00
peter 243139ee37 Make sure that "su" is initialized before dereferencing it.
Fixes Coverity CID 1075.
Ok by lukem@.
2006-03-17 21:24:33 +00:00
elad 237c0ec2a5 Fix three off-by-ones found by Coverity. CID 1444, 1445. 2006-03-17 02:12:15 +00:00
skrll 9f6658b9ff Remove the LD_BIND_NOW item 2006-03-04 09:00:22 +00:00
skrll 125d6a43ac Add LD_BIND_NOW support for mips.
This is the last arch to be done so remove the large ugly #if defined()
stuff in reloc.c.
2006-03-04 08:58:46 +00:00
wiz 5d1e8b2745 Fix some typos. 2006-02-25 02:28:55 +00:00
rpaulo 94ef983148 Remove -Wl,-non_shared (same meaing as -static). 2006-02-03 02:01:19 +00:00
he b4eeee2a61 Make the debug variable static, to accomodate static linking with libssh.a. 2006-02-02 18:31:12 +00:00
christos 1edbda9a2e debug -> ftpd_debug
xstrdup -> ftpd_strdup
2006-02-01 14:20:12 +00:00
skrll 39aae79d93 Bring across a change from FreeBSD from back in 1998:
"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."

"printf" isn't true for us, but various libc symbols are, e.g. "malloc".

Fixes PR 32074 as noted by uwe@

OK'd by christos@
2006-01-12 22:40:17 +00:00
uwe a35d2a5b09 Add some comments. 2006-01-11 22:24:34 +00:00
uwe e7102691a2 Kill trailing whitespace.
Indent delay slots.
2006-01-11 22:05:27 +00:00
uwe b98cf46363 _GLOBAL_OFFSET_TABLE_ is only used if RTLD_DEBUG, so wrap its
declaration too.

32-bit SuperH can not pretend that _GLOBAL_OFFSET_TABLE_ is a normal
variable, because of the way PIC variable references is generated, but
as compiler arranges for _GLOBAL_OFFSET_TABLE_ address to be in r12
anyway, just use that value by declaring it as a global register
variable.  Makes sh3 compile with RTLD_DEBUG.
2006-01-11 21:40:12 +00:00
christos 7f94fc6d62 PR/25605: Frank Kardel: getty leaves ttymodes at read login state when
exec-ing pppd. Fixed as suggested.
2005-12-28 09:43:05 +00:00
perry 0db47b5ca1 bare asm -> __asm 2005-12-24 21:51:51 +00:00
perry ae6ae2c362 Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:56:41 +00:00
lukem 03353d54d6 NLST should return 450 instead of 550 upon error, per RFC 959. 2005-11-24 23:47:23 +00:00
christos ef66965d63 Deal with fts errors properly. 2005-11-18 17:12:09 +00:00
christos 8f1498a599 - Don't use a stale errno when printing an error
- Redo all error printing using varargs
- KNF
- More descriptive error messages
2005-10-31 16:15:42 +00:00
christos 1cb716844a Don't use hard-coded values for nobody. Specially ones that don't match
what /etc/group has.
2005-10-31 15:46:50 +00:00
skrll bd7cbb198e Correct the lookup order of _rtld_symlook_default and make
_rtld_find_symdef use _rtld_symlook_default.

This reduces the code size and means that dlsym(RTLD_DEFAULT,...) has the
correct lookup order.

Reviewed by kleink. Thanks.
2005-10-13 11:14:09 +00:00
lukem d7a2bc3a39 logxfer(): don't use the same buffer to store the results of two separate
concurrent realpath(3)s, otherwise we'll log the wrong information
for a rename.
Noted by Dmitry Sivachenko in private mail.
2005-10-03 00:02:25 +00:00
lukem 7ea2be42e0 Fix comment about DEFAULT_UMASK.
Pointed out in private mail by Tetsuya Isaki and Dmitry Sivachenko.
2005-10-02 23:03:04 +00:00
chs 0c6e4dbbc4 ok, the change from rev 1.33 was unnecessary after all,
only the second part of the previous revision was needed.
put the logic for the initial icache invalidation of the PLT
back the way it was, but in a way that makes clearer what's going on,
and add some comments explaining it.
2005-09-27 07:20:32 +00:00
chs 96fb424f44 fix two problems with icache invalidation of the PLT:
- restore revision 1.33, it was correct.
 - fix pointer arithmetic in other calls to __syncicache().
2005-09-26 05:45:13 +00:00
tron 19577e1cae Reject unformatted manual pages with "[" characters in the description
because "makewhatis" cannot handle nroff macros properly. This fixes
the result of "apropos chrtbl". Problem pointed out by wizd(8)
in private e-mail.
2005-09-15 14:20:01 +00:00
wiz 0768214245 Remove duplicate line. From YOMURA Masanori in private mail. 2005-09-11 23:31:46 +00:00
wiz 03f5a25275 Fix typo. 2005-09-10 22:18:27 +00:00
elad 83057dc7cc Don't chown/unlink uninitialized lockfile if not uugetty.
From Dr. Wolfgang Stukenbrock, PR/31040.
2005-09-10 21:29:36 +00:00
ginsbach 818f7caa4b * Add recvbufsize configuration option
This allows for setting the passive socket's SO_RCVBUF.  Option works
  similarly to the current sendbufsize configuration option.
* Change how recveive_data() works
  When reading data from the socket for passive transfers to the server,
  receive_data() now works very similar to send_data_with_read().  Reads
  from the network are now done using either the filesystem block size or
  the configuration option readsize chunks.
* Crank version.h
  [Changes discussed with lukem.]
2005-08-24 15:51:41 +00:00
christos fdd5a2fbdd Change PRiu64 with a cast and %llu. I am not using PRIu32 and no cast for
now. I will do so in a separate pass that will fix all the inode printing.
2005-08-23 05:55:29 +00:00
skrll 680596d08e Add __RCSID. 2005-08-20 19:01:16 +00:00
kent 8dbae00531 fix compilation problem on LP64 2005-08-20 14:58:34 +00:00
christos d05efd58f3 64 bit inode changes. 2005-08-19 02:06:29 +00:00
skrll 9f486044a0 KNF 2005-08-15 10:52:42 +00:00
wiz d531be345e Sort options. 2005-08-07 11:13:34 +00:00
peter 1723484e06 Implement option "-D", for running ftpd in standalone mode (daemon).
ftpd will listen on the default FTP port for incoming connections and fork
a child for each connection.  This is lower overhead than starting ftpd from
inetd(8) and thus might be useful on busy servers to reduce load.

Inspired by FreeBSD.
Reviewed by lukem@.
2005-08-04 17:41:35 +00:00
christos 5ef1593468 Cleanup and make the arrays dynamically resizable. This will help for
only version 3, because version 2 is still artificially limited to MAXUSERS.
2005-08-01 21:08:34 +00:00
skrll 5f0dd3a852 Add support for immediate PLT binding on SH5. Compile tested only as
shared libs don't actually work on SH5 (yet).

OK'd by Steve Woodford.
2005-07-28 12:35:21 +00:00
skrll 57e00bf69e Support immediate PLT binding on powerpc. Thanks to Simon Burge for
testing.

I can see the finish line...
2005-07-28 10:54:30 +00:00
skrll 56d4febf60 Support immediate PLT binding on m68k. Tested on NetBSD/sun3 using the new
version of tme.

Not far now...
2005-07-26 15:43:34 +00:00
lukem 81d2b1e480 Crank version for Christos' utmpx/wtmpx changes on 20050623 2005-07-26 05:43:07 +00:00
skrll 51c5e03c82 Support immediate PLT binding on vax. Tested on simh.
Nearly there...
2005-07-24 08:02:23 +00:00
christos 70b85ad925 Don't do things you are not supposed to inside a signal handler. 2005-07-18 04:01:33 +00:00
skrll 16044f3d38 Support immediate binding on x86_64.
Closes PR 30570. Thanks to TAMURA Kent for testing.
2005-07-17 05:57:21 +00:00
christos 286ad449da sprinkle little const. 2005-06-26 20:47:08 +00:00
christos ea7965eb77 cleanup utmp and utmpx support.
- make them symmetric
	- add a function to open the wtmp file explicitly very early in the game
2005-06-23 04:20:41 +00:00
lha 3baf9430ad Remove static local variable so its easier to correctly use strlcpy. 2005-06-21 22:29:53 +00:00
peter f1cc466245 Add RCSID. 2005-06-14 12:18:24 +00:00
peter 23b24500dc Minor cleanup:
- remove the silly limit of 490 chars in change_format
- improve the timeout message
- delint (where it makes sense)
2005-06-14 12:17:13 +00:00
fair af23ff4dbb appease gcc -Wuninitialized 2005-06-08 00:19:18 +00:00
he 7ed57630be Initialize a bunch of local variables in _rtld_relocate_nonplt_self().
Found by -Wuninitialized while compiling for newsmips.

Reviewed by lukem.
2005-06-07 09:20:19 +00:00
chs 7bbdd188e1 appease gcc -Wuninitialized on hp700. 2005-06-05 19:08:28 +00:00
lukem 3ed9ffcae1 Explicitly prefix ld(1) options in LDFLAGS with "-Wl," rather than
using the ${LDFLAGS:@F@-Wl,$F@} make substitution because that breaks
if LDFLAGS is already set.
2005-06-04 16:17:17 +00:00
lukem d066333b1b Ensure IF is initialized before trying to use it.
Found with -Wuninitialized.
2005-06-01 15:57:40 +00:00
lukem c76b26e527 Shouldn't use += on a variable that we haven't initialized yet ...
Found with -Wuninitialized.
2005-06-01 15:55:31 +00:00
lukem 818f7c82fa appease gcc -Wuninitialized 2005-06-01 15:51:23 +00:00
lukem a8ce874400 Ensure rval is initialized before we try to check it; it won't be set
if AL or NN are in use.
Detected with gcc -Wuninitialized.
2005-06-01 15:50:00 +00:00
lukem a50c8ab399 Add some sanity checking inspired by gcc -Wuninitialized. 2005-06-01 14:57:22 +00:00
lukem a12d17494d appease gcc -Wuninitialized 2005-06-01 14:14:55 +00:00
skrll 9c5ec319c5 Support LD_BIND_NOW on sh3.. 2005-05-31 19:30:38 +00:00
skrll 13901ecdef Support LD_BIND_NOW for alpha. 2005-05-25 13:39:46 +00:00
christos 057e8f6aa6 Support VEOL2 and VSTATUS 2005-05-21 17:18:51 +00:00
skrll 504512d318 Copyright maintenance. 2005-05-21 06:43:39 +00:00
peter 9641151edb Remove the zombie reaper and set SIG_IGN on SIGCHLD. We won't get a zombie
when the child exists this way and it should also fix the race condition
as mentioned in PR bin/30253 from Patrick McPhee.

Approved by christos.
2005-05-18 00:31:32 +00:00
chs 14480c4191 in _rtld_is_exported(), use a function pointer type instead of Elf_Addr
so that hppa knows to do the plabel thang.
2005-05-10 13:15:56 +00:00
christos a6bb85932c PR/30170: Markus W Kilbinger: src/libexec/comsat complains about: '/' in
"/dev/pts/1"
2005-05-07 23:37:59 +00:00
lukem 2bfc59a549 use _PATH_DEV instead of "/dev/" 2005-05-05 01:28:57 +00:00
christos 467d3a1e76 remove bogus frees on uninitialized variable. 2005-05-03 00:20:17 +00:00
christos 01592c7cfe not supporting %c is confusing and it only uses up a few bytes. 2005-04-24 21:11:58 +00:00
perseant 2f695b5476 Provide a resize_lfs(8), including kernel and cleaner support. The current
implementation requires the fs to be mounted while resizing.  Tested in both
directions, and everything appears to work happily, but ymmv.
2005-04-23 19:47:51 +00:00
christos cce62d0952 check pwd != NULL 2005-04-19 03:22:54 +00:00
christos 857a611be2 s/getpwnam/sgetpwnam/ Found by John Nemeth. 2005-04-10 08:21:36 +00:00
peter 914d68e290 Fix a typo; some minor nits and tweaks; add a CAVEATS section which
describes where identd needs access to when using certain flags.
2005-04-04 18:43:55 +00:00
wiz 4dd1b491d0 Sync usage with man page. 2005-04-04 08:13:52 +00:00
wiz 0652314a20 Some cleanups, use more markup. 2005-04-04 08:13:27 +00:00
peter f90aa792d5 Add forward/proxy support to identd(8).
Approved by christos.
2005-04-03 22:15:32 +00:00
christos 183cc62f03 Make it parse old man pages, new mdoc pages, broken pages, and pages where
the synopsis line does not give us the section number. Add -w flag to print
pages we still don't like. Now we parse 99% of the pages properly.
2005-04-03 21:32:45 +00:00
christos 715420b601 remove debugging printfs. 2005-04-03 20:31:18 +00:00
christos 79519a3a20 Cat pages end up looking like "page -- description", so substitute "--" for
the section page. This makes things look right again, and avoids duplicates.
2005-04-03 20:30:39 +00:00
xtraeme dc7d7d7780 Add missing flags to usage() 2005-03-30 21:28:30 +00:00
christos 8ec5371f02 - use getpwnam_r 2005-03-30 01:33:30 +00:00
christos 2e7a44f29b - KNF fixes from John Nemeth
- Use getpwnam_r because pam may use getpw* and overwrite the static area
  (from FreeBSD)
2005-03-30 01:07:47 +00:00
christos 6e498d006d KNF, WARNS == 3. Reported by John Nemeth 2005-03-27 21:00:58 +00:00
christos 6cb3c8e4eb Handle printing ptyfs pty names 2005-03-17 01:34:41 +00:00
christos 00e4cd7dc0 print ptyfs ptys properly. 2005-03-17 01:25:40 +00:00
christos a646be989c Handle the regular case too, not only the error case. 2005-03-13 01:48:54 +00:00
christos bb8740ddcf - Don't call pam functions after pam_end().
- Only call wait for our own pid.
- Improve error checking.
- Reorder some code to minimize diffs with FreeBSD.
2005-03-12 18:23:30 +00:00
ginsbach 98d24e6cc9 Remove unnecessary cast. 2005-03-11 16:04:09 +00:00
peter 6e30b59e96 Some minor cleanup:
* Improve some comments and (error) messages.
* Use EXIT_FAILURE and EXIT_SUCCESS.
* Add function `maybe_syslog' (only log when -l is enabled).

Reviewed by christos.
2005-03-11 15:49:52 +00:00
wiz 4b98ca48e7 Sort options. 2005-03-09 16:43:37 +00:00
wiz 13966518a6 Bump date for previous, and some minor cleanup while here. 2005-03-09 16:42:49 +00:00
hubertf f396f9eb19 * Add ssh(1), sshd(8) and hosts_access(5) to SEE ALSO list.
(What would one look at for Kerberos?)
 * Be a bit more explicit about the security implications of rsh & friends,
   as suggested by Steven M. Bellovin and OK'd by Christos Zoulas
2005-03-09 07:49:08 +00:00
christos ceb0805a9b Add -lcrypt where -lcrypto is specified. 2005-03-09 03:11:21 +00:00
christos a2ee5dcfcc Avoid source routing ip options. Described in:
http://www.citi.umich.edu/u/provos/papers/secnet-spoof.txt
2005-03-08 04:35:19 +00:00
he 5152518685 Add -lcrypt to link lines for applications using -lkrb5, so that they
link successfully when MKPIC=no, as is always the case for our ports
which do not support shared libraries.

Discussed with thorpej and christos.
2005-03-04 20:44:55 +00:00
he 8e8728c45c Introduce PAM_STATIC_LDADD and PAM_STATIC_DPADD. When compiling
with MKPIC=no, possibly because the target does not support shared
libraries, these include libraries required to resolve all symbols
which end up referenced from PAM-using applications.  The libraries
presently required are -lcrypt, -lrpcsvc and -lutil.

Add use of these variables which are currently set up to use PAM,
so that they compile when MKPIC=no.

Also, in the telnetd case, reorder the order of the libraries, so
that libtelnet.a comes before -ltermcap and -lutil, again to fix
link error when MKPIC=no.

Discussed with thorpej and christos.
2005-03-04 20:41:08 +00:00
ginsbach f0b5287312 * Add hidesymlinks configuration option
This adds a -L to all ls command arguments so that the file or directory
  the link references is listed rather than the link itself.  This was
  inspired by IRIX ftpd's -S option.
  [Discussed with lukem some time ago.]
* Crank version.h [right Luke? :-)]
2005-03-03 22:19:47 +00:00
christos aa73cae196 Add a few lines of code to print the output from the remotely executed program. 2005-02-27 01:34:07 +00:00
skrll f5ee31d050 Update and be more descriptive about one of the machine specific #ifdefs 2005-02-26 22:26:18 +00:00
perseant 6e52bfc264 Various minor LFS improvements:
* Adapt lfs_cleanerd to use the fcntl call to get the Ifile filehandle,
  so it need not be in the namespace.
* Make lfs_cleanerd be more careful when there are very few available
  segments.
* Remove the Ifile from the filesystem namespace.  The cleaner now uses
  a fcntl call on the root inode to find the Ifile filehandle.
* Make lfs_cleanerd less verbose when the filesystem is unmounted.
2005-02-26 05:43:04 +00:00
christos 81e0d2b0af Add an example program that tests rexecd... I really don't want to encourage
its use though.
2005-02-23 01:27:32 +00:00
christos 62136d5653 PAMify: From John Nemeth with fixes from me. 2005-02-23 01:25:50 +00:00
christos 5029779902 Add pam glue. 2005-02-20 08:52:10 +00:00
christos 216d8f75cc Add missing goto badlogin; noticed by: Hisashi T Fujinaka 2005-02-20 06:11:51 +00:00
christos 6b2a62b742 PAMify. 2005-02-20 05:45:55 +00:00
christos 99fd5044d3 Add PAM and LOGIN_CAP support. Mostly from FreeBSD. If pam is defined,
then we don't fall back to other authentications even if PAM fails due
to a system error (e.g. configuration problem).
2005-02-20 01:45:17 +00:00
agc f27acbf4fc Make this compile after the de-__Ping round. 2005-02-06 17:30:33 +00:00
perry 4b90129081 de-__P, ANSIfy function declarations, remove obsolete "register" declarations. 2005-02-06 05:58:20 +00:00
perry 4c57dc9906 de-__P, ANSIfy function declarations, remove obsolete "register" declarations. 2005-02-06 05:11:52 +00:00
martin d7931a6191 Quote symbol names in a debug message (to make it easier to spot an empty
symbol name, a common failure mode)
2005-01-11 21:58:27 +00:00
martin d977618dcf Backout -DDEBUG that I accidently commited with the last change 2005-01-11 07:47:37 +00:00
ginsbach e793dd138a Fix thinko with last commit. 2005-01-10 19:01:09 +00:00
lukem 1e281ed227 Only #define HAVE_IPV6 if ${USE_INET6} != "no". 2005-01-10 03:11:17 +00:00
lukem 7157011597 Only compile in IPv6 support if ${USE_INET6} != "no"
MKINET6 is for providing IPv6 infrastructure.
USE_INET6 is for compiling IPv6 support into the programs (needs MKINET6).
2005-01-10 02:58:58 +00:00
martin 0a1196da3e Add LD_BIND_NOW support for sparc and remove some relocation types that
are not supposed to happen in 32bit code.
From Nick Hudson.
2005-01-09 14:58:15 +00:00
simonb c364c98f98 Don't process DT_DEBUG on MIPS as the dynamic section is mapped
read-only.  DT_MIPS_RLD_MAP is used instead.

Patch from Nick Hudson.
2005-01-09 12:43:23 +00:00
ginsbach 3596f57f42 ANSIfy; de-__P(); use STD*_FILENO rather than `magic' numbers 2005-01-08 03:14:02 +00:00
lukem 53eddbb6b4 Reorder some declarations so that parsers generated by bison can compile.
Fix from Michael Richardson.
2005-01-05 10:31:27 +00:00
martin 995d8a8e4b Add support for unaligned relocs on sparc, from PR 26858.
Should also fix PR 25901 and PR 18296.
2005-01-05 09:18:53 +00:00
martin 35130888e4 Add LD_BIND_NOW support for sparc64. 2005-01-05 09:16:03 +00:00
lha a0dab7aa39 Move linking with libdes to the common kerberos section since
libtelnet depends on the old des functions.

From Jukka Salmi in NetBSD pr misc/28727
2004-12-22 01:25:05 +00:00
mycroft ac7236712a ELF32_ST_TYPE -> ELF_ST_TYPE 2004-12-17 10:53:27 +00:00
skrll 38fb01be3a Apply fixes from Charles:
- Fix how _rtld_relocate_nonplt_self deals with REL32 relocations.

- Change the assert so that it is correct for binutils 2.14 and 2.15.

There are still problems with the libraries generated with binutils 2.15,
but at least ld.elf_so doesn't crash.
2004-12-15 10:26:29 +00:00
christos d465dbd49e change _PATH_FOO to _NAME_FOO where FOO is not a path. I'll discuss with
luke what is the best way to fix this.
2004-12-11 18:37:26 +00:00
ginsbach 93b00943e9 Fix inverted test for expired passwords. Mea culpa. 2004-12-09 20:58:39 +00:00
christos 2b9d36c223 PR/28473: Jed Davis: telnetd loses data and corrupts crypto state due to
typo in use of poll(). There was an && instead of an & (hi charles)
2004-11-30 04:13:43 +00:00
ginsbach 0211645da7 * Don't allow accounts with age expired passwords to login. Any account
that is required to change their password will not be allowed FTP
  access.  Inspired by similar functionality in other FTP daemons.
  (approved by lukem)

* Crank version to 20041119 per lukem's request.
2004-11-19 16:03:58 +00:00
soren c7dab32bb3 The /bin/rmail compat link has been in several major releases now. 2004-11-17 00:33:45 +00:00
itojun da88342476 NI_WITHSCOPEID was not picked up by IETF standardization process 2004-11-16 06:04:12 +00:00
christos c2edf6628e Oops, always store a full struct sockaddr_storage. 2004-11-15 21:01:18 +00:00
christos b904cdf4f6 - use sockaddr_storage directly.
- socklen_t instead of int.
- check ss_len for validity.
- pass -a to login so that it can record the address we've logged in from.
- constify.
2004-11-15 20:45:52 +00:00
christos 8b4b693dbe Pass -a [srrvis'd struct sockaddr] to login, so that login can record the
address where we have logged in from.
2004-11-14 18:07:56 +00:00
yamt 096fec04a9 move pf reachover makefiles into usr.sbin/pf. ok'ed by itojun.
before:
	sbin/pfctl
	usr.sbin/authpf
	usr.sbin/spamdb
	libexec/ftp-proxy
	libexec/spamd
	libexec/spamd-setup
	libexec/spamlogd
after:
	usr.sbin/pf/pfctl
	usr.sbin/pf/authpf
	usr.sbin/pf/spamdb
	usr.sbin/pf/ftp-proxy
	usr.sbin/pf/spamd
	usr.sbin/pf/spamd-setup
	usr.sbin/pf/spamlogd
2004-11-11 11:54:51 +00:00
yamt ce23bf1813 reduce diffs from the original, using dummy impl. of openlog_r and syslog_r. 2004-11-11 11:27:34 +00:00
yamt 7bd6643839 add a comment for ipf.c 2004-11-11 10:30:13 +00:00
yamt 93086a3d8d revert a function rename/move.
this kind of change is not appropriate for sources under dist/.
2004-11-11 09:49:59 +00:00
christos 3b40bfaefe Don't write trash in ut_ss; either initialize it to 0, or put in the proper
information.
2004-11-11 01:14:10 +00:00
christos b22902b65d Use non-blocking I/O when opening the tty. Otherwise we can get stuck... 2004-11-07 07:04:31 +00:00
dsl 1869f0e146 Add (unsigned char) cast to ctype functions 2004-11-05 21:56:01 +00:00
dsl 55d39107c6 Add (unsigned char) cast to ctype functions 2004-11-05 21:45:36 +00:00
dsl 49f7d8a9b1 Add (unsigned char) cast to ctype functions 2004-11-05 21:30:31 +00:00
dsl 076dc10086 Another (unsigned char) cast - for ldconfig 2004-10-28 20:18:48 +00:00
skrll 2728318e3c Add __RCSIDs.
OK'd by mycroft.
2004-10-22 05:39:56 +00:00
christos 5ec878616d Remove stray -I, noted by Adam Ciarcinski 2004-10-14 00:14:52 +00:00
christos 99e43e6d35 Fallout from ipf move.
Forgot to commit that one [oops]
2004-10-01 20:01:51 +00:00
christos 985ed5b767 PR/27097: John Klos: Talk daemon does not find additional ttys for
a particular user if the first tty is not writable. This broke in
revision 1.9 when it was strl'ified incorrectly (hi itojun). Thanks
to enami for spotting this.
2004-10-01 12:27:09 +00:00
martin b2772db1b0 Fix off by one reported by David A. Holland in PR bin/26778. 2004-09-15 08:44:02 +00:00
uwe 255de8f40e Preserve r2 in _rtld_bind_start - in r2 functions that return
aggregate types are passed the address of the memory area to store the
returned result to.

Fixes PR port-sh3/26949.
2004-09-14 21:34:01 +00:00
jrf 190b2e4c51 Replaced strncpy with strlcpy. Thanks to Peter Postma who
pointed them our in PR #25762. Approved by christos@NetBSD.org.
2004-09-07 13:20:39 +00:00
rearnsha 3fa803b523 Check the type of symbols; if it's a Thumb function, then set the Thumb
bit in the relocated value (JUMP_SLOT, ABS32 & GLOB_DAT).
2004-08-21 11:14:07 +00:00
rearnsha c3e148044f Use BX if available. 2004-08-21 11:12:03 +00:00
lukem 635a375704 Fixes from (or inspired by) OpenBSD:
* Fix yacc parser error recovery so that setjmp(3)/longjmp(3) is unnecessary.
* Fix SIGURG handler to set an urgflag that's later tested, rather than
  abusing setjmp(3)/longjmp(3).
* Use "volatile sig_atomic_t" as the type of variables modified by sig handlers.
* Use sigaction(3) instead of signal(3) to set the signal handlers.
* Only set the main SIGALRM handler once.  If we need to change it,
  cache the old handler and restore appropriately...
* Remove a bunch of signal races by improving the signal handlers.
* Fix memory leak with 'ESPV ALL'.

My stuff:
* Clean up the debug message in reply(); use vsnprintf(3) instead of vsyslog(3).
* Rework parsing of OOB commands to _not_ use the yacc parser, since the
  latter isn't reentrant and the hacks to work around that are ugly.
  We now examine urgflag at appropriate locations and call handleoobcmd()
  if it's set.  Since the only OOB commands we currently implement are
  ABOR and STAT, this isn't an issue.  (I also can't find the reference in
  RFC2228 where MIC, CONF & ENC are OOB-only commands.  Go figure.)
  I could clean up the is_oob stuff some more, but the remaining stuff
  in ftpcmd.y is harmless and it's unnecessary churn right this moment.
2004-08-09 12:56:47 +00:00
kim 7e384e20a9 The "FORMAL SYNTAX" on RFC-1314 (page 5) does not show any spaces
around the delimiters (commas and colons).  Also, at the end of
the "RESPONSE TYPES" section for "USERID" it is explicitly noted
that any spaces after the colon following the OSTYPE field *are*
part of the identifier.
2004-08-05 18:05:22 +00:00
pk facc7352d1 Newly built binary from netbsd-1-4 sources + arch/sparc/mdprologue.S, rev 1.8.
Workaround for non-executably mapped PLT in the data segment.
2004-07-20 10:17:50 +00:00
thorpej 2a63e04007 - Change the strong dlfcn names in libc to ___name, and make the __name
versions used by others in libc weak, so that we have:
	name: weak
	__name: weak
	___name: strong
- Add __name strong aliases of the dlfcn names in ld.elf_so, so that we have:
	name: strong
	__name: strong

This allows ld.elf_so to self-resolve both the name and __name variants
of the dlfcn functions, the former being required for dlfcn support in
applications, the latter being required for dlfcn support in libc.

Fixes the problem described in:

    http://mail-index.netbsd.org/tech-toolchain/2004/07/17/0000.html

Reviewed by Nick.
2004-07-18 17:26:19 +00:00
wiz 9074ea7ce0 Code is not using gethostbyaddr any longer, but getnameinfo.
Fix references. Addresses part of PR 26337 by Peter Postma.
2004-07-17 18:34:01 +00:00
wiz 6387678427 Bump date for previous. 2004-07-17 18:33:23 +00:00
wiz 24d271a979 Code is not using gethostbyaddr any longer, but getnameinfo.
Fix references. Addresses part of PR 26337 by Peter Postma.
2004-07-17 18:32:23 +00:00
petrov 1ee4832b70 Don't print relocated content (in DEBUG mode) as it can cause
misaligned access. It needs to be done differently if needed at all.
Fix PR port-sparc64/20907.
2004-07-17 05:03:33 +00:00
lukem 2b8830ba06 Correctly clamp illegal "SITE CHMOD" mode values. From OpenBSD. 2004-07-16 08:29:28 +00:00
lukem 0cd997a9f7 Fix minor memory leak with fromname. Inspired by OpenBSD. 2004-07-16 03:31:51 +00:00
chs ec3d29dac4 add some instructions at the top of rtld_entry() that use mprotect()
to make ld.so's data segment executable.  this is needed because the PLT
is in the data segment and we actually honor the execute permissions now.
2004-07-15 03:00:21 +00:00
enami 150b25198e Whitespace nits. 2004-07-10 07:11:38 +00:00
enami af9fc9cd10 Use strtoimax rather than strtol to parse a number which represents
an offset in a file.  long is insufficient on some architecture.
Problem noticed by Atsushi Onoe while ago.
2004-07-10 07:10:43 +00:00
christos f61a35eaaf stat the right file. 2004-07-10 04:00:09 +00:00
enami 66820706e0 No need to pretty print the errno with err() or warn(). 2004-07-10 00:00:58 +00:00