Commit graph

1503 commits

Author SHA1 Message Date
Yaroslav Tykhiy 2ea4228214 Add support for RFC 2389 (FEAT) and RFC 2640 (UTF8) to ftpd(8).
The support for RFC 2640 (UTF8) is optional and rudimentary.
The server just advertises its capability to handle UTF-8 file
names and relies on its own 8-bit cleanness, as well as on
the backward compatibility of UTF-8 with ASCII.  So uploaded
files will have UTF-8 names, but the initial server contents
should be prepared in UTF-8 by hand, no on-the-fly conversion
of file names will be done.

PR:		bin/111714
Submitted by:	Zhang Weiwu <see email in the PR>
MFC after:	1 week
2007-04-18 22:43:39 +00:00
Alexander Kabaev 3c0d0ca74b Bring rtld exports in line with corresponding symbols exported from
libc.

Disable SYMVER_DEFAULT n rtld until its implications are understood
better.
2007-04-09 23:00:29 +00:00
Alexander Kabaev 95a6a22d0a Remove reference to FBSDprivate version. We do not use it in this
module yet.
2007-04-07 23:23:10 +00:00
Alexander Kabaev ac34654dd9 Catch up on rtld's special status. Since it does not appear on
main object list, its versioning information needs to be examined
separately.

This hopefully fixes problems that people running with SYMVER_ENABLED
are experiencing.
2007-04-07 23:17:00 +00:00
Alexander Kabaev 7ca8e6a670 Prepare rtld for symbol versioning. Disable it by default for now. 2007-04-03 19:01:06 +00:00
Alexander Kabaev 49f90ad282 Implement dl_iterate_phdr function.
Convert boolean flags in internal Obj_Entry structure into bitfields.
Properly check for loaded segment alignment in map_object.
2007-04-03 18:31:20 +00:00
Alexander Kabaev fb6395da91 Use u_int for variable manipulated by atomic ops to match atomic
ops function prototypes.
2007-04-03 18:28:13 +00:00
Yaroslav Tykhiy 32072720cb Let automatic TCP send buffer sizing do its job for ftpd(8): stop
setting the SO_SNDBUF socket option.  Using a hard-coded value for
it was a poor idea anyway in the face of diverse network conditions.
2007-02-09 17:18:39 +00:00
John Baldwin f0ac0f92fb Document LD_UTRACE.
MFC after:	3 days
2007-01-23 22:38:39 +00:00
John Baldwin 1f4b63f824 Add various utrace's for use with ktrace to the ELF runtime linker. To
activate the traces, set the LD_UTRACE (or LD_32_UTRACE) environment
variable.  This also includes code in kdump(8) to parse the traces.

Reviewed by:	kan, jdp
MFC after:	2 weeks
2007-01-09 17:50:05 +00:00
Kip Macy b84c7a797c Fix TLS on sparc64 for statically and dynamically linked binaries
Approved by: rwatson (mentor)
Reviewed by: jmg and marcel
2006-10-08 02:50:34 +00:00
Jung-uk Kim da7bf2bb26 Clean up white spaces and fix style(9). 2006-09-19 16:48:08 +00:00
Konstantin Belousov 5fd885b07b Fix the buggy rev. 1.117. dagmembers are only initialized for dlopen'ed
dso that are actually loading. If dso a.so depends on b.so, then dlsym
with handle from dlopen("b.so") will fail unconditionally.

Correct implementation shall use the Obj_Entry.needed list to walk
dependencies DAG.

Test provided by: jkim
Tested (prev. version) by:	jkim, Nicolas Blais <nb_root at videotron ca>, h.blanke at chello nl
Pointy hat to:	kib
Approved by:	kan (mentor)
2006-09-19 12:47:13 +00:00
Ruslan Ermilov a3ec17db37 Markup fixes. 2006-09-17 21:48:47 +00:00
Konstantin Belousov d0cb0064fe When looking up the symbol by dlsym, look it not only in the object
given as dso handle, but also in the implicit dependencies of that dso.

Also, const-ify the read-only parameter objlist of symlook_list.

Reported by:	"Simon 'corecode' Schubert" <corecode at fs ei tum de>
Approved by:	kan (mentor)
X-MFC-After:	6.2
2006-09-08 14:59:54 +00:00
Marcel Moolenaar 3614156c7d Fix the variant I allocation for KSE: Allow a larger TCB and assume
that the documented TCB is at the tail of the extended TCB. In other
words, the base of the TCB has a negative offset from the TLS.
2006-09-01 06:13:16 +00:00
Marcel Moolenaar 9d34b1a911 o Fix the static TLS relocation. We were subtracting the size of
the TCB.
o  Use NULL for null pointer argument.
o  Replace magic 8 with TLS_TCB_SIZE.
2006-09-01 06:08:50 +00:00
Marcel Moolenaar 653d825a9a Use NULL for null-pointer argument. 2006-09-01 06:07:26 +00:00
Marcel Moolenaar 862894168d Replace magic 16 with TLS_TCB_SIZE. 2006-08-31 19:42:39 +00:00
David E. O'Brien d808b43a01 Not needed any more, vendor sources have PAM support. 2006-08-31 17:12:33 +00:00
David E. O'Brien 1908c0576c Catch up with the import of ftpd.c rev 1.1.1.6. 2006-08-31 17:02:05 +00:00
David E. O'Brien f83e9e84cc FreeBSD doesn't have the simple pidfile(3), so craft it using FreeBSD's
primitives.
2006-08-31 16:57:46 +00:00
Marcel Moolenaar 7d3f85133a Prevent dead code elimination for the TP assignmient by using inline
assembly.
2006-08-30 00:39:07 +00:00
Doug Barton e8ea7f0260 1. Attempt to take one bullet out of the foot-shooting gun by silently
ignoring errors when sourcing rc.conf* files. The most common error
occurs when users put a command of some sort into those files.
(ifconfig is a popular choice)

2. Make the file rotation logic simpler by starting one down from
the "top" of the list, rather than at the top.

3. Try to make file rotation more secure by calling unlink(1) on all
new file names before rotating an old file to the new name, rather than
merely calling 'rm -f' on any files that exceed the number of files
to save.
2006-08-28 06:41:50 +00:00
Ruslan Ermilov 2b46c64c9c Remove alpha left-overs. 2006-08-22 08:03:01 +00:00
Yaroslav Tykhiy ff7e281d6d - Improve and extend mark-up.
- Don't use full path in .Nm (we just don't do that).
- Correct some frivolous and poorly rendering language,
  such as using possessive case for .Nm or .Fl .
- Use the same capitalization for "user ID" as in setuid(2) and getuid(2).
- Bring SEE ALSO in accord with the text.

MFC after:	5 days
2006-08-07 16:05:55 +00:00
Xin LI c93b8edf09 In symlook_obj(): fix _rtld_error output.
MFC After:	2 weeks
2006-08-04 13:37:54 +00:00
Yaroslav Tykhiy af73d4e69e inetd and telnetd are not included in the standard release
crunched floppies, but they can be included as options in
src/release/picobsd (omitted by default though.)  Therefore
preserve the RELEASE_CRUNCH knob in their Makefiles, but
tell its real purpose in a comment.
2006-07-31 19:15:10 +00:00
Yaroslav Tykhiy 594a130b8a Stop enforcing dependencies between MK_* options at Makefile level.
All the dependencies are satisfied now in <bsd.own.mk>.
2006-07-31 13:29:36 +00:00
Yaroslav Tykhiy 33f0bffeb7 telnetd(8) doesn't really go to the crunched floppies,
so its Makefile needn't test for RELEASE_CRUNCH.

Suggested by:	ru
2006-07-31 13:20:44 +00:00
Yaroslav Tykhiy 249265386a The lukemftpd code depends on INET6. Therefore MK_INET6_SUPPORT
should be respected.
2006-07-28 10:50:11 +00:00
Yaroslav Tykhiy 02e182f681 Respect MK_INET6_SUPPORT.
Apply style.Makefile(5).
2006-07-27 12:15:37 +00:00
Yaroslav Tykhiy fed3e4543f Cook CFLAGS by the modern recipe:
- use WARNS;
- respect MK_INET6_SUPPORT.
2006-07-27 12:05:05 +00:00
Yaroslav Tykhiy 31ee80d88a Fix compilation of ftpcmd.y without -DINET6.
Respect MK_INET6_SUPPORT in Makefile.

Requested by:	Attila Nagy <bra at fsn dot hu>
MFC after:	1 week
2006-06-05 15:50:34 +00:00
Dag-Erling Smørgrav 4421d895a9 *thwack*! all the world's not i386.
Pointy hat to:	des
2006-03-29 12:29:01 +00:00
Dag-Erling Smørgrav 370e5ea48c Don't use dbg if it isn't defined (such as when this file is used by
code outside of rtld-elf)
2006-03-28 18:28:07 +00:00
Dag-Erling Smørgrav 1dc39023f8 Use C99's varadic macro syntax instead of gcc's. 2006-03-28 18:26:47 +00:00
David Xu c771787169 Er, forgot to clear tls space to zero for Variant II. 2006-03-28 06:14:22 +00:00
David Xu c0d2338cdd Allocate space for thread pointer, this allows thread library to access
its pointer from begin, and simplifies _get_curthread() in libthr.
2006-03-28 06:09:24 +00:00
Pav Lucistnik 8a50f51b1b - Document LD_32_* environment variables
- Mention 32-bit files in FILES section

MFC after:	1 week
2006-03-27 00:53:58 +00:00
Ruslan Ermilov e1fe3dba5c Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
Hajimu UMEMOTO 2c9fd5f29e - Reduce needless DNS query by lookup only appropriate address
family. [1]
- Specify appropriate hints to getaddrinfo(3). [1]
- Obtain address family from peername in inet mode.

Submitted by:	Rostislav Krasny <rosti.bsd__at__gmail.com> [1]
Tested by:	yar, Rostislav Krasny <rosti.bsd__at__gmail.com>
MFC after:	1 week
2006-03-01 16:13:17 +00:00
Peter Wemm 8c6a035ead Fix a malloc overrun in 32-bit compat libmap lookup code. 2006-01-31 06:08:28 +00:00
Yaroslav Tykhiy f1daaa3efe Touch .Dd because the last commit was content-related. 2006-01-29 13:10:38 +00:00
Marcel Moolenaar 05157fa0a1 s/DT_IA64_PLT_RESERVE/DT_IA_64_PLT_RESERVE/ 2006-01-28 17:58:22 +00:00
Marcel Moolenaar 4af16b88cc s/R_IA64_/R_IA_64_/ 2006-01-28 17:56:16 +00:00
Yaroslav Tykhiy a599a64a9f In the daemon code, check for and report possible errors
from accept(2) and fork(2).  Also close all unneeded fds
in the child process, namely listening sockets for all
address families and the fd initially obtained from accept(2).
(The main ftpd code operates on stdin/stdout anyway as it
has been designed for running from inetd.)

MFC after:	5 days
2006-01-21 13:06:37 +00:00
Yaroslav Tykhiy 8eb0508fe1 The daemon's child shouldn't go on with the for loop
over ctl_sock's -- it is solely the parent daemon's
job.  So just break out of the loop in the child.

MFC after:	5 days
2006-01-21 12:34:28 +00:00
Yaroslav Tykhiy 125b96351a Use pidfile(3) provided by libutil to manage the deamon's pid file.
By default, create a pid file at the standard location, /var/run/ftpd.pid,
in accord with the expected behavior of a stock system daemon.

MFC after:	5 days
2006-01-21 12:21:41 +00:00
Marcel Moolenaar 853b7411b6 s/R_IA64_/R_IA_64_/g as per the ia64 psABI. 2006-01-17 21:03:22 +00:00