Commit Graph

2303 Commits

Author SHA1 Message Date
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
wiz 5e2319eed0 2004, not 1994. 2004-06-25 17:36:04 +00:00
christos fd55c85046 Forgot to include utmpx support for this one. 2004-06-25 17:34:38 +00:00
itojun 8f329619b8 spamlogd(8) 2004-06-25 16:34:45 +00:00
itojun 9ec960c351 add ftp-proxy from PF OpenBSD 3.5. adjust setlists 2004-06-22 22:19:36 +00:00
jwise b89fa9ed33 Remove added SUBDIR+= settings from a developer's (hi itojun!) machine which
point to directories which do not exist (and are not wanted) in our source tree.

While we're here, was `libexec/spamd' approved for import?  It conflicts with the
name of a tool in pkgsrc which a _lot_ of developers and users of NetBSD are using...
2004-06-22 19:10:48 +00:00
itojun f7c9d7b3eb make spamd compile on netbsd 2004-06-22 16:04:40 +00:00
itojun c2d7a8642b spamd-setup, comes with PF for openbsd 3.5 2004-06-22 15:53:17 +00:00
itojun 10c71795a1 build and install spamd(8) 2004-06-22 15:41:54 +00:00
skrll 701ae47cdf Fix the dynamic linker for hppa using ELF.
Lazy binding doesn't work 100% of the time so force immediate binding.
One possible reason is that the PLT stub blows away r20 which the
compiler might not take into account.
2004-05-17 13:16:02 +00:00
skrll e88c851d08 Test before commit. 2004-05-17 11:00:01 +00:00
skrll 0556cd7d3c Re-arrange/correct some asserts. 2004-05-17 10:23:58 +00:00
skrll 8431fb3c4c Wrap a couple of lines to <80 columns 2004-05-14 11:59:14 +00:00
skrll c788a1a535 Whitespace. 2004-05-14 11:11:02 +00:00
skrll 212b905081 Garbage collect the RTLD_RELOCATE_SELF error. 2004-05-12 20:23:29 +00:00
skrll c0148a0dfe Add a debug message. 2004-05-12 20:12:37 +00:00
kleink ab12386beb Also set LOGNAME in the environment. 2004-05-11 08:07:37 +00:00
kleink a87145f3fc Make sure we tzset() before chroot(); after passing that point
it may no longer be accessible for syslog() to format messages.
2004-05-05 20:15:45 +00:00
mhitch b6825b1e42 The -symbolic flag in gcc 2.95.3 is not passed to the linker, which is
required.  Restore the -Bsymbolic option in LDFLAGS on the vax.  Fixes
the problem with ld.elf_so mentioned on port-vax.
2004-04-28 02:04:56 +00:00
christos ce26902593 add const to cgetent arg. 2004-04-23 21:04:25 +00:00
christos 6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
veego 3ee69bb240 Remove duplicated include of <sys/types.h>
Fixes bin/25062.
2004-04-05 19:27:01 +00:00
fair 02c4ccaafa Apply patch from PR 24917 to correct option parse error reporting. 2004-03-26 01:26:59 +00:00
he 9dffa08363 The MLINKS needs to come before .include <bsd.prog.mk>. 2004-03-24 21:20:26 +00:00
skrll 236df38503 Be more pedantic about where we use -shared, etc. 2004-03-24 08:01:26 +00:00
fair 88327f9bbc Add FILES section to document where the daemon is.
Add some paragraph breaks to make the man page more readable.

Add the history of the talkd -> ntalkd change as I recall it to
the HISTORY section. All of this to answer PR 13433
2004-03-24 05:32:42 +00:00
fair 790f7311ff Add man page link from talkd.8 to ntalkd.8 per PR 13433
We should probably rename all of this back to talkd. XXX
2004-03-24 05:20:12 +00:00
christos ba3c0c1bd8 Oops, put back my copyright. 2004-03-20 20:30:48 +00:00
christos 1074321aa8 - remove my license
- un __P
- de-lint
2004-03-20 20:26:58 +00:00
jmc 6fe4ead562 Convert to usage of UUDECODE_FILES and standardize on filename extension 2004-03-19 08:07:22 +00:00
atatat 1de60baa7c The <sys/sysctl.h> header already provides a perfectly good struct for
this purpose, so...uh...use it.
2004-03-16 05:25:12 +00:00
enami 76eaac1d6f Whitespace. 2004-02-26 21:45:59 +00:00
skrll 52581467e2 Whitespace. 2004-02-23 21:27:20 +00:00
skrll 4d30716d36 Remove the millicode hack - its not needed anymore.
Get the entry point right.
2004-02-23 21:20:40 +00:00
uwe 8eb5ba6d09 Use CC instead of LD to link the ld.elf_so. This will correctly link
"millicode" from libgcc_pic.a on platforms that need it.

From Nick Hudson <skrll@netbsd>.
2004-02-22 01:39:43 +00:00
skrll b5330c98c7 Add the standard XXX about CPPFLAGS and -fpic here. 2004-02-21 16:02:06 +00:00
skrll d93f13855a Move common LDFLAGS into Makefile from arch/*/Makefile.inc 2004-02-21 15:56:03 +00:00
skrll 151426159b Whitespace. 2004-02-20 20:58:24 +00:00
enami 074a9e8fee Salvage the instruction to save the pointer to ps_strings for later use
so that setproctitle() works again.  The problem reported by Naoki Fukaumi
on japanese mailing list.

Approved by: Ross Harvey
2004-02-18 23:04:49 +00:00
enami f1740378ad Don't assume past the mmaped region is accessible. 2004-02-15 02:59:04 +00:00
enami 63fcb5a042 Fix warning message: the failed operation is not fstat but mmap. 2004-02-15 02:56:53 +00:00
christos 16816b44a8 PR/24320: Alan Barrett: new identd does not report random data when getpwuid()
fails. Also improve some log messages.
2004-02-05 13:18:48 +00:00
wiz 29dcd7f961 Standardize flag listing; sort options; remove ending dot in Nd argument;
sort sections and SEE ALSO; new sentence, new line; replace some man
macros with mdoc macros.
2004-01-31 22:39:24 +00:00
christos 2a56437104 add RCSID. 2004-01-31 22:03:31 +00:00
christos f9ce139688 remove unused pidentd files. 2004-01-31 21:48:22 +00:00
christos 6310d36554 new identd from Peter Postma. 2004-01-31 21:47:17 +00:00
briggs 58f4d6af26 Remove duplicated headers. Pointed out by Peter Postma in PR bin/24002. 2004-01-06 14:30:10 +00:00
yamt e2e9c6ef96 fix debug output. 2003-12-17 09:13:41 +00:00
chs 1a686b2ea3 rearrange lib stuff so that these link on non-shared-lib platforms. 2003-12-13 22:07:35 +00:00
dyoung 4758291178 Fix the checkflist for builds without Kerberos 4 (MKKERBEROS4=no)
and without Kerberos 4 & 5 (MKKERBEROS=no). Previously checkflist
complained of missing files.

* move kerberos- and kerberos 4-only files into new flists,
  distrib/sets/lists/*/krb.*

* make the flist generators grok MKKERBEROS{,4} variables

* fix Makefiles which treat MKKERBEROS=no as MKKERBEROS5=no.
  9 out of 10 experts agree that it is ludicrous to build w/
  KERBEROS4 and w/o KERBEROS5.

* fix header files, also, which treat MKKERBEROS=no as MKKERBEROS5=no.

* omit some Kerberos-only subdirectories from the build as
  MKKERBEROS{,4} indicate

(I acknowledge the sentiment that flists are the wrong way to go,
and that the makefiles should produce the metalog directly.  That
sounds to me like the right way to go, but I am not prepared to do
revamp all the makefiles.  While my approach is expedient, it fits
painlessly within the current build architecture until we are
delivered from flist purgatory, and it does not postpone our
delivery. Fair enough?)
2003-12-11 09:46:26 +00:00
agc 7db1d33cba Modify the licences of code written by Theo De Raadt from a 4-clause
to a 2-clause licence (retaining UCB clauses (1) and (2)), per PR
22409 from Joel Baker, approved by Theo de Raadt, and ratified by
myself - the only discrepancy being the handling of the original
clause 3 in src/usr.sbin/yppoll/yppoll.c.
2003-12-10 12:06:25 +00:00
lukem afca253464 Use sysconf(_SC_LOGIN_NAME_MAX) to determine the length of login
names, rather than assuming LOGIN_NAME_MAX.
Based on patch from Garrett Wollman via David O'Brien (both at FreeBSD.org)
2003-12-10 01:18:56 +00:00
mrauch f06ab72b6e Change the symbol lookup order to search RTLD_GLOBAL objects
before referencing object's DAG. This makes it possible for
C++ exceptions to work across shared libraries.

Patch taken from FreeBSD: src/libexec/rtld-elf/rtld.c: 1.67 -> 1.68,
committed there by kan@FreeBSD.org.
2003-12-07 09:36:06 +00:00
christos 1a2b5965a9 Don't try to preload an empty string. 2003-11-25 14:36:49 +00:00
simonb 28817edd35 Restore handling of reloc entries that point to unaligned locations
that seems to have disappeared in rev 1.34.

Thanks to Jason Thorpe for suggesting where to look.
Fixes the simple test case in PR port-mips/23366.
2003-11-19 19:41:57 +00:00
wiz 4bbfee09ca Various typo fixes from Jonathon Gray via jmc@openbsd. 2003-11-17 11:16:10 +00:00
wiz 59409bce25 Some improvements from the OpenBSD version of this man page. Forwarded
by jmc@openbsd.
2003-11-02 11:27:49 +00:00
lukem 171d653219 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +00:00
lukem 130ab7336b Rework how MAKEVERBOSE operates:
*	Don't bother prefixing commands with a line of  ${_MKCMD}\
	and instead rely upon "make -s".  This is less intrusive on
	all the Makefiles than the former.  Idea from David Laight.

    *	Rename the variables use to print messages.  The scheme now is:
	    _MKMSG_FOO		Run  _MKMSG 'foo'
	    _MKTARGET_FOO	Run  _MKMSG_FOO ${.TARGET}
	From discussion with Alistair Crooks.
2003-10-21 10:01:19 +00:00
fvdl d83c6c4294 Don't use NULL for integers. 2003-10-21 01:19:10 +00:00
lukem ddff99b7f4 rework to use the newer _MKMSGCREATE (et al) macros 2003-10-19 04:45:01 +00:00
lukem 6cf0d872cd support MAKEVERBOSE 2003-10-19 01:19:10 +00:00
agc 9f1aac5bb3 Move Jason Downs's code from a 4-clause to a 3-clause licence by
removing the advertising clause.  Diffs provided in PR 22410 by Joel
Baker, confirmed to the board by Jason Downs.

With additional thanks to Jason Thorpe.
2003-10-13 15:36:33 +00:00
matt fd1caff7c2 Update to new reality. XXX _rtld_bind still needs to be written. 2003-10-06 16:08:35 +00:00
mycroft 65ed3bdcdd Make the effect of the hack clearer. 2003-09-24 10:25:26 +00:00
mycroft 7242c1114c One more tweak... 2003-09-24 10:18:52 +00:00
mycroft 7b234fd232 Make the comment a little more accurate. 2003-09-24 09:59:45 +00:00
mycroft 89ea37c60a Temporary workaround for some binutils/ld lossage. See the comment for more
information.
2003-09-24 09:55:35 +00:00
mycroft 5fb0b88880 Some notes... 2003-09-24 06:20:33 +00:00
enami 9c2e06fe24 Space after the keyword `if'. 2003-09-22 14:37:57 +00:00
bouyer 50a25ded2d memset(0) ext_getq_args before use. Should fix bin/22592 by Mark Davies. 2003-09-20 22:25:29 +00:00
itojun 0c4a8b5a7e realloc pedant 2003-09-19 06:01:24 +00:00
itojun 4698292ea9 realloc pedannt 2003-09-19 05:52:48 +00:00
itojun ba0ee95e6c realloc pedant 2003-09-19 05:50:41 +00:00
itojun 143464d11e realloc mistake 2003-09-19 05:41:33 +00:00
itojun 6e4e427990 realloc mistake. from openbsd 2003-09-19 05:33:15 +00:00
christos 81e1fcb367 downgrade the accept error to a warning so that we don't exit if we are being
port scanned.
2003-09-14 22:38:23 +00:00
mycroft 5bd33bcad6 Back out revision 1.100. There is something screwier going on. 2003-09-07 22:17:43 +00:00
wiz 47190e80b8 Consistently use 'RFC 1234' instead of 'RFC1234' or 'RFC-1234'.
From jmc@openbsd.
2003-09-07 16:22:20 +00:00
itojun 013cd625a4 use arc4random 2003-09-06 12:52:10 +00:00
mycroft 323a574dc3 dlsym() should not leave an error set. It confuses programs that check
dlerror() (such as pkgsrc/graphics/transcode).
2003-08-31 21:52:01 +00:00
lha afad8d1f7c libkrb depends on libdes, patch in private mail from
Harold Gutch logix at foobar franken de
2003-08-23 23:03:42 +00:00
lha be9358159d libkrb depend on libdes 2003-08-18 07:23:45 +00:00
skrll d900731978 Resolve dlsym(3) and friends directly so that dlsym(RTLD_NEXT,...) works.
Previously dlsym resolved to the version in crt0.o or libc which would
mean that the caller's shared object couldn't be determined correctly
using __builtin_return_address(0).

Mainly from FreeBSD, but adapted by me. Benefits of this solutions are:

	- backward comptibility maintained
	- existing broken binaries are fixed with a new ld.elf_so
	- __mainprog_obj can be removed from crt0.o
	- we do the same thing as FreeBSD

Fixes PR 22067.

OKed by Jason and Christos.
2003-08-12 09:18:38 +00:00
agc 8e6ab8837d Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22284, verified by myself.
2003-08-07 09:46:37 +00:00
skrll 59b0f10729 KNF 2003-08-05 19:41:53 +00:00
lha 0fe8a8550f libkrb depend on libdes
libkrb5 depends on libasn1 and libcrypto
2003-08-05 10:45:42 +00:00
salo 99410184e7 netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
mrg 88bb1d9b3b include <string.h> or <stdlib.h> for all prototypes 2003-07-26 15:04:38 +00:00
skrll 5f573ab68d ANSIfy and de-__P(). 2003-07-24 10:12:25 +00:00
itojun e63468d8cc split MKKERBEROS4 from MKKERBEROS. based on work by lha at stacken.kth.se
(build confirmed with both MKKERBEROS4=yes and MKKERBEROS4=no)
2003-07-23 08:01:24 +00:00
matt 9925d4a0c7 Since telnetd has ignored the USER environment variable for logging in for
quite a bit of time, make telnetd ignore it completely now.  This results
in the :if=: entry in the default gettytab entry to honored instead of
being ignored.  The -h option to telnetd will continue to suppress the
inclusion of :if=:
2003-07-22 00:03:26 +00:00
skrll ddc9322f3b Support immediate binding on arm. 2003-07-21 15:34:35 +00:00
skrll b2695e5a1f arm and sh5 also have bogus DT_TEXTRELs. sh5 was already covered so just
update the comment.
2003-07-21 15:17:55 +00:00
skrll 619dee76f6 Correct the in_plt parameter of a couple of _rtld_find_symdef calls.
The mips_reloc.c case is a no-op as _rtld_symlook_obj ignores in_plt for
MIPS.

OK'ed by Charles.
2003-07-17 13:56:32 +00:00
wiz f3a3343ca8 Bump date for -r removal. 2003-07-16 11:31:25 +00:00
itojun e26b0e0cf5 stop installing install libtelnet. build under lib/libtelnet and reference
it from usr.bin/telnet and libexec/telnetd.
(reason for separate build: compiler flags)
2003-07-16 05:42:01 +00:00
itojun 427af575fe use bounded string op. bump shlib major for libtelnet due to API change. 2003-07-15 10:14:54 +00:00
skrll d4cfd1c666 s/_rltd_obj_rtld/_rtld_objself/ in #ifdef notyet code. 2003-07-15 07:39:55 +00:00
skrll 9192c2eed4 Whitespace 2003-07-15 07:38:29 +00:00
itojun 3d8f7dcfb1 use snprintf 2003-07-15 05:03:49 +00:00
itojun 47d8f56c50 more cleanups 2003-07-14 16:23:40 +00:00
itojun 261e336de5 SIGINFO is defined 2003-07-14 16:17:37 +00:00
itojun 311ed76391 remove unused function
XXX what's the difference between #ifdef UTMPX and #ifdef SUPPORT_UTMPX
2003-07-14 16:16:42 +00:00
itojun 625dced967 remove unneeded #ifdefs. improves readability.
(confirmed that exact same *.o is produced)
2003-07-14 15:55:53 +00:00
itojun 1d041f9dd7 use bounded string op (some remains) 2003-07-13 12:04:45 +00:00
itojun e19eff3a82 asprintf is easier 2003-07-13 12:00:55 +00:00
itojun 6e7ade5e3e use bounded string ops. check malloc failure. asprintf is easier than
complicated strcat/strcpy combination.
2003-07-13 09:44:02 +00:00
itojun aa50bfde15 use bounded string op (there still are remains) 2003-07-13 09:40:20 +00:00
lukem 001c68bd94 Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO".  The new variables are:
	TOOL_ASN1_COMPILE  TOOL_CAP_MKDB  TOOL_CAT  TOOL_CKSUM  TOOL_COMPILE_ET
	TOOL_CONFIG  TOOL_CRUNCHGEN  TOOL_CTAGS  TOOL_DB  TOOL_EQN  TOOL_FGEN
	TOOL_GENCAT  TOOL_GROFF  TOOL_HEXDUMP  TOOL_INDXBIB  TOOL_INSTALLBOOT
	TOOL_INSTALL_INFO  TOOL_M4  TOOL_MAKEFS  TOOL_MAKEINFO  TOOL_MAKEWHATIS
	TOOL_MDSETIMAGE  TOOL_MENUC  TOOL_MKCSMAPPER  TOOL_MKESDB
	TOOL_MKLOCALE  TOOL_MKMAGIC  TOOL_MKTEMP  TOOL_MSGC  TOOL_MTREE
	TOOL_PAX  TOOL_PIC  TOOL_PREPMKBOOTIMAGE  TOOL_PWD_MKDB  TOOL_REFER
	TOOL_ROFF_ASCII  TOOL_ROFF_DVI  TOOL_ROFF_HTML  TOOL_ROFF_PS
	TOOL_ROFF_RAW  TOOL_RPCGEN  TOOL_SOELIM  TOOL_SUNLABEL  TOOL_TBL
	TOOL_UUDECODE  TOOL_VGRIND  TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
	TOOL_FOO?=	foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
	TOOL_FOO=	${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
2003-07-10 10:33:58 +00:00
marcus fae2567c9b Removed unused function. 2003-07-05 20:48:39 +00:00
tsutsui 0e65101f60 Add function prototype declarations. 2003-07-05 18:18:51 +00:00
tsutsui e40b9a1c1d Include <stdlib.h> for exit(3) prototype, warned by gcc-3.3. 2003-07-05 12:34:12 +00:00
wiz 13886c157c Bump date for last but one. 2003-07-04 12:11:45 +00:00
wiz a03d9214b1 s/&/and/ 2003-07-04 12:11:02 +00:00
marcus a4878b4349 Bugfix: Don't pick addend both from reloc and contents at the same time. 2003-07-02 15:29:34 +00:00
tacha 3bab95ce42 Add ftpd_loginx() and ftpd_logwtmpx() and use them to hold wtmpx file
open while a session.

Close bin/21692 by bqt@Krille.Update.UU.SE.
2003-06-30 03:06:06 +00:00
marcus 6aeeb40d4a Updated to work with current rtld code. 2003-06-30 00:50:46 +00:00
marcus 5404577abf SH also has a bogus DT_TEXTREL, it seems. 2003-06-30 00:49:25 +00:00
wiz ac4f069fda Add Ns. 2003-06-27 18:59:54 +00:00
christos 1e3cf33d74 fix botch in sysctl arg. 2003-06-27 18:37:48 +00:00
wiz 3393c12171 Add Ns where needed. 2003-06-26 18:09:39 +00:00
wiz f788cad16f Remove superfluous Ns and quoting. 2003-06-26 18:09:06 +00:00
christos cf96f20a95 Rewrite from scratch; modify sysctl so that it does not abuse the new pointer. 2003-06-26 17:31:12 +00:00
christos be4bd83a25 No need to define _KERNEL 2003-06-26 16:23:53 +00:00
joff 2c4a7474a0 use TCP_NODELAY 2003-06-14 22:43:31 +00:00
wiz 9e7c0f3178 Do not hardcode "nroff", allow it to be overridden by defining NROFF. Useful for tools/makewhatis. 2003-06-14 17:56:24 +00:00
wiz fee392c197 Report on which file nroff returned an error. 2003-06-14 16:58:00 +00:00
drochner 96b62d8a69 no need to #include <sys/dkstat.h> 2003-06-11 17:26:31 +00:00
briggs 4441128638 Support negotiation and use of TFTP Option Extension (rfc 2347) for the
'blksize' option (rfc 2348) and the 'timeout' and 'tsize' options (rfc 2349).

Contributed by Wasabi Systems, Inc.
2003-06-11 01:43:52 +00:00
simonb a9f5b3f871 KNF- blank lines before code at start of functions. 2003-06-05 10:41:32 +00:00
christos 683092605c Add RTLD_FIRST, RTLD_NEXT, RTLD_DEFAULT, from FreeBSD 2003-05-30 15:43:33 +00:00
petrov 458dbd70ac Fix alignment problem in debug output.
Happens only under RTLD_DEBUG_RELOC.
2003-05-23 20:13:50 +00:00
wiz cb04db5a91 Bump date for "nn" capability. 2003-05-20 19:40:53 +00:00
thorpej 2c1e482672 Add a "nn" (no name) capability to getty. If set in gettytab, getty
will not prompt for a login name, and will not pass one along to the
login program.  This can be used to accomodate login programs that have
an alternate way of selecting the user to log in.
2003-05-20 19:20:03 +00:00
lukem 826a14607a Now that <bsd.prog.mk> DTRT if HOSTPROG is defined (i.e, it is a no-op),
there's no need to special-case .include-ing it.
2003-05-18 07:57:31 +00:00
itojun 22795e9102 use strlcpy 2003-05-17 22:57:30 +00:00
itojun 3e6b78200d use strlcat 2003-05-17 22:56:31 +00:00
itojun bf792c0c43 string manipulation audit 2003-05-17 22:54:55 +00:00
itojun f4a82bcf1f strlcat is easier here 2003-05-17 22:50:29 +00:00
itojun 936d35bb1b use strlcpy 2003-05-17 21:28:53 +00:00
itojun 5a8065df69 string manipulation cleanup 2003-05-17 21:26:47 +00:00
itojun bb3fc85900 use snprintf 2003-05-17 21:24:38 +00:00
itojun 792f67c795 string manipulation cleanup 2003-05-17 21:20:09 +00:00
itojun c5f76786a4 use strlcpy 2003-05-17 21:18:46 +00:00
itojun 0f00216d14 string manipulation cleanup 2003-05-17 21:17:43 +00:00
wiz d43e332f1e setup -> set up. 2003-05-14 12:11:03 +00:00
christos cc1171039e PR/21233: Onno van der Linden: -U option does not work as advertised. 2003-05-09 20:50:35 +00:00
christos ac8c3de3b3 PR/21515: Onno van der Linden: Fix typo preventing %v from working. 2003-05-09 20:43:47 +00:00
agc 0134b3c484 Pull in <sys/param.h> explicitly. 2003-04-29 17:22:01 +00:00
mycroft f57f7ac072 Back out previous change for now -- it needs more work. 2003-04-24 16:55:29 +00:00
mycroft 8826c5e475 Attempt to give dlsym() the same symbol-searching semantics as _rtld_bind().
Tested in a handful of cases.
Reviewed by: a dead silence
2003-04-23 17:40:25 +00:00
tron 8e10566c2f Output a usefull error message if sysctl(3) fails. 2003-04-22 16:42:00 +00:00
itojun 39d6020d8a backout 1.18 and 1.19 2003-04-22 03:51:07 +00:00
itojun e2d8f394cc free vis_user 2003-04-22 03:03:16 +00:00
itojun 750506085f malloc vis_user (why 1.6 branch has the fix already?) 2003-04-22 03:02:14 +00:00
scw 0b8f02edad Handle unaligned relocations, and RELATIVE relocs with non-zero addends.
This gets binaries linked against libstdc++ working (FSVO "working").
2003-04-21 11:54:46 +00:00