Commit Graph

2359 Commits

Author SHA1 Message Date
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
cube d1b3d841ee Make ld.elf_so use the new sysctl API. That allows the user to give any
sysctl variable name in /etc/ld.so.conf.  It also makes the ld.elf_so
binary slightly smaller (at least on i386), and has no impact on
performance.

Fixes PR 26100.
2004-07-05 11:50:07 +00:00
kleink 25662013ee Add the kernel to the includes search path; ipf.c depends on it. 2004-07-01 01:41:16 +00:00
darrenr b8785aabcf Modify ftp-proxy to support both ipfilter and pf. It now requires at least
one command line option to specify which firewall it is meant to interact
with.  The implementation here puts the firewall specific code into separate
files with markers for future changes that could enable a fully transparent
mode for non-private network proxying.
2004-06-30 13:29:43 +00:00