Commit Graph

1900 Commits

Author SHA1 Message Date
perry 01788f947d behaviour->behavior
I actually really like the UK spelling on this, but consistency among
our man pages is also a virtue.
2003-03-31 17:05:12 +00:00
perry 29e8ef357f spell fixes (most from me, one from Igor Sobrado in PR misc/19700) 2003-03-31 01:51:01 +00:00
jdolecek bcc4e12368 s/USER-ID/USERID/ in response when -L is used
fixes PR bin/20911 by der Mouse
2003-03-27 22:32:59 +00:00
scw e6b13790fa SH5 needs __HAVE_FUNCTION_DESCRIPTORS defined in order for ld.elf_so
to resolve SHmedia function pointers correctly.
2003-03-26 14:46:32 +00:00
scw d174ad2eab Add support for shared libraries/dynamically linked binaries on sh5.
With the latest SuperH toolchain, NetBSD/evbsh5 can now
run with a fully dynamic userland (modulo a few remaining
gremlins affecting a couple of binaries).
2003-03-25 13:11:53 +00:00
wiz 83de4abed2 Use "its" instead of "it's" where appropriate.
From Soren Jacobsen in PR 20730.
2003-03-15 23:48:27 +00:00
wiz a6bd266319 Correct spelling of "preferred". From PR 20716 by Igor Sobrado. 2003-03-15 19:15:58 +00:00
hannken a775363fd5 Dont call gettimeofday on a rpc timeval.
This fails on sparc64 because rpc timeval elements are int
and timeval elements are long.
2003-03-09 10:33:04 +00:00
taca 28d2056e12 make it compile in /usr/src/rescue directory. 2003-03-06 17:01:27 +00:00
matt 7b28c56025 Align psections to their specified alignment (if possible). Use
mmap(2) MAP_ALIGNED.
2003-03-06 07:34:56 +00:00
dsl 0e023253c0 Call setsid so we get our own logname.
(approved by christos)
2003-03-03 19:05:09 +00:00
dsl 41880aca75 Call setsid so we don't change inetd's logname (and that of our peers).
(approved by christos)
2003-03-03 18:57:53 +00:00
dsl 2bc2d2208d Call setsid() before (setusercontext() calls) setlogin() so we don't change
the username of inetd and everyone else that is logged in.
(approved by christos)
2003-03-03 18:29:55 +00:00
dsl de1c071819 Call setsid() so that setlogname doesn't affect our parent and siblings.
(approved by christos)
2003-03-03 17:14:36 +00:00
lukem b018fb8971 Don't declare "yylex()" static; AFAICT it shouldn't be, and it causes
build problems with the output of some versions of yacc.
2003-03-03 02:14:57 +00:00
lukem 2cc6fff994 Fix typos accidentally introduced in rev 1.70 as part of the large
number support.
(NetBSD yacc didn't barf on these, although Solaris and HP/UX's did...)
2003-03-03 01:52:13 +00:00
mycroft 7cbba1750d Shorten rtld_start() by 2 instructions or 8 bytes, and make it not use GOT
entries.
2003-03-02 22:56:14 +00:00
mycroft d2fd5f837d Shorten rtld_start() slightly -- there's a base-relative _DYNAMIC pointer at
the beginning of the GOT, so we don't need an extra one here.  Also, remove a
bogus comment -- we do in fact have to do fixups, because there are pointers in
ld.elf_so's data segment that need to be relocated.
2003-03-02 22:03:40 +00:00
perseant 5646727e5a Let the cleaner use LFCNRECLAIM to help empty segments along, if it
thinks it needs to clean and segments are tantalizingly lingering
in the "empty but dirty" state.
2003-03-02 04:38:20 +00:00
mycroft 33131cb294 Update copyright. 2003-03-01 15:14:59 +00:00
christos 861ff9be73 we have constants for all this crap. don't hard-code things. 2003-02-28 23:05:24 +00:00
mycroft 9939b38056 Eliminate GOT usage in rtld_start() on this platform, too. 2003-02-28 22:37:35 +00:00
thorpej 527c1efca7 Use the "__NetBSD_Version__" constant rather than the "NetBSD" constant
in the NetBSD version note.  The old "NetBSD" constant was stuck in stone,
and thus didn't really convey any useful information.
2003-02-28 18:20:33 +00:00
mycroft 9cb7d16b11 Similar to other rela platforms, do not use any GOT entries (other than the
first entry, which is a special case) in rtld_start, because they could be
all 0s.  Instead we use the difference between the real _DYNAMIC address
(which we can determine on 68k with a "lea (%pc,_DYNAMIC),..." and the
base-relative one (at the beginning of the GOT) to figure out the relocation
offset.

Not needed for binutils-current, but I might as well fix it now.
2003-02-28 07:06:16 +00:00
lukem ceba77be0a it's actually 2003 ... 2003-02-28 03:06:14 +00:00
mycroft eea1001a73 Adjust for the fact that the GOT is all 0s in new binutils -- do the trick of
disassembling a call to _DYNAMIC to determine its real address, and using the
first entry of the GOT as its base-relative address.

It's evil, but it works.
2003-02-27 05:39:42 +00:00
christos dc7c6aef2a The following changes make ftpd able to remove its own entries. Ftpd
calls pututxline() with ruid = 0, euid = current-ftp-user. This ends
up calling update_utmp:
- if the real uid is root, don't do password or tty ownership checks
- if we cannot open the tty line, assume that it is a daemon that does
  not use ttys and allow it to change a live entry to a dead one if
  indeed it is the same process that created the entry.
2003-02-26 18:16:50 +00:00
lukem 0263859762 Add '-L xferlogfile', to write xferlog entries there rather than syslog them.
Based on work from Dmitry Sivachenko.
2003-02-26 12:27:04 +00:00
uwe 6a4d4259ae Do not add ${LIBC_PIC} to DPADD if MKPICINSTALL is "no". 2003-02-26 06:03:40 +00:00
perseant 6f5626d112 Make fs-specific fcntl macros take three arguments (approved wrstuden).
Let LFS use fcntl for cleaner functions.
2003-02-25 23:12:06 +00:00
wiz 990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
erh dadb4ce1cf Fix uninitialized variable "notglob" in send_file_list() that was causing
transfers to fail due to an abort in free().
2003-02-24 19:26:49 +00:00
erh 6697099535 Fix uninitialized variable in mlsname() 2003-02-24 19:25:25 +00:00
lukem 6c12b8f0d2 use LLT and STRTOLL() instead of off_t and strtoull() for parsing the
"larger than int" arguments from commands.  improves portability.
2003-02-24 12:57:06 +00:00
perseant d5bdd23d68 Convert lfs_cleanerd over to use the new ioctl calls instead of the
lfs syscalls.
2003-02-24 08:48:17 +00:00
lukem 558032443d rename local copies of login(), logout() and logwtmp() to
ftpd_login(), ftpd_logout() and ftpd_logwtmp() respectively.
(makes utmp support much easier in tnftpd).

per suggestion in mail from Mike Heffner <mheffner@vt.edu>, who
forwarded patch from Michael Ranner <mranner@inode.at>.
2003-02-23 13:04:37 +00:00
lukem 49230d68b3 crank version for:
Stop ftpd changing inetd's 'logname'
Stop buffer overrun if {NGROUPS_MAX} is greater than the compile time
NGROUPS_MAX.
2003-02-23 08:33:13 +00:00
mycroft c42fd7b479 Revert previous change. 2003-02-21 01:12:56 +00:00
matt 0f3ffeff6a gidlist is nolonger an array. 2003-02-19 23:12:20 +00:00
dsl 3dfa0d0485 Stop ftpd changing inetd's 'logname'
Stop buffer overrun if {NGROUPS_MAX} is greater than the compile time
NGROUPS_MAX.
(approved by christos)
2003-02-19 18:26:48 +00:00
perseant b397c875ae Add code to UBCify LFS. This is still behind "#ifdef LFS_UBC" for now
(there are still some details to work out) but expect that to go
away soon.  To support these basic changes (creation of lfs_putpages,
lfs_gop_write, mods to lfs_balloc) several other changes were made, to
wit:

* Create a writer daemon kernel thread whose purpose is to handle page
  writes for the pagedaemon, but which also takes over some of the
  functions of lfs_check().  This thread is started the first time an
  LFS is mounted.

* Add a "flags" parameter to GOP_SIZE.  Current values are
  GOP_SIZE_READ, meaning that the call should return the size of the
  in-core version of the file, and GOP_SIZE_WRITE, meaning that it
  should return the on-disk size.  One of GOP_SIZE_READ or
  GOP_SIZE_WRITE must be specified.

* Instead of using malloc(...M_WAITOK) for everything, reserve enough
  resources to get by and use malloc(...M_NOWAIT), using the reserves if
  necessary.  Use the pool subsystem for structures small enough that
  this is feasible.  This also obsoletes LFS_THROTTLE.

And a few that are not strictly necessary:

* Moves the LFS inode extensions off onto a separately allocated
  structure; getting closer to LFS as an LKM.  "Welcome to 1.6O."

* Unified GOP_ALLOC between FFS and LFS.

* Update LFS copyright headers to correct values.

* Actually cast to unsigned in lfs_shellsort, like the comment says.

* Keep track of which segments were empty before the previous
  checkpoint; any segments that pass two checkpoints both dirty and
  empty can be summarily cleaned.  Do this.  Right now lfs_segclean
  still works, but this should be turned into an effectless
  compatibility syscall.
2003-02-17 23:48:08 +00:00
bouyer 234e340664 Remove bug section, we now support group quotas. 2003-02-14 14:58:42 +00:00
bouyer a39a98c45d Implement rquota RPC version 2, compatible with the linux implementation,
as proposed on tech-userlevel on Dec 06 2002. This allows to retrieve
group quota informations from NFS servers.
2003-02-14 14:55:58 +00:00
fvdl 180fbdb32f Use int32_t for block adresses in segment summary structures. 2003-02-10 21:17:53 +00:00
fvdl c8ba6436ed If fstat info was passed, and from it it can be seen that the file size
is smaller than an ELF header, don't even bother to try to look at it.
Avoids coredumps with zero-sized files.
2003-02-06 12:38:17 +00:00
perry 1f4ad37fe3 "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
2003-02-05 00:02:24 +00:00
perry 8a49ec08e4 "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
2003-02-04 23:07:28 +00:00
christos 580d21c8c2 undo mallocvar.h change! 2003-02-02 02:31:14 +00:00
tron edb9087c05 Include "sys/mallocvar.h" with "_KERNEL" defined in time to avoid
build failure because MALLOC_DECLARE() is not defined.
2003-02-01 21:12:25 +00:00
tron 3125c302ff Fix build problem by rearranging the order of "#include" statements so
that "sys/mallocvar.h" gets include while "_KERNEL" is defined.
2003-02-01 17:59:47 +00:00
mrg a9119e2a88 make this build on alpha after daddr_t->64bit 2003-01-28 08:34:17 +00:00
fvdl a3ff3a3038 Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
2003-01-24 21:55:02 +00:00
lukem 1075c8325b Apply DoS fix as described by Crist J. Clark <crist.clark@attbi.com>
on <security@freebsd.org>, and subsequently in FreeBSD's cvs repository
as libexec/ftpd/ftpd.c rev 1.133:

	The FTP daemon was vulnerable to a DoS where an attacker could bind()
	up port 20 for an extended period of time and thus lock out all other
	users from establishing PORT data connections. Don't hold on to the
	bind() while we loop around waiting to see if we can make our
	connection.

Bump version to 20030122.
2003-01-22 04:46:08 +00:00
lukem 6d15ebd30b Fixes from Dmitry Sivachenko <demon@freebsd.org>:
- always set "curname" to something appropriate (even when logging is
  not in effect).
- fix usage for "PORT" command
2003-01-22 04:33:35 +00:00
kleink b3df6303a9 Rename `sigset' locals to avoid symbol shadowing warning. 2003-01-16 09:38:37 +00:00
itohy 4e2a4fe8fc Fix problem where dlclose() falls into infinite loop. 2003-01-16 08:45:56 +00:00
matt 0655a07988 Fix bug where only 2/3 of the PLT was being synched with the icache.
PLT entries are 12 bytes.  Add a #define for that and replace the
explicit values with the PLT_ENTRY_SIZE.  This bug can cause random
SIGILL signals to happen.
2003-01-11 01:33:56 +00:00
manu 32adf030a4 ftpd was unable to service the pwd request once you entered a directory
without search permission. This confused some ftp clients.

We fix this problem by maitaining a cached path when getcwd() does not work.
The symbolic links and ../ are resolved in the cached path, and it is finnally
checked for accuracy by comparing ./ and the cached path with stat (device
and inode comparison). If the comparison fails, pwd fails as it did before,
and if the comparison succeeds, the cached path is displayed.

If paths are too long, we should just compare ./ with a truncated path and
fail, thus making pwd displaying an error as it did before.
2003-01-08 18:07:31 +00:00
christos 5bae7276e8 Make this work finally, by prepending _PATH_DEV to the tty name. 2002-12-18 15:20:47 +00:00
wiz 7d87739e31 Add man page for utmp_update(8), reviewed by Christos. 2002-12-16 22:45:15 +00:00
yamt c2484eff3b - fix memory leak.
- add more error checks.
- spaces -> tab
2002-12-15 08:38:17 +00:00
yamt ad4e5e5793 for -b, use ssize instead of segshift.
segshift is invalid for v2 filesystems.
2002-12-15 07:25:37 +00:00
junyoung 8707cd2a36 Gracefully exit when invoked directly. Use of assert() here caused a segfault.
Address PR#11785.
2002-12-14 15:37:57 +00:00
junyoung 9e11602ee9 Remove comment which is not true any more. alpha and i386 support
R_xxx_COPY relocations.
2002-12-14 09:13:00 +00:00
thorpej e8cc3884de Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is. 2002-12-10 17:14:02 +00:00
thorpej 65c75a7f06 Avoid conflict with reserved identifer "log". 2002-12-06 02:03:18 +00:00
thorpej 7ec31d736f Avoid conflict with reserved identifier "log". 2002-12-06 01:59:22 +00:00
junyoung fd1f5e8f1b A bit speedup: in _rtld_load_object(), save the number of calls to
strcmp() by performing path name length comparison first. In the test
with Mozilla, the number was reduced to 1068 from 7182 (yes, we saved
6114 strcmp()!).
2002-12-05 04:56:56 +00:00
yamt eef82bb71b fix a typo in previous.
PR 19278 from Ryo HAYASAKA.
2002-12-05 02:03:56 +00:00
thorpej 044aeabaad Bintuils-current initializes the GOT entries to 0 (instead of the
base-relative offsets that were placed there previously), so we
must use a different mechanism to compute our reloc base.

Patch from Charles Hannum.
2002-12-04 01:19:37 +00:00
lukem 20b1f73235 revert previous; this *DOES* use -lutil 2002-11-30 21:56:34 +00:00
lukem 764c86e2b1 don't need -lutil here 2002-11-30 03:16:14 +00:00
wiz f5cc72e57b -1 -> \-1. 2002-11-29 19:22:01 +00:00
christos 8f7c885f66 clean this up a bit. avoid annoying code duplication on opening files,
and make error messages consistent.
2002-11-29 17:15:46 +00:00
lukem ee2d1afbb4 - convert to using libc's strsuftoll(3)
- use LLT (aka 'long long type') for all numeric class parameters
- improve description of various ftpd.conf(5) options
- statcmd(): print out:  mmapsize readsize writesize sendbufsize sendlowat
2002-11-29 14:39:59 +00:00
mycroft be3692c5a7 Back out the last two changes. They were misguided, and the code worked
correctly before.
2002-11-25 19:49:25 +00:00
fvdl 100e201ec6 Replace return -1 in rtld_bind with _rtld_die() call. 2002-11-24 18:19:23 +00:00
fvdl d93db1cfce Implement self-relocation as is required now. 2002-11-24 18:16:45 +00:00
fvdl 5505734fa9 For the debug case, print relocbase as well at the start of _rtld(). 2002-11-24 18:13:30 +00:00
yamt 84677ad64e fix calculation bugs that prevents coalescing from working properly.
PR 19133.
2002-11-24 08:47:28 +00:00
simonb 11823a584d Only warn on double-word displacements for displacements less
than -0x20000000, not -0x1f000000.  Quells the endless stream
of
	ld: Double word displacement -535682276, out of range
style warnings that have annoyed my once too often.
2002-11-22 12:40:20 +00:00
junyoung 2cc0cde8f5 Now _rtld_relocate_objects() returns with error as soon as any of
subsequent calls in it fails.

Spotted by wiz and enami.
2002-11-22 04:39:37 +00:00
junyoung b5ffe4c33c Simplify code a bit. 2002-11-21 19:09:56 +00:00
itojun b39cb313c6 verify strvis() buffer length is enough. make sure string termination before
use.  remove extra ntohs() which is not needed.  from Charles Blundell
2002-11-20 21:01:57 +00:00
itojun 35ddf151dc die if strdup fails 2002-11-16 15:41:17 +00:00
itojun 92ebc57756 audit use of strto* - beware of ERANGE, as well as typecast on result. 2002-11-16 03:10:34 +00:00
nathanw 15f633fbd3 In _rtld_load_library(), ensure that the old _rtld_error state (a message from
a previous error, or NULL) is preserved if the search eventually succeeds.

Addresses the problem pointed out in PR pkg/19024.
2002-11-14 21:07:46 +00:00
nathanw 6c24ccfd1f Remove "extern const chat *_rtld_error_message;". There is no such
variable, and never has been.
2002-11-14 20:11:48 +00:00
itohy cbb1f0fb0f MKDYNAMICROOT for a.out 2002-11-12 14:33:48 +00:00
christos 511dcb963a PR/18929: Kimmo Suominen: rpc.rusersd ignores utmpx 2002-11-04 22:03:38 +00:00
mrg c066bc7b3a update to new dkstats.c interface; no changes to how this program works.
pointed out by uwe@ in private email.
2002-11-02 01:59:24 +00:00
matt 01ba93bc3c Convert to register prefixes. 2002-10-31 20:23:25 +00:00
wiz 64ffd490cb Fix typos. Found by Adrian Mrva. 2002-10-29 16:19:49 +00:00
lukem f0349d3444 tweak reference to me 2002-10-26 04:21:12 +00:00
lukem 02c9f40f67 crank version for statfilecmd() 'fix' 2002-10-26 04:19:56 +00:00
itojun 4af2926283 Turns out that our implementation of STAT wasn't RFC 959 compliant.
This version is now RFC 959 compliant, using a patch adapted from one
sent in by david.leonard@eecs.uq.edu.au

openbsd libexec/ftpd/ftpd.c revision 1.69.

(see RFC959 page 36)
2002-10-25 01:45:37 +00:00
itojun 1d2f66eb21 add DPADD 2002-10-23 01:11:09 +00:00
itojun e39579269f add DPADD 2002-10-23 01:06:11 +00:00
itojun b4dcfbab07 correct libvers DPADD 2002-10-23 01:04:25 +00:00
itojun 24fcff9a4a add DPADD based on LDADD (not sure if the value is perfectly right) 2002-10-23 01:02:49 +00:00