Compare commits

...
185 Commits
Author SHA1 Message Date
Simon L. B. Nielsen 1a707c0e67 Fix BIND named(8) cache poisoning with DNSSEC validation.
[SA-10:01]

Fix ntpd mode 7 denial of service. [SA-10:02]

Fix ZFS ZIL playback with insecure permissions. [SA-10:03]

Various FreeBSD 8.0-RELEASE improvements. [EN-10:01]

Security:	FreeBSD-SA-10:01.bind
Security:	FreeBSD-SA-10:02.ntpd
Security:	FreeBSD-SA-10:03.zfs
Errata:		FreeBSD-EN-10:01.freebsd
Approved by:	so (simon)
2010-01-06 21:45:30 +00:00
Simon L. B. Nielsen 3bcabf8f98 Bump the patch level in the kernel version number, which was
accidentally left out of main commit for SA-09:15, SA-09:15, and
SA-09:17 in r200054.

Approved by:	so (simon)
2009-12-03 12:59:39 +00:00
Colin Percival d9ee9f36b8 Disable SSL renegotiation in order to protect against a serious
protocol flaw. [09:15]

Correctly handle failures from unsetenv resulting from a corrupt
environment in rtld-elf. [09:16]

Fix permissions in freebsd-update in order to prevent leakage of
sensitive files. [09:17]

Approved by:	so (cperciva)
Security:	FreeBSD-SA-09:15.ssl
Security:	FreeBSD-SA-09:16.rtld
Security:	FreeBSD-SA-09:17.freebsd-udpate
2009-12-03 09:18:40 +00:00
Simon L. B. Nielsen 482acad573 MFC r197711 (partial) to 6.x and 7.x:
- Add no zero mapping feature, disabled by default. [EN-09:05]

MFC 178913,178914,179242,179243,180336,180340 to 6.x:

- Fix kqueue pipe race conditions. [SA-09:13]

MFC r192301 to 7.x; 6.x has slightly different fix:

- Fix devfs / VFS NULL pointer race condition. [SA-09:14]

Security:	FreeBSD-SA-09:13.pipe
Security:	FreeBSD-SA-09:14.devfs
Errata:		FreeBSD-EN-09:05.null
Submitted by:	kib [SA-09:13] [SA-09:14]
Submitted by:	bz [EN-09:05]
In collaboration with:	jhb, kib, alc [EN-09:05]
Approved by:	so (simon)
2009-10-02 18:09:56 +00:00
Simon L. B. Nielsen e8c0497d68 Fix BIND named(8) dynamic update message remote DoS.
Obtained from:	ISC
Security:	FreeBSD-SA-09:12.bind
Security:	CVE-2009-0696
Approved by:	so (simon)
2009-07-29 00:14:14 +00:00
Colin Percival 57bbdcd908 Prevent integer overflow in direct pipe write code from circumventing
virtual-to-physical page lookups. [09:09]

Add missing permissions check for SIOCSIFINFO_IN6 ioctl. [09:10]

Fix buffer overflow in "autokey" negotiation in ntpd(8). [09:11]

Approved by:	so (cperciva)
Approved by:	re (not really, but SVN wants this...)
Security:	FreeBSD-SA-09:09.pipe
Security:	FreeBSD-SA-09:10.ipv6
Security:	FreeBSD-SA-09:11.ntpd
2009-06-10 10:31:11 +00:00
Colin Percival 5186ccc403 Don't leak information via uninitialized space in db(3) records. [09:07]
Sanity-check string lengths in order to stop OpenSSL crashing
when printing corrupt BMPString or UniversalString objects. [09:08]

Security:	FreeBSD-SA-09:07.libc
Security:	FreeBSD-SA-09:08.openssl
Security:	CVE-2009-0590
Approved by:	re (kensmith)
Approved by:	so (cperciva)
2009-04-22 14:07:14 +00:00
Simon L. B. Nielsen a554d42eab Correct ntpd(8) cryptographic signature bypass [SA-09:04].
Correct BIND DNSSEC incorrect checks for malformed signatures
[SA-09:04].

Security:	FreeBSD-SA-09:03.ntpd
Security:	FreeBSD-SA-09:04.bind
Obtained from:	ISC [SA-09:04]
Approved by:	so (simon)
2009-01-13 21:19:27 +00:00
Simon L. B. Nielsen 58c30e69b0 Prevent cross-site forgery attacks on lukemftpd(8) due to splitting
long commands into multiple requests. [09:01]

Fix incorrect OpenSSL checks for malformed signatures due to invalid
check of return value from EVP_VerifyFinal(), DSA_verify, and
DSA_do_verify. [09:02]

Security:	FreeBSD-SA-09:01.lukemftpd
Security:	FreeBSD-SA-09:02.openssl
Obtained from:	NetBSD [SA-09:01]
Obtained from:	OpenSSL Project [SA-09:02]
Approved by:	so (simon)
2009-01-07 20:17:55 +00:00
Colin Percival 09ac114e66 Prevent cross-site forgery attacks on ftpd(8) due to splitting
long commands into multiple requests. [08:12]

Avoid calling uninitialized function pointers in protocol switch
code. [08:13]

Merry Christmas everybody...

Approved by:	so (cperciva)
Approved by:	re (kensmith)
Security:	FreeBSD-SA-08:12.ftpd, FreeBSD-SA-08:13.protosw
2008-12-23 01:23:09 +00:00
Colin Percival be8a3da918 Make sure arc4random(9) is properly seeded when /etc/rc.d/initrandom returns.
Approved by:	so (cperciva)
Approved by:	re (kensmith)
Security:	FreeBSD-SA-08:11.arc4random
2008-11-24 17:39:39 +00:00
Colin Percival c3757ad304 Default to ignoring potentially evil IPv6 Neighbor Solicitation
messages.

Approved by:    so (cperciva)
Approved by:	re (kensmith)
Security:       FreeBSD-SA-08:10.nd6
Thanks to:      jinmei, bz
2008-10-02 00:32:59 +00:00
Simon L. B. Nielsen b0d92bd216 - Fix amd64 local privilege escalation. [08:07]
- Fix nmount(2) local privilege escalation. [08:08]
- Fix IPv6 remote kernel panics. [08:09]

Fix for [08:07] is merge of r181823.

Submitted by:	kib [08:07], csjp [08:08], bz [08:09]
Reviewed by:	peter [08:07], jhb [08:07]
Reviewed by:	jinmei [08:09], rwatson [08:09]
Approved by:	re (SA blanket)
Approved by:	so (simon)
Security:	FreeBSD-SA-08:07.amd64
Security:	FreeBSD-SA-08:08.nmount
Security:	FreeBSD-SA-08:09.icmp6
2008-09-03 19:09:47 +00:00
Colin Percival 8c5bc4cffd Improve randomization in BIND to prevent response spoofing.
Security:	FreeBSD-SA-08:06.bind
Approved by:	so (cperciva)
Thanks to:	remko, csjp
No thanks to:	bronchitis
2008-07-13 18:42:38 +00:00
Colin Percival 1ef83f7801 Forced commit to note that the previous commit message should have been:
Fix logic error in sshd(8) concerning the handling of failed
attempts to bind ports for X11 forwarding. [SA-08:05]

Fix issues with threaded programs calling fork(2). [EN-08:01]

Security:	FreeBSD-SA-08:05.openssh
Errata:		FreeBSD-EN-08:01.libpthread
Approved by:	so (cperciva)
2008-04-17 00:02:20 +00:00
Colin Percival f2f5e30f43 Fix logic error in sshd(8) concerning the handling of failed
attempts to bind ports for X11 forwarding.

Security:	FreeBSD-SA-08:05.openssh
Approved by:	so (cperciva)
2008-04-17 00:00:54 +00:00
Simon L. B. Nielsen 15b1f00205 Fix sendfile(2) write-only file permission bypass.
Security:	FreeBSD-SA-08:03.sendfile
Approved by:	so (simon)
2008-02-14 11:47:39 +00:00
Ken Smith 665ce17da4 Get ready for the 6.3-RELEASE builds.
Approved by:	re (implicit)
2008-01-15 15:46:21 +00:00
Ken Smith 4dfc2a9d07 Add theoretical date of 6.3-RELEASE.
Approved by:	re (implicit)
2008-01-15 15:45:07 +00:00
Andrew Gallatin 4b81b9d4b9 MFC: Update to firmware version 1.4.29 from 1.4.25
Approved by: re (kensmith)
2008-01-15 15:41:30 +00:00
Hiroki Sato e6a99ff64f Document FreeBSD-SA-08:01.pty and FreeBSD-SA-08:02.libc.
Approved by:	re (implicitly)
2008-01-15 02:34:11 +00:00
Colin Percival 8a642c9425 Fix issues which allow snooping on ptys. [08:01]
Fix an off-by-one error in inet_network(3). [08:02]

Security: FreeBSD-SA-08:01.pty
Security: FreeBSD-SA-08:02.libc
Approved by:	re (kensmith)
Thanks to:	re@ for being so patient with us holding up the release
2008-01-14 22:56:18 +00:00
Ken Smith 8745233043 MFRELENG_6 v1.6.2.11
> Add the various packages we've ejected from the CD sets through
> recent years back on disc3.

Approved by:    re (hrs)
2008-01-14 17:42:09 +00:00
Hiroki Sato ba86d89173 Update page footer for release.
Approved by:	re (implicitly)
2008-01-14 09:58:55 +00:00
Hiroki Sato 5012fd4fd1 Bump &release.*; for 6.3R.
Approved by:	re (implicitly)
2008-01-14 09:47:24 +00:00
Doug Barton 3dfc154adc MFC the change from 1.27, removal of zones from the empty zone list that
may theoretically be allocated some day.

Approved by:	re (kensmith)
2008-01-13 20:51:09 +00:00
Gabor Kovesdan 3784aa50c6 MFC r1.5:
- This driver will first appear in FreeBSD 6.3, not 7.0

Approved by:	re (hrs)
2008-01-08 15:37:57 +00:00
John Baldwin 23da803376 MFC: Use devclass_get_count() instead of devclass_get_maxunit().
Approved by:	re (hrs)
2008-01-07 21:27:50 +00:00
Xin LI 39cd379459 - Reflect tzdata2007k update;
- Simplified Chinese translation: catchup with English version.

Approved by:	re (hrs)
2008-01-07 21:00:18 +00:00
Gabor Kovesdan 51f1c14be6 MFC r1.10:
- ipmi(4) appeared in FreeBSD 6.2, not in 6.3

Approved by:	re (hrs)
2008-01-07 14:53:59 +00:00
Peter Wemm a174ff12b1 MFC: rev 1.4: forward compatability with cvs-1.12 repository
Approved by: re (kensmith)
2008-01-07 09:08:53 +00:00
Edwin Groothuis 4fabc4e8db MFC of tzdata2007k.
Approved by:	re (ken smith)
2008-01-06 07:36:08 +00:00
Edwin Groothuis bf2fff9689 Update iso3166 with the data from Newsletter VI-1 2007-09-21:
Added SAINT BARTHELEMY (BL) and SAINT MARTIN (MF).

MFC of rev 1.17

Approved by: re (ken smith)
2008-01-06 07:25:43 +00:00
Gabor Kovesdan 49f7801ee2 MFC
r1.62:
- Document icase variable of make search, which can be used to control
  case-sensitivity
r1.63:
- Document PORT_DBDIR
r1.64:
- Remove incomplete sentence fragment

Approved by:	re (hrs)
2008-01-04 13:33:01 +00:00
Gabor Kovesdan f0727e3c7c MFC r1.7
- This driver has already appeared in 6.2

Approved by:	re (hrs)
2008-01-04 13:15:02 +00:00
Gabor Kovesdan c70d37f758 MFC r1.4
- This driver will first appear in 6.3, not 7.0

Approved by:	re (hrs)
2008-01-04 13:14:32 +00:00
Gabor Kovesdan 8f19e086a1 MFC r1.13
- This driver will first appear in 6.3, not 7.0

Approved by:	re (hrs)
2008-01-04 13:14:06 +00:00
Gabor Kovesdan 9754196968 MFC r1.3
- This driver will first appear in 6.3, not 7.0

Approved by:	re (hrs)
2008-01-04 13:13:44 +00:00
Gabor Kovesdan 945e02ca3d MFC r1.9
- This driver will first appear in 6.3, not 7.0

Approved by:	re (hrs)
2008-01-04 13:12:19 +00:00
Gabor Kovesdan 1291c3363b MFC r1.2
- This driver will first appear in 6.3, not 7.0

Approved by:	re (hrs)
2008-01-04 13:11:59 +00:00
Gabor Kovesdan 91324bfc44 MFC r1.8
- This driver will first appear in 6.3, not 7.0

Approved by:	re (hrs)
2008-01-04 13:09:04 +00:00
Warner Losh a52d0fd7f4 MFC: Happy new year
Approved by: re@
2008-01-01 09:37:09 +00:00
Andrew Thompson f3931b63eb MFC r1.8
Fix a panic where if the mbuf was consumed by the filter for requeueing
  (dummynet), ipsec_filter() would return the empty error code and the ipsec
  code would continue to forward/deference the null mbuf.

Approved by:	re (gnn)
2007-12-29 17:29:11 +00:00
Ken Smith 4b2d1164e8 MFC v1.117:
> Plug a memory leak.  Once any given package (e.g. perl) was installed
> we would leak a saved screen for every other package we tried to install
> that listed perl as one of its dependencies.  When installing things
> like gnome and kde that wound up being a LOT of leaked memory.

While here fix up some whitespace nits that show up as differences
from the other branches.

Approved by:	re (bmah)
2007-12-29 06:22:56 +00:00
Ken Smith 292c474cc5 MFC v1.78 and v1.79:
Remove process limits for datasize and stacksize which are unlimited
during a "normal login" (thanks to /etc/login.conf) but not when
sysinstall is running as part of an installation.  Fixups for error
messages and a comment that became untrue.

Build test help from:	rwatson
Approved by:		re (bmah)
2007-12-29 06:21:59 +00:00
Warner Losh 04a6d14346 MFC: Update to 2008.
Approved by: re@ (kensmith)
2007-12-26 16:49:12 +00:00
Ken Smith d92b0d8d4f MFC v1.116:
> For the INDEX file to be used on disc1 of the 7.0-RELEASE the longest
> "build dependencies" field is 5,108 characters which overflows the
> length of the junk buffer by a teeny bit.  This whole section needs
> much more error checking but for now just completely ignore stuff
> we have no interest in instead of copying it to someplace we don't
> use in the process.

Approved by:    re (bmah)
2007-12-24 06:42:35 +00:00
Doug Barton 6e402d3117 MFC version 1.55, safety belt for the (unlikely) disappearance of
the temproot before a -r run.

Approved by:	re (kensmith)
2007-12-24 05:51:45 +00:00
Marius Strobl 12b20befe5 MFC: 1.8
In openprom_ioctl() ensure appropriate permissions and that data isn't
NULL and doesn't point to a NULL pointer before dereferencing it.

Approved by:	re (kensmith)
2007-12-23 11:31:24 +00:00
Robert Watson 36b3e34efe Merge in_pcb.c:1.165.2.7 from RELENG_6 to RELENG_6_3:
When IPSEC fails to allocate policy state for an inpcb, and MAC is in use,
  free the MAC label on the inpcb before freeing the inpcb.

  Submitted by:   tanyong <tanyong at ercist dot iscas dot ac dot cn>,
                  zhouzhouyi

Approved by:	re (kensmith)
2007-12-22 21:01:53 +00:00
Robert Watson 63891de9b7 Merge mac_posix_sem.c:1.1.2.1 from HEAD to RELENG_6_3:
Fix a MAC label leak for POSIX semaphores, in which per-policy labels
  would be properly disposed of, but the global label structure for the
  semaphore wouldn't be freed.

  Reported by:    tanyong <tanyong at ercist dot iscas dot ac dot cn>,
                  zhouzhouyi

Approved by:	re (kensmith)
2007-12-22 17:04:16 +00:00
Robert Watson 55813e26c7 Merge in6_pcb.c:1.62.2.6 from RELENG_6 to RELENG_6_3:
Fix leaking MAC labels for IPv6 inpcbs by adding missing MAC label
  destroy call; this transpired because the inpcb alloc path for IPv4/IPv6
  is the same code, but IPv6 has a separate free path.  The results was
  that as new IPv6 TCP connections were created, kernel memory would
  gradually leak.

  Reported by:    tanyong <tanyong at ercist dot iscas dot ac dot cn>,
                  zhouzhouyi

Approved by:    re (kensmith)
2007-12-22 16:49:20 +00:00
Ken Smith a2b33fe311 Prepare for RC2 builds.
Approved by:	re (implicit)
2007-12-22 06:52:56 +00:00
Ken Smith a964c7817f MFS of v1.6.2.10:
> Initial pass at shifting packages around for 6.3-REL layout.  There
> is a lot of space left on disc3 that we can put to use by adding back
> in lots of the packages we've been slowly ejecting through the years.
> We'll decide exactly which ones a little bit later.

Approved by:	re (rwatson)
2007-12-22 06:33:58 +00:00
Ken Smith ef22fd9354 MFC v1.887.2.22:
> Add support for disc3.  Depending on architecture the combination of
> kde3 and gnome2 is at least 670Mb which would mean if we stick with
> just disc1/disc2 the only packages we could provide on the iso's
> would be X11, kde3, and gnome2...

Approved by:    re (rwatson)
2007-12-22 06:30:01 +00:00
Ken Smith e1b4478f4a MFC v1.253 of dist.c and v1.71 of dist.h:
> A few more adjustments needed because of changes in xorg.  Just installing
> xorg-server doesn't include any video drivers so install xorg-drivers as
> well.  And if font-alias isn't installed the X server won't start,
> complaining it can't find the font "fixed".

Approved by:    re (rwatson)
2007-12-22 06:26:54 +00:00
Andrew Thompson 64455cad26 MFC r1.25
- Use the macro to check the port status has it will also test if its
   administratively down (!IFF_UP)
 - Use the same parameters to lagg_link_active() to get the backup port as in
   the output path, this didnt actually matter in practice as sc_primary is
   always the first on the port list.

Approved by:	re (kensmith)
2007-12-21 05:35:29 +00:00
Andrew Thompson 9ca01152e8 MFC r1.108
When the bridge has an address and a packet comes in for it then drop it if
 the link has been marked discarding by Spanning Tree.

Approved by:    re (kensmith)
2007-12-21 05:30:47 +00:00
David E. O'Brien f34d9cc44c MF6: gdbserver is back.
Approved by:	re(kensmith)
2007-12-20 07:02:48 +00:00
Rui Paulo 6536499f7d MFC revision 1.679:
Disallow the legacy USB circuit to generate an SMI# via an ICH
  register (MacBooks only).
  This allows MacBooks to boot in SMP mode without any trick and
  solves the timer problems with HZ=1000.

Approved by:	     re (kensmith), njl (mentor)
2007-12-19 21:08:33 +00:00
Rui Paulo edc309ced3 MFC revision 1.662 and 1.663:
Disallow the legacy USB circuit to generate an SMI# via an ICH
  register (MacBooks only).
  This allows MacBooks to boot in SMP mode without any trick and
  solves the timer problems with HZ=1000.

Approved by:	re (kensmith), njl (mentor)
2007-12-19 21:05:43 +00:00
Peter Wemm 6b2521f3b4 MFC: Specify minimum retransmit scale factor in fractions of hz, not ticks.
Approved by:  re (kensmith)
2007-12-18 04:13:52 +00:00
John Baldwin 892b55384b MFC: Only pass paths to directories or config files that exist for ldconfig
for 32-bit binaries.

Approved by:	re (kensmith)
2007-12-18 01:35:26 +00:00
John Baldwin 46e6d5f628 MFC: Update posix_openpt(3) to handle 512 ptys.
Approved by:	re (gnn)
2007-12-18 00:36:21 +00:00
Scott Long 17cef3e101 Add the hptrr driver.
Submitted by: Highpoint
Approved by: re
2007-12-15 06:32:34 +00:00
cvs2svn 6591ff2ad5 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-12-15 00:56:19 +00:00
Doug Barton 62ee8eeee8 Merge from RELENG_6 all updates to date *except* for the combination
of the fortunes-o.real and fortunes2.o files.

Approved by:	re (kensmith)
2007-12-13 06:09:08 +00:00
John Baldwin edc0b087c3 MF6: Add the workaround in busdma for busted PYXIS chipsets along with
the 'machdep.busdma_pyxis_bug' loader tunable.

Approved by:	re (kensmith, blanket on sys/alpha)
2007-12-10 20:16:07 +00:00
Ed Maste 49e4438dd7 MFC to RELENG_6_3
aac_pci.c:1.63-1.65
aac.4 1.37-1.39

  Add PCI IDs for controllers obtained from Adaptec's latest drivers.

Approved by:    re (kensmith)
2007-12-10 19:35:43 +00:00
Ed Maste 13aae9c16d MFC to RELENG_6_3
aac_debug.c:1.23

  Respell 'Conatainer' as 'Container'.

Approved by:    re (kensmith)
2007-12-10 19:30:54 +00:00
Gabor Kovesdan 36413fd02b MFC rev 1.13:
- Add doc/hu_* and doc/mn_* to the refuse examples so that include all
  of the currently used languages

Approved by:	re (kensmith)
2007-12-10 18:47:05 +00:00
Gabor Kovesdan bc726df6ec MFC rev 1.14:
- Add doc/hu_* and doc/mn_* to the sample refuse file so that it includes all
  of the languages

Approved by:	re (kensmith)
2007-12-10 18:46:20 +00:00
Jung-uk Kim 6036d78c07 MFC: 1.3
Teach dhclient(8) about net80211 link (association) status.

Reviewed by:	brooks
Approved by:	re (kensmith)
2007-12-10 17:58:47 +00:00
Scott Long 89f4d9ca29 MFC: Support new ARC120x generation of cards.
Approved by: re
Submitted by: Erich Chen @ Areca
2007-12-09 19:53:59 +00:00
Xin LI 2e79acad5f Sync up ata(4) work by sos@ on -HEAD:
* Add preliminary SATA ATAPI support for sii 3132/3124 chips.
 * Fix speed report on Intel SATA chips in compat mode.
 * Fix broken detect of JMicron 368.

Related revisions:
 - ata-chipset.c: 1.208, 1.210
 - ata-disk.c.c:  1.205

Approved by:	re (kensmith), sos
2007-12-09 19:27:19 +00:00
cvs2svn ef3bafb1ea This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-12-09 11:02:00 +00:00
Nate Lawson f0e0b13341 MFC: 1.149-1.150. Hold Giant over device_suspend/resume() methods in apm.
Approved by:	re
2007-12-09 00:24:16 +00:00
David Malone 412c054fad Regen.
Approved by:	re (kensmith)
2007-12-08 13:46:03 +00:00
David Malone e2ccfdec35 MFC: Linuxulator statfs64 fixes.
Approved by:	re (kensmith)
2007-12-08 13:43:48 +00:00
Remko Lodder 6ded5b3a3c MFC rev 1.6 msk.4
MFC rev 1.26 if_msk.c
MFC rev 1.11 if_mskreg.h

  Bring in support for: Marvell Yukon 8039

  PR:             118401
  Submitted by:   Skip Ford <skip at menantico dot com>
  Approved by:    imp (mentor), yongari
  MFC After:      3 days

Approved by:	re (kensmith), imp (mentor, implicit)
2007-12-08 12:19:13 +00:00
Ulf Lilleengen 93d9ea5d2d - Add support for all geom class command options in the Fixit environment by
pointing GEOM_LIBRARY_PATH to the geom libraries.

PR:		misc/113543
Submitted by:	Ed Schouten <ed -at- fxq.nl>
Approved by:	re (kensmith), pjd (mentor)
2007-12-08 10:05:32 +00:00
Xin LI 01c7c45203 em(4) is updated to 6.7.2.
Approved by:	re (hrs)
2007-12-08 06:01:34 +00:00
Kip Macy 89f88be1c1 MFC: 1.317, 1.318, 1.319
Fix bit macros to work on multi-byte types

Approved by: re(kensmith)
2007-12-07 23:22:57 +00:00
Olivier Houchard a86845d51e MFC:
sys/arm/include/asmacros.h rev 1.7
sys/arm/include/atomic.h rev 1.23

Close a race.

The RAS implementation would set the end address, then the start
address.  These were used by the kernel to restart a RAS sequence if
it was interrupted.  When the thread switching code ran, it would
check these values and adjust the PC and clear them if it did.

However, there's a small flaw in this scheme.  Thread T1, sets the end
address and gets preempted.  Thread T2 runs and also does a RAS
operation.  This resets end to zero.  Thread T1 now runs again and
sets start and then begins the RAS sequence, but is preempted before
the RAS sequence executes its last instruction.  The kernel code that
would ordinarily restart the RAS sequence doesn't because the PC isn't
between start and 0, so the PC isn't set to the start of the sequence.
So when T1 is resumed again, it is at the wrong location for RAS to
produce the correct results.  This causes the wrong results for the
atomic sequence.

The window for the first race is 3 instructions.  The window for the
second race is 5-10 instructions depending on the atomic operation.
This makes this failure fairly rare and hard to reproduce.

Mutexs are implemented in libthr using atomic operations.  When the
above race would occur, a lock could get stuck locked, causing many
downstream problems, as you might expect.

Also, make sure to reset the start and end address when doing a syscall, or
a malicious process could set them before doing a syscall.

Reviewed by: imp, ups (thanks guys)
Approved by:	re (kensmith)
Pointy hat to:  cognet
2007-12-07 22:08:02 +00:00
Xin LI 7f80e86632 MFC revision 1.209
date: 2007/11/26 19:08:08;  author: sos;  state: Exp;  lines: +1 -1
Use device_set_desc_copy in the generic ident as its used on a temp buffer.

Approved by:	re (kensmith)
2007-12-07 17:59:39 +00:00
Konstantin Belousov 6426331ee1 MFC rev. 1.181:
Check for the program headers alignment of the ELF images before
dereferencing. Unaligned access could cause panic on strict alignment
architectures.

Approved by:	re (kensmith)
2007-12-07 14:30:26 +00:00
Konstantin Belousov 1f0aa93ebc MFC rev. 1.5, 1.6:
Restore the branding of the ELF executables. The structure was optimized out.

Approved by:	re (kensmith)
2007-12-07 14:16:53 +00:00
Kevin Lo 560a040057 MFC r1.18:
zic(8) should exit the loop when the end of the string is reached
due to the call to error(). The problem found by doing fuzz testing.

Approved by: re (kensmith)
2007-12-07 05:17:34 +00:00
Xin LI 3473a51bfc Bring in the latest snapshot of Simplified Chinese translation for the release
notes documentation for 6.3-RELEASE.  This is a collective work by the FreeBSD
Simplified Chinese Project team.

Submitted by:	Junfeng Wen <wjf at cn.FreeBSD.org>
		Chifeng Qu <chifeng at gmail.com>
		delphij
Obtained from:	The FreeBSD Simplified Chinese Project CVS
Approved by:	re (kensmith)
2007-12-07 04:04:52 +00:00
Andrew Thompson 38ac70031f MFC r1.209
Apply a workaround for the unkillable jail problem where some devices created
  within the jail are never freed.

Approved by:	re (kensmith)
2007-12-07 03:46:23 +00:00
Philip Paeps 6015633f10 MFC r1.33: Add a cross-reference to newgrp(1).
Approved by:	re (kensmith)
2007-12-06 10:50:35 +00:00
Philip Paeps 846d2046c0 MFC r1.13:
Fix a use-after-free.

Submitted by:	Ilja van Sprundel <ilja -at- netric.org>
Reviewed by:	secteam
Approved by:	re (kensmith)
2007-12-06 10:24:29 +00:00
Philip Paeps c78c61ea80 MFC if_iwi.c:1.59
if_ipw.c:1.34

  Plug two potential (root-only, local) information leaks.  buf is not
  initialized before use and returned integrally instead of up to size.

Submitted by:	Ilja van Sprundel <ilja -at- netric.org>
Reviewed by:	secteam
Approved by:	re (kensmith)
2007-12-06 10:23:15 +00:00
John Baldwin 3785ce0ed0 MFC: Always assume type #1 PCI config transactions for amd64 and relax the
probe for type #1 on i386.

Approved by:	re (kensmith)
2007-12-06 08:27:03 +00:00
John Baldwin 75c29c3f05 MFC: Change pci_cfgdisable() into a nop for type #1 similar to what other
OSs do.

Approved by:	re (kensmith)
2007-12-06 08:19:00 +00:00
John Baldwin b672f930d6 MFC: Don't delete files in the X11 socket directories under /tmp.
Approved by:	re (kensmith)
2007-12-06 08:11:19 +00:00
Pyun YongHyeon b6a9024bad MFC if_re.c, rev 1.98 to RELENG_6_3
Always honor promiscuous flag prior to programming Rx multicast
filter. This fixes a regression introduced in rev 1.89.

PR:	114632
Approved by:	re (kensmith)
2007-12-06 06:02:43 +00:00
Ariff Abdullah 1f95d1b8c7 Headphone / speakers automute fixup for Acer Aspire 4710 @ ALC268 laptop.
Tested by:	Liyu, She
Approved by:	re (kensmith)
2007-12-06 05:21:07 +00:00
Kip Macy 9179a53af5 Common code changes for firmware update.
Approved by: re(kensmith)
2007-12-06 00:02:00 +00:00
Kip Macy 11fd3fc4d1 - fix qset to port binding as a proper fix for the problems encountered on the 4-port
- fix the use after free seen when sending packets small enough to fit as an immediate
     and bpf peers are present
   - update to firmware rev 4.7 along with various small vendor fixes

Approved by: re(kensmith)
2007-12-05 23:46:44 +00:00
Robert Watson e9a6c4793a Merge kern_mbuf.c:1.9.2.10 from RELENG_6 to RELENG_6_3:
Call NET_LOCK_GIANT/NET_UNLOCK_GIANT around calls to protocol drain
  methods in mb_reclaim().  This is not an MFC, as debug.mpsafenet is
  not present in 7.x or 8.x.  In practice, this likely resulted in
  instability only on kernels with INVARIANTS, as the protocol drain
  paths are generally MPSAFE.

  PR:             116034
  Reported by:    Dan Lukes <[email protected]>
  Discussed with: kmacy, alc
  Approved by:    re (kensmith)
  Tested by:      Eugene Grosbein <eugen at grosbein dot pp dot ru>
2007-12-05 00:47:48 +00:00
Colin Percival 6e92d79cc6 MFC revision 1.3: Add /root/, /.cshrc, and /.profile to the default
UpdateIfUnmodified directive in order to avoid overwriting these when
users upgrade to future versions of FreeBSD.

Approved by:    re (kensmith)
2007-12-04 22:51:36 +00:00
Xin LI 8f9668f065 MFC: less v416.
Approved by:	re (kensmith)
2007-12-04 22:41:44 +00:00
David E. O'Brien 21c88ae71d MFC: turn on gdbserver for the arch that supports it.
Approved by:	re(kensmith)
2007-12-04 18:02:47 +00:00
David E. O'Brien 64c1891e95 MFC:
+ Turn on gdbserver for the arch that supports it.
+ Fix static/extern mismatch.
+ Remove extern int verbose declaration.

Approved by:	re(kensmith)
2007-12-03 21:05:20 +00:00
Joe Marcus Clarke 6a9f60381f Forced commit to correct file handle reversal in previous commit. The
message should have read:

This is a partial MFC of rev 1.126 from HEAD's libkse.  This only merges the
fix which causes stderr_debug to write output to STDOUT_FILENO instead
of STDERR_FILENO.  This is known to fix (or workaround) some mono-related
build problems.

Approved by:	re (kensmith)
2007-12-02 23:46:27 +00:00
Joe Marcus Clarke b3e34e3178 MFC: rev 1.126
This is a partial MFC of rev 1.126 from HEAD's libkse.  This only merges the
fix which causes stderr_debug to write output to STDERR_FILENO instead
of STDOUT_FILENO.  This is known to fix (or workaround) some mono-related
build problems.

Approved by:	re (kensmith)
2007-12-02 23:42:38 +00:00
Olivier Houchard df6cda3c36 MFC:
gnu/usr.bin/gdb/arch/arm/nm-fbsd.h rev 1.2
gnu/usr.bin/gdb/arch/arm/Makefile rev 1.2
gnu/usr.bin/gdb/arch/arm/armfbsd-nat.c 1.2
gnu/usr.bin/gdb/arch/arm/armfbsd-tdep.c rev 1.2
gnu/usr.bin/gdb/arch/arm/init.c rev 1.2
Allow gdb to attach live process.
Thread support for arm.

Approved by:	re (kensmith)
2007-12-02 14:38:21 +00:00
Olivier Houchard 7cf3e7ee51 MFC:
arm/at91/kb920x_machdep.c rev 1.24, 1.25 and 1.26
arm/at91/std.at91 rev 1.4
arm/at91/std.kb920x rev 1.5
arm/at91/at91rm92reg.h rev 1.6
conf/options.arm 1.18
Small tweaks to be able to load the kernel at a different address than
0x20000000 + add an option to override the default value of the master clock
frequency.
arm/at91/if_ate.c rev 1.21:
In ate_get_mac(), try to get the mac address in the right order, at least
in the same order as it's set in ate_set_mac.

arm/conf/HL200: config file for the Hot-e HL200

Approved by:	re (kensmith)
2007-12-02 14:21:27 +00:00
cvs2svn c2cbeda1e4 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-12-02 13:10:44 +00:00
Remko Lodder 279a95ed00 MFC rev 1.29 atacontrol.8
Expand the EXAMPLES section for atacontrol.8

  PR:             docs/117310
  Submitted by:   Ted Mittelstaedt <tedm at ipinc dot net>
                  with minor modifications by me.

Approved by:    re (hrs)
2007-12-02 09:09:44 +00:00
Remko Lodder 4c67461f0a MFC rev 1.64 sysctl.8
Remove mentionings of kern.dumpdev which is no longer available.

  PR:             docs/113570
  Submitted by:   lawrance
  MFC After:      3 days (where applicable)

Approved by:    re (hrs)
2007-12-02 09:08:45 +00:00
Remko Lodder ab064722fb MFC rev 1.41, 1.42 mdconfig.8
Sync with md(4)'s information regarding the swap backend.

  PR:             docs/115721
  Submitted by:   Stefan Lambrev <[email protected]>
  MFC After:      3 days

  Every newline should start on it's own line. I didn't do that in the
  previous commit, so make it happen now.

  Prodded by:     brueffer

Approved by:    re (hrs)
2007-12-02 09:07:48 +00:00
Remko Lodder e85c901792 MFC rev 1.7 newsyslog.conf.5
s/effect/affect/

  PR:             docs/118266
  Submitted by:   "Kim Scarborough" <sluggo at unknown dot nu>
  MFC After:      3 days

Approved by:    re (hrs)
2007-12-02 09:06:42 +00:00
Remko Lodder bf26f95050 MFC rev 1.8 ichsmb.4
Add information about the ICH6 and ICH7 being supported since recently.

MFC rev 1.20 ichsmb_pci.c

  Add the Intel 82801FB (ICH6) SMBus controller and the
  Intel 82801GB (ICH7) SMBus controller.

  PR:             85106 [1]
  PR:             99663 [2]
  Approved by:    imp (mentor), jhb
  Submitted by:   Oliver Fromme <olli at lurza.secnetix dot de>, [1]
                  Arthur Hartwig <arthur dot hartwig at nokia dot com>, [1]
                  Lowell Gilbert <lgfbsd at be-well dot ilk dot org> [2]@
  MFC After:      3 days

Approved by:    re (hrs), imp (mentor, implicit)
2007-12-02 09:05:38 +00:00
Remko Lodder 404123cef8 MFC rev 1.45 rl.4
Add the Planex FNW-3603TX card to the list.

MFC rev 1.172 if_rl.c
MFC rev 1.68  if_rlreg.h

  Add the FNW3603TX Planex NIC.

  PR:             76081
  Approved by:    imp (mentor)
  Submitted by:   umi at pocke dot org
  MFC After:      3 days

Approved by:    re (hrs), imp (mentor, implicit)
2007-12-02 09:04:11 +00:00
Darren Reed e1bc400aa8 MFC:
Fix 3 issues relating to the use of "auth" rules in IPFilter, from sourceforge:
1837014 Kernel panics after authentication of an outgoing packet
1836992 Potential bugs in packet auth code (w/patches)
1836967 Kernel panic when using auth rule with keep state
and another reported only to FreeBSD by Andiry (see PR)

PR:             kern/118251
Submitted by:   Andriy Syrovenko <[email protected]>
Reviewed by:    darrenr
Approved by:    re
2007-12-01 00:53:41 +00:00
Ariff Abdullah 1983dff4e5 MFC: (revision 1.47, 1.48)
- Add missing MCP65 id which was accidentally removed in previous commit.
- Add Analog Devices AD1984 codec id.
- Enable pcbeep control for Acer + ALC268 (nid 29). Give enough (fake)
  hints so the parser will grab it and allocate "speaker" control.
- Fix regression while preparing DAC and ADC for multichannel
  format. Since playback policy is to output to every possible path,
  ensure that each DAC is started.

Reported / Tested by:	Guy Brand
Approved by:		re (kensmith)
2007-11-30 15:12:06 +00:00
Bruce A. Mah f656099089 Use X.org 7.2 and FreeBSD 6.3-RELEASE manpage hyperlinks.
Approved by:	re (implicitly)
2007-11-30 05:38:35 +00:00
Bruce A. Mah 0e74c5ca31 MFC: SA-07:09.random.
Approved by:	re (implicitly)
2007-11-30 05:28:03 +00:00
Andrew Thompson 8057d81ec7 MFC r1.22
Have the lagg interface generate link up/down events, this fixes using
 carp+lagg together.

Approved by:	re (kensmith)
2007-11-29 19:05:22 +00:00
Bruce A. Mah 17501dfed7 MFC: freebsd-update(8) upgrade, ipfwpcap(8), IPFilter 4.1.28.
Approved by:	re (implicitly)
2007-11-29 17:43:30 +00:00
Simon L. B. Nielsen 99d77ab486 Correct a random value disclosure in random(4).
Security:	FreeBSD-SA-07:09.random
Approved by:	re (kensmith)
2007-11-29 16:06:54 +00:00
Tai-hwa Liang 8acd51193d MFC(1.14): Fixing a double free bug which will cause tail to dump core when
there's no tailing newline(\n) character.

PR:		bin/118267
Reviewed by:	kib
Approved by:	re (kensmith)
2007-11-29 03:54:56 +00:00
David E. O'Brien a793975d0d MFC: fix situation where GDB gives incorrect backtraces when a signal
handler is in the call chain.

Approved by:	re(kensmith)
2007-11-28 16:55:39 +00:00
David E. O'Brien 31c1d654ac Sync with HEAD.
Approved by:	re(gnn)
2007-11-28 16:41:47 +00:00
Ariff Abdullah 067993cfde * Fix support for followings:
o Acer Aspire 4520 laptop
    - jack sensing / automute
  o Toshiba Satellite A135-S4527 laptop
    - jack sensing / automute
      Tested by: lioux
  o Apple Macbook 3 (is it?)
    - require gpio0 (for speakers) and ovref50 (for headphone)
      to make it works
    - jack sensing / automute
      Tested by: Ed Schouten
* Add Nvidia MCP67 controller ids.
* Be sensible about simmilar controller with multiple pci ids.
* Connect unused DAC/ADC to stream#0 rather than forcing each of them
  managing their own stream.

Approved by:	re (kensmith)
2007-11-27 23:37:48 +00:00
Marius Strobl 2a70b4aa1e MFC: UPDATING 1.512, sys/sparc64/conf/DEFAULTS 1.11
Let sunkbd(4) emulate an AT keyboard by default.
This has the following benefits:
- allows to use the AT keyboard maps in share/syscons/keymaps with
  sunkbd(4),
- allows to use kbdmux(4) with sunkbd(4),
- allows Sun RS232 keyboards to be configured and used the same
  way as Sun USB keyboards driven by ukbd(4) (which also does AT
  keyboard emulation) with X.Org, putting an end to the problem
  of native support for the former in X.Org being broken over and
  over again.

Approved by:	re (kensmith)
2007-11-27 20:48:13 +00:00
Dmitry Morozovsky e3f2c87593 MFC revision 1.31:
devinfo(8) manual page refers to pciconfr(8).  Add back reference for
	completeness.

Approved by:	re (kensmith)
2007-11-27 20:00:29 +00:00
John Baldwin 3a76a88a0d MFC: Bump up the number of ttys supported by pty(4) to 512.
Approved by:	re (kensmith)
2007-11-27 18:43:09 +00:00
John Baldwin 9addff1cb5 MFC: Expand critical section coverage for ithread scheduling.
Approved by:	re (kensmith)
2007-11-27 17:46:18 +00:00
John Baldwin a6c0a4ae53 MF6: Sync with i386 and expand support for bounce pages, etc.
Approved by:	re (kensmith)
2007-11-27 17:45:59 +00:00
Tai-hwa Liang 93d321a90c MFC(if_an.c:1.85, if_anreg.h:1.24): Trying to eliminate a racing as well as
reducing the chance of device removal(PCCARD) panic by replacing the
timeout(9) with callout(9) APIs.

Approved by:	re (gnn)
2007-11-27 08:22:37 +00:00
Ken Smith 78fe411920 Get ready for 6.3-RC1 builds.
Approved by:	re (implicit)
2007-11-26 15:51:15 +00:00
Scott Long 1a3fe001fc MFC: Expand critical section coverage so that shared fast and ithread handlers
don't stall.  Unlike 8-CURRENT and 7-STABLE, sparc64 and powerpc in 6-STABLE
do not appear to have this problem.

Approved by: re
2007-11-26 15:42:43 +00:00
Rong-En Fan 511f2283f0 - Put __mb_sb_limit symbol back to libc to ease users' pain when upgrading
their 6-STABLE system. This is necessary because we have this symbol
  exported between 20071025 and 20071030. Binaries built during that perios
  will be broken after 602115.

Requested by:	many
Approved by:	re (kensmith)
2007-11-26 03:29:17 +00:00
David Xu b4d58a20fd MFC revision 1.27:
In _pthread_key_create() ensure that libkse is initialized.

Approved by: re (kensmith)
2007-11-26 02:52:20 +00:00
Bruce A. Mah 265d576fc9 New release notes: freebsd-update(8) -r, OpenBSM 1.0.
Approved by:	re (implicitly)
2007-11-25 18:13:09 +00:00
Bruce A. Mah 3a603deb13 Bump version numbers in the release documentation for 6.3-RELEASE.
Some more changes are required in this file to make manpage hyperlinks
work correctly.

Approved by:	re (implicitly)
2007-11-25 17:51:48 +00:00
Bruce A. Mah abb2f160d4 Update upload location for release note renderings for 6.3-RELEASE.
Approved by:	re (implicitly)
2007-11-25 17:42:08 +00:00
Bruce A. Mah 4c313eeee1 Trim release errata for 6.3-RELEASE.
Approved by:	re (implicitly)
2007-11-25 17:41:31 +00:00
Jean-Sébastien Pédron 62ecd0a768 MFC 1.193:
The kernel uses two ways to write data on a pipe:
      o  buffered write, for chunks smaller than PIPE_MINDIRECT bytes
      o  direct write, for everything else

  A call to writev(2) may receive struct iov of various size and the
  kernel may have to switch from one solution to the other. Before doing
  this, it must wake reader processes and any select/poll/kqueue up.

  This commit fixes a bug where select/poll/kqueue are not triggered
  when switching from buffered write to direct write. It adds calls to
  pipeselwakeup().

  I give more details on freebsd-arch@:
  http://lists.freebsd.org/pipermail/freebsd-arch/2007-September/006790.html

  This should fix issues with Erlang (lang/erlang) and kqueue.

Reported by:	Rickard Green (Erlang)
Approved by:	re (kensmith)
2007-11-25 17:33:54 +00:00
Ken Smith 832724a318 Prepare for packages-6.3-release to exist.
Approved by:	re (implicit)
2007-11-25 06:36:32 +00:00
Ken Smith 779c287192 Adjust __FreeBSD_version now that RELENG_6_3 exists.
Approved by:	re (implicit)
2007-11-25 06:34:58 +00:00
Ken Smith 430befc57f Adjust branch tag in example.
Approved by:	re (implicit)
2007-11-25 06:32:51 +00:00
Ken Smith 381a8fe24f Adjust build name.
Approved by:	re (implicit)
2007-11-25 06:27:23 +00:00
Ken Smith 97dafd3d02 Switch to RELENG_6_3 for "make update".
Approved by:	re (implicit)
2007-11-25 06:23:43 +00:00
cvs2svn 0ef2db398f This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-11-24 19:45:58 +00:00
cvs2svn 91fdbf85cf This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-11-21 16:47:16 +00:00
cvs2svn d18bde5885 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-11-21 01:31:51 +00:00
cvs2svn 1da0a15938 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-11-21 01:31:50 +00:00
cvs2svn 8685a14be7 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-11-18 18:11:18 +00:00
cvs2svn 185ee3fe74 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-11-18 11:03:30 +00:00
cvs2svn 4f8445a66c This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-11-15 20:20:55 +00:00
cvs2svn 4dcafe4d81 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-11-11 17:07:38 +00:00
cvs2svn 5cbcb71f0c This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-11-07 13:38:46 +00:00
cvs2svn 7ac6ceb62e This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-11-04 15:07:29 +00:00
cvs2svn 36098e1aa6 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-10-26 20:48:19 +00:00
cvs2svn a2c7519ab4 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-10-24 21:19:03 +00:00
cvs2svn e88450ee18 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-10-23 23:45:15 +00:00
cvs2svn c841908172 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-10-23 23:41:25 +00:00
cvs2svn d328d6a7f9 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-09-10 17:30:27 +00:00
cvs2svn c78dc27387 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-07-30 16:53:56 +00:00
cvs2svn de40bc2e65 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-07-13 04:46:35 +00:00
cvs2svn 5b1c0a232e This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-05-16 21:39:45 +00:00
cvs2svn 83d8069140 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-02-09 14:47:54 +00:00
cvs2svn 2cc73f8b75 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-02-07 09:15:05 +00:00
cvs2svn 2e2cc1566c This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-01-15 18:37:34 +00:00
cvs2svn aff812c270 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2007-01-07 18:38:00 +00:00
cvs2svn 95714ee293 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2006-12-01 17:13:57 +00:00
cvs2svn 0cdfbdddbd This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2006-10-13 14:27:52 +00:00
cvs2svn fa0a183de0 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2006-08-17 01:20:37 +00:00
cvs2svn c6762f5f62 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2006-08-15 12:41:11 +00:00
cvs2svn 109a275834 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2006-06-23 10:51:37 +00:00
cvs2svn 5941c0383e This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2006-04-10 20:12:20 +00:00
cvs2svn ffb96c759a This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2006-03-10 19:37:37 +00:00
cvs2svn 60e943ac64 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2006-02-08 05:58:18 +00:00
cvs2svn aba3d67b94 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2006-01-31 15:44:52 +00:00
cvs2svn 8701469d4e This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2006-01-25 08:13:47 +00:00
cvs2svn c42ecb824c This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2005-09-26 19:35:34 +00:00
cvs2svn 84d5a41287 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2005-08-25 05:01:25 +00:00
cvs2svn 02a4541cca This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2005-08-19 18:38:56 +00:00
cvs2svn aa52f66151 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2005-07-11 04:15:01 +00:00
cvs2svn d985c83698 This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2005-07-11 04:15:00 +00:00
cvs2svn 4605e0666a This commit was manufactured by cvs2svn to create branch 'RELENG_6_3'. 2005-07-11 04:14:59 +00:00
341 changed files with 72538 additions and 42929 deletions

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@
The compilation of software known as FreeBSD is distributed under the
following terms:
Copyright (C) 1992-2007 The FreeBSD Project. All rights reserved.
Copyright (C) 1992-2008 The FreeBSD Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
+1 -1
View File
@@ -87,7 +87,7 @@ CLEANDIR= cleandir
.endif
CVS?= cvs
CVSFLAGS?= -r RELENG_6 -P -d -I!
CVSFLAGS?= -r RELENG_6_3 -P -d -I!
SUP?= /usr/bin/csup
SUPFLAGS?= -g -L 2
.if defined(SUPHOST)
-1
View File
@@ -553,7 +553,6 @@ OLD_FILES+=usr/lib/libpam_ssh.a
OLD_FILES+=usr/lib/libpam_ssh_p.a
OLD_FILES+=usr/bin/help
OLD_FILES+=usr/bin/sccs
OLD_FILES+=usr/bin/gdbserver
OLD_FILES+=usr/bin/ssh-keysign
OLD_FILES+=usr/sbin/gifconfig
OLD_FILES+=usr/sbin/prefix
+107
View File
@@ -8,6 +8,113 @@ Items affecting the ports and packages system can be found in
/usr/ports/UPDATING. Please read that file before running
portupgrade.
20100106: p15 FreeBSD-SA-10:01.bind, FreeBSD-SA-10:02.ntpd
Fix BIND named(8) cache poisoning with DNSSEC validation.
[SA-10:01]
Fix ntpd mode 7 denial of service. [SA-10:02]
20091203: p14 FreeBSD-SA-09:15.ssl, FreeBSD-SA-09:17.freebsd-update
Disable SSL renegotiation in order to protect against a serious
protocol flaw. [09:15]
Fix permissions in freebsd-update in order to prevent leakage of
sensitive files. [09:17]
20091002: p13 FreeBSD-SA-09:13.pipe, FreeBSD-SA-09:14.devfs,
FreeBSD-EN-09:05.null
Fix kqueue pipe race conditions. [SA-09:13]
Fix devfs / VFS NULL pointer race condition. [SA-09:14]
Add no zero mapping feature. [EN-09:05]
20090729: p12 FreeBSD-SA-09:12.bind
Fix BIND named(8) dynamic update message remote DoS.
20090610: p11 FreeBSD-SA-09:09.pipe, FreeBSD-SA-09:10.ipv6,
FreeBSD-SA-09:11.ntpd
Prevent integer overflow in direct pipe write code from circumventing
virtual-to-physical page lookups. [09:09]
Add missing permissions check for SIOCSIFINFO_IN6 ioctl. [09:10]
Fix buffer overflow in "autokey" negotiation in ntpd(8). [09:11]
20090422: p10 FreeBSD-SA-09:07.libc, FreeBSD-SA-09:08.openssl
Don't leak information via uninitialized space in db(3) records.
[09:07]
Sanity-check string lengths in order to stop OpenSSL crashing
when printing corrupt BMPString or UniversalString objects. [09:08]
20090113: p9 FreeBSD-SA-09:03.ntpd, FreeBSD-SA-09:04.bind
Correct ntpd cryptographic signature bypass. [09:03]
Correct BIND DNSSEC incorrect checks for malformed
signatures. [09:04]
20090107: p8 FreeBSD-SA-09:01.lukemftpd, FreeBSD-SA-09:02.openssl
Prevent cross-site forgery attacks on lukemftpd(8) due to splitting
long commands into multiple requests. [09:01]
Fix incorrect OpenSSL checks for malformed signatures. [09:02]
20081223: p7 FreeBSD-SA-08:12.ftpd, FreeBSD-SA-08:13.protosw
Prevent cross-site forgery attacks on ftpd(8) due to splitting
long commands into multiple requests. [08:12]
Avoid calling uninitialized function pointers in protocol switch
code. [08:13]
20081124: p6 FreeBSD-SA-08:11.arc4random
Make sure arc4random(9) is properly seeded when /etc/rc.d/initrandom
returns.
20081002: p5 FreeBSD-SA-08:10.nd6
Default to ignoring potentially evil IPv6 Neighbor Solicitation
messages.
20080903: p4 FreeBSD-SA-08:07.amd64, FreeBSD-SA-08:08.nmount,
FreeBSD-SA-08:09.icmp6
Fix amd64 local privilege escalation. [08:07]
Fix nmount(2) local privilege escalation. [08:08]
Fix IPv6 remote kernel panics. [08:09]
20080713: p3 FreeBSD-SA-08:06.bind
Improve randomization in BIND to prevent response spoofing.
20080416: p2 FreeBSD-SA-08:05.openssh,
FreeBSD-EN-08:01.libpthread
Fix logic error in sshd(8) concerning the handling of failed
attempts to bind ports for X11 forwarding. [SA-08:05]
Fix issued with threaded programs calling fork(2). [EN-08:01]
20080214: p1 FreeBSD-SA-08:02.sendfile
Fix sendfile(2) write-only file permission bypass.
20080118:
FreeBSD 6.3-RELEASE
20080118: FreeBSD-SA-08:01.pty, FreeBSD-SA-08:02.libc
Fix issues which allow snooping on ptys. [08:01]
Fix an off-by-one error in inet_network(3). [08:02]
20071129: FreeBSD-SA-07:09.random
Correct a random value disclosure in random(4).
20071127:
The AT keyboard emulation of sunkbd(4) has been turned on
by default. In order to make the special symbols of the Sun
keyboards driven by sunkbd(4) work under X these now have
to be configured the same way as Sun USB keyboards driven
by ukbd(4) (which also does AT keyboard emulation), f.e.:
Option "XkbLayout" "us"
Option "XkbRules" "xorg"
Option "XkbSymbols" "pc(pc105)+sun_vndr/usb(sun_usb)+us"
20071024:
A breakage was introduced in libc and fixed later. Make sure
you have lib/Makefile rev 1.205.2.4. If it already breaks your
-8
View File
@@ -1348,14 +1348,6 @@ client_request(isc_task_t *task, isc_event_t *event) {
}
}
/*
* Hash the incoming request here as it is after
* dns_dispatch_importrecv().
*/
dns_dispatch_hash(&client->now, sizeof(client->now));
dns_dispatch_hash(isc_buffer_base(buffer),
isc_buffer_usedlength(buffer));
/*
* It's a request. Parse it.
*/
+50 -8
View File
@@ -92,6 +92,8 @@
#define DNS_GETDB_NOLOG 0x02U
#define DNS_GETDB_PARTIAL 0x04U
#define PENDINGOK(x) (((x) & DNS_DBFIND_PENDINGOK) != 0)
static void
query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype);
@@ -1698,14 +1700,14 @@ query_addbestns(ns_client_t *client) {
zsigrdataset = NULL;
}
if ((client->query.dboptions & DNS_DBFIND_PENDINGOK) == 0 &&
(rdataset->trust == dns_trust_pending ||
(sigrdataset != NULL && sigrdataset->trust == dns_trust_pending)))
if ((DNS_TRUST_PENDING(rdataset->trust) ||
(sigrdataset != NULL && DNS_TRUST_PENDING(sigrdataset->trust))) &&
!PENDINGOK(client->query.dboptions))
goto cleanup;
if (WANTDNSSEC(client) && SECURE(client) &&
(rdataset->trust == dns_trust_glue ||
(sigrdataset != NULL && sigrdataset->trust == dns_trust_glue)))
if ((DNS_TRUST_GLUE(rdataset->trust) ||
(sigrdataset != NULL && DNS_TRUST_GLUE(sigrdataset->trust))) &&
SECURE(client) && WANTDNSSEC(client))
goto cleanup;
query_addrrset(client, &fname, &rdataset, &sigrdataset, dbuf,
@@ -2364,6 +2366,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
unsigned int options;
isc_boolean_t empty_wild;
dns_rdataset_t *noqname;
dns_rdataset_t tmprdataset;
unsigned int dboptions;
CTRACE("query_find");
@@ -2563,9 +2567,47 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
/*
* Now look for an answer in the database.
*/
dboptions = client->query.dboptions;
if (sigrdataset == NULL && client->view->enablednssec) {
/*
* If the client doesn't want DNSSEC we still want to
* look for any data pending validation to save a remote
* lookup if possible.
*/
dns_rdataset_init(&tmprdataset);
sigrdataset = &tmprdataset;
dboptions |= DNS_DBFIND_PENDINGOK;
}
refind:
result = dns_db_find(db, client->query.qname, version, type,
client->query.dboptions, client->now,
&node, fname, rdataset, sigrdataset);
dboptions, client->now, &node, fname,
rdataset, sigrdataset);
/*
* If we have found pending data try to validate it.
* If the data does not validate as secure and we can't
* use the unvalidated data requery the database with
* pending disabled to prevent infinite looping.
*/
if (result != ISC_R_SUCCESS || !DNS_TRUST_PENDING(rdataset->trust))
goto validation_done;
if (rdataset->trust != dns_trust_pending_answer ||
!PENDINGOK(client->query.dboptions)) {
dns_rdataset_disassociate(rdataset);
if (sigrdataset != NULL &&
dns_rdataset_isassociated(sigrdataset))
dns_rdataset_disassociate(sigrdataset);
if (sigrdataset == &tmprdataset)
sigrdataset = NULL;
dns_db_detachnode(db, &node);
dboptions &= ~DNS_DBFIND_PENDINGOK;
goto refind;
}
validation_done:
if (sigrdataset == &tmprdataset) {
if (dns_rdataset_isassociated(sigrdataset))
dns_rdataset_disassociate(sigrdataset);
sigrdataset = NULL;
}
resume:
CTRACE("query_find: resume");
+26 -6
View File
@@ -477,6 +477,14 @@ get_view_querysource_dispatch(const cfg_obj_t **maps,
attrs |= DNS_DISPATCHATTR_IPV6;
break;
}
if (isc_sockaddr_getport(&sa) != 0) {
INSIST(obj != NULL);
cfg_obj_log(obj, ns_g_lctx, ISC_LOG_INFO,
"using specific query-source port suppresses port "
"randomization and can be insecure.");
}
attrmask = 0;
attrmask |= DNS_DISPATCHATTR_UDP;
attrmask |= DNS_DISPATCHATTR_TCP;
@@ -486,7 +494,7 @@ get_view_querysource_dispatch(const cfg_obj_t **maps,
disp = NULL;
result = dns_dispatch_getudp(ns_g_dispatchmgr, ns_g_socketmgr,
ns_g_taskmgr, &sa, 4096,
1000, 32768, 16411, 16433,
1024, 32768, 16411, 16433,
attrs, attrmask, &disp);
if (result != ISC_R_SUCCESS) {
isc_sockaddr_t any;
@@ -1858,7 +1866,9 @@ scan_interfaces(ns_server_t *server, isc_boolean_t verbose) {
}
static isc_result_t
add_listenelt(isc_mem_t *mctx, ns_listenlist_t *list, isc_sockaddr_t *addr) {
add_listenelt(isc_mem_t *mctx, ns_listenlist_t *list, isc_sockaddr_t *addr,
isc_boolean_t wcardport_ok)
{
ns_listenelt_t *lelt = NULL;
dns_acl_t *src_acl = NULL;
dns_aclelement_t aelt;
@@ -1868,7 +1878,8 @@ add_listenelt(isc_mem_t *mctx, ns_listenlist_t *list, isc_sockaddr_t *addr) {
REQUIRE(isc_sockaddr_pf(addr) == AF_INET6);
isc_sockaddr_any6(&any_sa6);
if (!isc_sockaddr_equal(&any_sa6, addr)) {
if (!isc_sockaddr_equal(&any_sa6, addr) &&
(wcardport_ok || isc_sockaddr_getport(addr) != 0)) {
aelt.type = dns_aclelementtype_ipprefix;
aelt.negative = ISC_FALSE;
aelt.u.ip_prefix.prefixlen = 128;
@@ -1927,7 +1938,16 @@ adjust_interfaces(ns_server_t *server, isc_mem_t *mctx) {
result = dns_dispatch_getlocaladdress(dispatch6, &addr);
if (result != ISC_R_SUCCESS)
goto fail;
result = add_listenelt(mctx, list, &addr);
/*
* We always add non-wildcard address regardless of whether
* the port is 'any' (the fourth arg is TRUE): if the port is
* specific, we need to add it since it may conflict with a
* listening interface; if it's zero, we'll dynamically open
* query ports, and some of them may override an existing
* wildcard IPv6 port.
*/
result = add_listenelt(mctx, list, &addr, ISC_TRUE);
if (result != ISC_R_SUCCESS)
goto fail;
}
@@ -1957,12 +1977,12 @@ adjust_interfaces(ns_server_t *server, isc_mem_t *mctx) {
continue;
addrp = dns_zone_getnotifysrc6(zone);
result = add_listenelt(mctx, list, addrp);
result = add_listenelt(mctx, list, addrp, ISC_FALSE);
if (result != ISC_R_SUCCESS)
goto fail;
addrp = dns_zone_getxfrsource6(zone);
result = add_listenelt(mctx, list, addrp);
result = add_listenelt(mctx, list, addrp, ISC_FALSE);
if (result != ISC_R_SUCCESS)
goto fail;
}
+5 -1
View File
@@ -859,7 +859,11 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
if (type == dns_rdatatype_rrsig ||
type == dns_rdatatype_sig)
covers = dns_rdata_covers(&t->rdata);
else
else if (type == dns_rdatatype_any) {
dns_db_detachnode(db, &node);
dns_diff_clear(&trash);
return (DNS_R_NXRRSET);
} else
covers = 0;
/*
+3 -3
View File
@@ -1,3 +1,3 @@
LIBINTERFACE = 23
LIBREVISION = 0
LIBAGE = 1
LIBINTERFACE = 24
LIBREVISION = 2
LIBAGE = 2
+233 -472
View File
@@ -27,6 +27,7 @@
#include <isc/mem.h>
#include <isc/mutex.h>
#include <isc/print.h>
#include <isc/random.h>
#include <isc/string.h>
#include <isc/task.h>
#include <isc/time.h>
@@ -43,25 +44,22 @@
typedef ISC_LIST(dns_dispentry_t) dns_displist_t;
typedef struct dns_nsid {
isc_uint16_t nsid_state;
isc_uint16_t *nsid_vtable;
isc_uint16_t *nsid_pool;
isc_uint16_t nsid_a1, nsid_a2, nsid_a3;
isc_uint16_t nsid_c1, nsid_c2, nsid_c3;
isc_uint16_t nsid_state2;
isc_boolean_t nsid_usepool;
} dns_nsid_t;
typedef struct dns_qid {
unsigned int magic;
unsigned int qid_nbuckets; /* hash table size */
unsigned int qid_increment; /* id increment on collision */
isc_mutex_t lock;
dns_nsid_t nsid;
dns_displist_t *qid_table; /* the table itself */
} dns_qid_t;
/* ARC4 Random generator state */
typedef struct arc4ctx {
isc_uint8_t i;
isc_uint8_t j;
isc_uint8_t s[256];
int count;
} arc4ctx_t;
struct dns_dispatchmgr {
/* Unlocked. */
unsigned int magic;
@@ -74,6 +72,10 @@ struct dns_dispatchmgr {
unsigned int state;
ISC_LIST(dns_dispatch_t) list;
/* Locked by arc4_lock. */
isc_mutex_t arc4_lock;
arc4ctx_t arc4ctx; /*%< ARC4 context for QID */
/* locked by buffer lock */
dns_qid_t *qid;
isc_mutex_t buffer_lock;
@@ -100,6 +102,7 @@ struct dns_dispentry {
unsigned int magic;
dns_dispatch_t *disp;
dns_messageid_t id;
in_port_t port;
unsigned int bucket;
isc_sockaddr_t host;
isc_task_t *task;
@@ -119,6 +122,7 @@ struct dns_dispatch {
isc_task_t *task; /* internal task */
isc_socket_t *socket; /* isc socket attached to */
isc_sockaddr_t local; /* local address */
in_port_t localport; /* local UDP port */
unsigned int maxrequests; /* max requests */
isc_event_t *ctlevent;
@@ -161,14 +165,14 @@ struct dns_dispatch {
* Statics.
*/
static dns_dispentry_t *bucket_search(dns_qid_t *, isc_sockaddr_t *,
dns_messageid_t, unsigned int);
dns_messageid_t, in_port_t, unsigned int);
static isc_boolean_t destroy_disp_ok(dns_dispatch_t *);
static void destroy_disp(isc_task_t *task, isc_event_t *event);
static void udp_recv(isc_task_t *, isc_event_t *);
static void tcp_recv(isc_task_t *, isc_event_t *);
static void startrecv(dns_dispatch_t *);
static dns_messageid_t dns_randomid(dns_nsid_t *);
static isc_uint32_t dns_hash(dns_qid_t *, isc_sockaddr_t *, dns_messageid_t);
static isc_uint32_t dns_hash(dns_qid_t *, isc_sockaddr_t *, dns_messageid_t,
in_port_t);
static void free_buffer(dns_dispatch_t *disp, void *buf, unsigned int len);
static void *allocate_udp_buffer(dns_dispatch_t *disp);
static inline void free_event(dns_dispatch_t *disp, dns_dispatchevent_t *ev);
@@ -188,12 +192,8 @@ static isc_result_t dispatch_createudp(dns_dispatchmgr_t *mgr,
static isc_boolean_t destroy_mgr_ok(dns_dispatchmgr_t *mgr);
static void destroy_mgr(dns_dispatchmgr_t **mgrp);
static isc_result_t qid_allocate(dns_dispatchmgr_t *mgr, unsigned int buckets,
unsigned int increment, isc_boolean_t usepool,
dns_qid_t **qidp);
unsigned int increment, dns_qid_t **qidp);
static void qid_destroy(isc_mem_t *mctx, dns_qid_t **qidp);
static isc_uint16_t nsid_next(dns_nsid_t *nsid);
static isc_result_t nsid_init(isc_mem_t *mctx, dns_nsid_t *nsid, isc_boolean_t usepool);
static void nsid_destroy(isc_mem_t *mctx, dns_nsid_t *nsid);
#define LVL(x) ISC_LOG_DEBUG(x)
@@ -274,26 +274,152 @@ request_log(dns_dispatch_t *disp, dns_dispentry_t *resp,
}
/*
* Return an unpredictable message ID.
* ARC4 random number generator obtained from OpenBSD
*/
static dns_messageid_t
dns_randomid(dns_nsid_t *nsid) {
isc_uint32_t id;
static void
dispatch_arc4init(arc4ctx_t *actx) {
int n;
for (n = 0; n < 256; n++)
actx->s[n] = n;
actx->i = 0;
actx->j = 0;
actx->count = 0;
}
id = nsid_next(nsid);
static void
dispatch_arc4addrandom(arc4ctx_t *actx, unsigned char *dat, int datlen) {
int n;
isc_uint8_t si;
return ((dns_messageid_t)id);
actx->i--;
for (n = 0; n < 256; n++) {
actx->i = (actx->i + 1);
si = actx->s[actx->i];
actx->j = (actx->j + si + dat[n % datlen]);
actx->s[actx->i] = actx->s[actx->j];
actx->s[actx->j] = si;
}
actx->j = actx->i;
}
static inline isc_uint8_t
dispatch_arc4get8(arc4ctx_t *actx) {
isc_uint8_t si, sj;
actx->i = (actx->i + 1);
si = actx->s[actx->i];
actx->j = (actx->j + si);
sj = actx->s[actx->j];
actx->s[actx->i] = sj;
actx->s[actx->j] = si;
return (actx->s[(si + sj) & 0xff]);
}
static inline isc_uint16_t
dispatch_arc4get16(arc4ctx_t *actx) {
isc_uint16_t val;
val = dispatch_arc4get8(actx) << 8;
val |= dispatch_arc4get8(actx);
return (val);
}
static void
dispatch_arc4stir(dns_dispatchmgr_t *mgr) {
int i;
union {
unsigned char rnd[128];
isc_uint32_t rnd32[32];
} rnd;
isc_result_t result;
if (mgr->entropy != NULL) {
/*
* We accept any quality of random data to avoid blocking.
*/
result = isc_entropy_getdata(mgr->entropy, rnd.rnd,
sizeof(rnd), NULL, 0);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
} else {
for (i = 0; i < 32; i++)
isc_random_get(&rnd.rnd32[i]);
}
dispatch_arc4addrandom(&mgr->arc4ctx, rnd.rnd, sizeof(rnd.rnd));
/*
* Discard early keystream, as per recommendations in:
* http://www.wisdom.weizmann.ac.il/~itsik/RC4/Papers/Rc4_ksa.ps
*/
for (i = 0; i < 256; i++)
(void)dispatch_arc4get8(&mgr->arc4ctx);
/*
* Derived from OpenBSD's implementation. The rationale is not clear,
* but should be conservative enough in safety, and reasonably large
* for efficiency.
*/
mgr->arc4ctx.count = 1600000;
}
static isc_uint16_t
dispatch_arc4random(dns_dispatchmgr_t *mgr) {
isc_uint16_t result;
LOCK(&mgr->arc4_lock);
mgr->arc4ctx.count -= sizeof(isc_uint16_t);
if (mgr->arc4ctx.count <= 0)
dispatch_arc4stir(mgr);
result = dispatch_arc4get16(&mgr->arc4ctx);
UNLOCK(&mgr->arc4_lock);
return (result);
}
static isc_uint16_t
dispatch_arc4uniformrandom(dns_dispatchmgr_t *mgr, isc_uint16_t upper_bound) {
isc_uint16_t min, r;
/* The caller must hold the manager lock. */
if (upper_bound < 2)
return (0);
/*
* Ensure the range of random numbers [min, 0xffff] be a multiple of
* upper_bound and contain at least a half of the 16 bit range.
*/
if (upper_bound > 0x8000)
min = 1 + ~upper_bound; /* 0x8000 - upper_bound */
else
min = (isc_uint16_t)(0x10000 % (isc_uint32_t)upper_bound);
/*
* This could theoretically loop forever but each retry has
* p > 0.5 (worst case, usually far better) of selecting a
* number inside the range we need, so it should rarely need
* to re-roll.
*/
for (;;) {
r = dispatch_arc4random(mgr);
if (r >= min)
break;
}
return (r % upper_bound);
}
/*
* Return a hash of the destination and message id.
*/
static isc_uint32_t
dns_hash(dns_qid_t *qid, isc_sockaddr_t *dest, dns_messageid_t id) {
dns_hash(dns_qid_t *qid, isc_sockaddr_t *dest, dns_messageid_t id,
in_port_t port)
{
unsigned int ret;
ret = isc_sockaddr_hash(dest, ISC_TRUE);
ret ^= id;
ret ^= (id << 16) | port;
ret %= qid->qid_nbuckets;
INSIST(ret < qid->qid_nbuckets);
@@ -410,7 +536,7 @@ destroy_disp(isc_task_t *task, isc_event_t *event) {
*/
static dns_dispentry_t *
bucket_search(dns_qid_t *qid, isc_sockaddr_t *dest, dns_messageid_t id,
unsigned int bucket)
in_port_t port, unsigned int bucket)
{
dns_dispentry_t *res;
@@ -419,8 +545,10 @@ bucket_search(dns_qid_t *qid, isc_sockaddr_t *dest, dns_messageid_t id,
res = ISC_LIST_HEAD(qid->qid_table[bucket]);
while (res != NULL) {
if ((res->id == id) && isc_sockaddr_equal(dest, &res->host))
if ((res->id == id) && isc_sockaddr_equal(dest, &res->host) &&
res->port == port) {
return (res);
}
res = ISC_LIST_NEXT(res, link);
}
@@ -622,13 +750,10 @@ udp_recv(isc_task_t *task, isc_event_t *ev_in) {
goto restart;
}
dns_dispatch_hash(&ev->timestamp, sizeof(&ev->timestamp));
dns_dispatch_hash(ev->region.base, ev->region.length);
/* response */
bucket = dns_hash(qid, &ev->address, id);
bucket = dns_hash(qid, &ev->address, id, disp->localport);
LOCK(&qid->lock);
resp = bucket_search(qid, &ev->address, id, bucket);
resp = bucket_search(qid, &ev->address, id, disp->localport, bucket);
dispatch_log(disp, LVL(90),
"search for response in bucket %d: %s",
bucket, (resp == NULL ? "not found" : "found"));
@@ -859,14 +984,13 @@ tcp_recv(isc_task_t *task, isc_event_t *ev_in) {
goto restart;
}
dns_dispatch_hash(tcpmsg->buffer.base, tcpmsg->buffer.length);
/*
* Response.
*/
bucket = dns_hash(qid, &tcpmsg->address, id);
bucket = dns_hash(qid, &tcpmsg->address, id, disp->localport);
LOCK(&qid->lock);
resp = bucket_search(qid, &tcpmsg->address, id, bucket);
resp = bucket_search(qid, &tcpmsg->address, id, disp->localport,
bucket);
dispatch_log(disp, LVL(90),
"search for response in bucket %d: %s",
bucket, (resp == NULL ? "not found" : "found"));
@@ -1015,6 +1139,8 @@ destroy_mgr(dns_dispatchmgr_t **mgrp) {
DESTROYLOCK(&mgr->lock);
mgr->state = 0;
DESTROYLOCK(&mgr->arc4_lock);
isc_mempool_destroy(&mgr->epool);
isc_mempool_destroy(&mgr->rpool);
isc_mempool_destroy(&mgr->dpool);
@@ -1093,10 +1219,14 @@ dns_dispatchmgr_create(isc_mem_t *mctx, isc_entropy_t *entropy,
if (result != ISC_R_SUCCESS)
goto deallocate;
result = isc_mutex_init(&mgr->buffer_lock);
result = isc_mutex_init(&mgr->arc4_lock);
if (result != ISC_R_SUCCESS)
goto kill_lock;
result = isc_mutex_init(&mgr->buffer_lock);
if (result != ISC_R_SUCCESS)
goto kill_arc4_lock;
result = isc_mutex_init(&mgr->pool_lock);
if (result != ISC_R_SUCCESS)
goto kill_buffer_lock;
@@ -1147,6 +1277,8 @@ dns_dispatchmgr_create(isc_mem_t *mctx, isc_entropy_t *entropy,
if (entropy != NULL)
isc_entropy_attach(entropy, &mgr->entropy);
dispatch_arc4init(&mgr->arc4ctx);
*mgrp = mgr;
return (ISC_R_SUCCESS);
@@ -1158,6 +1290,8 @@ dns_dispatchmgr_create(isc_mem_t *mctx, isc_entropy_t *entropy,
DESTROYLOCK(&mgr->pool_lock);
kill_buffer_lock:
DESTROYLOCK(&mgr->buffer_lock);
kill_arc4_lock:
DESTROYLOCK(&mgr->arc4_lock);
kill_lock:
DESTROYLOCK(&mgr->lock);
deallocate:
@@ -1244,7 +1378,7 @@ dns_dispatchmgr_setudp(dns_dispatchmgr_t *mgr,
isc_mempool_setmaxalloc(mgr->bpool, maxbuffers);
isc_mempool_associatelock(mgr->bpool, &mgr->pool_lock);
result = qid_allocate(mgr, buckets, increment, ISC_TRUE, &mgr->qid);
result = qid_allocate(mgr, buckets, increment, &mgr->qid);
if (result != ISC_R_SUCCESS)
goto cleanup;
@@ -1283,20 +1417,27 @@ dns_dispatchmgr_destroy(dns_dispatchmgr_t **mgrp) {
}
static isc_boolean_t
blacklisted(dns_dispatchmgr_t *mgr, isc_socket_t *sock) {
blacklisted(dns_dispatchmgr_t *mgr, isc_socket_t *sock,
isc_sockaddr_t *sockaddrp)
{
isc_sockaddr_t sockaddr;
isc_result_t result;
REQUIRE(sock != NULL || sockaddrp != NULL);
if (mgr->portlist == NULL)
return (ISC_FALSE);
result = isc_socket_getsockname(sock, &sockaddr);
if (result != ISC_R_SUCCESS)
return (ISC_FALSE);
if (sock != NULL) {
sockaddrp = &sockaddr;
result = isc_socket_getsockname(sock, sockaddrp);
if (result != ISC_R_SUCCESS)
return (ISC_FALSE);
}
if (mgr->portlist != NULL &&
dns_portlist_match(mgr->portlist, isc_sockaddr_pf(&sockaddr),
isc_sockaddr_getport(&sockaddr)))
dns_portlist_match(mgr->portlist, isc_sockaddr_pf(sockaddrp),
isc_sockaddr_getport(sockaddrp)))
return (ISC_TRUE);
return (ISC_FALSE);
}
@@ -1317,7 +1458,7 @@ local_addr_match(dns_dispatch_t *disp, isc_sockaddr_t *addr) {
if (disp->mgr->portlist != NULL &&
isc_sockaddr_getport(addr) == 0 &&
isc_sockaddr_getport(&disp->local) == 0 &&
blacklisted(disp->mgr, disp->socket))
blacklisted(disp->mgr, disp->socket, NULL))
return (ISC_FALSE);
/*
@@ -1390,7 +1531,7 @@ dispatch_find(dns_dispatchmgr_t *mgr, isc_sockaddr_t *local,
static isc_result_t
qid_allocate(dns_dispatchmgr_t *mgr, unsigned int buckets,
unsigned int increment, isc_boolean_t usepool, dns_qid_t **qidp)
unsigned int increment, dns_qid_t **qidp)
{
dns_qid_t *qid;
unsigned int i;
@@ -1411,16 +1552,8 @@ qid_allocate(dns_dispatchmgr_t *mgr, unsigned int buckets,
return (ISC_R_NOMEMORY);
}
if (nsid_init(mgr->mctx, &qid->nsid, usepool) != ISC_R_SUCCESS) {
isc_mem_put(mgr->mctx, qid->qid_table,
buckets * sizeof(dns_displist_t));
isc_mem_put(mgr->mctx, qid, sizeof(*qid));
return (ISC_R_NOMEMORY);
}
if (isc_mutex_init(&qid->lock) != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__, "isc_mutex_init failed");
nsid_destroy(mgr->mctx, &qid->nsid);
isc_mem_put(mgr->mctx, qid->qid_table,
buckets * sizeof(dns_displist_t));
isc_mem_put(mgr->mctx, qid, sizeof(*qid));
@@ -1448,7 +1581,6 @@ qid_destroy(isc_mem_t *mctx, dns_qid_t **qidp) {
*qidp = NULL;
qid->magic = 0;
nsid_destroy(mctx, &qid->nsid);
isc_mem_put(mctx, qid->qid_table,
qid->qid_nbuckets * sizeof(dns_displist_t));
DESTROYLOCK(&qid->lock);
@@ -1485,6 +1617,7 @@ dispatch_allocate(dns_dispatchmgr_t *mgr, unsigned int maxrequests,
disp->refcount = 1;
disp->recv_pending = 0;
memset(&disp->local, 0, sizeof(disp->local));
disp->localport = 0;
disp->shutting_down = 0;
disp->shutdown_out = 0;
disp->connected = 0;
@@ -1592,7 +1725,7 @@ dns_dispatch_createtcp(dns_dispatchmgr_t *mgr, isc_socket_t *sock,
return (result);
}
result = qid_allocate(mgr, buckets, increment, ISC_FALSE, &disp->qid);
result = qid_allocate(mgr, buckets, increment, &disp->qid);
if (result != ISC_R_SUCCESS)
goto deallocate_dispatch;
@@ -1657,7 +1790,7 @@ dns_dispatch_getudp(dns_dispatchmgr_t *mgr, isc_socketmgr_t *sockmgr,
dns_dispatch_t **dispp)
{
isc_result_t result;
dns_dispatch_t *disp;
dns_dispatch_t *disp = NULL;
REQUIRE(VALID_DISPATCHMGR(mgr));
REQUIRE(sockmgr != NULL);
@@ -1677,6 +1810,11 @@ dns_dispatch_getudp(dns_dispatchmgr_t *mgr, isc_socketmgr_t *sockmgr,
LOCK(&mgr->lock);
if ((attributes & DNS_DISPATCHATTR_RANDOMPORT) != 0) {
REQUIRE(isc_sockaddr_getport(localaddr) == 0);
goto createudp;
}
/*
* First, see if we have a dispatcher that matches.
*/
@@ -1705,6 +1843,7 @@ dns_dispatch_getudp(dns_dispatchmgr_t *mgr, isc_socketmgr_t *sockmgr,
return (ISC_R_SUCCESS);
}
createudp:
/*
* Nope, create one.
*/
@@ -1740,7 +1879,9 @@ dispatch_createudp(dns_dispatchmgr_t *mgr, isc_socketmgr_t *sockmgr,
dns_dispatch_t *disp;
isc_socket_t *sock = NULL;
isc_socket_t *held[DNS_DISPATCH_HELD];
unsigned int i = 0, j = 0;
unsigned int i = 0, j = 0, k = 0;
isc_sockaddr_t localaddr_bound;
in_port_t localport = 0;
/*
* dispatch_allocate() checks mgr for us.
@@ -1756,11 +1897,34 @@ dispatch_createudp(dns_dispatchmgr_t *mgr, isc_socketmgr_t *sockmgr,
* from returning the same port to us too quickly.
*/
memset(held, 0, sizeof(held));
localaddr_bound = *localaddr;
getsocket:
result = create_socket(sockmgr, localaddr, &sock);
if ((attributes & DNS_DISPATCHATTR_RANDOMPORT) != 0) {
in_port_t prt;
/* XXX: should the range be configurable? */
prt = 1024 + dispatch_arc4uniformrandom(mgr, 65535 - 1023);
isc_sockaddr_setport(&localaddr_bound, prt);
if (blacklisted(mgr, NULL, &localaddr_bound)) {
if (++k == 1024)
attributes &= ~DNS_DISPATCHATTR_RANDOMPORT;
goto getsocket;
}
result = create_socket(sockmgr, &localaddr_bound, &sock);
if (result == ISC_R_ADDRINUSE) {
if (++k == 1024)
attributes &= ~DNS_DISPATCHATTR_RANDOMPORT;
goto getsocket;
}
localport = prt;
} else
result = create_socket(sockmgr, localaddr, &sock);
if (result != ISC_R_SUCCESS)
goto deallocate_dispatch;
if (isc_sockaddr_getport(localaddr) == 0 && blacklisted(mgr, sock)) {
if ((attributes & DNS_DISPATCHATTR_RANDOMPORT) == 0 &&
isc_sockaddr_getport(localaddr) == 0 &&
blacklisted(mgr, sock, NULL))
{
if (held[i] != NULL)
isc_socket_detach(&held[i]);
held[i++] = sock;
@@ -1781,6 +1945,7 @@ dispatch_createudp(dns_dispatchmgr_t *mgr, isc_socketmgr_t *sockmgr,
disp->socktype = isc_sockettype_udp;
disp->socket = sock;
disp->local = *localaddr;
disp->localport = localport;
disp->task = NULL;
result = isc_task_create(taskmgr, 0, &disp->task);
@@ -1911,19 +2076,20 @@ dns_dispatch_addresponse(dns_dispatch_t *disp, isc_sockaddr_t *dest,
/*
* Try somewhat hard to find an unique ID.
*/
id = (dns_messageid_t)dispatch_arc4random(disp->mgr);
qid = DNS_QID(disp);
LOCK(&qid->lock);
id = dns_randomid(&qid->nsid);
bucket = dns_hash(qid, dest, id);
bucket = dns_hash(qid, dest, id, disp->localport);
ok = ISC_FALSE;
for (i = 0; i < 64; i++) {
if (bucket_search(qid, dest, id, bucket) == NULL) {
if (bucket_search(qid, dest, id, disp->localport, bucket) ==
NULL) {
ok = ISC_TRUE;
break;
}
id += qid->qid_increment;
id &= 0x0000ffff;
bucket = dns_hash(qid, dest, id);
bucket = dns_hash(qid, dest, id, disp->localport);
}
if (!ok) {
@@ -1945,6 +2111,7 @@ dns_dispatch_addresponse(dns_dispatch_t *disp, isc_sockaddr_t *dest,
isc_task_attach(task, &res->task);
res->disp = disp;
res->id = id;
res->port = disp->localport;
res->bucket = bucket;
res->host = *dest;
res->action = action;
@@ -2256,409 +2423,3 @@ dns_dispatchmgr_dump(dns_dispatchmgr_t *mgr) {
}
}
#endif
/*
* Allow the user to pick one of two ID randomization algorithms.
*
* The first algorithm is an adaptation of the sequence shuffling
* algorithm discovered by Carter Bays and S. D. Durham [ACM Trans. Math.
* Software 2 (1976), 59-64], as documented as Algorithm B in Chapter
* 3.2.2 in Volume 2 of Knuth's "The Art of Computer Programming". We use
* a randomly selected linear congruential random number generator with a
* modulus of 2^16, whose increment is a randomly picked odd number, and
* whose multiplier is picked from a set which meets the following
* criteria:
* Is of the form 8*n+5, which ensures "high potency" according to
* principle iii in the summary chapter 3.6. This form also has a
* gcd(a-1,m) of 4 which is good according to principle iv.
*
* Is between 0.01 and 0.99 times the modulus as specified by
* principle iv.
*
* Passes the spectral test "with flying colors" (ut >= 1) in
* dimensions 2 through 6 as calculated by Algorithm S in Chapter
* 3.3.4 and the ratings calculated by formula 35 in section E.
*
* Of the multipliers that pass this test, pick the set that is
* best according to the theoretical bounds of the serial
* correlation test. This was calculated using a simplified
* version of Knuth's Theorem K in Chapter 3.3.3.
*
* These criteria may not be important for this use, but we might as well
* pick from the best generators since there are so many possible ones and
* we don't have that many random bits to do the picking.
*
* We use a modulus of 2^16 instead of something bigger so that we will
* tend to cycle through all the possible IDs before repeating any,
* however the shuffling will perturb this somewhat. Theoretically there
* is no minimimum interval between two uses of the same ID, but in
* practice it seems to be >64000.
*
* Our adaptatation of Algorithm B mixes the hash state which has
* captured various random events into the shuffler to perturb the
* sequence.
*
* One disadvantage of this algorithm is that if the generator parameters
* were to be guessed, it would be possible to mount a limited brute force
* attack on the ID space since the IDs are only shuffled within a limited
* range.
*
* The second algorithm uses the same random number generator to populate
* a pool of 65536 IDs. The hash state is used to pick an ID from a window
* of 4096 IDs in this pool, then the chosen ID is swapped with the ID
* at the beginning of the window and the window position is advanced.
* This means that the interval between uses of the ID will be no less
* than 65536-4096. The ID sequence in the pool will become more random
* over time.
*
* For both algorithms, two more linear congruential random number generators
* are selected. The ID from the first part of algorithm is used to seed
* the first of these generators, and its output is used to seed the second.
* The strategy is use these generators as 1 to 1 hashes to obfuscate the
* properties of the generator used in the first part of either algorithm.
*
* The first algorithm may be suitable for use in a client resolver since
* its memory requirements are fairly low and it's pretty random out of
* the box. It is somewhat succeptible to a limited brute force attack,
* so the second algorithm is probably preferable for a longer running
* program that issues a large number of queries and has time to randomize
* the pool.
*/
#define NSID_SHUFFLE_TABLE_SIZE 100 /* Suggested by Knuth */
/*
* Pick one of the next 4096 IDs in the pool.
* There is a tradeoff here between randomness and how often and ID is reused.
*/
#define NSID_LOOKAHEAD 4096 /* Must be a power of 2 */
#define NSID_SHUFFLE_ONLY 1 /* algorithm 1 */
#define NSID_USE_POOL 2 /* algorithm 2 */
#define NSID_HASHSHIFT 3
#define NSID_HASHROTATE(v) \
(((v) << NSID_HASHSHIFT) | ((v) >> ((sizeof(v) * 8) - NSID_HASHSHIFT)))
static isc_uint32_t nsid_hash_state;
/*
* Keep a running hash of various bits of data that we'll use to
* stir the ID pool or perturb the ID generator
*/
static void
nsid_hash(void *data, size_t len) {
unsigned char *p = data;
/*
* Hash function similar to the one we use for hashing names.
* We don't fold case or toss the upper bit here, though.
* This hash doesn't do much interesting when fed binary zeros,
* so there may be a better hash function.
* This function doesn't need to be very strong since we're
* only using it to stir the pool, but it should be reasonably
* fast.
*/
/*
* We don't care about locking access to nsid_hash_state.
* In fact races make the result even more non deteministic.
*/
while (len-- > 0U) {
nsid_hash_state = NSID_HASHROTATE(nsid_hash_state);
nsid_hash_state += *p++;
}
}
/*
* Table of good linear congruential multipliers for modulus 2^16
* in order of increasing serial correlation bounds (so trim from
* the end).
*/
static const isc_uint16_t nsid_multiplier_table[] = {
17565, 25013, 11733, 19877, 23989, 23997, 24997, 25421,
26781, 27413, 35901, 35917, 35973, 36229, 38317, 38437,
39941, 40493, 41853, 46317, 50581, 51429, 53453, 53805,
11317, 11789, 12045, 12413, 14277, 14821, 14917, 18989,
19821, 23005, 23533, 23573, 23693, 27549, 27709, 28461,
29365, 35605, 37693, 37757, 38309, 41285, 45261, 47061,
47269, 48133, 48597, 50277, 50717, 50757, 50805, 51341,
51413, 51581, 51597, 53445, 11493, 14229, 20365, 20653,
23485, 25541, 27429, 29421, 30173, 35445, 35653, 36789,
36797, 37109, 37157, 37669, 38661, 39773, 40397, 41837,
41877, 45293, 47277, 47845, 49853, 51085, 51349, 54085,
56933, 8877, 8973, 9885, 11365, 11813, 13581, 13589,
13613, 14109, 14317, 15765, 15789, 16925, 17069, 17205,
17621, 17941, 19077, 19381, 20245, 22845, 23733, 24869,
25453, 27213, 28381, 28965, 29245, 29997, 30733, 30901,
34877, 35485, 35613, 36133, 36661, 36917, 38597, 40285,
40693, 41413, 41541, 41637, 42053, 42349, 45245, 45469,
46493, 48205, 48613, 50861, 51861, 52877, 53933, 54397,
55669, 56453, 56965, 58021, 7757, 7781, 8333, 9661,
12229, 14373, 14453, 17549, 18141, 19085, 20773, 23701,
24205, 24333, 25261, 25317, 27181, 30117, 30477, 34757,
34885, 35565, 35885, 36541, 37957, 39733, 39813, 41157,
41893, 42317, 46621, 48117, 48181, 49525, 55261, 55389,
56845, 7045, 7749, 7965, 8469, 9133, 9549, 9789,
10173, 11181, 11285, 12253, 13453, 13533, 13757, 14477,
15053, 16901, 17213, 17269, 17525, 17629, 18605, 19013,
19829, 19933, 20069, 20093, 23261, 23333, 24949, 25309,
27613, 28453, 28709, 29301, 29541, 34165, 34413, 37301,
37773, 38045, 38405, 41077, 41781, 41925, 42717, 44437,
44525, 44613, 45933, 45941, 47077, 50077, 50893, 52117,
5293, 55069, 55989, 58125, 59205, 6869, 14685, 15453,
16821, 17045, 17613, 18437, 21029, 22773, 22909, 25445,
25757, 26541, 30709, 30909, 31093, 31149, 37069, 37725,
37925, 38949, 39637, 39701, 40765, 40861, 42965, 44813,
45077, 45733, 47045, 50093, 52861, 52957, 54181, 56325,
56365, 56381, 56877, 57013, 5741, 58101, 58669, 8613,
10045, 10261, 10653, 10733, 11461, 12261, 14069, 15877,
17757, 21165, 23885, 24701, 26429, 26645, 27925, 28765,
29197, 30189, 31293, 39781, 39909, 40365, 41229, 41453,
41653, 42165, 42365, 47421, 48029, 48085, 52773, 5573,
57037, 57637, 58341, 58357, 58901, 6357, 7789, 9093,
10125, 10709, 10765, 11957, 12469, 13437, 13509, 14773,
15437, 15773, 17813, 18829, 19565, 20237, 23461, 23685,
23725, 23941, 24877, 25461, 26405, 29509, 30285, 35181,
37229, 37893, 38565, 40293, 44189, 44581, 45701, 47381,
47589, 48557, 4941, 51069, 5165, 52797, 53149, 5341,
56301, 56765, 58581, 59493, 59677, 6085, 6349, 8293,
8501, 8517, 11597, 11709, 12589, 12693, 13517, 14909,
17397, 18085, 21101, 21269, 22717, 25237, 25661, 29189,
30101, 31397, 33933, 34213, 34661, 35533, 36493, 37309,
40037, 4189, 42909, 44309, 44357, 44389, 4541, 45461,
46445, 48237, 54149, 55301, 55853, 56621, 56717, 56901,
5813, 58437, 12493, 15365, 15989, 17829, 18229, 19341,
21013, 21357, 22925, 24885, 26053, 27581, 28221, 28485,
30605, 30613, 30789, 35437, 36285, 37189, 3941, 41797,
4269, 42901, 43293, 44645, 45221, 46893, 4893, 50301,
50325, 5189, 52109, 53517, 54053, 54485, 5525, 55949,
56973, 59069, 59421, 60733, 61253, 6421, 6701, 6709,
7101, 8669, 15797, 19221, 19837, 20133, 20957, 21293,
21461, 22461, 29085, 29861, 30869, 34973, 36469, 37565,
38125, 38829, 39469, 40061, 40117, 44093, 47429, 48341,
50597, 51757, 5541, 57629, 58405, 59621, 59693, 59701,
61837, 7061, 10421, 11949, 15405, 20861, 25397, 25509,
25893, 26037, 28629, 28869, 29605, 30213, 34205, 35637,
36365, 37285, 3773, 39117, 4021, 41061, 42653, 44509,
4461, 44829, 4725, 5125, 52269, 56469, 59085, 5917,
60973, 8349, 17725, 18637, 19773, 20293, 21453, 22533,
24285, 26333, 26997, 31501, 34541, 34805, 37509, 38477,
41333, 44125, 46285, 46997, 47637, 48173, 4925, 50253,
50381, 50917, 51205, 51325, 52165, 52229, 5253, 5269,
53509, 56253, 56341, 5821, 58373, 60301, 61653, 61973,
62373, 8397, 11981, 14341, 14509, 15077, 22261, 22429,
24261, 28165, 28685, 30661, 34021, 34445, 39149, 3917,
43013, 43317, 44053, 44101, 4533, 49541, 49981, 5277,
54477, 56357, 57261, 57765, 58573, 59061, 60197, 61197,
62189, 7725, 8477, 9565, 10229, 11437, 14613, 14709,
16813, 20029, 20677, 31445, 3165, 31957, 3229, 33541,
36645, 3805, 38973, 3965, 4029, 44293, 44557, 46245,
48917, 4909, 51749, 53709, 55733, 56445, 5925, 6093,
61053, 62637, 8661, 9109, 10821, 11389, 13813, 14325,
15501, 16149, 18845, 22669, 26437, 29869, 31837, 33709,
33973, 34173, 3677, 3877, 3981, 39885, 42117, 4421,
44221, 44245, 44693, 46157, 47309, 5005, 51461, 52037,
55333, 55693, 56277, 58949, 6205, 62141, 62469, 6293,
10101, 12509, 14029, 17997, 20469, 21149, 25221, 27109,
2773, 2877, 29405, 31493, 31645, 4077, 42005, 42077,
42469, 42501, 44013, 48653, 49349, 4997, 50101, 55405,
56957, 58037, 59429, 60749, 61797, 62381, 62837, 6605,
10541, 23981, 24533, 2701, 27333, 27341, 31197, 33805,
3621, 37381, 3749, 3829, 38533, 42613, 44381, 45901,
48517, 51269, 57725, 59461, 60045, 62029, 13805, 14013,
15461, 16069, 16157, 18573, 2309, 23501, 28645, 3077,
31541, 36357, 36877, 3789, 39429, 39805, 47685, 47949,
49413, 5485, 56757, 57549, 57805, 58317, 59549, 62213,
62613, 62853, 62933, 8909, 12941, 16677, 20333, 21541,
24429, 26077, 26421, 2885, 31269, 33381, 3661, 40925,
42925, 45173, 4525, 4709, 53133, 55941, 57413, 57797,
62125, 62237, 62733, 6773, 12317, 13197, 16533, 16933,
18245, 2213, 2477, 29757, 33293, 35517, 40133, 40749,
4661, 49941, 62757, 7853, 8149, 8573, 11029, 13421,
21549, 22709, 22725, 24629, 2469, 26125, 2669, 34253,
36709, 41013, 45597, 46637, 52285, 52333, 54685, 59013,
60997, 61189, 61981, 62605, 62821, 7077, 7525, 8781,
10861, 15277, 2205, 22077, 28517, 28949, 32109, 33493,
4661, 49941, 62757, 7853, 8149, 8573, 11029, 13421,
21549, 22709, 22725, 24629, 2469, 26125, 2669, 34253,
36709, 41013, 45597, 46637, 52285, 52333, 54685, 59013,
60997, 61189, 61981, 62605, 62821, 7077, 7525, 8781,
10861, 15277, 2205, 22077, 28517, 28949, 32109, 33493,
3685, 39197, 39869, 42621, 44997, 48565, 5221, 57381,
61749, 62317, 63245, 63381, 23149, 2549, 28661, 31653,
33885, 36341, 37053, 39517, 42805, 45853, 48997, 59349,
60053, 62509, 63069, 6525, 1893, 20181, 2365, 24893,
27397, 31357, 32277, 33357, 34437, 36677, 37661, 43469,
43917, 50997, 53869, 5653, 13221, 16741, 17893, 2157,
28653, 31789, 35301, 35821, 61613, 62245, 12405, 14517,
17453, 18421, 3149, 3205, 40341, 4109, 43941, 46869,
48837, 50621, 57405, 60509, 62877, 8157, 12933, 12957,
16501, 19533, 3461, 36829, 52357, 58189, 58293, 63053,
17109, 1933, 32157, 37701, 59005, 61621, 13029, 15085,
16493, 32317, 35093, 5061, 51557, 62221, 20765, 24613,
2629, 30861, 33197, 33749, 35365, 37933, 40317, 48045,
56229, 61157, 63797, 7917, 17965, 1917, 1973, 20301,
2253, 33157, 58629, 59861, 61085, 63909, 8141, 9221,
14757, 1581, 21637, 26557, 33869, 34285, 35733, 40933,
42517, 43501, 53653, 61885, 63805, 7141, 21653, 54973,
31189, 60061, 60341, 63357, 16045, 2053, 26069, 33997,
43901, 54565, 63837, 8949, 17909, 18693, 32349, 33125,
37293, 48821, 49053, 51309, 64037, 7117, 1445, 20405,
23085, 26269, 26293, 27349, 32381, 33141, 34525, 36461,
37581, 43525, 4357, 43877, 5069, 55197, 63965, 9845,
12093, 2197, 2229, 32165, 33469, 40981, 42397, 8749,
10853, 1453, 18069, 21693, 30573, 36261, 37421, 42533
};
#define NSID_MULT_TABLE_SIZE \
((sizeof nsid_multiplier_table)/(sizeof nsid_multiplier_table[0]))
#define NSID_RANGE_MASK (NSID_LOOKAHEAD - 1)
#define NSID_POOL_MASK 0xFFFF /* used to wrap the pool index */
#define NSID_SHUFFLE_ONLY 1
#define NSID_USE_POOL 2
static isc_uint16_t
nsid_next(dns_nsid_t *nsid) {
isc_uint16_t id, compressed_hash;
isc_uint16_t j;
compressed_hash = ((nsid_hash_state >> 16) ^
(nsid_hash_state)) & 0xFFFF;
if (nsid->nsid_usepool) {
isc_uint16_t pick;
pick = compressed_hash & NSID_RANGE_MASK;
pick = (nsid->nsid_state + pick) & NSID_POOL_MASK;
id = nsid->nsid_pool[pick];
if (pick != 0) {
/* Swap two IDs to stir the pool */
nsid->nsid_pool[pick] =
nsid->nsid_pool[nsid->nsid_state];
nsid->nsid_pool[nsid->nsid_state] = id;
}
/* increment the base pointer into the pool */
if (nsid->nsid_state == 65535)
nsid->nsid_state = 0;
else
nsid->nsid_state++;
} else {
/*
* This is the original Algorithm B
* j = ((u_long) NSID_SHUFFLE_TABLE_SIZE * nsid_state2) >> 16;
*
* We'll perturb it with some random stuff ...
*/
j = ((isc_uint32_t) NSID_SHUFFLE_TABLE_SIZE *
(nsid->nsid_state2 ^ compressed_hash)) >> 16;
nsid->nsid_state2 = id = nsid->nsid_vtable[j];
nsid->nsid_state = (((isc_uint32_t) nsid->nsid_a1 * nsid->nsid_state) +
nsid->nsid_c1) & 0xFFFF;
nsid->nsid_vtable[j] = nsid->nsid_state;
}
/* Now lets obfuscate ... */
id = (((isc_uint32_t) nsid->nsid_a2 * id) + nsid->nsid_c2) & 0xFFFF;
id = (((isc_uint32_t) nsid->nsid_a3 * id) + nsid->nsid_c3) & 0xFFFF;
return (id);
}
static isc_result_t
nsid_init(isc_mem_t *mctx, dns_nsid_t *nsid, isc_boolean_t usepool) {
isc_time_t now;
pid_t mypid;
isc_uint16_t a1ndx, a2ndx, a3ndx, c1ndx, c2ndx, c3ndx;
int i;
isc_time_now(&now);
mypid = getpid();
/* Initialize the state */
memset(nsid, 0, sizeof(*nsid));
nsid_hash(&now, sizeof now);
nsid_hash(&mypid, sizeof mypid);
/*
* Select our random number generators and initial seed.
* We could really use more random bits at this point,
* but we'll try to make a silk purse out of a sows ear ...
*/
/* generator 1 */
a1ndx = ((isc_uint32_t) NSID_MULT_TABLE_SIZE *
(nsid_hash_state & 0xFFFF)) >> 16;
nsid->nsid_a1 = nsid_multiplier_table[a1ndx];
c1ndx = (nsid_hash_state >> 9) & 0x7FFF;
nsid->nsid_c1 = 2 * c1ndx + 1;
/* generator 2, distinct from 1 */
a2ndx = ((isc_uint32_t) (NSID_MULT_TABLE_SIZE - 1) *
((nsid_hash_state >> 10) & 0xFFFF)) >> 16;
if (a2ndx >= a1ndx)
a2ndx++;
nsid->nsid_a2 = nsid_multiplier_table[a2ndx];
c2ndx = nsid_hash_state % 32767;
if (c2ndx >= c1ndx)
c2ndx++;
nsid->nsid_c2 = 2*c2ndx + 1;
/* generator 3, distinct from 1 and 2 */
a3ndx = ((isc_uint32_t) (NSID_MULT_TABLE_SIZE - 2) *
((nsid_hash_state >> 20) & 0xFFFF)) >> 16;
if (a3ndx >= a1ndx || a3ndx >= a2ndx)
a3ndx++;
if (a3ndx >= a1ndx && a3ndx >= a2ndx)
a3ndx++;
nsid->nsid_a3 = nsid_multiplier_table[a3ndx];
c3ndx = nsid_hash_state % 32766;
if (c3ndx >= c1ndx || c3ndx >= c2ndx)
c3ndx++;
if (c3ndx >= c1ndx && c3ndx >= c2ndx)
c3ndx++;
nsid->nsid_c3 = 2*c3ndx + 1;
nsid->nsid_state =
((nsid_hash_state >> 16) ^ (nsid_hash_state)) & 0xFFFF;
nsid->nsid_usepool = usepool;
if (nsid->nsid_usepool) {
nsid->nsid_pool = isc_mem_get(mctx, 0x10000 * sizeof(isc_uint16_t));
if (nsid->nsid_pool == NULL)
return (ISC_R_NOMEMORY);
for (i = 0; ; i++) {
nsid->nsid_pool[i] = nsid->nsid_state;
nsid->nsid_state =
(((u_long) nsid->nsid_a1 * nsid->nsid_state) +
nsid->nsid_c1) & 0xFFFF;
if (i == 0xFFFF)
break;
}
} else {
nsid->nsid_vtable = isc_mem_get(mctx, NSID_SHUFFLE_TABLE_SIZE *
(sizeof(isc_uint16_t)) );
if (nsid->nsid_vtable == NULL)
return (ISC_R_NOMEMORY);
for (i = 0; i < NSID_SHUFFLE_TABLE_SIZE; i++) {
nsid->nsid_vtable[i] = nsid->nsid_state;
nsid->nsid_state =
(((isc_uint32_t) nsid->nsid_a1 * nsid->nsid_state) +
nsid->nsid_c1) & 0xFFFF;
}
nsid->nsid_state2 = nsid->nsid_state;
}
return (ISC_R_SUCCESS);
}
static void
nsid_destroy(isc_mem_t *mctx, dns_nsid_t *nsid) {
if (nsid->nsid_usepool)
isc_mem_put(mctx, nsid->nsid_pool,
0x10000 * sizeof(isc_uint16_t));
else
isc_mem_put(mctx, nsid->nsid_vtable,
NSID_SHUFFLE_TABLE_SIZE * (sizeof(isc_uint16_t)) );
memset(nsid, 0, sizeof(*nsid));
}
void
dns_dispatch_hash(void *data, size_t len) {
nsid_hash(data, len);
}
+4 -7
View File
@@ -112,6 +112,9 @@ struct dns_dispatchevent {
* _MAKEQUERY
* The dispatcher can be used to issue queries to other servers, and
* accept replies from them.
*
* _RANDOMPORT
* Allocate UDP port randomly.
*/
#define DNS_DISPATCHATTR_PRIVATE 0x00000001U
#define DNS_DISPATCHATTR_TCP 0x00000002U
@@ -121,6 +124,7 @@ struct dns_dispatchevent {
#define DNS_DISPATCHATTR_NOLISTEN 0x00000020U
#define DNS_DISPATCHATTR_MAKEQUERY 0x00000040U
#define DNS_DISPATCHATTR_CONNECTED 0x00000080U
#define DNS_DISPATCHATTR_RANDOMPORT 0x00000100U
isc_result_t
dns_dispatchmgr_create(isc_mem_t *mctx, isc_entropy_t *entropy,
@@ -437,13 +441,6 @@ dns_dispatch_importrecv(dns_dispatch_t *disp, isc_event_t *event);
* event != NULL
*/
void
dns_dispatch_hash(void *data, size_t len);
/*%<
* Feed 'data' to the dispatch query id generator where 'len' is the size
* of 'data'.
*/
ISC_LANG_ENDDECLS
#endif /* DNS_DISPATCH_H */
+26 -15
View File
@@ -226,40 +226,51 @@ enum {
dns_trust_none = 0,
#define dns_trust_none ((dns_trust_t)dns_trust_none)
/* Subject to DNSSEC validation but has not yet been validated */
dns_trust_pending = 1,
#define dns_trust_pending ((dns_trust_t)dns_trust_pending)
/*%
* Subject to DNSSEC validation but has not yet been validated
* dns_trust_pending_additional (from the additional section).
*/
dns_trust_pending_additional = 1,
#define dns_trust_pending_additional \
((dns_trust_t)dns_trust_pending_additional)
/* Received in the additional section of a response. */
dns_trust_additional = 2,
dns_trust_pending_answer = 2,
#define dns_trust_pending_answer ((dns_trust_t)dns_trust_pending_answer)
/*% Received in the additional section of a response. */
dns_trust_additional = 3,
#define dns_trust_additional ((dns_trust_t)dns_trust_additional)
/* Received in a referral response. */
dns_trust_glue = 3,
/* Received in a referral response. */
dns_trust_glue = 4,
#define dns_trust_glue ((dns_trust_t)dns_trust_glue)
/* Answser from a non-authoritative server */
dns_trust_answer = 4,
/* Answer from a non-authoritative server */
dns_trust_answer = 5,
#define dns_trust_answer ((dns_trust_t)dns_trust_answer)
/* Received in the authority section as part of an
authoritative response */
dns_trust_authauthority = 5,
dns_trust_authauthority = 6,
#define dns_trust_authauthority ((dns_trust_t)dns_trust_authauthority)
/* Answser from an authoritative server */
dns_trust_authanswer = 6,
/* Answer from an authoritative server */
dns_trust_authanswer = 7,
#define dns_trust_authanswer ((dns_trust_t)dns_trust_authanswer)
/* Successfully DNSSEC validated */
dns_trust_secure = 7,
/* Successfully DNSSEC validated */
dns_trust_secure = 8,
#define dns_trust_secure ((dns_trust_t)dns_trust_secure)
/* This server is authoritative */
dns_trust_ultimate = 8
dns_trust_ultimate = 9
#define dns_trust_ultimate ((dns_trust_t)dns_trust_ultimate)
};
#define DNS_TRUST_PENDING(x) ((x) == dns_trust_pending_answer || \
(x) == dns_trust_pending_additional)
#define DNS_TRUST_GLUE(x) ((x) == dns_trust_glue)
/*
* Name checking severites.
*/
+2 -1
View File
@@ -763,7 +763,8 @@ dump_order_compare(const void *a, const void *b) {
static const char *trustnames[] = {
"none",
"pending",
"pending-additional",
"pending-answer",
"additional",
"glue",
"answer",
+1 -1
View File
@@ -133,7 +133,7 @@ openssldsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
status = DSA_do_verify(digest, ISC_SHA1_DIGESTLENGTH, dsasig, dsa);
DSA_SIG_free(dsasig);
if (status == 0)
if (status != 1)
return (dst__openssl_toresult(DST_R_VERIFYFAILURE));
return (ISC_R_SUCCESS);
+1 -1
View File
@@ -246,7 +246,7 @@ opensslrsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
status = RSA_verify(type, digest, digestlen, sig->base,
RSA_size(rsa), rsa);
if (status == 0)
if (status != 1)
return (dst__openssl_toresult(DST_R_VERIFYFAILURE));
return (ISC_R_SUCCESS);
+2 -2
View File
@@ -2652,7 +2652,7 @@ cache_zonecut_callback(dns_rbtnode_t *node, dns_name_t *name, void *arg) {
}
if (dname_header != NULL &&
(dname_header->trust != dns_trust_pending ||
(!DNS_TRUST_PENDING(dname_header->trust) ||
(search->options & DNS_DBFIND_PENDINGOK) != 0)) {
/*
* We increment the reference count on node to ensure that
@@ -3113,7 +3113,7 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
if (found == NULL ||
(found->trust == dns_trust_glue &&
((options & DNS_DBFIND_GLUEOK) == 0)) ||
(found->trust == dns_trust_pending &&
(DNS_TRUST_PENDING(found->trust) &&
((options & DNS_DBFIND_PENDINGOK) == 0))) {
/*
* If there is an NS rdataset at this node, then this is the
+65 -9
View File
@@ -1054,17 +1054,50 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
* A dispatch will be created once the connect succeeds.
*/
} else {
isc_sockaddr_t localaddr;
unsigned int attrs, attrmask;
dns_dispatch_t *disp_base;
attrs = 0;
attrs |= DNS_DISPATCHATTR_UDP;
attrs |= DNS_DISPATCHATTR_RANDOMPORT;
attrmask = 0;
attrmask |= DNS_DISPATCHATTR_UDP;
attrmask |= DNS_DISPATCHATTR_TCP;
attrmask |= DNS_DISPATCHATTR_IPV4;
attrmask |= DNS_DISPATCHATTR_IPV6;
switch (isc_sockaddr_pf(&addrinfo->sockaddr)) {
case PF_INET:
dns_dispatch_attach(res->dispatchv4, &query->dispatch);
case AF_INET:
disp_base = res->dispatchv4;
attrs |= DNS_DISPATCHATTR_IPV4;
break;
case PF_INET6:
dns_dispatch_attach(res->dispatchv6, &query->dispatch);
case AF_INET6:
disp_base = res->dispatchv6;
attrs |= DNS_DISPATCHATTR_IPV6;
break;
default:
result = ISC_R_NOTIMPLEMENTED;
goto cleanup_query;
}
result = dns_dispatch_getlocaladdress(disp_base, &localaddr);
if (result != ISC_R_SUCCESS)
goto cleanup_query;
if (isc_sockaddr_getport(&localaddr) == 0) {
result = dns_dispatch_getudp(res->dispatchmgr,
res->socketmgr,
res->taskmgr,
&localaddr,
4096, 1000, 32768,
16411, 16433,
attrs, attrmask,
&query->dispatch);
if (result != ISC_R_SUCCESS)
goto cleanup_query;
} else
dns_dispatch_attach(disp_base, &query->dispatch);
/*
* We should always have a valid dispatcher here. If we
* don't support a protocol family, then its dispatcher
@@ -3570,6 +3603,7 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
* for it, unless it is glue.
*/
if (secure_domain && rdataset->trust != dns_trust_glue) {
dns_trust_t trust;
/*
* RRSIGs are validated as part of validating the
* type they cover.
@@ -3606,12 +3640,34 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
}
/*
* Cache this rdataset/sigrdataset pair as
* pending data.
* Reject out of bailiwick additional records
* without RRSIGs as they can't possibly validate
* as "secure" and as we will never never want to
* store these as "answers" after validation.
*/
rdataset->trust = dns_trust_pending;
if (rdataset->trust == dns_trust_additional &&
sigrdataset == NULL && EXTERNAL(rdataset))
continue;
/*
* XXXMPA: If we store as "answer" after validating
* then we need to do bailiwick processing and
* also need to track whether RRsets are in or
* out of bailiwick. This will require a another
* pending trust level.
*
* Cache this rdataset/sigrdataset pair as
* pending data. Track whether it was additional
* or not.
*/
if (rdataset->trust == dns_trust_additional)
trust = dns_trust_pending_additional;
else
trust = dns_trust_pending_answer;
rdataset->trust = trust;
if (sigrdataset != NULL)
sigrdataset->trust = dns_trust_pending;
sigrdataset->trust = trust;
if (!need_validation)
addedrdataset = ardataset;
else
@@ -3931,7 +3987,7 @@ ncache_message(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
for (trdataset = ISC_LIST_HEAD(tname->list);
trdataset != NULL;
trdataset = ISC_LIST_NEXT(trdataset, link))
trdataset->trust = dns_trust_pending;
trdataset->trust = dns_trust_pending_answer;
result = dns_message_nextname(fctx->rmessage,
DNS_SECTION_AUTHORITY);
}
+5 -5
View File
@@ -235,7 +235,7 @@ auth_nonpending(dns_message_t *message) {
rdataset != NULL;
rdataset = ISC_LIST_NEXT(rdataset, link))
{
if (rdataset->trust == dns_trust_pending)
if (DNS_TRUST_PENDING(rdataset->trust))
rdataset->trust = dns_trust_authauthority;
}
}
@@ -1146,7 +1146,7 @@ get_key(dns_validator_t *val, dns_rdata_rrsig_t *siginfo) {
* We have an rrset for the given keyname.
*/
val->keyset = &val->frdataset;
if (val->frdataset.trust == dns_trust_pending &&
if (DNS_TRUST_PENDING(val->frdataset.trust) &&
dns_rdataset_isassociated(&val->fsigrdataset))
{
/*
@@ -1161,7 +1161,7 @@ get_key(dns_validator_t *val, dns_rdata_rrsig_t *siginfo) {
if (result != ISC_R_SUCCESS)
return (result);
return (DNS_R_WAIT);
} else if (val->frdataset.trust == dns_trust_pending) {
} else if (DNS_TRUST_PENDING(val->frdataset.trust)) {
/*
* Having a pending key with no signature means that
* something is broken.
@@ -1723,7 +1723,7 @@ validatezonekey(dns_validator_t *val) {
* We have DS records.
*/
val->dsset = &val->frdataset;
if (val->frdataset.trust == dns_trust_pending &&
if (DNS_TRUST_PENDING(val->frdataset.trust) &&
dns_rdataset_isassociated(&val->fsigrdataset))
{
result = create_validator(val,
@@ -1736,7 +1736,7 @@ validatezonekey(dns_validator_t *val) {
if (result != ISC_R_SUCCESS)
return (result);
return (DNS_R_WAIT);
} else if (val->frdataset.trust == dns_trust_pending) {
} else if (DNS_TRUST_PENDING(val->frdataset.trust)) {
/*
* There should never be an unsigned DS.
*/
+10
View File
@@ -429,6 +429,16 @@ warning: this CVS does not support PreservePermissions");
else if (strcmp (p, "stat") == 0)
RereadLogAfterVerify = LOGMSG_REREAD_STAT;
}
else if (strcmp(line, "LocalKeyword") == 0)
{
/* Recognize cvs-1.12-style keyword control rather than erroring out. */
RCS_setlocalid(p);
}
else if (strcmp(line, "KeywordExpand") == 0)
{
/* Recognize cvs-1.12-style keyword control rather than erroring out. */
RCS_setincexc(p);
}
else
{
/* We may be dealing with a keyword which was added in a
-16
View File
@@ -1,16 +0,0 @@
#----------------------------------------------------------------
# basis: file(1) magic for BBx/Pro5-files
# Oliver Dammer <[email protected]> 2005/11/07
# http://www.basis.com business-basic-files.
#
0 string \074\074bbx\076\076 BBx
>7 string \000 indexed file
>7 string \001 serial file
>7 string \002 keyed file
>>13 short 0 (sort)
>7 string \004 program
>>18 byte x (LEVEL %d)
>>>23 string >\000 psaved
>7 string \006 mkeyed file
>>13 short 0 (sort)
>>8 string \000 (mkey)
-12
View File
@@ -1,12 +0,0 @@
#------------------------------------------------------------------------------
# bFLT: file(1) magic for BFLT uclinux binary files
#
# From Philippe De Muyter <[email protected]>
#
0 string bFLT BFLT executable
>4 belong x - version %ld
>4 belong 4
>>36 belong&0x1 0x1 ram
>>36 belong&0x2 0x2 gotpic
>>36 belong&0x4 0x4 gzip
>>36 belong&0x8 0x8 gzdata
-11
View File
@@ -1,11 +0,0 @@
#------------------------------------------------------------------------------
# BTSnoop: file(1) magic for BTSnoop files
#
# From <[email protected]>
0 string btsnoop\0 BTSnoop
>8 belong x version %d,
>12 belong 1001 Unencapsulated HCI
>12 belong 1002 HCI UART (H4)
>12 belong 1003 HCI BCSP
>12 belong 1004 HCI Serial (H5)
>>12 belong x type %d
-21
View File
@@ -1,21 +0,0 @@
#------------------------------------------------------------------------------
# Cafe Babes unite!
#
# Since Java bytecode and Mach-O fat-files have the same magic number, the test
# must be performed in the same "magic" sequence to get both right. The long
# at offset 4 in a mach-O fat file tells the number of architectures; the short at
# offset 4 in a Java bytecode file is the JVM minor version and the
# short at offset 6 is the JVM major version. Since there are only
# only 18 labeled Mach-O architectures at current, and the first released
# Java class format was version 43.0, we can safely choose any number
# between 18 and 39 to test the number of architectures against
# (and use as a hack). Let's not use 18, because the Mach-O people
# might add another one or two as time goes by...
#
0 belong 0xcafebabe
>4 belong >30 compiled Java class data,
>>6 beshort x version %d.
>>4 beshort x \b%d
>4 belong 1 Mach-O fat file with 1 architecture
>4 belong >1
>>4 belong <20 Mach-O fat file with %ld architectures
-13
View File
@@ -1,13 +0,0 @@
#------------------------------------------------------------------------------
# cracklib: file (1) magic for cracklib v2.7
0 lelong 0x70775631 Cracklib password index, little endian
>4 long >0 (%i words)
>4 long 0 ("64-bit")
>>8 long >-1 (%i words)
0 belong 0x70775631 Cracklib password index, big endian
>4 belong >-1 (%i words)
# really bellong 0x0000000070775631
4 belong 0x70775631 Cracklib password index, big endian ("64-bit")
>12 belong >0 (%i words)
-22
View File
@@ -1,22 +0,0 @@
# ------------------------------------------------------------------------
# mup: file(1) magic for Mup (Music Publisher) input file.
#
# From: Abel Cheung <abel (@) oaka.org>
#
# NOTE: This header is mainly proposed in the Arkkra mailing list,
# and is not a mandatory header because of old mup input file
# compatibility. Noteedit also use mup format, but is not forcing
# user to use any header as well.
#
0 string //!Mup Mup music publication program input text
>6 string -Arkkra (Arkkra)
>>13 string -
>>>16 string .
>>>>14 string x \b, need V%.4s
>>>15 string .
>>>>14 string x \b, need V%.3s
>6 string -
>>9 string .
>>>7 string x \b, need V%.4s
>>8 string .
>>>7 string x \b, need V%.3s
-37
View File
@@ -1,37 +0,0 @@
#------------------------------------------------------------------------------
# os400: file(1) magic for IBM OS/400 files
#
# IBM OS/400 (i5/OS) Save file (SAVF) - [email protected]
# In spite of its quite variable format (due to internal memory page
# length differences between CISC and RISC versions of the OS) the
# SAVF structure hasn't suitable offsets to identify the catalog
# header in the first descriptor where there are some useful infos,
# so we must search in a somewhat large area for a particular string
# that represents the EBCDIC encoding of 'QSRDSSPC' (save/restore
# descriptor space) preceded by a two byte constant.
#
1090 search/7393 \x19\xDB\xD8\xE2\xD9\xC4\xE2\xE2\xD7\xC3 IBM OS/400 save file data
>&212 byte 0x01 \b, created with SAVOBJ
>&212 byte 0x02 \b, created with SAVLIB
>&212 byte 0x07 \b, created with SAVCFG
>&212 byte 0x08 \b, created with SAVSECDTA
>&212 byte 0x0A \b, created with SAVSECDTA
>&212 byte 0x0B \b, created with SAVDLO
>&212 byte 0x0D \b, created with SAVLICPGM
>&212 byte 0x11 \b, created with SAVCHGOBJ
>&213 byte 0x44 \b, at least V5R4 to open
>&213 byte 0x43 \b, at least V5R3 to open
>&213 byte 0x42 \b, at least V5R2 to open
>&213 byte 0x41 \b, at least V5R1 to open
>&213 byte 0x40 \b, at least V4R5 to open
>&213 byte 0x3F \b, at least V4R4 to open
>&213 byte 0x3E \b, at least V4R3 to open
>&213 byte 0x3C \b, at least V4R2 to open
>&213 byte 0x3D \b, at least V4R1M4 to open
>&213 byte 0x3B \b, at least V4R1 to open
>&213 byte 0x3A \b, at least V3R7 to open
>&213 byte 0x35 \b, at least V3R6 to open
>&213 byte 0x36 \b, at least V3R2 to open
>&213 byte 0x34 \b, at least V3R1 to open
>&213 byte 0x31 \b, at least V3R0M5 to open
>&213 byte 0x30 \b, at least V2R3 to open
-60
View File
@@ -1,60 +0,0 @@
#------------------------------------------------------------------------------
# scientific: file(1) magic for scientific formats
#
# From: Joe Krahn <[email protected]>
########################################################
# CCP4 data and plot files:
0 string MTZ\040 MTZ reflection file
92 string PLOT%%84 Plot84 plotting file
>52 byte 1 , Little-endian
>55 byte 1 , Big-endian
########################################################
# Electron density MAP/MASK formats
0 string EZD_MAP NEWEZD Electron Density Map
109 string MAP\040( Old EZD Electron Density Map
0 string/c :-)\040Origin BRIX Electron Density Map
>170 string >0 , Sigma:%.12s
#>4 string >0 %.178s
#>4 addr x %.178s
7 string 18\040!NTITLE XPLOR ASCII Electron Density Map
9 string \040!NTITLE\012\040REMARK CNS ASCII electron density map
208 string MAP\040 CCP4 Electron Density Map
# Assumes same stamp for float and double (normal case)
>212 byte 17 \b, Big-endian
>212 byte 34 \b, VAX format
>212 byte 68 \b, Little-endian
>212 byte 85 \b, Convex native
############################################################
# X-Ray Area Detector images
0 string R-AXIS4\ \ \ R-Axis Area Detector Image:
>796 lelong <20 Little-endian, IP #%d,
>>768 lelong >0 Size=%dx
>>772 lelong >0 \b%d
>796 belong <20 Big-endian, IP #%d,
>>768 belong >0 Size=%dx
>>772 belong >0 \b%d
0 string RAXIS\ \ \ \ \ R-Axis Area Detector Image, Win32:
>796 lelong <20 Little-endian, IP #%d,
>>768 lelong >0 Size=%dx
>>772 lelong >0 \b%d
>796 belong <20 Big-endian, IP #%d,
>>768 belong >0 Size=%dx
>>772 belong >0 \b%d
1028 string MMX\000\000\000\000\000\000\000\000\000\000\000\000\000 MAR Area Detector Image,
>1072 ulong >1 Compressed(%d),
>1100 ulong >1 %d headers,
>1104 ulong >0 %d x
>1108 ulong >0 %d,
>1120 ulong >0 %d bits/pixel
-15
View File
@@ -1,15 +0,0 @@
#---------------------------------------------------------------------------
# Unicode: BOM prefixed text files - Adrian Havill <[email protected]>
#
0 string +/v8 Unicode text, UTF-7
0 string +/v9 Unicode text, UTF-7
0 string +/v+ Unicode text, UTF-7
0 string +/v/ Unicode text, UTF-7
0 string \357\273\277 Unicode text, UTF-8
0 string \335\163\146\163 Unicode text, UTF-8-EBCDIC
0 string \376\377\000\000 Unicode text, UTF-32, big-endian
0 string \377\376\000\000 Unicode text, UTF-32, little-endian
0 string \376\377 Unicode text, UTF-16, big-endian
0 string \377\376 Unicode text, UTF-16, little-endian
0 string \016\376\377 Unicode text, SCSU (Standard Compression Scheme for Unicode)
+1 -1
View File
@@ -91,7 +91,7 @@ _initialize_i386fbsd_nat (void)
#ifdef KERN_PS_STRINGS
{
int mib[2];
int ps_strings;
u_long ps_strings;
size_t len;
mib[0] = CTL_KERN;
+1 -1
View File
@@ -2,7 +2,7 @@
------------
Less
Copyright (C) 1984-2005 Mark Nudelman
Copyright (C) 1984-2007 Mark Nudelman
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
-58
View File
@@ -1,58 +0,0 @@
# Makefile for less.
# MS-DOS version
#### Start of system configuration section. ####
CC = cl
# Change the following directories to match your installation.
LIBDIR = c:\msvc\lib
INCDIR = c:\msvc\include
# CFLAGS are compile-time options and LDFLAGS are link-time options. They are
# customized for MSVC 1.0 (MSC 8.0). If you have a different version of the
# compiler, you may need to change some of the options to their equivalents.
# -Ot optimize for speed
# -AL large memory model
# -Za ANSI C conformance
# -nologo suppress MSVC banners
# -onerror:noexe no .EXE file if link errors occur
CFLAGS = -Ot -AL -Za -nologo
LDFLAGS = -onerror:noexe -nologo
LIBS = $(LIBDIR)\llibce.lib $(LIBDIR)\graphics.lib
#### End of system configuration section. ####
# This rule allows us to supply the necessary -D options
# in addition to whatever the user asks for.
.c.obj:
$(CC) -c -I. -I$(INCDIR) $(CPPFLAGS) $(CFLAGS) $<
OBJ = main.obj screen.obj brac.obj ch.obj charset.obj cmdbuf.obj command.obj \
decode.obj edit.obj filename.obj forwback.obj help.obj ifile.obj \
input.obj jump.obj line.obj linenum.obj lsystem.obj \
mark.obj optfunc.obj option.obj opttbl.obj os.obj output.obj \
position.obj prompt.obj search.obj signal.obj tags.obj \
ttyin.obj version.obj
all: less lesskey
# This is really horrible, but the command line is too long for
# MS-DOS if we try to link $(OBJ).
less: $(OBJ)
-if exist lesskey.obj del lesskey.obj
$(CC) $(LDFLAGS) -o $@ *.obj $(LIBS)
lesskey: lesskey.obj version.obj
$(CC) $(LDFLAGS) -o $@ lesskey.obj version.obj $(LIBS)
defines.h: defines.ds
-del defines.h
-copy defines.ds defines.h
$(OBJ): less.h defines.h
clean:
-del *.obj
-del less.exe
-del lesskey.exe
+12
View File
@@ -13,6 +13,17 @@
======================================================================
Major changes between "less" versions 409 and 416
* New --follow-name option makes F command follow the name of a file
rather than the file descriptor if an open file is renamed.
* Make searching with -i/-I work correctly with non-ASCII text.
* Fix DJGPP build.
======================================================================
Major changes between "less" versions 406 and 409
* Support CSI escape sequences, like SGR escape sequences.
@@ -698,3 +709,4 @@
+2 -2
View File
@@ -1,7 +1,7 @@
Less, version 409
Less, version 416
This is the distribution of less, version 409, released 12 Oct 2007.
This is the distribution of less, version 416, released 22 Nov 2007.
This program is part of the GNU project (http://www.gnu.org).
This program is free software. You may redistribute it and/or
+31 -4
View File
@@ -21,6 +21,12 @@
#include <windows.h>
#endif
#if HAVE_STAT_INO
#include <sys/stat.h>
extern dev_t curr_dev;
extern ino_t curr_ino;
#endif
typedef POSITION BLOCKNUM;
public int ignore_eoi;
@@ -98,6 +104,8 @@ static int maxbufs = -1;
extern int autobuf;
extern int sigs;
extern int secure;
extern int screen_trashed;
extern int follow_mode;
extern constant char helpdata[];
extern constant int size_helpdata;
extern IFILE curr_ifile;
@@ -195,7 +203,7 @@ fch_get()
*/
if (!(ch_flags & CH_CANSEEK))
return ('?');
if (lseek(ch_file, (off_t)pos, 0) == BAD_LSEEK)
if (lseek(ch_file, (off_t)pos, SEEK_SET) == BAD_LSEEK)
{
error("seek error", NULL_PARG);
clear_eol();
@@ -276,6 +284,25 @@ fch_get()
#endif
#endif
slept = TRUE;
#if HAVE_STAT_INO
if (follow_mode == FOLLOW_NAME)
{
/* See whether the file's i-number has changed.
* If so, force the file to be closed and
* reopened. */
struct stat st;
int r = stat(get_filename(curr_ifile), &st);
if (r == 0 && (st.st_ino != curr_ino ||
st.st_dev != curr_dev))
{
/* screen_trashed=2 causes
* make_display to reopen the file. */
screen_trashed = 2;
return (EOI);
}
}
#endif
}
if (sigs)
return (EOI);
@@ -648,7 +675,7 @@ ch_flush()
}
#endif
if (lseek(ch_file, (off_t)0, 0) == BAD_LSEEK)
if (lseek(ch_file, (off_t)0, SEEK_SET) == BAD_LSEEK)
{
/*
* Warning only; even if the seek fails for some reason,
@@ -711,7 +738,7 @@ ch_delbufs()
while (ch_bufhead != END_OF_CHAIN)
{
bp = ch_bufhead;
bp->next->prev = bp->prev;;
bp->next->prev = bp->prev;
bp->prev->next = bp->next;
free(bp);
}
@@ -737,7 +764,7 @@ seekable(f)
return (0);
}
#endif
return (lseek(f, (off_t)1, 0) != BAD_LSEEK);
return (lseek(f, (off_t)1, SEEK_SET) != BAD_LSEEK);
}
/*
+32 -11
View File
@@ -557,6 +557,21 @@ mca_char(c)
return (MCA_MORE);
}
/*
* Discard any buffered file data.
*/
static void
clear_buffers()
{
if (!(ch_getflags() & CH_CANSEEK))
return;
ch_flush();
clr_linenum();
#if HILITE_SEARCH
clr_hilite();
#endif
}
/*
* Make sure the screen is displayed.
*/
@@ -580,11 +595,20 @@ make_display()
jump_loc(initial_scrpos.pos, initial_scrpos.ln);
} else if (screen_trashed)
{
int save_top_scroll;
save_top_scroll = top_scroll;
int save_top_scroll = top_scroll;
int save_ignore_eoi = ignore_eoi;
top_scroll = 1;
ignore_eoi = 0;
if (screen_trashed == 2)
{
/* Special case used by ignore_eoi: re-open the input file
* and jump to the end of the file. */
reopen_curr_ifile();
jump_forw();
}
repaint();
top_scroll = save_top_scroll;
ignore_eoi = save_ignore_eoi;
}
}
@@ -1115,7 +1139,10 @@ commands()
ignore_eoi = 1;
hit_eof = 0;
while (!sigs)
{
make_display();
forward(1, 0, 0);
}
ignore_eoi = 0;
/*
* This gets us back in "F mode" after processing
@@ -1154,14 +1181,7 @@ commands()
* Flush buffers, then repaint screen.
* Don't flush the buffers on a pipe!
*/
if (ch_getflags() & CH_CANSEEK)
{
ch_flush();
clr_linenum();
#if HILITE_SEARCH
clr_hilite();
#endif
}
clear_buffers();
/* FALLTHRU */
case A_REPAINT:
/*
@@ -1263,7 +1283,8 @@ commands()
/*
* Define abbreviation for a commonly used sequence below.
*/
#define DO_SEARCH() if (number <= 0) number = 1; \
#define DO_SEARCH() \
if (number <= 0) number = 1; \
mca_search(); \
cmd_exec(); \
multi_search((char *)NULL, (int) number);
+229 -1
View File
@@ -3611,6 +3611,73 @@ fi
# Checks for general libraries.
{ echo "$as_me:$LINENO: checking for tgoto in -ltinfo" >&5
echo $ECHO_N "checking for tgoto in -ltinfo... $ECHO_C" >&6; }
if test "${ac_cv_lib_tinfo_tgoto+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ltinfo $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char tgoto ();
int
main ()
{
return tgoto ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_tinfo_tgoto=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_tinfo_tgoto=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_tinfo_tgoto" >&5
echo "${ECHO_T}$ac_cv_lib_tinfo_tgoto" >&6; }
if test $ac_cv_lib_tinfo_tgoto = yes; then
have_tinfo=yes
else
have_tinfo=no
fi
{ echo "$as_me:$LINENO: checking for initscr in -lxcurses" >&5
echo $ECHO_N "checking for initscr in -lxcurses... $ECHO_C" >&6; }
if test "${ac_cv_lib_xcurses_initscr+set}" = set; then
@@ -4246,6 +4313,61 @@ fi
fi
if test $curses_broken = 0; then
# -- Try tinfo.
if test "x$TERMLIBS" = x; then
if test $have_tinfo = yes; then
TERMLIBS="-ltinfo"
SAVE_LIBS=$LIBS
LIBS="$LIBS $TERMLIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
termok=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
termok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$SAVE_LIBS
if test $termok = no; then TERMLIBS=""; fi
fi
fi
# -- Try xcurses.
if test "x$TERMLIBS" = x; then
if test $have_xcurses = yes; then
@@ -4895,7 +5017,8 @@ done
for ac_header in ctype.h errno.h fcntl.h limits.h stdio.h stdlib.h string.h termcap.h termio.h termios.h time.h unistd.h values.h sys/ioctl.h sys/stream.h
for ac_header in ctype.h errno.h fcntl.h limits.h stdio.h stdlib.h string.h termcap.h termio.h termios.h time.h unistd.h values.h sys/ioctl.h sys/stream.h wctype.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -5443,6 +5566,10 @@ fi
@@ -5655,6 +5782,55 @@ sed 's/^/| /' conftest.$ac_ext >&5
echo "${ECHO_T}no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: checking for st_ino in struct stat" >&5
echo $ECHO_N "checking for st_ino in struct stat... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/stat.h>
int
main ()
{
struct stat s; dev_t dev = s.st_dev; ino_t ino = s.st_ino;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }; cat >>confdefs.h <<\_ACEOF
#define HAVE_STAT_INO 1
_ACEOF
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# Checks for library functions.
@@ -6515,6 +6691,7 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
{ echo "$as_me:$LINENO: checking for ctype functions" >&5
echo $ECHO_N "checking for ctype functions... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
@@ -6566,6 +6743,57 @@ sed 's/^/| /' conftest.$ac_ext >&5
echo "${ECHO_T}no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
{ echo "$as_me:$LINENO: checking for wctype functions" >&5
echo $ECHO_N "checking for wctype functions... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <wctype.h>
int
main ()
{
iswlower(0); iswupper(0); towlower(0); towupper(0);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }; cat >>confdefs.h <<\_ACEOF
#define HAVE_WCTYPE 1
_ACEOF
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
+30 -1
View File
@@ -23,6 +23,7 @@ AC_PROG_INSTALL
AC_SYS_LARGEFILE
# Checks for general libraries.
AC_CHECK_LIB(tinfo, tgoto, [have_tinfo=yes], [have_tinfo=no])
AC_CHECK_LIB(xcurses, initscr, [have_xcurses=yes], [have_xcurses=no])
AC_CHECK_LIB(ncursesw, initscr, [have_ncursesw=yes], [have_ncursesw=no])
AC_CHECK_LIB(ncurses, initscr, [have_ncurses=yes], [have_ncurses=no])
@@ -51,6 +52,20 @@ fi
fi
if test $curses_broken = 0; then
# -- Try tinfo.
if test "x$TERMLIBS" = x; then
if test $have_tinfo = yes; then
TERMLIBS="-ltinfo"
SAVE_LIBS=$LIBS
LIBS="$LIBS $TERMLIBS"
AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
[termok=yes], [termok=no])
LIBS=$SAVE_LIBS
if test $termok = no; then TERMLIBS=""; fi
fi
fi
# -- Try xcurses.
if test "x$TERMLIBS" = x; then
if test $have_xcurses = yes; then
@@ -154,7 +169,7 @@ LIBS="$LIBS $TERMLIBS"
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([ctype.h errno.h fcntl.h limits.h stdio.h stdlib.h string.h termcap.h termio.h termios.h time.h unistd.h values.h sys/ioctl.h sys/stream.h])
AC_CHECK_HEADERS([ctype.h errno.h fcntl.h limits.h stdio.h stdlib.h string.h termcap.h termio.h termios.h time.h unistd.h values.h sys/ioctl.h sys/stream.h wctype.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STAT
@@ -182,6 +197,8 @@ AH_TEMPLATE([HAVE_VOID],
[Define HAVE_VOID if your compiler supports the "void" type.])
AH_TEMPLATE([HAVE_CONST],
[Define HAVE_CONST if your compiler supports the "const" modifier.])
AH_TEMPLATE([HAVE_STAT_INO],
[Define HAVE_STAT_INO if your struct stat has st_ino and st_dev.])
AH_TEMPLATE([HAVE_TIME_T],
[Define HAVE_TIME_T if your system supports the "time_t" type.])
AH_TEMPLATE([HAVE_STRERROR],
@@ -204,6 +221,8 @@ AH_TEMPLATE([HAVE_TERMIOS_FUNCS],
[Define HAVE_TERMIOS_FUNCS if you have tcgetattr/tcsetattr.])
AH_TEMPLATE([HAVE_UPPER_LOWER],
[Define HAVE_UPPER_LOWER if you have isupper, islower, toupper, tolower.])
AH_TEMPLATE([HAVE_WCTYPE],
[Define HAVE_WCTYPE if you have iswupper, iswlower, towupper, towlower.])
AH_TEMPLATE([HAVE_SIGSET_T],
[Define HAVE_SIGSET_T you have the sigset_t type.])
AH_TEMPLATE([HAVE_SIGEMPTYSET],
@@ -224,6 +243,11 @@ AC_TRY_COMPILE(, [const int foo = 0;],
AC_MSG_CHECKING(for time_t)
AC_TRY_COMPILE([#include <time.h>], [time_t t = 0;],
[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIME_T)], [AC_MSG_RESULT(no)])
AC_MSG_CHECKING(for st_ino in struct stat)
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/stat.h>],
[struct stat s; dev_t dev = s.st_dev; ino_t ino = s.st_ino;],
[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STAT_INO)], [AC_MSG_RESULT(no)])
# Checks for library functions.
AC_TYPE_SIGNAL
@@ -307,6 +331,7 @@ AC_TRY_LINK([#include <locale.h>
#include <ctype.h>
#include <langinfo.h>], [setlocale(LC_CTYPE,""); isprint(0); iscntrl(0);],
[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_LOCALE)], [AC_MSG_RESULT(no)])
AC_MSG_CHECKING(for ctype functions)
AC_TRY_LINK([
#if HAVE_CTYPE_H
@@ -314,6 +339,10 @@ AC_TRY_LINK([
#endif], [static int x; x = isupper(x); x = tolower(x); x = toupper(x);],
[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_UPPER_LOWER)], [AC_MSG_RESULT(no)])
AC_MSG_CHECKING(for wctype functions)
AC_TRY_LINK([#include <wctype.h>], [iswlower(0); iswupper(0); towlower(0); towupper(0);],
[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_WCTYPE)], [AC_MSG_RESULT(no)])
# Checks for external variable ospeed in the termcap library.
have_ospeed=no
AC_MSG_CHECKING(termcap for ospeed)
+1 -1
View File
@@ -682,7 +682,7 @@ lesskey(filename, sysvar)
close(f);
return (-1);
}
if (lseek(f, (off_t)0, 0) == BAD_LSEEK)
if (lseek(f, (off_t)0, SEEK_SET) == BAD_LSEEK)
{
free(buf);
close(f);
+3
View File
@@ -313,6 +313,9 @@
/* Define if you have the <ctype.h> header file. */
#define HAVE_CTYPE_H 1
/* Define if you have the <wctype.h> header file. */
#define HAVE_WCTYPE_H 0
/* Define if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1
+9
View File
@@ -282,6 +282,9 @@
/* Define to 1 if you have the `stat' function. */
#undef HAVE_STAT
/* Define HAVE_STAT_INO if your struct stat has st_ino and st_dev. */
#undef HAVE_STAT_INO
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
@@ -351,6 +354,12 @@
/* Define HAVE_VOID if your compiler supports the "void" type. */
#undef HAVE_VOID
/* Define HAVE_WCTYPE if you have iswupper, iswlower, towupper, towlower. */
#undef HAVE_WCTYPE
/* Define to 1 if you have the <wctype.h> header file. */
#undef HAVE_WCTYPE_H
/* Define to 1 if you have the `_setjmp' function. */
#undef HAVE__SETJMP
+3
View File
@@ -279,6 +279,9 @@
/* Define if you have the <ctype.h> header file. */
#define HAVE_CTYPE_H 1
/* Define if you have the <wctype.h> header file. */
#define HAVE_WCTYPE_H 0
/* Define if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1
+3
View File
@@ -287,6 +287,9 @@
/* Define if you have the <ctype.h> header file. */
#define HAVE_CTYPE_H 1
/* Define if you have the <wctype.h> header file. */
#define HAVE_WCTYPE_H 0
/* Define if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1
+3
View File
@@ -277,6 +277,9 @@
/* Define if you have the <ctype.h> header file. */
#define HAVE_CTYPE_H 1
/* Define if you have the <wctype.h> header file. */
#define HAVE_WCTYPE_H 1
/* Define if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1
+33 -2
View File
@@ -10,6 +10,9 @@
#include "less.h"
#if HAVE_STAT
#include <sys/stat.h>
#endif
public int fd0 = 0;
@@ -36,6 +39,11 @@ extern int force_logfile;
extern char *namelogfile;
#endif
#if HAVE_STAT_INO
public dev_t curr_dev;
public ino_t curr_ino;
#endif
char *curr_altfilename = NULL;
static void *curr_altpipe;
@@ -178,6 +186,9 @@ close_file()
curr_altfilename = NULL;
}
curr_ifile = NULL_IFILE;
#if HAVE_STAT_INO
curr_ino = curr_dev = 0;
#endif
}
/*
@@ -360,7 +371,6 @@ edit_ifile(ifile)
}
}
}
free(qopen_filename);
/*
* Get the new ifile.
@@ -384,11 +394,24 @@ edit_ifile(ifile)
#if LOGFILE
if (namelogfile != NULL && is_tty)
use_logfile(namelogfile);
#endif
#if HAVE_STAT_INO
/* Remember the i-number and device of the opened file. */
{
struct stat statbuf;
int r = stat(qopen_filename, &statbuf);
if (r == 0)
{
curr_ino = statbuf.st_ino;
curr_dev = statbuf.st_dev;
}
}
#endif
if (every_first_cmd != NULL)
ungetsc(every_first_cmd);
}
free(qopen_filename);
no_display = !any_display;
flush();
any_display = TRUE;
@@ -657,6 +680,14 @@ reedit_ifile(save_ifile)
quit(QUIT_ERROR);
}
public void
reopen_curr_ifile()
{
IFILE save_ifile = save_curr_ifile();
close_file();
reedit_ifile(save_ifile);
}
/*
* Edit standard input.
*/
@@ -747,7 +778,7 @@ loop:
* Append: open the file and seek to the end.
*/
logfile = open(filename, OPEN_APPEND);
if (lseek(logfile, (off_t)0, 2) == BAD_LSEEK)
if (lseek(logfile, (off_t)0, SEEK_END) == BAD_LSEEK)
{
close(logfile);
logfile = -1;
+2 -2
View File
@@ -476,7 +476,7 @@ bin_file(f)
if (!seekable(f))
return (0);
if (lseek(f, (off_t)0, 0) == BAD_LSEEK)
if (lseek(f, (off_t)0, SEEK_SET) == BAD_LSEEK)
return (0);
n = read(f, data, sizeof(data));
for (i = 0; i < n; i++)
@@ -505,7 +505,7 @@ seek_filesize(f)
{
off_t spos;
spos = lseek(f, (off_t)0, 2);
spos = lseek(f, (off_t)0, SEEK_END);
if (spos == BAD_LSEEK)
return (NULL_POSITION);
return ((POSITION) spos);
+1
View File
@@ -104,6 +104,7 @@
public IFILE save_curr_ifile ();
public void unsave_ifile ();
public void reedit_ifile ();
public void reopen_curr_ifile ();
public int edit_stdin ();
public void cat_file ();
public void use_logfile ();
+25 -5
View File
@@ -72,6 +72,9 @@
#if HAVE_CTYPE_H
#include <ctype.h>
#endif
#if HAVE_WCTYPE_H
#include <wctype.h>
#endif
#if HAVE_LIMITS_H
#include <limits.h>
#endif
@@ -126,16 +129,23 @@ void free();
#undef IS_SPACE
#undef IS_DIGIT
#if !HAVE_UPPER_LOWER
#define IS_UPPER(c) ASCII_IS_UPPER(c)
#define IS_LOWER(c) ASCII_IS_LOWER(c)
#define TO_UPPER(c) ASCII_TO_UPPER(c)
#define TO_LOWER(c) ASCII_TO_LOWER(c)
#if HAVE_WCTYPE
#define IS_UPPER(c) iswupper(c)
#define IS_LOWER(c) iswlower(c)
#define TO_UPPER(c) towupper(c)
#define TO_LOWER(c) towlower(c)
#else
#if HAVE_UPPER_LOWER
#define IS_UPPER(c) isupper((unsigned char) (c))
#define IS_LOWER(c) islower((unsigned char) (c))
#define TO_UPPER(c) toupper((unsigned char) (c))
#define TO_LOWER(c) tolower((unsigned char) (c))
#else
#define IS_UPPER(c) ASCII_IS_UPPER(c)
#define IS_LOWER(c) ASCII_IS_LOWER(c)
#define TO_UPPER(c) ASCII_TO_UPPER(c)
#define TO_LOWER(c) ASCII_TO_LOWER(c)
#endif
#endif
#ifdef isspace
@@ -188,6 +198,13 @@ void free();
#define BAD_LSEEK ((off_t)-1)
#ifndef SEEK_SET
#define SEEK_SET 0
#endif
#ifndef SEEK_END
#define SEEK_END 2
#endif
#ifndef CHAR_BIT
#define CHAR_BIT 8
#endif
@@ -458,6 +475,9 @@ struct textlist
#define QUIT_ERROR 1
#define QUIT_SAVED_STATUS (-1)
#define FOLLOW_DESC 0
#define FOLLOW_NAME 1
/* filestate flags */
#define CH_CANSEEK 001
#define CH_KEEPOPEN 002
+66 -54
View File
@@ -445,8 +445,8 @@ LESS(1) LESS(1)
buffer space is used for each file (unless the file is a pipe;
see the -B option). The -b option specifies instead that n
kilobytes of buffer space should be used for each file. If n is
-1, buffer space is unlimited; that is, the entire file is read
into memory.
-1, buffer space is unlimited; that is, the entire file can be
read into memory.
-B or --auto-buffers
By default, when data is read from a pipe, buffers are allocated
@@ -456,8 +456,8 @@ LESS(1) LESS(1)
buffers for pipes, so that only 64K (or the amount of space
specified by the -b option) is used for the pipe. Warning: use
of -B can result in erroneous display, since only the most
recently viewed part of the file is kept in memory; any earlier
data is lost.
recently viewed part of the piped data is kept in memory; any
earlier data is lost.
-c or --clear-screen
Causes full screen repaints to be painted from the top line
@@ -533,42 +533,44 @@ LESS(1) LESS(1)
-jn or --jump-target=n
Specifies a line on the screen where the "target" line is to be
positioned. A target line is the object of a text search, tag
search, jump to a line number, jump to a file percentage, or
jump to a marked position. The screen line may be specified by
a number: the top line on the screen is 1, the next is 2, and so
on. The number may be negative to specify a line relative to
the bottom of the screen: the bottom line on the screen is -1,
the second to the bottom is -2, and so on. Alternately, the
screen line may be specified as a fraction of the height of the
screen, starting with a decimal point: .5 is in the middle of
the screen, .3 is three tenths down from the first line, and so
on. If the line is specified as a fraction, the actual line
positioned. The target line is the line specified by any com-
mand to search for a pattern, jump to a line number, jump to a
file percentage or jump to a tag. The screen line may be speci-
fied by a number: the top line on the screen is 1, the next is
2, and so on. The number may be negative to specify a line rel-
ative to the bottom of the screen: the bottom line on the screen
is -1, the second to the bottom is -2, and so on. Alternately,
the screen line may be specified as a fraction of the height of
the screen, starting with a decimal point: .5 is in the middle
of the screen, .3 is three tenths down from the first line, and
so on. If the line is specified as a fraction, the actual line
number is recalculated if the terminal window is resized, so
that the target line remains at the specified fraction of the
screen height. If the -j option is used, searches begin at the
line immediately after the target line. For example, if "-j4"
is used, the target line is the fourth line on the screen, so
searches begin at the fifth line on the screen.
screen height. If any form of the -j option is used, forward
searches begin at the line immediately after the target line,
and backward searches begin at the target line. For example, if
"-j4" is used, the target line is the fourth line on the screen,
so forward searches begin at the fifth line on the screen.
-J or --status-column
Displays a status column at the left edge of the screen. The
status column shows the lines that matched the current search.
The status column is also used if the -w or -W option is in
Displays a status column at the left edge of the screen. The
status column shows the lines that matched the current search.
The status column is also used if the -w or -W option is in
effect.
-kfilename or --lesskey-file=filename
Causes less to open and interpret the named file as a lesskey
Causes less to open and interpret the named file as a lesskey
(1) file. Multiple -k options may be specified. If the LESSKEY
or LESSKEY_SYSTEM environment variable is set, or if a lesskey
or LESSKEY_SYSTEM environment variable is set, or if a lesskey
file is found in a standard place (see KEY BINDINGS), it is also
used as a lesskey file.
-K or --quit-on-intr
Causes less to exit immediately when an interrupt character
(usually ^C) is typed. Normally, an interrupt character causes
less to stop whatever it is doing and return to its command
prompt.
Causes less to exit immediately when an interrupt character
(usually ^C) is typed. Normally, an interrupt character causes
less to stop whatever it is doing and return to its command
prompt. Note that use of this option makes it impossible to
return to the command prompt from the "F" command.
-L or --no-lessopen
Ignore the LESSOPEN environment variable (see the INPUT PREPRO-
@@ -739,8 +741,8 @@ LESS(1) LESS(1)
-xn,... or --tabs=n,...
Sets tab stops. If only one n is specified, tab stops are set
at multiples of n. If multiple values separated by commas are
specified, tab stops are set at those positions, and then
continue with the same spacing as the last two. For example,
specified, tab stops are set at those positions, and then con-
tinue with the same spacing as the last two. For example,
-x9,17 will set tabs at positions 9, 17, 25, 33, etc. The
default for n is 8.
@@ -750,40 +752,35 @@ LESS(1) LESS(1)
deinitialization string does something unnecessary, like clear-
ing the screen.
--no-keypad
Disables sending the keypad initialization and deinitialization
strings to the terminal. This is sometimes useful if the keypad
strings make the numeric keypad behave in an undesirable manner.
-yn or --max-forw-scroll=n
Specifies a maximum number of lines to scroll forward. If it is
necessary to scroll forward more than n lines, the screen is
repainted instead. The -c or -C option may be used to repaint
from the top of the screen if desired. By default, any forward
necessary to scroll forward more than n lines, the screen is
repainted instead. The -c or -C option may be used to repaint
from the top of the screen if desired. By default, any forward
movement causes scrolling.
-[z]n or --window=n
Changes the default scrolling window size to n lines. The
Changes the default scrolling window size to n lines. The
default is one screenful. The z and w commands can also be used
to change the window size. The "z" may be omitted for compati-
to change the window size. The "z" may be omitted for compati-
bility with some versions of more. If the number n is negative,
it indicates n lines less than the current screen size. For
it indicates n lines less than the current screen size. For
example, if the screen is 24 lines, -z-4 sets the scrolling win-
dow to 20 lines. If the screen is resized to 40 lines, the
dow to 20 lines. If the screen is resized to 40 lines, the
scrolling window automatically changes to 36 lines.
-"cc or --quotes=cc
Changes the filename quoting character. This may be necessary
if you are trying to name a file which contains both spaces and
quote characters. Followed by a single character, this changes
the quote character to that character. Filenames containing a
Changes the filename quoting character. This may be necessary
if you are trying to name a file which contains both spaces and
quote characters. Followed by a single character, this changes
the quote character to that character. Filenames containing a
space should then be surrounded by that character rather than by
double quotes. Followed by two characters, changes the open
quote to the first character, and the close quote to the second
double quotes. Followed by two characters, changes the open
quote to the first character, and the close quote to the second
character. Filenames containing a space should then be preceded
by the open quote character and followed by the close quote
character. Note that even after the quote characters are
changed, this option remains -" (a dash followed by a double
by the open quote character and followed by the close quote
character. Note that even after the quote characters are
changed, this option remains -" (a dash followed by a double
quote).
-~ or --tilde
@@ -793,10 +790,25 @@ LESS(1) LESS(1)
-# or --shift
Specifies the default number of positions to scroll horizontally
in the RIGHTARROW and LEFTARROW commands. If the number speci-
fied is zero, it sets the default number of positions to one
in the RIGHTARROW and LEFTARROW commands. If the number speci-
fied is zero, it sets the default number of positions to one
half of the screen width.
--no-keypad
Disables sending the keypad initialization and deinitialization
strings to the terminal. This is sometimes useful if the keypad
strings make the numeric keypad behave in an undesirable manner.
--follow-name
Normally, if the input file is renamed while an F command is
executing, less will continue to display the contents of the
original file despite its name change. If --follow-name is
specified, during an F command less will periodically attempt to
reopen the file by name. If the reopen succeeds and the file is
a different file from the original (which means that a new file
has been created with the same name as the original (now
renamed) file), less will display the contents of that new file.
-- A command line argument of "--" marks the end of option argu-
ments. Any arguments following this are interpreted as file-
names. This can be useful when viewing a file whose name begins
@@ -1544,4 +1556,4 @@ LESS(1) LESS(1)
Version 409: 12 Oct 2007 LESS(1)
Version 416: 22 Nov 2007 LESS(1)
+30 -14
View File
@@ -1,4 +1,4 @@
.TH LESS 1 "Version 409: 12 Oct 2007"
.TH LESS 1 "Version 416: 22 Nov 2007"
.SH NAME
less \- opposite of more
.SH SYNOPSIS
@@ -462,7 +462,7 @@ By default 64K of buffer space is used for each file
The \-b option specifies instead that \fIn\fP kilobytes of
buffer space should be used for each file.
If \fIn\fP is \-1, buffer space is unlimited; that is,
the entire file is read into memory.
the entire file can be read into memory.
.IP "\-B or \-\-auto-buffers"
By default, when data is read from a pipe,
buffers are allocated automatically as needed.
@@ -473,7 +473,7 @@ so that only 64K
(or the amount of space specified by the \-b option)
is used for the pipe.
Warning: use of \-B can result in erroneous display, since only the
most recently viewed part of the file is kept in memory;
most recently viewed part of the piped data is kept in memory;
any earlier data is lost.
.IP "\-c or \-\-clear-screen"
Causes full screen repaints to be painted from the top line down.
@@ -555,9 +555,9 @@ the pattern contains uppercase letters.
.IP "\-j\fIn\fP or \-\-jump-target=\fIn\fP"
Specifies a line on the screen where the "target" line
is to be positioned.
A target line is the object of a text search,
tag search, jump to a line number,
jump to a file percentage, or jump to a marked position.
The target line is the line specified by any command to
search for a pattern, jump to a line number,
jump to a file percentage or jump to a tag.
The screen line may be specified by a number: the top line on the screen
is 1, the next is 2, and so on.
The number may be negative to specify a line relative to the bottom
@@ -569,10 +569,11 @@ screen, .3 is three tenths down from the first line, and so on.
If the line is specified as a fraction, the actual line number
is recalculated if the terminal window is resized, so that the
target line remains at the specified fraction of the screen height.
If the \-j option is used, searches begin at the line immediately
after the target line.
If any form of the \-j option is used,
forward searches begin at the line immediately after the target line,
and backward searches begin at the target line.
For example, if "\-j4" is used, the target line is the
fourth line on the screen, so searches begin at the fifth line
fourth line on the screen, so forward searches begin at the fifth line
on the screen.
.IP "\-J or \-\-status-column"
Displays a status column at the left edge of the screen.
@@ -597,6 +598,8 @@ to exit immediately when an interrupt character (usually ^C) is typed.
Normally, an interrupt character causes
.I less
to stop whatever it is doing and return to its command prompt.
Note that use of this option makes it impossible to return to the
command prompt from the "F" command.
.IP "\-L or \-\-no-lessopen"
Ignore the LESSOPEN environment variable
(see the INPUT PREPROCESSOR section below).
@@ -799,11 +802,6 @@ Disables sending the termcap initialization and deinitialization strings
to the terminal.
This is sometimes desirable if the deinitialization string does
something unnecessary, like clearing the screen.
.IP "\-\-no-keypad"
Disables sending the keypad initialization and deinitialization strings
to the terminal.
This is sometimes useful if the keypad strings make the numeric
keypad behave in an undesirable manner.
.IP "\-y\fIn\fP or \-\-max-forw-scroll=\fIn\fP"
Specifies a maximum number of lines to scroll forward.
If it is necessary to scroll forward more than \fIn\fP lines,
@@ -847,6 +845,24 @@ Specifies the default number of positions to scroll horizontally
in the RIGHTARROW and LEFTARROW commands.
If the number specified is zero, it sets the default number of
positions to one half of the screen width.
.IP "\-\-no-keypad"
Disables sending the keypad initialization and deinitialization strings
to the terminal.
This is sometimes useful if the keypad strings make the numeric
keypad behave in an undesirable manner.
.IP "\-\-follow-name"
Normally, if the input file is renamed while an F command is executing,
.I less
will continue to display the contents of the original file despite
its name change.
If \-\-follow-name is specified, during an F command
.I less
will periodically attempt to reopen the file by name.
If the reopen succeeds and the file is a different file from the original
(which means that a new file has been created
with the same name as the original (now renamed) file),
.I less
will display the contents of that new file.
.IP \-\-
A command line argument of "\-\-" marks the end of option arguments.
Any arguments following this are interpreted as filenames.
+1 -1
View File
@@ -46,4 +46,4 @@ LESSECHO(1) LESSECHO(1)
Version 409: 12 Oct 2007 LESSECHO(1)
Version 416: 22 Nov 2007 LESSECHO(1)
+1 -1
View File
@@ -1,4 +1,4 @@
.TH LESSECHO 1 "Version 409: 12 Oct 2007"
.TH LESSECHO 1 "Version 416: 22 Nov 2007"
.SH NAME
lessecho \- expand metacharacters
.SH SYNOPSIS
+1 -1
View File
@@ -357,4 +357,4 @@ LESSKEY(1) LESSKEY(1)
Version 409: 12 Oct 2007 LESSKEY(1)
Version 416: 22 Nov 2007 LESSKEY(1)
+1 -1
View File
@@ -1,4 +1,4 @@
.TH LESSKEY 1 "Version 409: 12 Oct 2007"
.TH LESSKEY 1 "Version 416: 22 Nov 2007"
.SH NAME
lesskey \- specify key bindings for less
.SH SYNOPSIS
+17
View File
@@ -1047,6 +1047,23 @@ pdone(endline)
linebuf[curr] = '\n';
attr[curr] = AT_NORMAL;
curr++;
}
else if (ignaw && !auto_wrap && column >= sc_width)
{
/*
* Big horrible kludge.
* No-wrap terminals are too hard to deal with when they get in
* the state where a full screen width of characters have been
* output but the cursor is sitting on the right edge instead
* of at the start of the next line.
* So after we output a full line, we output an extra
* space and backspace to force the cursor to the
* beginning of the next line, like a sane terminal.
*/
linebuf[curr] = ' ';
attr[curr++] = AT_NORMAL;
linebuf[curr] = '\b';
attr[curr++] = AT_NORMAL;
}
linebuf[curr] = '\0';
attr[curr] = AT_NORMAL;
+1 -1
View File
@@ -442,7 +442,7 @@ opt__V(type, s)
any_display = 1;
putstr("less ");
putstr(version);
putstr("\nCopyright (C) 1984-2005 Mark Nudelman\n\n");
putstr("\nCopyright (C) 1984-2007 Mark Nudelman\n\n");
putstr("less comes with NO WARRANTY, to the extent permitted by law.\n");
putstr("For information about the terms of redistribution,\n");
putstr("see the file named README in the less distribution.\n");
+11 -1
View File
@@ -50,7 +50,8 @@ public int shift_count; /* Number of positions to shift horizontally */
public int status_col; /* Display a status column */
public int use_lessopen; /* Use the LESSOPEN filter */
public int quit_on_intr; /* Quit on interrupt */
public int oldbot; /* Old bottom of screen behavior */
public int follow_mode; /* F cmd Follows file desc or file name? */
public int oldbot; /* Old bottom of screen behavior {{REMOVE}} */
#if HILITE_SEARCH
public int hilite_search; /* Highlight matched search patterns? */
#endif
@@ -113,6 +114,7 @@ static struct optname query_optname = { "help", NULL };
static struct optname pound_optname = { "shift", NULL };
static struct optname keypad_optname = { "no-keypad", NULL };
static struct optname oldbot_optname = { "old-bot", NULL };
static struct optname follow_optname = { "follow-name", NULL };
/*
@@ -440,6 +442,14 @@ static struct loption option[] =
NULL
}
},
{ '.', &follow_optname,
BOOL, FOLLOW_DESC, &follow_mode, NULL,
{
"F command Follows file descriptor",
"F command Follows file name",
NULL
}
},
{ '\0', NULL, NOVAR, 0, NULL, NULL, { NULL, NULL, NULL } }
};
+4
View File
@@ -1845,11 +1845,15 @@ line_left()
GetConsoleScreenBufferInfo(con_out, &scr);
row = scr.dwCursorPosition.Y - scr.srWindow.Top + 1;
}
#else
#if MSDOS_COMPILER==BORLANDC || MSDOS_COMPILER==DJGPPC
row = wherey();
#else
{
struct rccoord tpos = _gettextposition();
row = tpos.row;
}
#endif
#endif
_settextposition(row, 1);
#endif
+100 -66
View File
@@ -66,6 +66,7 @@ extern int screen_trashed;
extern int size_linebuf;
extern int squished;
extern int can_goto_line;
extern int utf_mode;
static int hide_hilite;
static int oldbot;
static POSITION prep_startpos;
@@ -106,14 +107,34 @@ static int is_ucase_pattern;
static int last_search_type;
static char *last_pattern = NULL;
/*
* Convert text. Perform one or more of these transformations:
*/
#define CVT_TO_LC 01 /* Convert upper-case to lower-case */
#define CVT_BS 02 /* Do backspace processing */
#define CVT_CRLF 04 /* Remove CR after LF */
#define CVT_ANSI 010 /* Remove ANSI escape sequences */
/*
* Get the length of a buffer needed to convert a string.
*/
static int
cvt_length(len, ops)
int len;
int ops;
{
if (utf_mode)
/*
* Just copying a string in UTF-8 mode can cause it to grow
* in length.
* Six output bytes for one input byte is the worst case
* (and unfortunately is far more than is needed in any
* non-pathological situation, so this is very wasteful).
*/
len *= 6;
return len + 1;
}
/*
* Convert text. Perform one or more of these transformations:
*/
static void
cvt_text(odst, osrc, lenp, ops)
char *odst;
@@ -140,7 +161,7 @@ cvt_text(odst, osrc, lenp, ops)
put_wchar(&dst, TO_LOWER(ch));
} else if ((ops & CVT_BS) && ch == '\b' && dst > odst)
{
/* Delete BS and preceding char. */
/* Delete backspace and preceding char. */
do {
dst--;
} while (dst > odst &&
@@ -363,7 +384,7 @@ undo_search()
* Compile a search pattern, for future use by match_pattern.
*/
static int
compile_pattern(pattern, search_type)
compile_pattern2(pattern, search_type)
char *pattern;
int search_type;
{
@@ -442,6 +463,30 @@ compile_pattern(pattern, search_type)
return (0);
}
/*
* Like compile_pattern, but convert the pattern to lowercase if necessary.
*/
static int
compile_pattern(pattern, search_type)
char *pattern;
int search_type;
{
char *cvt_pattern;
int result;
if (caseless != OPT_ONPLUS)
cvt_pattern = pattern;
else
{
cvt_pattern = (char*) ecalloc(1, cvt_length(strlen(pattern), CVT_TO_LC));
cvt_text(cvt_pattern, pattern, (int *)NULL, CVT_TO_LC);
}
result = compile_pattern2(cvt_pattern, search_type);
if (cvt_pattern != pattern)
free(cvt_pattern);
return (result);
}
/*
* Forget that we have a compiled pattern.
*/
@@ -681,35 +726,8 @@ add_hilite(anchor, hl)
ihl->hl_next = hl;
}
static void
adj_hilite_ansi(cvt_ops, line, line_len, npos)
int cvt_ops;
char **line;
int line_len;
POSITION *npos;
{
char *line_end = *line + line_len;
if (cvt_ops & CVT_ANSI)
while (IS_CSI_START(**line))
{
/*
* Found an ESC. The file position moves
* forward past the entire ANSI escape sequence.
*/
(*line)++;
(*npos)++;
while (*line < line_end)
{
(*npos)++;
if (!is_ansi_middle(*(*line)++))
break;
}
}
}
/*
* Adjust hl_startpos & hl_endpos to account for backspace processing.
* Adjust hl_startpos & hl_endpos to account for processing by cvt_text.
*/
static void
adj_hilite(anchor, linepos, cvt_ops)
@@ -718,18 +736,21 @@ adj_hilite(anchor, linepos, cvt_ops)
int cvt_ops;
{
char *line;
char *oline;
int line_len;
char *line_end;
struct hilite *hl;
int checkstart;
POSITION opos;
POSITION npos;
LWCHAR ch;
int ncwidth;
/*
* The line was already scanned and hilites were added (in hilite_line).
* But it was assumed that each char position in the line
* correponds to one char position in the file.
* This may not be true if there are backspaces in the line.
* This may not be true if cvt_text modified the line.
* Get the raw line again. Look at each character.
*/
(void) forw_raw_line(linepos, &line, &line_len);
@@ -760,31 +781,43 @@ adj_hilite(anchor, linepos, cvt_ops)
}
if (line == line_end)
break;
adj_hilite_ansi(cvt_ops, &line, line_end - line, &npos);
opos++;
npos++;
line++;
if (cvt_ops & CVT_BS)
/* Get the next char from the line. */
oline = line;
ch = step_char(&line, +1, line_end);
ncwidth = line - oline;
npos += ncwidth;
/* Figure out how this char was processed by cvt_text. */
if ((cvt_ops & CVT_BS) && ch == '\b')
{
while (*line == '\b')
/* Skip the backspace and the following char. */
oline = line;
ch = step_char(&line, +1, line_end);
ncwidth = line - oline;
npos += ncwidth;
} else if ((cvt_ops & CVT_TO_LC) && IS_UPPER(ch))
{
/* Converted uppercase to lower.
* Note that this may have changed the number of bytes
* that the character occupies. */
char dbuf[6];
char *dst = dbuf;
put_wchar(&dst, TO_LOWER(ch));
opos += dst - dbuf;
} else if ((cvt_ops & CVT_ANSI) && IS_CSI_START(ch))
{
/* Skip to end of ANSI escape sequence. */
while (line < line_end)
{
npos++;
line++;
adj_hilite_ansi(cvt_ops, &line, line_end - line, &npos);
if (line == line_end)
{
--npos;
--line;
if (!is_ansi_middle(*++line))
break;
}
/*
* Found a backspace. The file position moves
* forward by 2 relative to the processed line
* which was searched in hilite_line.
*/
npos++;
line++;
}
} else
{
/* Ordinary unprocessed character. */
opos += ncwidth;
}
}
}
@@ -1014,6 +1047,7 @@ search_range(pos, endpos, search_type, matches, maxlines, plinepos, pendpos)
POSITION *pendpos;
{
char *line;
char *cline;
int line_len;
LINENUM linenum;
char *sp, *ep;
@@ -1099,18 +1133,22 @@ search_range(pos, endpos, search_type, matches, maxlines, plinepos, pendpos)
* If we're doing backspace processing, delete backspaces.
*/
cvt_ops = get_cvt_ops();
cvt_text(line, line, &line_len, cvt_ops);
cline = calloc(1, cvt_length(line_len, cvt_ops));
cvt_text(cline, line, &line_len, cvt_ops);
/*
* Test the next line to see if we have a match.
* We are successful if we either want a match and got one,
* or if we want a non-match and got one.
*/
line_match = match_pattern(line, line_len, &sp, &ep, 0);
line_match = match_pattern(cline, line_len, &sp, &ep, 0);
line_match = (!(search_type & SRCH_NO_MATCH) && line_match) ||
((search_type & SRCH_NO_MATCH) && !line_match);
if (!line_match)
{
free(cline);
continue;
}
/*
* Got a match.
*/
@@ -1123,8 +1161,9 @@ search_range(pos, endpos, search_type, matches, maxlines, plinepos, pendpos)
* hilite list and keep searching.
*/
if (line_match)
hilite_line(linepos, line, line_len, sp, ep, cvt_ops);
hilite_line(linepos, cline, line_len, sp, ep, cvt_ops);
#endif
free(cline);
} else if (--matches <= 0)
{
/*
@@ -1140,9 +1179,10 @@ search_range(pos, endpos, search_type, matches, maxlines, plinepos, pendpos)
*/
clr_hilite();
if (line_match)
hilite_line(linepos, line, line_len, sp, ep, cvt_ops);
hilite_line(linepos, cline, line_len, sp, ep, cvt_ops);
}
#endif
free(cline);
if (plinepos != NULL)
*plinepos = linepos;
return (0);
@@ -1165,9 +1205,6 @@ hist_pattern(search_type)
if (pattern == NULL)
return (0);
if (caseless == OPT_ONPLUS)
cvt_text(pattern, pattern, (int *)NULL, CVT_TO_LC);
if (compile_pattern(pattern, search_type) < 0)
return (0);
@@ -1204,7 +1241,7 @@ search(search_type, pattern, n)
int n;
{
POSITION pos;
int ucase;
int result;
if (pattern == NULL || *pattern == '\0')
{
@@ -1247,16 +1284,13 @@ search(search_type, pattern, n)
/*
* Compile the pattern.
*/
ucase = is_ucase(pattern);
if (caseless == OPT_ONPLUS)
cvt_text(pattern, pattern, (int *)NULL, CVT_TO_LC);
if (compile_pattern(pattern, search_type) < 0)
return (-1);
/*
* Ignore case if -I is set OR
* -i is set AND the pattern is all lowercase.
*/
is_ucase_pattern = ucase;
is_ucase_pattern = is_ucase(pattern);
if (is_ucase_pattern && caseless != OPT_ONPLUS)
is_caseless = 0;
else
+1 -1
View File
@@ -662,7 +662,7 @@ prevgtag()
/*
* Position the current file at at what is hopefully the tag that was chosen
* using either findtag() or one of nextgtag() and prevgtag(). Returns -1
* if it was unable to position at the tag, 0 if succesful.
* if it was unable to position at the tag, 0 if successful.
*/
static POSITION
gtagsearch()
+7 -1
View File
@@ -696,6 +696,12 @@ v406 6/17/07 Fix secure build.
v407 8/16/07 Fix bugs; support CSI chars.
v408 10/1/07 Fix bug in -i with non-ASCII chars.
v409 10/12/07 Fix crash when viewing text with invalid UTF-8 sequences.
v411 11/6/07 Fix case-insensitive searching with non-ASCII text.
v412 11/6/07 Use symbolic SEEK constants.
v413 11/6/07 Fix search highlight bug with non-ASCII text.
v414 11/6/07 Fix display bug with no-wrap terminals.
v415 11/14/07 Add --follow-name option.
v416 11/22/07 Fix crash when searching text with invalid UTF-8 sequences.
*/
char version[] = "409";
char version[] = "416";
+1 -1
View File
@@ -139,7 +139,7 @@ void feat(void);
void format_path(char *, const char *);
int ftpd_pclose(FILE *);
FILE *ftpd_popen(char *[], const char *, int);
char *getline(char *, int, FILE *);
int getline(char *, int, FILE *);
void init_curclass(void);
void logxfer(const char *, off_t, const char *, const char *,
const struct timeval *, const char *);
+31 -8
View File
@@ -1363,8 +1363,12 @@ lookup(struct tab *p, const char *cmd)
/*
* getline - a hacked up version of fgets to ignore TELNET escape codes.
* `s' is the buffer to read into.
* `n' is the 1 less than the size of the buffer, to allow trailing NUL
* `iop' is the FILE to read from.
* Returns 0 on success, -1 on EOF, -2 if the command was too long.
*/
char *
int
getline(char *s, int n, FILE *iop)
{
int c;
@@ -1379,7 +1383,7 @@ getline(char *s, int n, FILE *iop)
if (ftpd_debug)
syslog(LOG_DEBUG, "command: %s", s);
tmpline[0] = '\0';
return(s);
return(0);
}
if (c == 0)
tmpline[0] = '\0';
@@ -1418,11 +1422,25 @@ getline(char *s, int n, FILE *iop)
}
}
*cs++ = c;
if (--n <= 0 || c == '\n')
if (--n <= 0) {
/*
* If command doesn't fit into buffer, discard the
* rest of the command and indicate truncation.
* This prevents the command to be split up into
* multiple commands.
*/
if (ftpd_debug)
syslog(LOG_DEBUG,
"command too long, last char: %d", c);
while (c != '\n' && (c = getc(iop)) != EOF)
continue;
return (-2);
}
if (c == '\n')
break;
}
if (c == EOF && cs == s)
return (NULL);
return (-1);
*cs++ = '\0';
if (ftpd_debug) {
if ((curclass.type != CLASS_GUEST &&
@@ -1444,7 +1462,7 @@ getline(char *s, int n, FILE *iop)
syslog(LOG_DEBUG, "command: %.*s", len, s);
}
}
return (s);
return (0);
}
void
@@ -1458,15 +1476,20 @@ ftp_handle_line(char *cp)
void
ftp_loop(void)
{
int ret;
while (1) {
(void) alarm(curclass.timeout);
if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) {
ret = getline(cbuf, sizeof(cbuf)-1, stdin);
(void) alarm(0);
if (ret == -1) {
reply(221, "You could at least say goodbye.");
dologout(0);
} else if (ret == -2) {
reply(500, "Command too long.");
} else {
ftp_handle_line(cbuf);
}
(void) alarm(0);
ftp_handle_line(cbuf);
}
/*NOTREACHED*/
}
+8 -2
View File
@@ -1,4 +1,4 @@
/* $NetBSD: ftpd.c,v 1.176 2006/05/09 20:18:06 mrg Exp $ */
/* $NetBSD: ftpd.c,v 1.187 2008/09/13 03:30:35 lukem Exp $ */
/*
* Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
@@ -2896,6 +2896,7 @@ static int
handleoobcmd()
{
char *cp;
int ret;
if (!urgflag)
return (0);
@@ -2904,9 +2905,14 @@ handleoobcmd()
if (!transflag)
return (0);
cp = tmpline;
if (getline(cp, sizeof(tmpline), stdin) == NULL) {
ret = getline(cp, sizeof(tmpline)-1, stdin);
if (ret == -1) {
reply(221, "You could at least say goodbye.");
dologout(0);
} else if (ret == -2) {
/* Ignore truncated command */
/* XXX: abort xfer with "500 command too long", & return 1 ? */
return 0;
}
/*
* Manually parse OOB commands, because we can't
+21 -18
View File
@@ -534,7 +534,7 @@ crypto_recv(
peer->issuer = emalloc(vallen + 1);
strcpy(peer->issuer, peer->subject);
temp32 = (fstamp >> 16) & 0xffff;
sprintf(statstr,
snprintf(statstr, NTP_MAXSTRLEN,
"flags 0x%x host %s signature %s", fstamp,
peer->subject, OBJ_nid2ln(temp32));
record_crypto_stats(&peer->srcadr, statstr);
@@ -604,7 +604,8 @@ crypto_recv(
}
peer->flash &= ~TEST10;
temp32 = cinfo->nid;
sprintf(statstr, "cert %s 0x%x %s (%u) fs %u",
snprintf(statstr, NTP_MAXSTRLEN,
"cert %s 0x%x %s (%u) fs %u",
cinfo->subject, cinfo->flags,
OBJ_nid2ln(temp32), temp32,
ntohl(ep->fstamp));
@@ -652,7 +653,7 @@ crypto_recv(
peer->crypto |= CRYPTO_FLAG_VRFY |
CRYPTO_FLAG_PROV;
peer->flash &= ~TEST10;
sprintf(statstr, "iff fs %u",
snprintf(statstr, NTP_MAXSTRLEN, "iff fs %u",
ntohl(ep->fstamp));
record_crypto_stats(&peer->srcadr, statstr);
#ifdef DEBUG
@@ -699,7 +700,7 @@ crypto_recv(
peer->crypto |= CRYPTO_FLAG_VRFY |
CRYPTO_FLAG_PROV;
peer->flash &= ~TEST10;
sprintf(statstr, "gq fs %u",
snprintf(statstr, NTP_MAXSTRLEN, "gq fs %u",
ntohl(ep->fstamp));
record_crypto_stats(&peer->srcadr, statstr);
#ifdef DEBUG
@@ -739,7 +740,7 @@ crypto_recv(
peer->crypto |= CRYPTO_FLAG_VRFY |
CRYPTO_FLAG_PROV;
peer->flash &= ~TEST10;
sprintf(statstr, "mv fs %u",
snprintf(statstr, NTP_MAXSTRLEN, "mv fs %u",
ntohl(ep->fstamp));
record_crypto_stats(&peer->srcadr, statstr);
#ifdef DEBUG
@@ -778,7 +779,7 @@ crypto_recv(
peer->crypto |= CRYPTO_FLAG_SIGN;
peer->flash &= ~TEST10;
temp32 = cinfo->nid;
sprintf(statstr, "sign %s 0x%x %s (%u) fs %u",
snprintf(statstr, NTP_MAXSTRLEN, "sign %s 0x%x %s (%u) fs %u",
cinfo->issuer, cinfo->flags,
OBJ_nid2ln(temp32), temp32,
ntohl(ep->fstamp));
@@ -833,7 +834,7 @@ crypto_recv(
peer->crypto &= ~CRYPTO_FLAG_AUTO;
peer->crypto |= CRYPTO_FLAG_AGREE;
peer->flash &= ~TEST10;
sprintf(statstr, "cook %x ts %u fs %u",
snprintf(statstr, NTP_MAXSTRLEN, "cook %x ts %u fs %u",
peer->pcookie, ntohl(ep->tstamp),
ntohl(ep->fstamp));
record_crypto_stats(&peer->srcadr, statstr);
@@ -897,7 +898,7 @@ crypto_recv(
peer->crypto &= ~CRYPTO_FLAG_AUTO;
peer->crypto |= CRYPTO_FLAG_AGREE;
peer->flash &= ~TEST10;
sprintf(statstr, "cook %x ts %u fs %u",
snprintf(statstr, NTP_MAXSTRLEN, "cook %x ts %u fs %u",
peer->pcookie, ntohl(ep->tstamp),
ntohl(ep->fstamp));
record_crypto_stats(&peer->srcadr, statstr);
@@ -947,7 +948,7 @@ crypto_recv(
peer->pkeyid = bp->key;
peer->crypto |= CRYPTO_FLAG_AUTO;
peer->flash &= ~TEST10;
sprintf(statstr,
snprintf(statstr, NTP_MAXSTRLEN,
"auto seq %d key %x ts %u fs %u", bp->seq,
bp->key, ntohl(ep->tstamp),
ntohl(ep->fstamp));
@@ -1051,7 +1052,7 @@ crypto_recv(
(void)ntp_adjtime(&ntv);
#endif /* NTP_API */
#endif /* KERNEL_PLL */
sprintf(statstr, "leap %u ts %u fs %u",
snprintf(statstr, NTP_MAXSTRLEN, "leap %u ts %u fs %u",
vallen, ntohl(ep->tstamp),
ntohl(ep->fstamp));
record_crypto_stats(&peer->srcadr, statstr);
@@ -1106,7 +1107,7 @@ crypto_recv(
* scan and we return the laundry to the caller.
*/
if (rval != XEVNT_OK) {
sprintf(statstr,
snprintf(statstr, NTP_MAXSTRLEN,
"error %x opcode %x ts %u fs %u", rval,
code, tstamp, fstamp);
if (rval > XEVNT_TSP)
@@ -1388,7 +1389,8 @@ crypto_xmit(
*/
if (rval > XEVNT_TSP) {
opcode |= CRYPTO_ERROR;
sprintf(statstr, "error %x opcode %x", rval, opcode);
snprintf(statstr, NTP_MAXSTRLEN,
"error %x opcode %x", rval, opcode);
record_crypto_stats(srcadr_sin, statstr);
#ifdef DEBUG
if (debug)
@@ -1536,7 +1538,7 @@ crypto_verify(
EVP_VerifyUpdate(&ctx, (u_char *)&ep->tstamp, vallen +
12);
if (EVP_VerifyFinal(&ctx, (u_char *)&ep->pkt[i], siglen,
pkey)) {
pkey) == 1) {
if (peer->crypto & CRYPTO_FLAG_VRFY)
peer->crypto |= CRYPTO_FLAG_PROV;
} else {
@@ -1884,7 +1886,8 @@ crypto_update(void)
if (EVP_SignFinal(&ctx, tai_leap.sig, &len, sign_pkey))
tai_leap.siglen = htonl(len);
}
sprintf(statstr, "update ts %u", ntohl(hostval.tstamp));
snprintf(statstr, NTP_MAXSTRLEN,
"update ts %u", ntohl(hostval.tstamp));
record_crypto_stats(NULL, statstr);
#ifdef DEBUG
if (debug)
@@ -3461,7 +3464,7 @@ crypto_key(
*/
if ((ptr = strrchr(linkname, '\n')) != NULL)
*ptr = '\0';
sprintf(statstr, "%s mod %d", &linkname[2],
snprintf(statstr, NTP_MAXSTRLEN, "%s mod %d", &linkname[2],
EVP_PKEY_size(pkey) * 8);
record_crypto_stats(NULL, statstr);
#ifdef DEBUG
@@ -3563,8 +3566,8 @@ crypto_cert(
return (NULL);
if ((ptr = strrchr(linkname, '\n')) != NULL)
*ptr = '\0';
sprintf(statstr, "%s 0x%x len %lu", &linkname[2], ret->flags,
len);
snprintf(statstr, NTP_MAXSTRLEN,
"%s 0x%x len %lu", &linkname[2], ret->flags, len);
record_crypto_stats(NULL, statstr);
#ifdef DEBUG
if (debug)
@@ -3692,7 +3695,7 @@ crypto_tai(
"crypto_tai: kernel TAI update failed");
#endif /* NTP_API */
#endif /* KERNEL_PLL */
sprintf(statstr, "%s link %d fs %u offset %u", cp, rval, fstamp,
snprintf(statstr, NTP_MAXSTRLEN, "%s link %d fs %u offset %u", cp, rval, fstamp,
ntohl(tai_leap.vallen) / 4 + TAI_1972 - 1);
record_crypto_stats(NULL, statstr);
#ifdef DEBUG
+9 -2
View File
@@ -404,6 +404,7 @@ process_private(
int mod_okay
)
{
static u_long quiet_until;
struct req_pkt *inpkt;
struct req_pkt_tail *tailinpkt;
struct sockaddr_storage *srcadr;
@@ -439,8 +440,14 @@ process_private(
|| (++ec, INFO_MBZ(inpkt->mbz_itemsize) != 0)
|| (++ec, rbufp->recv_length < REQ_LEN_HDR)
) {
msyslog(LOG_ERR, "process_private: INFO_ERR_FMT: test %d failed, pkt from %s", ec, stoa(srcadr));
req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
NLOG(NLOG_SYSEVENT)
if (current_time >= quiet_until) {
msyslog(LOG_ERR,
"process_private: drop test %d"
" failed, pkt from %s",
ec, stoa(srcadr));
quiet_until = current_time + 60;
}
return;
}
-3
View File
@@ -2895,9 +2895,6 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
debug2("bind port %d: %.100s", port, strerror(errno));
close(sock);
if (ai->ai_next)
continue;
for (n = 0; n < num_socks; n++) {
close(socks[n]);
}
+1 -1
View File
@@ -1486,7 +1486,7 @@ int MAIN(int argc, char **argv)
{
ret=RSA_verify(NID_md5_sha1, buf,36, buf2,
rsa_num, rsa_key[j]);
if (ret == 0)
if (ret <= 0)
{
BIO_printf(bio_err,
"RSA verify failure\n");
+1 -1
View File
@@ -284,7 +284,7 @@ bad:
pkey = NETSCAPE_SPKI_get_pubkey(spki);
if(verify) {
i = NETSCAPE_SPKI_verify(spki, pkey);
if(i) BIO_printf(bio_err, "Signature OK\n");
if (i > 0) BIO_printf(bio_err, "Signature OK\n");
else {
BIO_printf(bio_err, "Signature Failure\n");
ERR_print_errors(bio_err);
+1 -2
View File
@@ -275,7 +275,7 @@ static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, STACK_OF(X
ret=0;
end:
if (i)
if (i > 0)
{
fprintf(stdout,"OK\n");
ret=1;
@@ -365,4 +365,3 @@ static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx)
ERR_clear_error();
return(ok);
}
+1 -1
View File
@@ -1113,7 +1113,7 @@ static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
/* NOTE: this certificate can/should be self signed, unless it was
* a certificate request in which case it is not. */
X509_STORE_CTX_set_cert(&xsc,x);
if (!reqfile && !X509_verify_cert(&xsc))
if (!reqfile && X509_verify_cert(&xsc) <= 0)
goto end;
if (!X509_check_private_key(xca,pkey))
+2
View File
@@ -1030,6 +1030,7 @@ void ERR_load_ASN1_strings(void);
#define ASN1_R_BAD_OBJECT_HEADER 102
#define ASN1_R_BAD_PASSWORD_READ 103
#define ASN1_R_BAD_TAG 104
#define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 210
#define ASN1_R_BN_LIB 105
#define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106
#define ASN1_R_BUFFER_TOO_SMALL 107
@@ -1088,6 +1089,7 @@ void ERR_load_ASN1_strings(void);
#define ASN1_R_UNABLE_TO_DECODE_RSA_KEY 157
#define ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY 158
#define ASN1_R_UNEXPECTED_EOC 159
#define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH 211
#define ASN1_R_UNKNOWN_FORMAT 160
#define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM 161
#define ASN1_R_UNKNOWN_OBJECT_TYPE 162
+2
View File
@@ -153,6 +153,7 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
{ASN1_R_BAD_OBJECT_HEADER ,"bad object header"},
{ASN1_R_BAD_PASSWORD_READ ,"bad password read"},
{ASN1_R_BAD_TAG ,"bad tag"},
{ASN1_R_BMPSTRING_IS_WRONG_LENGTH ,"bmpstring is wrong length"},
{ASN1_R_BN_LIB ,"bn lib"},
{ASN1_R_BOOLEAN_IS_WRONG_LENGTH ,"boolean is wrong length"},
{ASN1_R_BUFFER_TOO_SMALL ,"buffer too small"},
@@ -211,6 +212,7 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
{ASN1_R_UNABLE_TO_DECODE_RSA_KEY ,"unable to decode rsa key"},
{ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY ,"unable to decode rsa private key"},
{ASN1_R_UNEXPECTED_EOC ,"unexpected eoc"},
{ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH ,"universalstring is wrong length"},
{ASN1_R_UNKNOWN_FORMAT ,"unknown format"},
{ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM ,"unknown message digest algorithm"},
{ASN1_R_UNKNOWN_OBJECT_TYPE ,"unknown object type"},
+12
View File
@@ -768,6 +768,18 @@ int asn1_ex_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype, char
case V_ASN1_SET:
case V_ASN1_SEQUENCE:
default:
if (utype == V_ASN1_BMPSTRING && (len & 1))
{
ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE,
ASN1_R_BMPSTRING_IS_WRONG_LENGTH);
goto err;
}
if (utype == V_ASN1_UNIVERSALSTRING && (len & 3))
{
ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE,
ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH);
goto err;
}
/* All based on ASN1_STRING and handled the same */
if(!*pval) {
stmp = ASN1_STRING_type_new(utype);
+1 -1
View File
@@ -1062,7 +1062,7 @@ int ssl2_set_certificate(SSL *s, int type, int len, unsigned char *data)
i=ssl_verify_cert_chain(s,sk);
if ((s->verify_mode != SSL_VERIFY_NONE) && (!i))
if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0))
{
SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED);
goto err;
+2 -2
View File
@@ -1070,7 +1070,7 @@ static int request_certificate(SSL *s)
i=ssl_verify_cert_chain(s,sk);
if (i) /* we like the packet, now check the chksum */
if (i > 0) /* we like the packet, now check the chksum */
{
EVP_MD_CTX ctx;
EVP_PKEY *pkey=NULL;
@@ -1099,7 +1099,7 @@ static int request_certificate(SSL *s)
EVP_PKEY_free(pkey);
EVP_MD_CTX_cleanup(&ctx);
if (i)
if (i > 0)
{
if (s->session->peer != NULL)
X509_free(s->session->peer);
+2 -2
View File
@@ -833,7 +833,7 @@ static int ssl3_get_server_certificate(SSL *s)
}
i=ssl_verify_cert_chain(s,sk);
if ((s->verify_mode != SSL_VERIFY_NONE) && (!i)
if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0)
#ifndef OPENSSL_NO_KRB5
&& (s->s3->tmp.new_cipher->algorithms & (SSL_MKEY_MASK|SSL_AUTH_MASK))
!= (SSL_aKRB5|SSL_kKRB5)
@@ -1206,7 +1206,7 @@ static int ssl3_get_key_exchange(SSL *s)
EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE);
EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE);
EVP_VerifyUpdate(&md_ctx,param,param_len);
if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey))
if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0)
{
/* bad signature */
al=SSL_AD_DECRYPT_ERROR;
+3
View File
@@ -1768,6 +1768,9 @@ int ssl3_renegotiate(SSL *s)
if (s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS)
return(0);
if (1)
return(0);
s->s3->renegotiate=1;
return(1);
}
+2 -5
View File
@@ -975,9 +975,7 @@ start:
if (s->msg_callback)
s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE, s->s3->handshake_fragment, 4, s, s->msg_callback_arg);
if (SSL_is_init_finished(s) &&
!(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS) &&
!s->s3->renegotiate)
if (0)
{
ssl3_renegotiate(s);
if (ssl3_renegotiate_check(s))
@@ -1108,8 +1106,7 @@ start:
/* Unexpected handshake message (Client Hello, or protocol violation) */
if ((s->s3->handshake_fragment_len >= 4) && !s->in_handshake)
{
if (((s->state&SSL_ST_MASK) == SSL_ST_OK) &&
!(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS))
if (0)
{
#if 0 /* worked only because C operator preferences are not as expected (and
* because this is not really needed for clients except for detecting
+8 -1
View File
@@ -654,6 +654,13 @@ static int ssl3_get_client_hello(SSL *s)
SSL_COMP *comp=NULL;
STACK_OF(SSL_CIPHER) *ciphers=NULL;
if (s->new_session)
{
al=SSL_AD_HANDSHAKE_FAILURE;
SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, ERR_R_INTERNAL_ERROR);
goto f_err;
}
/* We do this so that we will respond with our native type.
* If we are TLSv1 and we get SSLv3, we will respond with TLSv1,
* This down switching should be handled by a different method.
@@ -2015,7 +2022,7 @@ static int ssl3_get_client_certificate(SSL *s)
else
{
i=ssl_verify_cert_chain(s,sk);
if (!i)
if (i <= 0)
{
al=ssl_verify_alarm_type(s->verify_result);
SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED);
+3 -1
View File
@@ -45,7 +45,9 @@ daily_clean_disks_verbose="YES" # Mention files deleted
daily_clean_tmps_enable="NO" # Delete stuff daily
daily_clean_tmps_dirs="/tmp" # Delete under here
daily_clean_tmps_days="3" # If not accessed for
daily_clean_tmps_ignore=".X*-lock quota.user quota.group" # Don't delete these
daily_clean_tmps_ignore=".X*-lock .X11-unix .ICE-unix .font-unix .XIM-unix"
daily_clean_tmps_ignore="$daily_clean_tmps_ignore quota.user quota.group"
# Don't delete these
daily_clean_tmps_verbose="YES" # Mention files deleted
# 120.clean-preserve
+256
View File
@@ -309,3 +309,259 @@ ttySs none network
ttySt none network
ttySu none network
ttySv none network
ttyl0 none network
ttyl1 none network
ttyl2 none network
ttyl3 none network
ttyl4 none network
ttyl5 none network
ttyl6 none network
ttyl7 none network
ttyl8 none network
ttyl9 none network
ttyla none network
ttylb none network
ttylc none network
ttyld none network
ttyle none network
ttylf none network
ttylg none network
ttylh none network
ttyli none network
ttylj none network
ttylk none network
ttyll none network
ttylm none network
ttyln none network
ttylo none network
ttylp none network
ttylq none network
ttylr none network
ttyls none network
ttylt none network
ttylu none network
ttylv none network
ttym0 none network
ttym1 none network
ttym2 none network
ttym3 none network
ttym4 none network
ttym5 none network
ttym6 none network
ttym7 none network
ttym8 none network
ttym9 none network
ttyma none network
ttymb none network
ttymc none network
ttymd none network
ttyme none network
ttymf none network
ttymg none network
ttymh none network
ttymi none network
ttymj none network
ttymk none network
ttyml none network
ttymm none network
ttymn none network
ttymo none network
ttymp none network
ttymq none network
ttymr none network
ttyms none network
ttymt none network
ttymu none network
ttymv none network
ttyn0 none network
ttyn1 none network
ttyn2 none network
ttyn3 none network
ttyn4 none network
ttyn5 none network
ttyn6 none network
ttyn7 none network
ttyn8 none network
ttyn9 none network
ttyna none network
ttynb none network
ttync none network
ttynd none network
ttyne none network
ttynf none network
ttyng none network
ttynh none network
ttyni none network
ttynj none network
ttynk none network
ttynl none network
ttynm none network
ttynn none network
ttyno none network
ttynp none network
ttynq none network
ttynr none network
ttyns none network
ttynt none network
ttynu none network
ttynv none network
ttyo0 none network
ttyo1 none network
ttyo2 none network
ttyo3 none network
ttyo4 none network
ttyo5 none network
ttyo6 none network
ttyo7 none network
ttyo8 none network
ttyo9 none network
ttyoa none network
ttyob none network
ttyoc none network
ttyod none network
ttyoe none network
ttyof none network
ttyog none network
ttyoh none network
ttyoi none network
ttyoj none network
ttyok none network
ttyol none network
ttyom none network
ttyon none network
ttyoo none network
ttyop none network
ttyoq none network
ttyor none network
ttyos none network
ttyot none network
ttyou none network
ttyov none network
ttyL0 none network
ttyL1 none network
ttyL2 none network
ttyL3 none network
ttyL4 none network
ttyL5 none network
ttyL6 none network
ttyL7 none network
ttyL8 none network
ttyL9 none network
ttyLa none network
ttyLb none network
ttyLc none network
ttyLd none network
ttyLe none network
ttyLf none network
ttyLg none network
ttyLh none network
ttyLi none network
ttyLj none network
ttyLk none network
ttyLl none network
ttyLm none network
ttyLn none network
ttyLo none network
ttyLp none network
ttyLq none network
ttyLr none network
ttyLs none network
ttyLt none network
ttyLu none network
ttyLv none network
ttyM0 none network
ttyM1 none network
ttyM2 none network
ttyM3 none network
ttyM4 none network
ttyM5 none network
ttyM6 none network
ttyM7 none network
ttyM8 none network
ttyM9 none network
ttyMa none network
ttyMb none network
ttyMc none network
ttyMd none network
ttyMe none network
ttyMf none network
ttyMg none network
ttyMh none network
ttyMi none network
ttyMj none network
ttyMk none network
ttyMl none network
ttyMm none network
ttyMn none network
ttyMo none network
ttyMp none network
ttyMq none network
ttyMr none network
ttyMs none network
ttyMt none network
ttyMu none network
ttyMv none network
ttyN0 none network
ttyN1 none network
ttyN2 none network
ttyN3 none network
ttyN4 none network
ttyN5 none network
ttyN6 none network
ttyN7 none network
ttyN8 none network
ttyN9 none network
ttyNa none network
ttyNb none network
ttyNc none network
ttyNd none network
ttyNe none network
ttyNf none network
ttyNg none network
ttyNh none network
ttyNi none network
ttyNj none network
ttyNk none network
ttyNl none network
ttyNm none network
ttyNn none network
ttyNo none network
ttyNp none network
ttyNq none network
ttyNr none network
ttyNs none network
ttyNt none network
ttyNu none network
ttyNv none network
ttyO0 none network
ttyO1 none network
ttyO2 none network
ttyO3 none network
ttyO4 none network
ttyO5 none network
ttyO6 none network
ttyO7 none network
ttyO8 none network
ttyO9 none network
ttyOa none network
ttyOb none network
ttyOc none network
ttyOd none network
ttyOe none network
ttyOf none network
ttyOg none network
ttyOh none network
ttyOi none network
ttyOj none network
ttyOk none network
ttyOl none network
ttyOm none network
ttyOn none network
ttyOo none network
ttyOp none network
ttyOq none network
ttyOr none network
ttyOs none network
ttyOt none network
ttyOu none network
ttyOv none network
+256
View File
@@ -307,3 +307,259 @@ ttySs none network
ttySt none network
ttySu none network
ttySv none network
ttyl0 none network
ttyl1 none network
ttyl2 none network
ttyl3 none network
ttyl4 none network
ttyl5 none network
ttyl6 none network
ttyl7 none network
ttyl8 none network
ttyl9 none network
ttyla none network
ttylb none network
ttylc none network
ttyld none network
ttyle none network
ttylf none network
ttylg none network
ttylh none network
ttyli none network
ttylj none network
ttylk none network
ttyll none network
ttylm none network
ttyln none network
ttylo none network
ttylp none network
ttylq none network
ttylr none network
ttyls none network
ttylt none network
ttylu none network
ttylv none network
ttym0 none network
ttym1 none network
ttym2 none network
ttym3 none network
ttym4 none network
ttym5 none network
ttym6 none network
ttym7 none network
ttym8 none network
ttym9 none network
ttyma none network
ttymb none network
ttymc none network
ttymd none network
ttyme none network
ttymf none network
ttymg none network
ttymh none network
ttymi none network
ttymj none network
ttymk none network
ttyml none network
ttymm none network
ttymn none network
ttymo none network
ttymp none network
ttymq none network
ttymr none network
ttyms none network
ttymt none network
ttymu none network
ttymv none network
ttyn0 none network
ttyn1 none network
ttyn2 none network
ttyn3 none network
ttyn4 none network
ttyn5 none network
ttyn6 none network
ttyn7 none network
ttyn8 none network
ttyn9 none network
ttyna none network
ttynb none network
ttync none network
ttynd none network
ttyne none network
ttynf none network
ttyng none network
ttynh none network
ttyni none network
ttynj none network
ttynk none network
ttynl none network
ttynm none network
ttynn none network
ttyno none network
ttynp none network
ttynq none network
ttynr none network
ttyns none network
ttynt none network
ttynu none network
ttynv none network
ttyo0 none network
ttyo1 none network
ttyo2 none network
ttyo3 none network
ttyo4 none network
ttyo5 none network
ttyo6 none network
ttyo7 none network
ttyo8 none network
ttyo9 none network
ttyoa none network
ttyob none network
ttyoc none network
ttyod none network
ttyoe none network
ttyof none network
ttyog none network
ttyoh none network
ttyoi none network
ttyoj none network
ttyok none network
ttyol none network
ttyom none network
ttyon none network
ttyoo none network
ttyop none network
ttyoq none network
ttyor none network
ttyos none network
ttyot none network
ttyou none network
ttyov none network
ttyL0 none network
ttyL1 none network
ttyL2 none network
ttyL3 none network
ttyL4 none network
ttyL5 none network
ttyL6 none network
ttyL7 none network
ttyL8 none network
ttyL9 none network
ttyLa none network
ttyLb none network
ttyLc none network
ttyLd none network
ttyLe none network
ttyLf none network
ttyLg none network
ttyLh none network
ttyLi none network
ttyLj none network
ttyLk none network
ttyLl none network
ttyLm none network
ttyLn none network
ttyLo none network
ttyLp none network
ttyLq none network
ttyLr none network
ttyLs none network
ttyLt none network
ttyLu none network
ttyLv none network
ttyM0 none network
ttyM1 none network
ttyM2 none network
ttyM3 none network
ttyM4 none network
ttyM5 none network
ttyM6 none network
ttyM7 none network
ttyM8 none network
ttyM9 none network
ttyMa none network
ttyMb none network
ttyMc none network
ttyMd none network
ttyMe none network
ttyMf none network
ttyMg none network
ttyMh none network
ttyMi none network
ttyMj none network
ttyMk none network
ttyMl none network
ttyMm none network
ttyMn none network
ttyMo none network
ttyMp none network
ttyMq none network
ttyMr none network
ttyMs none network
ttyMt none network
ttyMu none network
ttyMv none network
ttyN0 none network
ttyN1 none network
ttyN2 none network
ttyN3 none network
ttyN4 none network
ttyN5 none network
ttyN6 none network
ttyN7 none network
ttyN8 none network
ttyN9 none network
ttyNa none network
ttyNb none network
ttyNc none network
ttyNd none network
ttyNe none network
ttyNf none network
ttyNg none network
ttyNh none network
ttyNi none network
ttyNj none network
ttyNk none network
ttyNl none network
ttyNm none network
ttyNn none network
ttyNo none network
ttyNp none network
ttyNq none network
ttyNr none network
ttyNs none network
ttyNt none network
ttyNu none network
ttyNv none network
ttyO0 none network
ttyO1 none network
ttyO2 none network
ttyO3 none network
ttyO4 none network
ttyO5 none network
ttyO6 none network
ttyO7 none network
ttyO8 none network
ttyO9 none network
ttyOa none network
ttyOb none network
ttyOc none network
ttyOd none network
ttyOe none network
ttyOf none network
ttyOg none network
ttyOh none network
ttyOi none network
ttyOj none network
ttyOk none network
ttyOl none network
ttyOm none network
ttyOn none network
ttyOo none network
ttyOp none network
ttyOq none network
ttyOr none network
ttyOs none network
ttyOt none network
ttyOu none network
ttyOv none network
+256
View File
@@ -308,3 +308,259 @@ ttySs none network
ttySt none network
ttySu none network
ttySv none network
ttyl0 none network
ttyl1 none network
ttyl2 none network
ttyl3 none network
ttyl4 none network
ttyl5 none network
ttyl6 none network
ttyl7 none network
ttyl8 none network
ttyl9 none network
ttyla none network
ttylb none network
ttylc none network
ttyld none network
ttyle none network
ttylf none network
ttylg none network
ttylh none network
ttyli none network
ttylj none network
ttylk none network
ttyll none network
ttylm none network
ttyln none network
ttylo none network
ttylp none network
ttylq none network
ttylr none network
ttyls none network
ttylt none network
ttylu none network
ttylv none network
ttym0 none network
ttym1 none network
ttym2 none network
ttym3 none network
ttym4 none network
ttym5 none network
ttym6 none network
ttym7 none network
ttym8 none network
ttym9 none network
ttyma none network
ttymb none network
ttymc none network
ttymd none network
ttyme none network
ttymf none network
ttymg none network
ttymh none network
ttymi none network
ttymj none network
ttymk none network
ttyml none network
ttymm none network
ttymn none network
ttymo none network
ttymp none network
ttymq none network
ttymr none network
ttyms none network
ttymt none network
ttymu none network
ttymv none network
ttyn0 none network
ttyn1 none network
ttyn2 none network
ttyn3 none network
ttyn4 none network
ttyn5 none network
ttyn6 none network
ttyn7 none network
ttyn8 none network
ttyn9 none network
ttyna none network
ttynb none network
ttync none network
ttynd none network
ttyne none network
ttynf none network
ttyng none network
ttynh none network
ttyni none network
ttynj none network
ttynk none network
ttynl none network
ttynm none network
ttynn none network
ttyno none network
ttynp none network
ttynq none network
ttynr none network
ttyns none network
ttynt none network
ttynu none network
ttynv none network
ttyo0 none network
ttyo1 none network
ttyo2 none network
ttyo3 none network
ttyo4 none network
ttyo5 none network
ttyo6 none network
ttyo7 none network
ttyo8 none network
ttyo9 none network
ttyoa none network
ttyob none network
ttyoc none network
ttyod none network
ttyoe none network
ttyof none network
ttyog none network
ttyoh none network
ttyoi none network
ttyoj none network
ttyok none network
ttyol none network
ttyom none network
ttyon none network
ttyoo none network
ttyop none network
ttyoq none network
ttyor none network
ttyos none network
ttyot none network
ttyou none network
ttyov none network
ttyL0 none network
ttyL1 none network
ttyL2 none network
ttyL3 none network
ttyL4 none network
ttyL5 none network
ttyL6 none network
ttyL7 none network
ttyL8 none network
ttyL9 none network
ttyLa none network
ttyLb none network
ttyLc none network
ttyLd none network
ttyLe none network
ttyLf none network
ttyLg none network
ttyLh none network
ttyLi none network
ttyLj none network
ttyLk none network
ttyLl none network
ttyLm none network
ttyLn none network
ttyLo none network
ttyLp none network
ttyLq none network
ttyLr none network
ttyLs none network
ttyLt none network
ttyLu none network
ttyLv none network
ttyM0 none network
ttyM1 none network
ttyM2 none network
ttyM3 none network
ttyM4 none network
ttyM5 none network
ttyM6 none network
ttyM7 none network
ttyM8 none network
ttyM9 none network
ttyMa none network
ttyMb none network
ttyMc none network
ttyMd none network
ttyMe none network
ttyMf none network
ttyMg none network
ttyMh none network
ttyMi none network
ttyMj none network
ttyMk none network
ttyMl none network
ttyMm none network
ttyMn none network
ttyMo none network
ttyMp none network
ttyMq none network
ttyMr none network
ttyMs none network
ttyMt none network
ttyMu none network
ttyMv none network
ttyN0 none network
ttyN1 none network
ttyN2 none network
ttyN3 none network
ttyN4 none network
ttyN5 none network
ttyN6 none network
ttyN7 none network
ttyN8 none network
ttyN9 none network
ttyNa none network
ttyNb none network
ttyNc none network
ttyNd none network
ttyNe none network
ttyNf none network
ttyNg none network
ttyNh none network
ttyNi none network
ttyNj none network
ttyNk none network
ttyNl none network
ttyNm none network
ttyNn none network
ttyNo none network
ttyNp none network
ttyNq none network
ttyNr none network
ttyNs none network
ttyNt none network
ttyNu none network
ttyNv none network
ttyO0 none network
ttyO1 none network
ttyO2 none network
ttyO3 none network
ttyO4 none network
ttyO5 none network
ttyO6 none network
ttyO7 none network
ttyO8 none network
ttyO9 none network
ttyOa none network
ttyOb none network
ttyOc none network
ttyOd none network
ttyOe none network
ttyOf none network
ttyOg none network
ttyOh none network
ttyOi none network
ttyOj none network
ttyOk none network
ttyOl none network
ttyOm none network
ttyOn none network
ttyOo none network
ttyOp none network
ttyOq none network
ttyOr none network
ttyOs none network
ttyOt none network
ttyOu none network
ttyOv none network
+256
View File
@@ -307,3 +307,259 @@ ttySs none network
ttySt none network
ttySu none network
ttySv none network
ttyl0 none network
ttyl1 none network
ttyl2 none network
ttyl3 none network
ttyl4 none network
ttyl5 none network
ttyl6 none network
ttyl7 none network
ttyl8 none network
ttyl9 none network
ttyla none network
ttylb none network
ttylc none network
ttyld none network
ttyle none network
ttylf none network
ttylg none network
ttylh none network
ttyli none network
ttylj none network
ttylk none network
ttyll none network
ttylm none network
ttyln none network
ttylo none network
ttylp none network
ttylq none network
ttylr none network
ttyls none network
ttylt none network
ttylu none network
ttylv none network
ttym0 none network
ttym1 none network
ttym2 none network
ttym3 none network
ttym4 none network
ttym5 none network
ttym6 none network
ttym7 none network
ttym8 none network
ttym9 none network
ttyma none network
ttymb none network
ttymc none network
ttymd none network
ttyme none network
ttymf none network
ttymg none network
ttymh none network
ttymi none network
ttymj none network
ttymk none network
ttyml none network
ttymm none network
ttymn none network
ttymo none network
ttymp none network
ttymq none network
ttymr none network
ttyms none network
ttymt none network
ttymu none network
ttymv none network
ttyn0 none network
ttyn1 none network
ttyn2 none network
ttyn3 none network
ttyn4 none network
ttyn5 none network
ttyn6 none network
ttyn7 none network
ttyn8 none network
ttyn9 none network
ttyna none network
ttynb none network
ttync none network
ttynd none network
ttyne none network
ttynf none network
ttyng none network
ttynh none network
ttyni none network
ttynj none network
ttynk none network
ttynl none network
ttynm none network
ttynn none network
ttyno none network
ttynp none network
ttynq none network
ttynr none network
ttyns none network
ttynt none network
ttynu none network
ttynv none network
ttyo0 none network
ttyo1 none network
ttyo2 none network
ttyo3 none network
ttyo4 none network
ttyo5 none network
ttyo6 none network
ttyo7 none network
ttyo8 none network
ttyo9 none network
ttyoa none network
ttyob none network
ttyoc none network
ttyod none network
ttyoe none network
ttyof none network
ttyog none network
ttyoh none network
ttyoi none network
ttyoj none network
ttyok none network
ttyol none network
ttyom none network
ttyon none network
ttyoo none network
ttyop none network
ttyoq none network
ttyor none network
ttyos none network
ttyot none network
ttyou none network
ttyov none network
ttyL0 none network
ttyL1 none network
ttyL2 none network
ttyL3 none network
ttyL4 none network
ttyL5 none network
ttyL6 none network
ttyL7 none network
ttyL8 none network
ttyL9 none network
ttyLa none network
ttyLb none network
ttyLc none network
ttyLd none network
ttyLe none network
ttyLf none network
ttyLg none network
ttyLh none network
ttyLi none network
ttyLj none network
ttyLk none network
ttyLl none network
ttyLm none network
ttyLn none network
ttyLo none network
ttyLp none network
ttyLq none network
ttyLr none network
ttyLs none network
ttyLt none network
ttyLu none network
ttyLv none network
ttyM0 none network
ttyM1 none network
ttyM2 none network
ttyM3 none network
ttyM4 none network
ttyM5 none network
ttyM6 none network
ttyM7 none network
ttyM8 none network
ttyM9 none network
ttyMa none network
ttyMb none network
ttyMc none network
ttyMd none network
ttyMe none network
ttyMf none network
ttyMg none network
ttyMh none network
ttyMi none network
ttyMj none network
ttyMk none network
ttyMl none network
ttyMm none network
ttyMn none network
ttyMo none network
ttyMp none network
ttyMq none network
ttyMr none network
ttyMs none network
ttyMt none network
ttyMu none network
ttyMv none network
ttyN0 none network
ttyN1 none network
ttyN2 none network
ttyN3 none network
ttyN4 none network
ttyN5 none network
ttyN6 none network
ttyN7 none network
ttyN8 none network
ttyN9 none network
ttyNa none network
ttyNb none network
ttyNc none network
ttyNd none network
ttyNe none network
ttyNf none network
ttyNg none network
ttyNh none network
ttyNi none network
ttyNj none network
ttyNk none network
ttyNl none network
ttyNm none network
ttyNn none network
ttyNo none network
ttyNp none network
ttyNq none network
ttyNr none network
ttyNs none network
ttyNt none network
ttyNu none network
ttyNv none network
ttyO0 none network
ttyO1 none network
ttyO2 none network
ttyO3 none network
ttyO4 none network
ttyO5 none network
ttyO6 none network
ttyO7 none network
ttyO8 none network
ttyO9 none network
ttyOa none network
ttyOb none network
ttyOc none network
ttyOd none network
ttyOe none network
ttyOf none network
ttyOg none network
ttyOh none network
ttyOi none network
ttyOj none network
ttyOk none network
ttyOl none network
ttyOm none network
ttyOn none network
ttyOo none network
ttyOp none network
ttyOq none network
ttyOr none network
ttyOs none network
ttyOt none network
ttyOu none network
ttyOv none network
+256
View File
@@ -307,3 +307,259 @@ ttySs none network
ttySt none network
ttySu none network
ttySv none network
ttyl0 none network
ttyl1 none network
ttyl2 none network
ttyl3 none network
ttyl4 none network
ttyl5 none network
ttyl6 none network
ttyl7 none network
ttyl8 none network
ttyl9 none network
ttyla none network
ttylb none network
ttylc none network
ttyld none network
ttyle none network
ttylf none network
ttylg none network
ttylh none network
ttyli none network
ttylj none network
ttylk none network
ttyll none network
ttylm none network
ttyln none network
ttylo none network
ttylp none network
ttylq none network
ttylr none network
ttyls none network
ttylt none network
ttylu none network
ttylv none network
ttym0 none network
ttym1 none network
ttym2 none network
ttym3 none network
ttym4 none network
ttym5 none network
ttym6 none network
ttym7 none network
ttym8 none network
ttym9 none network
ttyma none network
ttymb none network
ttymc none network
ttymd none network
ttyme none network
ttymf none network
ttymg none network
ttymh none network
ttymi none network
ttymj none network
ttymk none network
ttyml none network
ttymm none network
ttymn none network
ttymo none network
ttymp none network
ttymq none network
ttymr none network
ttyms none network
ttymt none network
ttymu none network
ttymv none network
ttyn0 none network
ttyn1 none network
ttyn2 none network
ttyn3 none network
ttyn4 none network
ttyn5 none network
ttyn6 none network
ttyn7 none network
ttyn8 none network
ttyn9 none network
ttyna none network
ttynb none network
ttync none network
ttynd none network
ttyne none network
ttynf none network
ttyng none network
ttynh none network
ttyni none network
ttynj none network
ttynk none network
ttynl none network
ttynm none network
ttynn none network
ttyno none network
ttynp none network
ttynq none network
ttynr none network
ttyns none network
ttynt none network
ttynu none network
ttynv none network
ttyo0 none network
ttyo1 none network
ttyo2 none network
ttyo3 none network
ttyo4 none network
ttyo5 none network
ttyo6 none network
ttyo7 none network
ttyo8 none network
ttyo9 none network
ttyoa none network
ttyob none network
ttyoc none network
ttyod none network
ttyoe none network
ttyof none network
ttyog none network
ttyoh none network
ttyoi none network
ttyoj none network
ttyok none network
ttyol none network
ttyom none network
ttyon none network
ttyoo none network
ttyop none network
ttyoq none network
ttyor none network
ttyos none network
ttyot none network
ttyou none network
ttyov none network
ttyL0 none network
ttyL1 none network
ttyL2 none network
ttyL3 none network
ttyL4 none network
ttyL5 none network
ttyL6 none network
ttyL7 none network
ttyL8 none network
ttyL9 none network
ttyLa none network
ttyLb none network
ttyLc none network
ttyLd none network
ttyLe none network
ttyLf none network
ttyLg none network
ttyLh none network
ttyLi none network
ttyLj none network
ttyLk none network
ttyLl none network
ttyLm none network
ttyLn none network
ttyLo none network
ttyLp none network
ttyLq none network
ttyLr none network
ttyLs none network
ttyLt none network
ttyLu none network
ttyLv none network
ttyM0 none network
ttyM1 none network
ttyM2 none network
ttyM3 none network
ttyM4 none network
ttyM5 none network
ttyM6 none network
ttyM7 none network
ttyM8 none network
ttyM9 none network
ttyMa none network
ttyMb none network
ttyMc none network
ttyMd none network
ttyMe none network
ttyMf none network
ttyMg none network
ttyMh none network
ttyMi none network
ttyMj none network
ttyMk none network
ttyMl none network
ttyMm none network
ttyMn none network
ttyMo none network
ttyMp none network
ttyMq none network
ttyMr none network
ttyMs none network
ttyMt none network
ttyMu none network
ttyMv none network
ttyN0 none network
ttyN1 none network
ttyN2 none network
ttyN3 none network
ttyN4 none network
ttyN5 none network
ttyN6 none network
ttyN7 none network
ttyN8 none network
ttyN9 none network
ttyNa none network
ttyNb none network
ttyNc none network
ttyNd none network
ttyNe none network
ttyNf none network
ttyNg none network
ttyNh none network
ttyNi none network
ttyNj none network
ttyNk none network
ttyNl none network
ttyNm none network
ttyNn none network
ttyNo none network
ttyNp none network
ttyNq none network
ttyNr none network
ttyNs none network
ttyNt none network
ttyNu none network
ttyNv none network
ttyO0 none network
ttyO1 none network
ttyO2 none network
ttyO3 none network
ttyO4 none network
ttyO5 none network
ttyO6 none network
ttyO7 none network
ttyO8 none network
ttyO9 none network
ttyOa none network
ttyOb none network
ttyOc none network
ttyOd none network
ttyOe none network
ttyOf none network
ttyOg none network
ttyOh none network
ttyOi none network
ttyOj none network
ttyOk none network
ttyOl none network
ttyOm none network
ttyOn none network
ttyOo none network
ttyOp none network
ttyOq none network
ttyOr none network
ttyOs none network
ttyOt none network
ttyOu none network
ttyOv none network
+256
View File
@@ -307,3 +307,259 @@ ttySs none network
ttySt none network
ttySu none network
ttySv none network
ttyl0 none network
ttyl1 none network
ttyl2 none network
ttyl3 none network
ttyl4 none network
ttyl5 none network
ttyl6 none network
ttyl7 none network
ttyl8 none network
ttyl9 none network
ttyla none network
ttylb none network
ttylc none network
ttyld none network
ttyle none network
ttylf none network
ttylg none network
ttylh none network
ttyli none network
ttylj none network
ttylk none network
ttyll none network
ttylm none network
ttyln none network
ttylo none network
ttylp none network
ttylq none network
ttylr none network
ttyls none network
ttylt none network
ttylu none network
ttylv none network
ttym0 none network
ttym1 none network
ttym2 none network
ttym3 none network
ttym4 none network
ttym5 none network
ttym6 none network
ttym7 none network
ttym8 none network
ttym9 none network
ttyma none network
ttymb none network
ttymc none network
ttymd none network
ttyme none network
ttymf none network
ttymg none network
ttymh none network
ttymi none network
ttymj none network
ttymk none network
ttyml none network
ttymm none network
ttymn none network
ttymo none network
ttymp none network
ttymq none network
ttymr none network
ttyms none network
ttymt none network
ttymu none network
ttymv none network
ttyn0 none network
ttyn1 none network
ttyn2 none network
ttyn3 none network
ttyn4 none network
ttyn5 none network
ttyn6 none network
ttyn7 none network
ttyn8 none network
ttyn9 none network
ttyna none network
ttynb none network
ttync none network
ttynd none network
ttyne none network
ttynf none network
ttyng none network
ttynh none network
ttyni none network
ttynj none network
ttynk none network
ttynl none network
ttynm none network
ttynn none network
ttyno none network
ttynp none network
ttynq none network
ttynr none network
ttyns none network
ttynt none network
ttynu none network
ttynv none network
ttyo0 none network
ttyo1 none network
ttyo2 none network
ttyo3 none network
ttyo4 none network
ttyo5 none network
ttyo6 none network
ttyo7 none network
ttyo8 none network
ttyo9 none network
ttyoa none network
ttyob none network
ttyoc none network
ttyod none network
ttyoe none network
ttyof none network
ttyog none network
ttyoh none network
ttyoi none network
ttyoj none network
ttyok none network
ttyol none network
ttyom none network
ttyon none network
ttyoo none network
ttyop none network
ttyoq none network
ttyor none network
ttyos none network
ttyot none network
ttyou none network
ttyov none network
ttyL0 none network
ttyL1 none network
ttyL2 none network
ttyL3 none network
ttyL4 none network
ttyL5 none network
ttyL6 none network
ttyL7 none network
ttyL8 none network
ttyL9 none network
ttyLa none network
ttyLb none network
ttyLc none network
ttyLd none network
ttyLe none network
ttyLf none network
ttyLg none network
ttyLh none network
ttyLi none network
ttyLj none network
ttyLk none network
ttyLl none network
ttyLm none network
ttyLn none network
ttyLo none network
ttyLp none network
ttyLq none network
ttyLr none network
ttyLs none network
ttyLt none network
ttyLu none network
ttyLv none network
ttyM0 none network
ttyM1 none network
ttyM2 none network
ttyM3 none network
ttyM4 none network
ttyM5 none network
ttyM6 none network
ttyM7 none network
ttyM8 none network
ttyM9 none network
ttyMa none network
ttyMb none network
ttyMc none network
ttyMd none network
ttyMe none network
ttyMf none network
ttyMg none network
ttyMh none network
ttyMi none network
ttyMj none network
ttyMk none network
ttyMl none network
ttyMm none network
ttyMn none network
ttyMo none network
ttyMp none network
ttyMq none network
ttyMr none network
ttyMs none network
ttyMt none network
ttyMu none network
ttyMv none network
ttyN0 none network
ttyN1 none network
ttyN2 none network
ttyN3 none network
ttyN4 none network
ttyN5 none network
ttyN6 none network
ttyN7 none network
ttyN8 none network
ttyN9 none network
ttyNa none network
ttyNb none network
ttyNc none network
ttyNd none network
ttyNe none network
ttyNf none network
ttyNg none network
ttyNh none network
ttyNi none network
ttyNj none network
ttyNk none network
ttyNl none network
ttyNm none network
ttyNn none network
ttyNo none network
ttyNp none network
ttyNq none network
ttyNr none network
ttyNs none network
ttyNt none network
ttyNu none network
ttyNv none network
ttyO0 none network
ttyO1 none network
ttyO2 none network
ttyO3 none network
ttyO4 none network
ttyO5 none network
ttyO6 none network
ttyO7 none network
ttyO8 none network
ttyO9 none network
ttyOa none network
ttyOb none network
ttyOc none network
ttyOd none network
ttyOe none network
ttyOf none network
ttyOg none network
ttyOh none network
ttyOi none network
ttyOj none network
ttyOk none network
ttyOl none network
ttyOm none network
ttyOn none network
ttyOo none network
ttyOp none network
ttyOq none network
ttyOr none network
ttyOs none network
ttyOt none network
ttyOu none network
ttyOv none network
+256
View File
@@ -315,3 +315,259 @@ ttySs none network
ttySt none network
ttySu none network
ttySv none network
ttyl0 none network
ttyl1 none network
ttyl2 none network
ttyl3 none network
ttyl4 none network
ttyl5 none network
ttyl6 none network
ttyl7 none network
ttyl8 none network
ttyl9 none network
ttyla none network
ttylb none network
ttylc none network
ttyld none network
ttyle none network
ttylf none network
ttylg none network
ttylh none network
ttyli none network
ttylj none network
ttylk none network
ttyll none network
ttylm none network
ttyln none network
ttylo none network
ttylp none network
ttylq none network
ttylr none network
ttyls none network
ttylt none network
ttylu none network
ttylv none network
ttym0 none network
ttym1 none network
ttym2 none network
ttym3 none network
ttym4 none network
ttym5 none network
ttym6 none network
ttym7 none network
ttym8 none network
ttym9 none network
ttyma none network
ttymb none network
ttymc none network
ttymd none network
ttyme none network
ttymf none network
ttymg none network
ttymh none network
ttymi none network
ttymj none network
ttymk none network
ttyml none network
ttymm none network
ttymn none network
ttymo none network
ttymp none network
ttymq none network
ttymr none network
ttyms none network
ttymt none network
ttymu none network
ttymv none network
ttyn0 none network
ttyn1 none network
ttyn2 none network
ttyn3 none network
ttyn4 none network
ttyn5 none network
ttyn6 none network
ttyn7 none network
ttyn8 none network
ttyn9 none network
ttyna none network
ttynb none network
ttync none network
ttynd none network
ttyne none network
ttynf none network
ttyng none network
ttynh none network
ttyni none network
ttynj none network
ttynk none network
ttynl none network
ttynm none network
ttynn none network
ttyno none network
ttynp none network
ttynq none network
ttynr none network
ttyns none network
ttynt none network
ttynu none network
ttynv none network
ttyo0 none network
ttyo1 none network
ttyo2 none network
ttyo3 none network
ttyo4 none network
ttyo5 none network
ttyo6 none network
ttyo7 none network
ttyo8 none network
ttyo9 none network
ttyoa none network
ttyob none network
ttyoc none network
ttyod none network
ttyoe none network
ttyof none network
ttyog none network
ttyoh none network
ttyoi none network
ttyoj none network
ttyok none network
ttyol none network
ttyom none network
ttyon none network
ttyoo none network
ttyop none network
ttyoq none network
ttyor none network
ttyos none network
ttyot none network
ttyou none network
ttyov none network
ttyL0 none network
ttyL1 none network
ttyL2 none network
ttyL3 none network
ttyL4 none network
ttyL5 none network
ttyL6 none network
ttyL7 none network
ttyL8 none network
ttyL9 none network
ttyLa none network
ttyLb none network
ttyLc none network
ttyLd none network
ttyLe none network
ttyLf none network
ttyLg none network
ttyLh none network
ttyLi none network
ttyLj none network
ttyLk none network
ttyLl none network
ttyLm none network
ttyLn none network
ttyLo none network
ttyLp none network
ttyLq none network
ttyLr none network
ttyLs none network
ttyLt none network
ttyLu none network
ttyLv none network
ttyM0 none network
ttyM1 none network
ttyM2 none network
ttyM3 none network
ttyM4 none network
ttyM5 none network
ttyM6 none network
ttyM7 none network
ttyM8 none network
ttyM9 none network
ttyMa none network
ttyMb none network
ttyMc none network
ttyMd none network
ttyMe none network
ttyMf none network
ttyMg none network
ttyMh none network
ttyMi none network
ttyMj none network
ttyMk none network
ttyMl none network
ttyMm none network
ttyMn none network
ttyMo none network
ttyMp none network
ttyMq none network
ttyMr none network
ttyMs none network
ttyMt none network
ttyMu none network
ttyMv none network
ttyN0 none network
ttyN1 none network
ttyN2 none network
ttyN3 none network
ttyN4 none network
ttyN5 none network
ttyN6 none network
ttyN7 none network
ttyN8 none network
ttyN9 none network
ttyNa none network
ttyNb none network
ttyNc none network
ttyNd none network
ttyNe none network
ttyNf none network
ttyNg none network
ttyNh none network
ttyNi none network
ttyNj none network
ttyNk none network
ttyNl none network
ttyNm none network
ttyNn none network
ttyNo none network
ttyNp none network
ttyNq none network
ttyNr none network
ttyNs none network
ttyNt none network
ttyNu none network
ttyNv none network
ttyO0 none network
ttyO1 none network
ttyO2 none network
ttyO3 none network
ttyO4 none network
ttyO5 none network
ttyO6 none network
ttyO7 none network
ttyO8 none network
ttyO9 none network
ttyOa none network
ttyOb none network
ttyOc none network
ttyOd none network
ttyOe none network
ttyOf none network
ttyOg none network
ttyOh none network
ttyOi none network
ttyOj none network
ttyOk none network
ttyOl none network
ttyOm none network
ttyOn none network
ttyOo none network
ttyOp none network
ttyOq none network
ttyOr none network
ttyOs none network
ttyOt none network
ttyOu none network
ttyOv none network
+1 -1
View File
@@ -24,7 +24,7 @@ IgnorePaths
# Paths which start with anything matching an entry in an UpdateIfUnmodified
# statement will only be updated if the contents of the file have not been
# modified by the user (unless changes are merged; see below).
UpdateIfUnmodified /etc/ /var/
UpdateIfUnmodified /etc/ /var/ /root/ /.cshrc /.profile
# When upgrading to a new FreeBSD release, files which match MergeChanges
# will have any local changes merged into the version from the new release.
+1 -1
View File
@@ -32,7 +32,7 @@
db
entropy uname=operator gname=operator mode=0700
..
freebsd-update
freebsd-update mode=0700
..
ipf mode=0700
..
-8
View File
@@ -123,14 +123,6 @@ zone "0.ip6.arpa" { type master; file "master/localhost-reverse.db"; };
// "This" Network (RFCs 1912 and 3330)
zone "0.in-addr.arpa" { type master; file "master/empty.db"; };
// IANA Reserved - Unlikely to ever be assigned
zone "1.in-addr.arpa" { type master; file "master/empty.db"; };
zone "2.in-addr.arpa" { type master; file "master/empty.db"; };
zone "223.in-addr.arpa" { type master; file "master/empty.db"; };
// Public Data Networks (RFC 3330)
zone "14.in-addr.arpa" { type master; file "master/empty.db"; };
// Private Use Networks (RFC 1918)
zone "10.in-addr.arpa" { type master; file "master/empty.db"; };
zone "16.172.in-addr.arpa" { type master; file "master/empty.db"; };
+8 -2
View File
@@ -50,8 +50,14 @@ ldconfig_start()
fi
fi
done
echo '32-bit compatibility ldconfig path:' ${ldconfig32_paths}
${ldconfig} -32 -m ${_ins} ${ldconfig32_paths}
_LDC=""
for i in ${ldconfig32_paths}; do
if [ -r "${i}" ]; then
_LDC="${_LDC} ${i}"
fi
done
echo '32-bit compatibility ldconfig path:' ${_LDC}
${ldconfig} -32 -m ${_ins} ${_LDC}
;;
esac
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+433 -435
View File
@@ -1,111 +1,54 @@
This fortune brought to you by:
$FreeBSD$
%
Having trouble using fetch through a firewall? Try setting the environment
variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details.
Any user that is a member of the wheel group can use "su -" to simulate
a root login. You can add a user to the wheel group by editing /etc/group.
-- Konstantinos Konstantinidis <[email protected]>
%
By pressing "Scroll Lock" you can use the arrow keys to scroll backward
through the console output. Press "Scroll Lock" again to turn it off.
%
Want colour in your directory listings? Use "ls -G". "ls -F" is also useful,
and they can be combined as "ls -FG".
Can't remember if you've installed a certain port or not? Try "pkg_info
-Ix port_name".
%
If you need to ask a question on the FreeBSD-questions mailing list then
Ever wonder what those numbers after command names were, as in cat(1)? It's
the section of the manual the man page is in. "man man" will tell you more.
-- David Scheidt <[email protected]>
%
Forget how to spell a word or a variation of a word? Use
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/\
freebsd-questions/index.html
contains lots of useful advice to help you get the best results.
look portion_of_word_you_know
-- Dru <[email protected]>
%
If you'd like to keep track of applications in the FreeBSD ports tree, take a
look at FreshPorts;
http://www.freshports.org/
Forget what directory you are in? Type "pwd".
-- Dru <[email protected]>
%
To search for files that match a particular name, use find(1); for example
find / -name "*GENERIC*" -ls
will search '/', and all subdirectories, for files with 'GENERIC' in the name.
-- Stephen Hilton <[email protected]>
Forget when Easter is? Try "ncal -e". If you need the date for Orthodox
Easter, use "ncal -o" instead.
-- Dru <[email protected]>
%
In tcsh, you can `set autolist' to have the shell automatically show
all the possible matches when doing filename/directory expansion.
FreeBSD is started up by the program 'init'. The first thing init does when
starting multiuser mode (ie, starting the computer up for normal use) is to
run the shell script /etc/rc. By reading /etc/rc and the /etc/rc.d/ scripts,
you can learn a lot about how the system is put together, which again will
make you more confident about what happens when you do something with it.
%
You can `set autologout = 30' to have tcsh log you off automatically
if you leave the shell idle for more than 30 minutes.
Handy bash(1) prompt: PS1="\u@\h \w \!$ "
-- David Scheidt <[email protected]>
%
If you `set filec' (file completion) in tcsh and write a part of the
filename, pressing TAB will show you the available choices when there
is more than one, or complete the filename if there's only one match.
Having trouble using fetch through a firewall? Try setting the environment
variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details.
%
You can press up-arrow or down-arrow to walk through a list of
previous commands in tcsh.
If other operating systems have damaged your Master Boot Record, you can
reinstall it either with /usr/sbin/sysinstall or with boot0cfg(8). See
"man boot0cfg" for details.
%
You can disable tcsh's terminal beep if you `set nobeep'.
If you accidentally end up inside vi, you can quit it by pressing Escape, colon
(:), q (q), bang (!) and pressing return.
%
If you `set watch = (0 any any)' in tcsh, you will be notified when
someone logs in or out of your system.
%
Nice tcsh prompt: set prompt = '%m %# '
%
Nice tcsh prompt: set prompt = '%n@%m%# '
%
Nice tcsh prompt: set prompt = '%n@%m:%~%# '
%
Nice tcsh prompt: set prompt = '%n@%m:%/%# '
%
Nice tcsh prompt: set prompt = '[%B%m%b] %B%~%b%# '
%
Simple tcsh prompt: set prompt = '%# '
%
If you want df(1) and other commands to display disk sizes in
kilobytes instead of 512-byte blocks, set BLOCKSIZE in your
environment to 'K'. You can also use 'M' for Megabytes or 'G' for
Gigabytes. If you want df(1) to automatically select the best size
then use 'df -h'.
%
To change an environment variable in tcsh you use: setenv NAME "value"
where NAME is the name of the variable and "value" its new value.
%
To change an environment variable in /bin/sh use:
$ VARIABLE="value"
$ export VARIABLE
%
You can use /etc/make.conf to control the options used to compile software
on this system. Example entries are in
/usr/share/examples/etc/make.conf.
%
To do a fast search for a file, try
locate filename
locate uses a database that is updated every Saturday (assuming your computer
is running FreeBSD at the time) to quickly find files based on name only.
%
In order to search for a string in some files, use 'grep' like this:
grep "string" filename1 [filename2 filename3 ...]
This will print out the lines in the files that contain the string. grep can
also do a lot more advanced searches - type 'man grep' for details.
%
You can use the 'fetch' command to retrieve files over ftp or http.
fetch http://www.freebsd.org/index.html
will download the front page of the FreeBSD web site.
%
In order to make fetch (the FreeBSD downloading tool) ask for
username/password when it encounters a password-protected web page, you can set
the environment variable HTTP_AUTH to 'basic:*'.
%
You can permanently set environment variables for your shell by putting them
in a startup file for the shell. The name of the startup file varies
depending on the shell - csh and tcsh uses .login, bash, sh, ksh and zsh use
.profile. When using bash, sh, ksh or zsh, don't forget to export the
variable.
If you are in the C shell and have just installed a new program, you won't
be able to run it unless you first type "rehash".
-- Dru <[email protected]>
%
If you are running xterm, the default TERM variable will be 'xterm'. If you
set this environment variable to 'xterm-color' instead, a lot of programs will
@@ -123,16 +66,403 @@ If you do not want to get beeps in X11 (X Windows), you can turn them off with
xset b off
%
You can look through a file in a nice text-based interface by typing
If you have a CD-ROM drive in your machine, you can make the CD-ROM that is
presently inserted available by typing 'mount /cdrom' as root. The CD-ROM
will be available under /cdrom/. Remember to do 'umount /cdrom' before
removing the CD-ROM (it will usually not be possible to remove the CD-ROM
without doing this.)
less filename
Note: This tip may not work in all configurations.
%
If you need a reminder to leave your terminal, type "leave +hhmm" where
"hhmm" represents in how many hours and minutes you need to leave.
-- Dru <[email protected]>
%
If you need to ask a question on the FreeBSD-questions mailing list then
http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/\
freebsd-questions/index.html
contains lots of useful advice to help you get the best results.
%
If you `set filec' (file completion) in tcsh and write a part of the
filename, pressing TAB will show you the available choices when there
is more than one, or complete the filename if there's only one match.
%
If you `set watch = (0 any any)' in tcsh, you will be notified when
someone logs in or out of your system.
%
If you use the C shell, add the following line to the .cshrc file in your
home directory to prevent core files from being written to disk:
limit coredumpsize 0
-- Dru <[email protected]>
%
If you want df(1) and other commands to display disk sizes in
kilobytes instead of 512-byte blocks, set BLOCKSIZE in your
environment to 'K'. You can also use 'M' for Megabytes or 'G' for
Gigabytes. If you want df(1) to automatically select the best size
then use 'df -h'.
%
If you want to play CDs with FreeBSD, a utility for this is already included.
Type 'cdcontrol' then 'help' to learn more. (You may need to set the CDROM
environment variable in order to make cdcontrol want to start.)
%
If you want to quickly check for duplicate package/port installations,
try the following pkg_info command.
pkg_info | sort | sed -e 's/-[0-9].*$//' | \
uniq -c | grep -v '^[[:space:]]*1'
%
If you'd like to keep track of applications in the FreeBSD ports tree, take a
look at FreshPorts;
http://www.freshports.org/
%
In order to make fetch (the FreeBSD downloading tool) ask for
username/password when it encounters a password-protected web page, you can set
the environment variable HTTP_AUTH to 'basic:*'.
%
In order to search for a string in some files, use 'grep' like this:
grep "string" filename1 [filename2 filename3 ...]
This will print out the lines in the files that contain the string. grep can
also do a lot more advanced searches - type 'man grep' for details.
%
In order to support national characters for European languages in tools like
less without creating other nationalisation aspects, set the environment
variable LC_ALL to 'en_US.ISO8859-1'.
%
In tcsh, you can `set autolist' to have the shell automatically show
all the possible matches when doing filename/directory expansion.
%
"man firewall" will give advice for building a FreeBSD firewall
-- David Scheidt <[email protected]>
%
"man hier" will explain the way FreeBSD filesystems are normally laid out.
-- David Scheidt <[email protected]>
%
Man pages are divided into section depending on topic. There are 9 different
sections numbered from 1 (General Commands) to 9 (Kernel Developer's Manual).
You can get an introduction to each topic by typing
man <number> intro
In other words, to get the intro to general commands, type
man 1 intro
%
"man ports" gives many useful hints about installing FreeBSD ports.
%
"man security" gives very good advice on how to tune the security of your
FreeBSD system.
%
"man tuning" gives some tips how to tune performance of your FreeBSD system.
-- David Scheidt <[email protected]>
%
Need to do a search in a manpage or in a file you've sent to a pager? Use
"/search_word". To repeat the same search, type "n" for next.
-- Dru <[email protected]>
%
Need to find the location of a program? Use "locate program_name".
-- Dru <[email protected]>
%
Need to leave your terminal for a few minutes and don't want to logout?
Use "lock -p". When you return, use your password as the key to unlock the
terminal.
-- Dru <[email protected]>
%
Need to print a manpage? Use
man name_of_manpage | col -bx | lpr
-- Dru <[email protected]>
%
Need to quickly empty a file? Use ": > filename".
-- Dru <[email protected]>
%
Need to quickly return to your home directory? Type "cd".
-- Dru <[email protected]>
%
Need to remove all those ^M characters from a DOS file? Try
tr -d \\r < dosfile > newfile
-- Originally by Dru <[email protected]>
%
Need to see the calendar for this month? Simply type "cal". To see the
whole year, type "cal -y".
-- Dru <[email protected]>
%
Need to see which daemons are listening for connection requests? Use
"sockstat -4l" for IPv4, and "sockstat -l" for IPv4 and IPv6.
-- Dru <[email protected]>
%
Need to see your routing table? Type "netstat -rn". The entry with the G
flag is your gateway.
-- Dru <[email protected]>
%
Nice bash prompt: PS1='(\[$(tput md)\]\t <\w>\[$(tput me)\]) $(echo $?) \$ '
-- Mathieu <[email protected]>
%
Nice tcsh prompts:
set prompt = '[%B%m%b] %B%~%b%# '
set prompt = '%m %# '
set prompt = '%n@%m%# '
set prompt = '%n@%m:%/%# '
set prompt = '%n@%m:%~%# '
%
Over quota? "du -s * | sort -n " will give you a sorted list of your
directory sizes.
-- David Scheidt <[email protected]>
%
ports/net/netcat port is useful not only for redirecting input/output
to TCP or UDP connections, but also for proxying them with inetd(8).
%
sh (the default Bourne shell in FreeBSD) supports command-line editing. Just
``set -o emacs'' or ``set -o vi'' to enable it.
%
Simple tcsh prompt: set prompt = '%# '
%
The default editor in FreeBSD is vi, which is efficient to use when you have
learned it, but somewhat user-unfriendly. To use ee (an easier but less
powerful editor) instead, set the environment variable EDITOR to /usr/bin/ee
%
If you accidentally end up inside vi, you can quit it by pressing Escape, colon
(:), q (q), bang (!) and pressing return.
Time to change your password? Type "passwd" and follow the prompts.
-- Dru <[email protected]>
%
To change an environment variable in /bin/sh use:
$ VARIABLE="value"
$ export VARIABLE
%
To change an environment variable in tcsh you use: setenv NAME "value"
where NAME is the name of the variable and "value" its new value.
%
To clear the screen, use "clear". To re-display your screen buffer, press
the scroll lock key and use your page up button. When you're finished,
press the scroll lock key again to get your prompt back.
-- Dru <[email protected]>
%
To determine whether a file is a text file, executable, or some other type
of file, use
file filename
-- Dru <[email protected]>
%
To do a fast search for a file, try
locate filename
locate uses a database that is updated every Saturday (assuming your computer
is running FreeBSD at the time) to quickly find files based on name only.
%
To erase a line you've written at the command prompt, use "Ctrl-U".
-- Dru <[email protected]>
%
To find out the hostname associated with an IP address, use
dig -x IP_address
-- Dru <[email protected]>
%
To obtain a neat PostScript rendering of a manual page, use ``-t'' switch
of the man(1) utility: ``man -t <topic>''. For example:
man -t grep > grep.ps # Save the PostScript version to a file
or
man -t printf | lp # Send the PostScript directly to printer
%
To quickly create an empty file, use "touch filename".
-- Dru <[email protected]>
%
To read a compressed file without having to first uncompress it, use
"zcat" or "zmore" to view it.
-- Dru <[email protected]>
%
To repeat the last command in the C shell, type "!!".
-- Dru <[email protected]>
%
To save disk space in your home directory, compress files you rarely
use with "gzip filename".
-- Dru <[email protected]>
%
To search for files that match a particular name, use find(1); for example
find / -name "*GENERIC*" -ls
will search '/', and all subdirectories, for files with 'GENERIC' in the name.
-- Stephen Hilton <[email protected]>
%
To see all of the directories on your FreeBSD system, type
ls -R / | more
-- Dru <[email protected]>
%
To see how long it takes a command to run, type the word "time" before the
command name.
-- Dru <[email protected]>
%
To see how much disk space is left on your partitions, use
df -h
-- Dru <[email protected]>
%
To see the 10 largest files on a directory or partition, use
du /partition_or_directory_name | sort -rn | head
-- Dru <[email protected]>
%
To see the IP addresses currently set on your active interfaces, type
"ifconfig -u".
-- Dru <[email protected]>
%
To see the last 10 lines of a long file, use "tail filename". To see the
first 10 lines, use "head filename".
-- Dru <[email protected]>
%
To see the last time that you logged in, use lastlogin(8).
-- Dru <[email protected]>
%
To see the MAC addresses of the NICs on your system, type
ifconfig -a
-- Dru <[email protected]>
%
To see the output from when your computer started, run dmesg(8). If it has
been replaced with other messages, look at /var/run/dmesg.boot.
-- Francisco Reyes <[email protected]>
%
Want colour in your directory listings? Use "ls -G". "ls -F" is also useful,
and they can be combined as "ls -FG".
%
Want to find a specific port, just type the following under /usr/ports,
or one its subdirectories:
"make search name=<port-name>"
or
"make search key=<keyword>"
%
Want to know how many words, lines, or bytes are contained in a file? Type
"wc filename".
-- Dru <[email protected]>
%
Want to see how much virtual memory you're using? Just type "swapinfo" to
be shown information about the usage of your swap partitions.
%
Want to strip UTF-8 BOM(Byte Order Mark) from given files?
sed -e '1s/^\xef\xbb\xbf//' < bomfile > newfile
%
Want to use sed(1) to edit a file in place? Well, to replace every 'e' with
an 'o', in a file named 'foo', you can do:
sed -i.bak s/e/o/g foo
And you'll get a backup of the original in a file named 'foo.bak', but if you
want no backup:
sed -i '' s/e/o/g foo
%
When you've made modifications to a file in vi(1) and then find that
you can't write it, type ``<ESC>!rm -f %'' then ``:w!'' to force the
write
This won't work if you don't have write permissions to the directory
and probably won't be suitable if you're editing through a symbolic link.
%
You can adjust the volume of various parts of the sound system in your
computer by typing 'mixer <type> <volume>'. To get a list of what you can
adjust, just type 'mixer'.
%
You can automatically download and install binary packages by doing
pkg_add -r <URL>
where you replace <URL> with the URL to the package. This will also
automatically install the packages the package you download is dependent on
(ie, the packages it needs in order to work.)
%
You can change the video mode on all consoles by adding something like
the following to /etc/rc.conf:
allscreens="80x30"
You can use "vidcontrol -i mode | grep T" for a list of supported text
modes.
-- Konstantinos Konstantinidis <[email protected]>
%
You can disable tcsh's terminal beep if you `set nobeep'.
%
You can get a good generic server install by using the
instant-server port/package. If you have ports installed, you can
install it by doing
# cd /usr/ports/misc/instant-server
# make install && make clean
as root. This will install a collection of packages that is appropriate for
running a "generic" server.
%
You can get a good standard workstation install by using the
instant-workstation port/package. If you have ports installed, you can
install it by doing
# cd /usr/ports/misc/instant-workstation
# make install && make clean
as root. This will install a collection of packages that is convenient to
have on a workstation.
%
You can install extra packages for FreeBSD by using the ports system.
If you have installed it, you can download, compile, and install software by
just typing
# cd /usr/ports/<category>/<portname>
# make install && make clean
as root. The ports infrastructure will download the software, change it so
it works on FreeBSD, compile it, install it, register the installation so it
will be possible to automatically uninstall it, and clean out the temporary
working space it used. You can remove an installed port you decide you do not
want after all by typing
# cd /usr/ports/<category>/<portname>
# make deinstall
as root.
%
You can look through a file in a nice text-based interface by typing
less filename
%
You can make a log of your terminal session with script(1).
%
You can often get answers to your questions about FreeBSD by searching in the
FreeBSD mailing list archives at
http://www.FreeBSD.org/search/search.html
%
You can open up a new split-screen window in (n)vi with :N or :E and then
use ^w to switch between the two.
%
You can permanently set environment variables for your shell by putting them
in a startup file for the shell. The name of the startup file varies
depending on the shell - csh and tcsh uses .login, bash, sh, ksh and zsh use
.profile. When using bash, sh, ksh or zsh, don't forget to export the
variable.
%
You can press Ctrl-D to quickly exit from a shell, or logout from a
login shell.
-- Konstantinos Konstantinidis <[email protected]>
%
You can press up-arrow or down-arrow to walk through a list of
previous commands in tcsh.
%
You can search for documentation on a keyword by typing
apropos keyword
%
You can `set autologout = 30' to have tcsh log you off automatically
if you leave the shell idle for more than 30 minutes.
%
You can use aliases to decrease the amount of typing you need to do to get
commands you commonly use. Examples of fairly popular aliases include (in
@@ -151,66 +481,18 @@ In csh or tcsh, these would be
To remove an alias, you can usually use 'unalias aliasname'. To list all
aliases, you can usually type just 'alias'.
%
In order to support national characters for European languages in tools like
less without creating other nationalisation aspects, set the environment
variable LC_ALL to 'en_US.ISO8859-1'.
You can use /etc/make.conf to control the options used to compile software
on this system. Example entries are in
/usr/share/examples/etc/make.conf.
%
You can search for documentation on a keyword by typing
apropos keyword
You can use "pkg_info" to see a list of packages you have installed.
-- Konstantinos Konstantinidis <[email protected]>
%
Man pages are divided into section depending on topic. There are 9 different
sections numbered from 1 (General Commands) to 9 (Kernel Developer's Manual).
You can get an introduction to each topic by typing
You can use the 'fetch' command to retrieve files over ftp or http.
man <number> intro
fetch http://www.FreeBSD.org/index.html
In other words, to get the intro to general commands, type
man 1 intro
%
FreeBSD is started up by the program 'init'. The first thing init does when
starting multiuser mode (ie, starting the computer up for normal use) is to
run the shell script /etc/rc. By reading /etc/rc and the /etc/rc.d/ scripts,
you can learn a lot about how the system is put together, which again will
make you more confident about what happens when you do something with it.
%
If you want to play CDs with FreeBSD, a utility for this is already included.
Type 'cdcontrol' then 'help' to learn more. (You may need to set the CDROM
environment variable in order to make cdcontrol want to start.)
%
If you have a CD-ROM drive in your machine, you can make the CD-ROM that is
presently inserted available by typing 'mount /cdrom' as root. The CD-ROM
will be available under /cdrom/. Remember to do 'umount /cdrom' before
removing the CD-ROM (it will usually not be possible to remove the CD-ROM
without doing this.)
Note: This tip may not work in all configurations.
%
You can install extra packages for FreeBSD by using the ports system.
If you have installed it, you can download, compile, and install software by
just typing
# cd /usr/ports/<category>/<portname>
# make install && make clean
as root. The ports infrastructure will download the software, change it so
it works on FreeBSD, compile it, install it, register the installation so it
will be possible to automatically uninstall it, and clean out the temporary
working space it used. You can remove an installed port you decide you do not
want after all by typing
# cd /usr/ports/<category>/<portname>
# make deinstall
as root.
%
Nice bash prompt: PS1='(\[$(tput md)\]\t <\w>\[$(tput me)\]) $(echo $?) \$ '
-- Mathieu <[email protected]>
%
To see the output from when your computer started, run dmesg(8). If it has
been replaced with other messages, look at /var/run/dmesg.boot.
-- Francisco Reyes <[email protected]>
will download the front page of the FreeBSD web site.
%
You can use "whereis" to search standard binary, manual page and source
directories for the specified programs. This can be particularly handy
@@ -219,287 +501,3 @@ when you are trying to find where in the ports tree an application is.
Try "whereis netscape" and "whereis whereis".
-- Konstantinos Konstantinidis <[email protected]>
%
You can press Ctrl-D to quickly exit from a shell, or logout from a
login shell.
-- Konstantinos Konstantinidis <[email protected]>
%
You can use "pkg_info" to see a list of packages you have installed.
-- Konstantinos Konstantinidis <[email protected]>
%
You can change the video mode on all consoles by adding something like
the following to /etc/rc.conf:
allscreens="80x30"
You can use "vidcontrol -i mode | grep T" for a list of supported text
modes.
-- Konstantinos Konstantinidis <[email protected]>
%
Any user that is a member of the wheel group can use "su -" to simulate
a root login. You can add a user to the wheel group by editing /etc/group.
-- Konstantinos Konstantinidis <[email protected]>
%
Over quota? "du -s * | sort -n " will give you a sorted list of your
directory sizes.
-- David Scheidt <[email protected]>
%
Handy bash(1) prompt: PS1="\u@\h \w \!$ "
-- David Scheidt <[email protected]>
%
Ever wonder what those numbers after command names were, as in cat(1)? It's
the section of the manual the man page is in. "man man" will tell you more.
-- David Scheidt <[email protected]>
%
"man hier" will explain the way FreeBSD filesystems are normally laid out.
-- David Scheidt <[email protected]>
%
"man tuning" gives some tips how to tune performance of your FreeBSD system.
-- David Scheidt <[email protected]>
%
"man firewall" will give advice for building a FreeBSD firewall
-- David Scheidt <[email protected]>
%
You can often get answers to your questions about FreeBSD by searching in the
FreeBSD mailing list archives at
http://www.freebsd.org/search/search.html
%
You can adjust the volume of various parts of the sound system in your
computer by typing 'mixer <type> <volume>'. To get a list of what you can
adjust, just type 'mixer'.
%
You can automatically download and install binary packages by doing
pkg_add -r <URL>
where you replace <URL> with the URL to the package. This will also
automatically install the packages the package you download is dependent on
(ie, the packages it needs in order to work.)
%
You can get a good standard workstation install by using the
instant-workstation port/package. If you have ports installed, you can
install it by doing
# cd /usr/ports/misc/instant-workstation
# make install && make clean
as root. This will install a collection of packages that is convenient to
have on a workstation.
%
You can get a good generic server install by using the
instant-server port/package. If you have ports installed, you can
install it by doing
# cd /usr/ports/misc/instant-server
# make install && make clean
as root. This will install a collection of packages that is appropriate for
running a "generic" server.
%
You can make a log of your terminal session with script(1).
%
"man ports" gives many useful hints about installing FreeBSD ports.
%
"man security" gives very good advice on how to tune the security of your
FreeBSD system.
%
Want to find a specific port, just type the following under /usr/ports,
or one its subdirectories:
"make search name=<port-name>"
or
"make search key=<keyword>"
%
Want to see how much virtual memory you're using? Just type "swapinfo" to
be shown information about the usage of your swap partitions.
%
ports/net/netcat port is useful not only for redirecting input/output
to TCP or UDP connections, but also for proxying them with inetd(8).
%
If other operating systems have damaged your Master Boot Record, you can
reinstall it either with /usr/sbin/sysinstall or with boot0cfg(8). See
"man boot0cfg" for details.
%
Need to see the calendar for this month? Simply type "cal". To see the
whole year, type "cal -y".
-- Dru <[email protected]>
%
Need to quickly return to your home directory? Type "cd".
-- Dru <[email protected]>
%
To see the last time that you logged in, use lastlogin(8).
-- Dru <[email protected]>
%
To clear the screen, use "clear". To re-display your screen buffer, press
the scroll lock key and use your page up button. When you're finished,
press the scroll lock key again to get your prompt back.
-- Dru <[email protected]>
%
To save disk space in your home directory, compress files you rarely
use with "gzip filename".
-- Dru <[email protected]>
%
To read a compressed file without having to first uncompress it, use
"zcat" or "zmore" to view it.
-- Dru <[email protected]>
%
To see how much disk space is left on your partitions, use
df -h
-- Dru <[email protected]>
%
To see the 10 largest files on a directory or partition, use
du /partition_or_directory_name | sort -rn | head
-- Dru <[email protected]>
%
To determine whether a file is a text file, executable, or some other type
of file, use
file filename
-- Dru <[email protected]>
%
Time to change your password? Type "passwd" and follow the prompts.
-- Dru <[email protected]>
%
Want to know how many words, lines, or bytes are contained in a file? Type
"wc filename".
-- Dru <[email protected]>
%
Need to print a manpage? Use
man name_of_manpage | col -bx | lpr
-- Dru <[email protected]>
%
Need to remove all those ^M characters from a DOS file? Try
tr -d \\r < dosfile > newfile
-- Originally by Dru <[email protected]>
%
Forget what directory you are in? Type "pwd".
-- Dru <[email protected]>
%
If you are in the C shell and have just installed a new program, you won't
be able to run it unless you first type "rehash".
-- Dru <[email protected]>
%
Need to leave your terminal for a few minutes and don't want to logout?
Use "lock -p". When you return, use your password as the key to unlock the
terminal.
-- Dru <[email protected]>
%
Need to find the location of a program? Use "locate program_name".
-- Dru <[email protected]>
%
Forget how to spell a word or a variation of a word? Use
look portion_of_word_you_know
-- Dru <[email protected]>
%
To see the last 10 lines of a long file, use "tail filename". To see the
first 10 lines, use "head filename".
-- Dru <[email protected]>
%
To see how long it takes a command to run, type the word "time" before the
command name.
-- Dru <[email protected]>
%
To quickly create an empty file, use "touch filename".
-- Dru <[email protected]>
%
To find out the hostname associated with an IP address, use
dig -x IP_address
-- Dru <[email protected]>
%
If you use the C shell, add the following line to the .cshrc file in your
home directory to prevent core files from being written to disk:
limit coredumpsize 0
-- Dru <[email protected]>
%
If you need a reminder to leave your terminal, type "leave +hhmm" where
"hhmm" represents in how many hours and minutes you need to leave.
-- Dru <[email protected]>
%
Need to do a search in a manpage or in a file you've sent to a pager? Use
"/search_word". To repeat the same search, type "n" for next.
-- Dru <[email protected]>
%
Forget when Easter is? Try "ncal -e". If you need the date for Orthodox
Easter, use "ncal -o" instead.
-- Dru <[email protected]>
%
Need to see your routing table? Type "netstat -rn". The entry with the G
flag is your gateway.
-- Dru <[email protected]>
%
Need to see which daemons are listening for connection requests? Use
"sockstat -4l" for IPv4, and "sockstat -l" for IPv4 and IPv6.
-- Dru <[email protected]>
%
Can't remember if you've installed a certain port or not? Try "pkg_info
-Ix port_name".
%
To erase a line you've written at the command prompt, use "Ctrl-U".
-- Dru <[email protected]>
%
To repeat the last command in the C shell, type "!!".
-- Dru <[email protected]>
%
Need to quickly empty a file? Use ": > filename".
-- Dru <[email protected]>
%
To see all of the directories on your FreeBSD system, type
ls -R / | more
-- Dru <[email protected]>
%
To see the IP addresses currently set on your active interfaces, type
"ifconfig -u".
-- Dru <[email protected]>
%
To see the MAC addresses of the NICs on your system, type
ifconfig -a
-- Dru <[email protected]>
%
You can open up a new split-screen window in (n)vi with :N or :E and then
use ^w to switch between the two.
%
sh (the default Bourne shell in FreeBSD) supports command-line editing. Just
``set -o emacs'' or ``set -o vi'' to enable it.
%
When you've made modifications to a file in vi(1) and then find that
you can't write it, type ``<ESC>!rm -f %'' then ``:w!'' to force the
write
This won't work if you don't have write permissions to the directory
and probably won't be suitable if you're editing through a symbolic link.
%
If you want to quickly check for duplicate package/port installations,
try the following pkg_info command.
pkg_info | sort | sed -e 's/-[0-9].*$//' | \
uniq -c | grep -v '^[[:space:]]*1'
%
Want to use sed(1) to edit a file in place? Well, to replace every 'e' with
an 'o', in a file named 'foo', you can do:
sed -i.bak s/e/o/g foo
And you'll get a backup of the original in a file named 'foo.bak', but if you
want no backup:
sed -i '' s/e/o/g foo
%
To obtain a neat PostScript rendering of a manual page, use ``-t'' switch
of the man(1) utility: ``man -t <topic>''. For example:
man -t grep > grep.ps # Save the PostScript version to a file
or
man -t printf | lp # Send the PostScript directly to printer
%
Want to strip UTF-8 BOM(Byte Order Mark) from given files?
sed -e '1s/^\xef\xbb\xbf//' < bomfile > newfile
+88
View File
@@ -0,0 +1,88 @@
# $FreeBSD$
aliasname
allscreens
AUTH
autolist
autologout
BLOCKSIZE
bomfile
cdcontrol
cdrom
CDs
cfg
conf
coredumpsize
csh
cshrc
Ctrl
deinstall
dmesg
dosfile
dscheidt
duth
ESC
filec
FreeBSD
grep
gzip
hiltonbsd
html
http
ifconfig
inetd
init
interactionvirtuelle
IPv
istar
kkonstan
Konstantinidis
ksh
lastlogin
lpr
manpage
mathieu
misc
natserv
ncal
netcat
netscape
netstat
newfile
NICs
nobeep
nospam
org
passwd
pkg
portname
PostScript
printf
proxying
PS
pwd
Reyes
sbin
Scheidt
setenv
sockstat
swapinfo
sysinstall
tcsh
tcsh's
tput
tumbolia
UDP
umount
unalias
uninstall
uniq
username
usr
UTF
vidcontrol
whereis
www
xset
zcat
zmore
zsh
+45 -93
View File
@@ -1,4 +1,5 @@
%% $FreeBSD$
%
A bad little girl in Madrid,
A most reprehensible kid,
Told her Tante Louise
@@ -148,13 +149,6 @@ Had a rather tough bug in its core.
And spewed yards and yards
Of illegible tape on the floor.
%
A computer, to print out a fact,
Will divide, multiply, and subtract.
But this output can be
No more than debris,
If the input was short of exact.
-- Gigo
%
A contortionist hailing from Lynch
Used to rent out his tool by the inch.
A foot cost a quid --
@@ -315,13 +309,13 @@ By bleeding all over his face.
A gay young prince from Morocco
Made love in a manner rococco.
He painted his penis
To resemble a venus
To resemble a Venus
And flavored his semen with cocoa.
%
A geneticist living in Delft
Scientifically played with himself,
And when he was done
He labled it: son,
He labeled it: son,
And filed him away on a shelf.
%
A gentleman, otherwise meek,
@@ -420,7 +414,7 @@ He couldn't get out with ESC.
A hacker-turned-pervert named Fisk
Made love to the drive of his disk.
The thing circumsized him,
Which rather suprised him.
Which rather surprised him.
He wasn't aware of *that* risk.
%
A handsome young rodent named Gratian
@@ -602,12 +596,6 @@ Used to catch all the harlots and jail 'em.
He would stand them in line,
With his common-law tool to impale 'em.
%
A limerick packs laughs anatomical
Into space that is quite economical.
But the good ones I've seen
So seldom are clean,
And the clean ones so seldom are comical.
%
A linguist thought it a farce
That memory space was so sparse.
One day they increased it.
@@ -687,7 +675,7 @@ Got a doctor to alter his dong.
When he got there he found he was wrong.
%
A mathematician named Hall
Had a hexhedronical ball,
Had a hexahedronical ball,
And the square of its weight
Times his pecker's, plus eight,
Was four-fifths of five-eighths of fuck-all.
@@ -699,7 +687,7 @@ Has a hexahedronical ball,
Is his phone number -- give him a call...
%
A mathematician named Klein
Thought the Mobius band was divine.
Thought the Moebius band was divine.
Said he, "If you glue
The edges of two,
You'll get a weird bottle like mine!
@@ -777,12 +765,6 @@ Tied her infantine charge to a kite;
And watched till it flew out of sight.
-- Edward Gorey
%
A pansy who lived in Khartoum
Took a lesbian up to his room.
They argued all night
Over who had the right
To do what, with which, and to whom.
%
A passionate red-haired girl
When you kissed her, her senses would whirl,
And her twat would get wet,
@@ -995,10 +977,10 @@ But I hope -- yes I do -- that I marry
As the kind that you zoo-keepers carry."
%
A spunky young schoolboy named Fred
Used totoss off each night while in bed.
Used to toss off each night while in bed.
Said his mother, "Dear lad,
That's exceedingly bad--
Jump in here with your mamma instead."
Jump in here with your mama instead."
%
A starship commander named Kirk
Emerged from his cabin berserk.
@@ -1049,7 +1031,7 @@ Called the umpire blind out of malice.
And a girl in the bleachers named Alice.
%
A teenage protester named Lil
Cried, "Those watergate spies make me ill
Cried, "Those Watergate spies make me ill
First they bugged our martinis,
Our bras and bikinis,
And now they are bugging the pill."
@@ -1229,7 +1211,7 @@ A young maiden from France was no prude,
She decided to dive in the nude,
But her buddy, behind,
Went out of his mind,
When he noticed where she was tatooed.
When he noticed where she was tattooed.
%
A young man by a girl was desired
To give her the thrills she required,
@@ -1276,17 +1258,11 @@ Tore a hole in his sister's best lingerie.
To add incest to insult and injury.
%
A young polo-player of Berkeley
Made love to his sweetheart beserkly.
Made love to his sweetheart berserkly.
In the midst of each chukker
He would break off and fuck her
Horizontally, laterally and verkeley.
%
A young violinist from Rio
Was seducing a woman named Cleo.
As she took down her panties
She said, "No andantes;
I want this allegro con brio!"
%
A young wife in the outskirts of Reims
Preferred frigging to going to mass.
Said her husband, "Take Jacques,
@@ -1363,7 +1339,7 @@ An ardent young man named Magruder
Once wooed a girl nude in Bermuda.
She thought it quite lewd
To be wooed in the nude,
But magruder was shrewder, he screwed her.
But Magruder was shrewder, he screwed her.
%
An Argentine gaucho named Bruno
Who said, "Fucking is one thing I do know.
@@ -1395,6 +1371,12 @@ Once buggered a VAX Unibus.
But not the young lad
(Except for the toupee and truss).
%
An earnest young woman in Thrace
Said, "Darling, that's not the right place!"
So he gave her a thwack,
And did on her back,
What he couldn't have done face to face.
%
An Edwardian father named Udgeon,
Whose offspring provoked him to dudgeon,
Used on Saturday nights
@@ -1447,7 +1429,7 @@ Made a synthetic ass for a friend,
It was simply a bother -- no end.
%
An innocent maiden named Herridge
Was cruelly tricked ito marriage;
Was cruelly tricked into marriage;
When she later found out
What her spouse was about,
She threw herself under a carriage.
@@ -1520,12 +1502,6 @@ Who valued her morals too dearly
Only once every year,
And she strained her vagina severely.
%
An earnest young woman in Thrace
Said, "Darling, that's not the right place!"
So he gave her a thwack,
And did on her back,
What he couldn't have done face to face.
%
And then there's the story that's fraught
With disaster -- of balls that got caught,
When a chap took a crap
@@ -1715,12 +1691,6 @@ Discovered a marvelous fossil.
And the knot on the end,
T'was the penis of Paul the Apostle.
%
There was a young man from the Coast
Who had an affair with a ghost.
At the height of orgasm
Said the pallid phantasm,
"I think I can feel it -- almost!"
%
There once was a bishop from Birmingham
Who deflowered young girls while confirming 'em.
As they knelt on the hassock
@@ -1775,8 +1745,8 @@ Whose cunt was incredibly huge.
As he thunderously came:
"Mon Dieu! Apres moi, le deluge!"
%
There once was a fag of Khartoom
Who spent the night in a Lesbians room.
There once was a fag of Khartoum
Who spent the night in a Lesbian's room.
They argued all night,
Over who had the right,
To do what, and with which, and to whom.
@@ -1785,7 +1755,7 @@ There once was a fairy named Avers
Who encircled his cock with lifesavers.
Though buggers all claimed
That their asses were maimed,
Sixy-niners all cheered the new flavors.
Sixty-niners all cheered the new flavors.
%
There once was a fellow named Bob
Who in sexual ways was a snob.
@@ -1821,7 +1791,7 @@ There once was a fencer named Fisk,
Whose speed was incredibly brisk.
So fast was his action,
The Fitzgerald contraction,
Foreshortended his foil to a disk.
Foreshortened his foil to a disk.
%
There once was a fiesty young terrier
Who liked to bite girls on the derriere.
@@ -1986,7 +1956,7 @@ Fell in love with a virile young Tartar.
And cried: "For that I'll be a martyr!"
%
There once was a lady named Clair,
Who posessed a magnificent pair.
Who possessed a magnificent pair.
Or that's what I thought,
Till I saw one get caught,
On a thorn and begin losing air.
@@ -2035,12 +2005,6 @@ Who always ate soup with a fork.
Either fish, foul or flesh,
I otherwise finish too quick."
%
There once was a man from Exameter
Who had a prodigious diameter
But it wasn't the size
That brought forth the cries
'Twas his rythm, iambic pentameter.
%
There once was a man from Nantucket
Who kept all his cash in a bucket.
His daughter, named Nan,
@@ -2077,12 +2041,6 @@ Who could put it up to her kidney.
Put it up to her neck;
He had a big one, now didn't he?
%
There once was a man named Lodge,
who had seatbelts installed in his Dodge.
When his date was strapped in,
He committed a sin,
without ever leaving the garage.
%
There once was a man named McGruder,
Who canoed with a girl in Bermuder.
But the girl thought it crude,
@@ -2169,8 +2127,8 @@ Or a breeches-buoy swung from the masthead.
%
There once was a Scot named McAmeter
With a tool of prodigious diameter.
It was not the size
That cause such surprise;
But it wasn't the size
That caused such surprise;
'Twas his rhythm -- iambic pentameter.
%
There once was a son-of-a-bitch,
@@ -2292,7 +2250,7 @@ Who'd a really enormous vagina,
And used it for docking a liner.
%
There was a fat man from Rangoon
Whose prick was much like a ballon.
Whose prick was much like a balloon.
He tried hard to ride her
And when finally inside her
She thought she was pregnant too soon.
@@ -2706,12 +2664,6 @@ Was prodigiously massive and long.
Two testes did hang
That attracted a curious throng.
%
There was a young gaucho named Bruno
Who said, "Screwing is one thing I do know.
A woman is fine,
And a sheep is divine,
But a llama is Numero Uno."
%
There was a young German named Ringer
Who was screwing an opera singer.
Said he with a grin,
@@ -3075,7 +3027,7 @@ Whose screams could be heard for a block away.
Cried, "God! I have cut his whole cock away!"
%
There was a young lad from Siam,
Whose sexlife was caught in a jam.
Whose sex life was caught in a jam.
He loved them real small,
'Cause they're funner to ball,
So he went out and bought him a lamb!
@@ -3183,8 +3135,8 @@ Lodged tight in her hole so it seems.
There was a young lady from Rio
Who slept with the Fornier trio.
As she dropped her panties
She said, "No andanties
I want this allegro con brio."
She said, "No andantes,
I want this allegro con brio!"
%
There was a young lady from Siam
Who said to her lover, one Kiam,
@@ -3300,12 +3252,6 @@ Who said, "I think skating's a bliss"
For a wheel off her skate
.siht ekil gnihtemos pu hsinif reh edaM
%
There was a young lady named Clair
Who possessed a magnificent pair;
At least so I thought
Till I saw one get caught
On a thorn, and begin losing air.
%
There was a young lady named Dot
Whose cunt was so terribly hot
That ten bishops of Rome
@@ -3393,7 +3339,7 @@ But if you got her alone, Oh God!
%
There was a young lady named May
Who strolled in a park by the way,
And she met a youg man
And she met a young man
Who fucked her and ran --
Now she goes to the park every day.
%
@@ -3521,7 +3467,7 @@ I much prefer fucking to feeling."
There was a young lady of fashion
Who had oodles and oodles of passion.
To her lover she said,
As they climbed into bed,
As they climbed into bed,
"Here's one thing the bastards can't ration!"
%
There was a young lady of Fez
@@ -3627,7 +3573,7 @@ As her bridegroom got into the bed,
You can get up my bottom instead."
%
There was a young lady whose cunt
Could accomodate a small punt.
Could accommodate a small punt.
Her mother said, "Annie,
It matches your fanny,
Which never was that of a runt."
@@ -3818,6 +3764,12 @@ Who boasted so torrid a tool
Explored by this satyr
Seemed almost unpleasantly cool.
%
There was a young man from the Coast
Who had an affair with a ghost.
At the height of orgasm
Said the pallid phantasm,
"I think I can feel it -- almost!"
%
There was a young man from Tibet-
And this is the strangest one yet-
Whose tool was so long,
@@ -4206,7 +4158,7 @@ But alas! he was only a eunuch.
%
There was a young sportsman named Peel
Who went for a trip on his wheel;
He pedalled for days
He pedaled for days
Through crepuscular haze,
And returned feeling somewhat unreal.
-- Edward Gorey
@@ -4335,7 +4287,7 @@ Who would not pay a whore what he owed her.
And pissed in his whiskey-and-soda.
%
There was an old curate of Hestion
Who'd errect at the slightest suggestion.
Who'd erect at the slightest suggestion.
But so small was his tool
He could scarce screw a spool,
And a cunt was quite out of the question.
@@ -4522,7 +4474,7 @@ Who attempted an anthropoid ravish.
And the anthropoid ravished McTavish.
%
There was an old whore from Silesia
Who'd croke: "If my box doesn't please ya,
Who'd croak: "If my box doesn't please ya,
For a slight extra sum
You can go up my bum
But watchout or my tapeworm'll seize ya."
@@ -4737,7 +4689,7 @@ Fished, hidden in deep shore-grass,
Your sinkers -- they're banging my ass."
%
Two eager young men from Cawnpore
Once buggared and fucked the same whore.
Once buggered and fucked the same whore.
But her partition split
And the blood and the shit
Rolled out in a mess on the floor.
@@ -4785,7 +4737,7 @@ Who'd been bedded and banged in the palace,
She replied, "He's a jolly good phallus!"
%
When you fuck little Annie in Anza
You get a great bossom bonanza:
You get a great bosom bonanza:
Sucking Annie's soft tits
Makes her throw fifty fits,
And the fuck is a sextravaganza!
@@ -4821,7 +4773,7 @@ His model reclined on a ladder.
Suggested coition,
So he leapt up the ladder and had 'er.
%
While travelling in farthest Tibet,
While traveling in farthest Tibet,
Lord Irongate found cause to regret
The buttered-up tea,
A pain in his knee,
+463
View File
@@ -0,0 +1,463 @@
# $FreeBSD$
abbess's
Abercrombie
Aberystwyth
acrost
Aden
Ades
Alsace
altera
Amphigorey
anatomies
andantes
Annie's
Annista
Antigua
Anza
Apres
archeologist
Arden
ARPAnaut
arsehole
astonishment's
Asturias
Attila
ausgefuckt
Azores
backsides
ballocks
Baroda
Bartholin
Batonger
Baugh
Bavel
beabrve
Beaconsfield
beastial
Beaulieu
Beever
belican
Benares
Bergere
Bermuder
berserkly
bettera
Bicester
Bingly
Bloch
Blott
Blount
Bluth
boffed
bologna
Bonaire
boney
Breerley
bridegroom's
Brienz
Brighton
Brillo
brio
Bronix
Bruckner
Bruges
Buckingham
Bude
bull's
busiasm
bustles
Byrd
Cah'lina
Cajon
callgirl
Camyre
cannie
Carmia
Carranza's
Carruthers
Castellamare
Cawnpore
cervixes
chanties
Charteris
Cheadle
Cheddar
Chichester
Chichester's
circumsized
Ciss
clarum
clergyman's
Clews
Clombe
Coblenz
cocksucking
coish
Condover
coxing
Coxsaxie
creame
Crewe
crewmates
Cribbs
crusader's
curat
d'hotel
d'Isere
d'oeuvres
Daguerrodargue
Decatur
deflowered
deflowers
Detroit
detumesced
Devizes
Dieu
dillie
disait
Dispar
dooflicker
doric
Drambuie
draymen
dribblings
Drumrig
duck's
Duddee
Dumfries
Dundee
Dunoon
duply
Durand
Durcan
Ealing
eastertide
edaM
eighths
ekil
elihW
Ells
epousetta
erat
Ermintrude's
Eroticon
ESC
Esser
Eton
exige
eyesight's
Fabia
faggot
faire
fanny
fart
farta
farted
farter
farting
farts
fecerat
Feeney
fellatrix
fellatrix's
Fenner
Fennis
festooned
festoons
fidgital
fiesty
Fleager
floozie
Folies
foreskins
Forgeteth
Fornier
frigged
frigger
frigging
fritz
fuckener
fucking'em
Fuckoscope
fuckstress
fuddled
Fyfe
Gamahuchee
Gasted
gaucho
gawked
Gaza
geminarum
Glengozzle
gnihtemos
gniyl
Gomorrah
goosey
gooster
Gorey
Gratian
Gression
guerre
Hank's
Harper's
Harwich
helican
Herridge
Herts
Hestion
hetera
Heuser
hexahedronical
hexed
hsinif
huic
Huxham
Hyde
hymen's
Ickes
Ignatious
iguanas
IIE
Illiac
intacto
interflex
Irongate
itchez
jello
Jodhpur
Johore
joile
Kew
Kewry
Khartoum
Kiam
Kilkenny
Kimble
Kissen
Kornbluth
Kotex
Kroll
Kutki
lacklustre
Lahore
Lancelot
laundress
Leeds
Lefebrve
Lesbian's
lifesavers
lilly
Lizes
llamas
Llanfairpwllgwyngyll
LLewellyn
Longet
looky
Lorentz
lovemaking
Lowe
LSD
Luntz
lusus
Mable
MacDougall
Magnifique
Mais
Maitre
Mam'selle
Manchukuo
Mandel
Manhasset
mari
Maurier
maxi
Mayence
McAmeter
McFee
Mcgoffin
McGru
McGruder
McMeanus
McSweeny
McTavish
meanie
meanies
meany
mentis
midgets
minimis
missin
misspent
Moebius
moi
moister
mole's
Mons
Moxie
muckener
n'est
Natches
naturae
navel's
Nemetia
nighty
nihili
niners
Noah's
Norte
nuki
nutless
O'Clare
O'Doole
O'Malley
obbligatos
octagenerian
organed
orter
Ostend
oversexed
Paloma
papooses
paree
Parridge
patchez
pecker's
peckers
peedle
peeholes
peenies
pees
Penzance
pink'un
pissin
Pitlochry
Pitts
plaudits
pleasure's
ploughman
Plunnery
port's
Pourtant
Priam
Pridgets
prodigical
pruntz
Pryne
Prynne
Quaffed
Quelle
question's
quibblings
quim
quimmy
quints
ravished
Reims
reknown
Resounded
retriebrve
Rhyll
rococco
rogered
Salinas
Sandem
savoir
Schmitz
scratchez
seatbelts
secours
secret's
sextravaganza
Shedd
shins
Shittlecock
shitty
shootin
shrewder
Siegel
siht
skating's
Slatey
Smokey
sneaux
sniffin
sophomore'd
spaceman
spikey
Spitzbergen
Sprotic
Spyder
Stamboul
Stillson
Streator
Strensall
strewed
stroda
Suki
Susiasm
Sweenies
Swoboda
T'was
Tagore
Tante
tapeworm'll
Terminus's
testicularum
thing's
Thrace
Thrums
Tiffan
tis
titted
titties
Tobruk
tooty
topsheet
tous
Trans
Trasket
trifurcated
triplici
trop
truckloads
trysts
Tunney
Tupper
Tupps
Twickenham
Twiss
Twould
Udgeon
Uhura
urgin's
Usenetter
vaginae
vaginoid
Vassar
Venerio
Ventry
verkeley
Vesuvial
Virginny
virgo
Vitalis
vobiscum
Vogel's
Voulait
wanna
Weaveth
weeney
Whatam
Whyte
Wimley
Wohunt
Wubley
Wylde
ylbatrofmoc
yontiff
Yoric
Yost
yourselfer
Zerubbabel
Zerubbabub
Zug
Loaded 100 of 341 files, more files were not shown because too many files have changed in this diff. Show more