dragonfly.git
4 years agoSync zoneinfo database with tzdata2009l from elsie.
Sascha Wildner [Tue, 18 Aug 2009 11:48:54 +0000 (13:48 +0200)]
Sync zoneinfo database with tzdata2009l from elsie.

africa:         8.22 -> 8.23
australasia:    8.11 -> 8.12

* africa: Egypt starts winter time on August 21.

* australasia: Add comment about the possibility of Samoa observing DST
      in 2009/2010.

4 years agoFix nasty bug in exec*() code that can crash the machine.
Matthew Dillon [Thu, 30 Jul 2009 18:33:36 +0000 (11:33 -0700)]
Fix nasty bug in exec*() code that can crash the machine.

Fix a case where the exec() would sometimes attempt to free a wild pointer,
placing it in the objcache and creating nasty kernel memory corruption.

Reported-by: Borislav Nikolov <none@venom.interbgc.com>
4 years agonrelease: don't mkdir bootstrap workdir
Simon Schubert [Thu, 11 Jun 2009 23:51:33 +0000 (01:51 +0200)]
nrelease: don't mkdir bootstrap workdir

The newer pkgsrc bootstraps don't seem to like it when their
workdir already exist, so simply don't create it.

4 years agoRepair rcenable(8) and rcdisable(8).
Sascha Wildner [Sun, 26 Jul 2009 21:39:27 +0000 (23:39 +0200)]
Repair rcenable(8) and rcdisable(8).

* rcenable(8) was not playing nicely with our three year old change to
  no longer depend on _enable being appended to rc variables for starting
  daemons etc. (i.e., foo_enable=yes and foo=yes both work).

* rcdisable(8) did not properly run rcstop(8) because that needs to be
  run when the variable is still set to 'yes' and not after it's been
  set to 'no'.

Noticed-by: phma on #dragonflybsd
4 years agoSync zoneinfo database with tz{code,data}2009k from elsie.
Sascha Wildner [Mon, 20 Jul 2009 23:19:53 +0000 (01:19 +0200)]
Sync zoneinfo database with tz{code,data}2009k from elsie.

africa:         8.21 -> 8.22
asia:           8.35 -> 8.36
europe:         8.21 -> 8.22
leapseconds:    8.8  -> 8.9

zic.c:          8.19 -> 8.20

From Arthur David Olson's comments:

* africa: Change Mauritius to reflect that the 2008-2009 DST experiment
      is not repeated (and to change end of DST in 2009 from 2:00
      standard time to 2:00 local time) (thanks to Steffen Thorsen).

* asia: Arbitrarily cut off Dhaka DST at end of 2009 (so that a POSIX-
      style time zone string can appear in the Dhaka binary file, and
      for the benefit of systems with old glibc reimplementations of
      the time zone library that don't handle permanent DST correctly).
      Note that another change will be needed once the real end date
      for DST in Dhaka is known.

* europe: Update URL for Directive 2000/84/EC on summer-time
      arrangements (thanks to Colin Watson and Ian Jackson).

* leapseconds: Change "no leap second" comment (no leap second at end
      of 2009).

* zic.c: Do not end a binary file with a POSIX-style time zone string
      for locations that end up in permanent DST (thanks to Andreas Schwab).

4 years agodma: correctly initialize error before delivering mail
Simon Schubert [Thu, 16 Jul 2009 09:54:44 +0000 (11:54 +0200)]
dma: correctly initialize error before delivering mail

error is used to return failure or success from deliver_remote().  However
error is also used before, so we have to make sure that it is initialized
to 0, else a previous (non-fatal) error could pull through, even if the
delivery was successful.

4 years agodma: always send EHLO after tls setup
Simon Schubert [Thu, 16 Jul 2009 09:30:10 +0000 (11:30 +0200)]
dma: always send EHLO after tls setup

We have to send EHLO even after a STARTTLS, so unconditionally send it
after connection/tls setup.

4 years agodma: prevent races from sharing fd between children
Simon Schubert [Thu, 9 Jul 2009 21:24:35 +0000 (23:24 +0200)]
dma: prevent races from sharing fd between children

On fork, fds are shared between children.  If two processes work on
different recipients, but on the same queue file, they might get
confused when the fd (and thus the offset) is shared.  Prevent this by
re-opening the queue file after fork.

Reported-by: Daniel Roethlisberger <daniel@roe.ch>
4 years agoMFC: fstest regression fixes - POSIX error codes.
Simon 'corecode' Schubert [Wed, 15 Jul 2009 14:04:42 +0000 (16:04 +0200)]
MFC: fstest regression fixes - POSIX error codes.

Partial MFC of d7c75c7a20590cab729c3d653aaa91a4960d6165:

Deal with most of the issues found by FreeBSD's fstest regression test:
    * Limit path components to 255 characters.  Return ENAMETOOLONG if
      the limit is exceeded.

    * Return EEXIST, EINVAL, and ENOTEMPTY as appropriate when the user
      attempts to create, delete, or rename "." or "..", instead of EINVAL.

    * Return EACCES if an attempt is made to open a file O_TRUNC without
      O_RDWR or O_WRONLY, instead of silently dropping the O_TRUNC.

    * Implement O_NOFOLLOW semantics generally instead of just with O_EXCL.

Not MFC'd:
    * Return EISDIR if an attempt is made to open a directory for writing,
      instead of EINVAL.

This is required so that /usr/bin/tar can extract to an existing
directory:

tar cf - . | (cd otherdir && tar xof -)

failed before (breaking nrelease).

4 years agoisdnd(8): Fix some NULL dereferences.
Sascha Wildner [Wed, 15 Jul 2009 10:45:22 +0000 (12:45 +0200)]
isdnd(8): Fix some NULL dereferences.

Taken-from: FreeBSD

4 years agotelnetd: Fix a bug (really use the return value of tty_istrapsig()).
Sascha Wildner [Mon, 13 Jul 2009 22:15:11 +0000 (00:15 +0200)]
telnetd: Fix a bug (really use the return value of tty_istrapsig()).

4 years agoDDB - Do not generate endless stream of CRs if console not attached
Matthew Dillon [Mon, 8 Jun 2009 19:31:44 +0000 (12:31 -0700)]
DDB - Do not generate endless stream of CRs if console not attached

If we get a console EOF do not just generate an endless stream of
CR's.  Just hang in the loop for now.

4 years agoSync zoneinfo database with tzdata2009j from elsie.
Sascha Wildner [Thu, 18 Jun 2009 13:39:50 +0000 (15:39 +0200)]
Sync zoneinfo database with tzdata2009j from elsie.

asia:           8.34 -> 8.35

As Bangladesh's start of DST on June 19 is now official, simplify the
last change.

4 years agoRemove trailing whitespace.
Sascha Wildner [Thu, 18 Jun 2009 13:38:24 +0000 (15:38 +0200)]
Remove trailing whitespace.

4 years agoSync zoneinfo database with tzdata2009i from elsie.
Sascha Wildner [Mon, 8 Jun 2009 13:43:03 +0000 (15:43 +0200)]
Sync zoneinfo database with tzdata2009i from elsie.

asia:           8.32 -> 8.34

Bangladesh will introduce DST starting June 20.

4 years agoSync zoneinfo database with tzdata2009h from elsie.
Sascha Wildner [Tue, 26 May 2009 23:07:04 +0000 (01:07 +0200)]
Sync zoneinfo database with tzdata2009h from elsie.

README:         8.2  -> 8.3
Theory:         8.2  -> 8.3
africa:         8.19 -> 8.21
antarctica:     8.4  -> 8.5
asia:           8.30 -> 8.32
australasia:    8.9  -> 8.11
backward:       8.7  -> 8.8
etcetera:       8.1  -> 8.2
europe:         8.20 -> 8.21
factory:        8.1  -> 8.2
iso3166.tab:    8.5  -> 8.6
leapseconds:    8.7  -> 8.8
northamerica:   8.27 -> 8.28
southamerica:   8.34 -> 8.36
systemv:        8.1  -> 8.2
zone.tab:       8.26 -> 8.28

From Arthur David Olson's comments:

* "Public domain" statements are added to a number of files.

* Instances of "=3D" are changed to "=" in the "africa"
  and "southamerica" files.

* The start of DST in Jordan from 2002 forward is changed from
  0:00 on the last Friday of the month to 24:00 on the last Thursday.

* Four sets of latitute/longitude are corrected in the "zone.tab" file
  (with thanks to Marc Wick).

* Commentary is added to the "australasia" file regarding DST in
  South Australia (no changes to the rules).

4 years agoaac(4): Functions called on the interrupt processing code path is not MPSAFE
Sepherosa Ziehau [Wed, 20 May 2009 13:18:17 +0000 (21:18 +0800)]
aac(4): Functions called on the interrupt processing code path is not MPSAFE
yet, so don't mark its interrupt handler MPSAFE.

Reported-and-tested-by: Archimedes Gaviola <archimedes.gaviola@gmail.com>
4 years agoaac(4): Break out of the loop, if the command could not be sent.
Sepherosa Ziehau [Tue, 19 May 2009 10:40:06 +0000 (18:40 +0800)]
aac(4): Break out of the loop, if the command could not be sent.

4 years agonewvers.sh: Take the src/ dir as an argument instead of hard coding it.
Sascha Wildner [Tue, 19 May 2009 14:04:12 +0000 (16:04 +0200)]
newvers.sh: Take the src/ dir as an argument instead of hard coding it.

This fixes the issue where the last number in our version was included
only if /usr/src was present at build time, which resulted in different
output of uname -r, sysctl kern.{osrelease,version}, etc. across
different systems (e.g. "2.3.1-DEVELOPMENT" vs. "2.3-DEVELOPMENT").

This commit also removes the passing of ${KERN_IDENT} and ${IDENT} to
newvers.sh (both of which are not used by it) and performs some
additional cleanup.

Brought-to-my-attention-by: Antonio Huete Jimenez <ahuete.devel@gmail.com>
Reviewed-by: dillon
4 years agoaacvar.h: Fix typo in AAC_ON_AACQ_MASK.
Sascha Wildner [Mon, 18 May 2009 20:03:57 +0000 (22:03 +0200)]
aacvar.h: Fix typo in AAC_ON_AACQ_MASK.

4 years agoBump to 2.2.2 for HAMMER security fixes.
Matthew Dillon [Mon, 4 May 2009 06:49:49 +0000 (23:49 -0700)]
Bump to 2.2.2 for HAMMER security fixes.

4 years agoThe kernel permissions check code was not checking deletability for
Matthew Dillon [Mon, 4 May 2009 06:08:19 +0000 (23:08 -0700)]
The kernel permissions check code was not checking deletability for
the rename source or the directory sticky bit for rename targets which
existed.

This only effected HAMMER which assumes the kernel is responsible for
permissions checks.

Reported-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
4 years agoFix sticky bit directory handling for deletions.
Matthew Dillon [Sat, 2 May 2009 17:49:58 +0000 (10:49 -0700)]
Fix sticky bit directory handling for deletions.

Properly check the sticky bit and disallow deletions if set on a directory
and the user doing the deletion does not own the directory or the file.

This check is now being done by the kernel layer, VFSs do not need to do
this check any more.

Reported-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
4 years agoFix permissions check for utimes() - owner can call even if u-w.
Matt Dillon [Thu, 2 Apr 2009 03:56:49 +0000 (03:56 +0000)]
Fix permissions check for utimes() - owner can call even if u-w.

The owner of a file can call utimes() to modify the file's access and
modified times even if the file is not user-writable.  Add a VOWN test
for VOP_ACCESS() / naccess() which performs this check.

As far as I know only kern_utimes() needs to use this particular type
of test.

This also fixes issues with cp -p and a few other programs.

Reported-by: Johannes Hofmann <johannes.hofmann@gmx.de>
4 years agoHAMMER VFS - Fix improper cred checks for utimes()
Matthew Dillon [Sat, 28 Feb 2009 23:30:30 +0000 (15:30 -0800)]
HAMMER VFS - Fix improper cred checks for utimes()

Adjust the kern_utimes() code in the kernel to check for write permissions
prior to diving into the VFS.  UFS checks for write perms but HAMMER doesn't.
Generally speaking we want (at least for now) the kernel to do as much of
these checks as possible.

Reported-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
4 years agonanosleep: don't overwrite error with copyout success status
Simon Schubert [Sun, 3 May 2009 21:06:53 +0000 (23:06 +0200)]
nanosleep: don't overwrite error with copyout success status

When nanosleep gets interrupted, it returns EINTR.  In the case of a
non-zero error status, sys_nanosleep will copyout() the remaining sleep
time.  However it would overwrite the nanosleep error status with the
error status of copyout() -- which is 0 (success) most of the time.  This
means the important error status of nanosleep (EINTR) would be overwritten
by 0.  Follow FreeBSD and NetBSD and only return the copyout status if it
failed.

Reported-by: walt
4 years agoinstaller: Deactivate "Install extra software packages" option.
Sascha Wildner [Sun, 3 May 2009 08:51:40 +0000 (10:51 +0200)]
installer: Deactivate "Install extra software packages" option.

Our installation unconditionally cpdups the CD/DVD's /usr/pkg to the
disk so this option doesn't make sense and only confused people in the
past.

Leave "Remove software packages" in, though, since it actually seems to
work.

4 years agoinstaller: Fix various issues related to MFS backed partitions.
Sascha Wildner [Sun, 3 May 2009 07:25:44 +0000 (09:25 +0200)]
installer: Fix various issues related to MFS backed partitions.

* The size of the MFS should be what the user specified, and not be
  based on slice size.

* On the fstab line, specify block and fragment size too. Softupdates
  is ignored as it doesn't seem to play nice with MFS.

* MFS backed partitions don't need to be mounted at installation time
  but the mount points have to be created anyway.

* While here, perform some minor cleanup.

4 years agoinstaller: Fix typo that prevented the creation of MFS backed partitions.
Sascha Wildner [Sat, 2 May 2009 20:42:08 +0000 (22:42 +0200)]
installer: Fix typo that prevented the creation of MFS backed partitions.

A bit late, but it was hard to spot. :)

Reported-by: Alec Berryman <alec@thened.net>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue34>

4 years agoMFC - Fix short allocation in libc RTLD for static-compiled programs.
Matthew Dillon [Tue, 28 Apr 2009 23:49:30 +0000 (16:49 -0700)]
MFC - Fix short allocation in libc RTLD for static-compiled programs.

4 years agoMFC - CPDUP - Fix lack of error reporting if created target directory cannot stat.
Matthew Dillon [Fri, 17 Apr 2009 21:08:31 +0000 (14:08 -0700)]
MFC - CPDUP - Fix lack of error reporting if created target directory cannot stat.

Fix a lack of error reporting if a just-created target directory cannot
be stat()'ed or chown()'d.

4 years agoSync zoneinfo database with tzdata2009g from elsie.
Sascha Wildner [Mon, 27 Apr 2009 18:19:43 +0000 (20:19 +0200)]
Sync zoneinfo database with tzdata2009g from elsie.

africa:         8.18 -> 8.19

Due to Ramadan shifting through the Gregorian calendar it will end before
the fourth Thursday in September in 2009 and the next couple of years, so
Egypt is expected to end DST on the last Thursday in September.

4 years agoMFC - Fix recursive lock in detached close of /dev/tty. v2.2.1
Matthew Dillon [Sun, 26 Apr 2009 19:26:16 +0000 (12:26 -0700)]
MFC - Fix recursive lock in detached close of /dev/tty.

4 years agoBump to 2.2.1
Matthew Dillon [Sun, 26 Apr 2009 17:28:29 +0000 (10:28 -0700)]
Bump to 2.2.1

4 years agoMFC - Fix logic when using the umtx_*_err() functions.
Matthew Dillon [Thu, 23 Apr 2009 22:16:51 +0000 (15:16 -0700)]
MFC - Fix logic when using the umtx_*_err() functions.

4 years agoMFC - Add missing files from umtx errno fixes commit.
Matthew Dillon [Thu, 23 Apr 2009 19:14:30 +0000 (12:14 -0700)]
MFC - Add missing files from umtx errno fixes commit.

4 years agoMFC - Fix VM panic. Add required overflow check for MAP_STACK and MAP_FIXED mmaps
Matthew Dillon [Thu, 23 Apr 2009 18:54:47 +0000 (11:54 -0700)]
MFC - Fix VM panic.  Add required overflow check for MAP_STACK and MAP_FIXED mmaps

4 years agoMFC - Fix an errno leak in libthread_xu's calls to umtx.
Matthew Dillon [Thu, 23 Apr 2009 17:34:34 +0000 (10:34 -0700)]
MFC - Fix an errno leak in libthread_xu's calls to umtx.

4 years agoMFC - FreeBSD-SA-09:05.telnet - fix environment based code execution vulnerability
Matthew Dillon [Thu, 23 Apr 2009 00:57:21 +0000 (17:57 -0700)]
MFC - FreeBSD-SA-09:05.telnet - fix environment based code execution vulnerability

4 years agoMFC - Fix libthread_xu's use of MAP_STACK. Guards not being setup properly.
Matthew Dillon [Thu, 23 Apr 2009 20:05:24 +0000 (13:05 -0700)]
MFC - Fix libthread_xu's use of MAP_STACK.  Guards not being setup properly.

4 years agoMFC - Add cpdup feature - allow uid/gid/flags changes to fail if running as user
Matthew Dillon [Sat, 25 Apr 2009 18:39:45 +0000 (11:39 -0700)]
MFC - Add cpdup feature - allow uid/gid/flags changes to fail if running as user

4 years agoFix an installworld failure due to kernel fixes and a libthread_xu issue.
Matthew Dillon [Sat, 25 Apr 2009 17:36:03 +0000 (10:36 -0700)]
Fix an installworld failure due to kernel fixes and a libthread_xu issue.

Build the bootstrap version of cpdup without threading to work around a
bug in libthread_xu.  Libthread_xu was trying to map the original user
stack's red zone without using MAP_FIXED or MAP_TRYFIXED or MAP_STACK,
a behavior which the kernel now prohibits.

This fixes running installworld after rebooting with a new kernel.

Sepherosa Ziehau <sepherosa@gmail.com>

5 years agoHAMMER VFS: Add missing hammer_rel_volume() call in deadlock/retry case.
Matthew Dillon [Wed, 25 Feb 2009 18:39:42 +0000 (10:39 -0800)]
HAMMER VFS: Add missing hammer_rel_volume() call in deadlock/retry case.

A late collision in hammer_get_buffer() could result in a ref count leak
on a hammer_volume structure.  Fix the leak.

5 years agoenv(1): unbreak build of 2_2 release branch under HEAD
Stathis Kamperis [Tue, 21 Apr 2009 23:22:27 +0000 (23:22 +0000)]
env(1): unbreak build of 2_2 release branch under HEAD

The problem exhibits when running an old env(1), which is part of
the bootstrap tools of 2_2, in a host system with new libc/setenv(3).

When a "value=name" string is supplied to the old env(1), it doesn't
actually break it into 2 pieces (ie null terminate on '='). It just
creates two pointers, one pointing to the start of "value" and one
to the start of "name". These pointers are subsequently passed to
setenv(3). When new setenv(3) encounters the '=' character as part
of the "name", it fails with EINVAL. Which is exactly what it should
do, complying with the POSIX standard.

This patch has been tested and found to:
1) unbreak the build of 2_2 release branch under HEAD
2) not affect (i.e., break) the build of 2_2 under a 2.2 host system
3) not affect (i.e., break) the build of 2_2 under a 2.0 host system

5 years agomagic(3): Fix program name extraction from core dumps.
Sascha Wildner [Tue, 14 Apr 2009 22:44:25 +0000 (00:44 +0200)]
magic(3): Fix program name extraction from core dumps.

Remove trailing whitespace only instead of unconditionally removing the
last character from the program name (see comments).

Reported-by: hasso
Located-by: Eric J. Christeson
Taken-from:  FreeBSD's libmagic

5 years agoSync zoneinfo database with tzdata2009f from elsie.
Sascha Wildner [Mon, 13 Apr 2009 13:40:16 +0000 (15:40 +0200)]
Sync zoneinfo database with tzdata2009f from elsie.

asia:           8.29 -> 8.30

Pakistan will observe DST from April 15, 2009 instead of May 1 like
previously planned.

5 years agoi4b(4): Reorder includes slightly to silence some compilation warnings.
Sascha Wildner [Sun, 12 Apr 2009 16:22:27 +0000 (18:22 +0200)]
i4b(4): Reorder includes slightly to silence some compilation warnings.

5 years agoi4b(4): Initialize callout handles before first accessing them.
Sascha Wildner [Sun, 12 Apr 2009 09:54:46 +0000 (11:54 +0200)]
i4b(4): Initialize callout handles before first accessing them.

5 years agosppp(4): Properly initialize keepalive_timeout.
Sascha Wildner [Sun, 12 Apr 2009 09:02:59 +0000 (11:02 +0200)]
sppp(4): Properly initialize keepalive_timeout.

5 years agokdump: Add net/if_arp.h include
Thomas Nikolajsen [Sun, 12 Apr 2009 06:19:15 +0000 (08:19 +0200)]
kdump: Add net/if_arp.h include

Missing in 7a80e26d5284cff1a1ddbfa4098cf939e9569155

5 years agosln(4): Include <sys/param.h>
Sepherosa Ziehau [Sat, 11 Apr 2009 11:50:14 +0000 (19:50 +0800)]
sln(4): Include <sys/param.h>

5 years agoUnbreak GENERIC building
Sepherosa Ziehau [Sat, 11 Apr 2009 11:40:26 +0000 (19:40 +0800)]
Unbreak GENERIC building

5 years agonetgraph/i4b: sppp struct should start with arpcom, so netgraph could work
Sepherosa Ziehau [Sat, 11 Apr 2009 11:19:41 +0000 (19:19 +0800)]
netgraph/i4b: sppp struct should start with arpcom, so netgraph could work

Reported-by: swildner@
5 years agoSync zoneinfo database with tzdata2009e from elsie.
Sascha Wildner [Mon, 6 Apr 2009 13:43:12 +0000 (15:43 +0200)]
Sync zoneinfo database with tzdata2009e from elsie.

asia:           8.26 -> 8.29

* Jordan has been going to DST on the last Friday in March since 2002
  and not on the last Thursday.

* Palestine started DST midnight, March 26 and will end midnight,
  September 27.

5 years agoFix side-effect of a80e869f; -net 0.0.0.0 has been treated as 0.0.0.0/32.
YONETANI Tomokazu [Mon, 23 Feb 2009 14:35:04 +0000 (23:35 +0900)]
Fix side-effect of a80e869f; -net 0.0.0.0 has been treated as 0.0.0.0/32.
Also bring the rest of the relavant fix r187384 from FreeBSD.

5 years agoSync zoneinfo database with tzdata2009d from elsie.
Sascha Wildner [Tue, 24 Mar 2009 08:12:45 +0000 (09:12 +0100)]
Sync zoneinfo database with tzdata2009d from elsie.

africa:         8.17 -> 8.18
asia:           8.25 -> 8.26
southamerica:   8.33 -> 8.34

* Morocco will observe DST from June 1, 2009 0:00 to August 21, 2009 0:00

* Tunisia will not observe DST this year.

* Syria will start DST one week earlier this year (March 27, 0:00)

* San Luis, Argentina, decided to observe standard Argentine DST in the
  future.

5 years agoFix target machine define in compiler.
Hasso Tepper [Mon, 23 Mar 2009 12:21:37 +0000 (14:21 +0200)]
Fix target machine define in compiler.

Make(1) doesn't like "target" as a name for variable, seems.

5 years agopax(1): Fix WARNS regression
Sascha Wildner [Wed, 18 Mar 2009 10:30:53 +0000 (11:30 +0100)]
pax(1): Fix WARNS regression

5 years agoCreate destination on copy if it doesn't exists.
Hasso Tepper [Tue, 17 Mar 2009 14:41:03 +0000 (16:41 +0200)]
Create destination on copy if it doesn't exists.

Should conform to SUSv3 and fixes a lot of building failures in pkgsrc.

Digged-out-by: Alex Hornung
5 years agoSync zoneinfo database with tzdata2009c from elsie.
Sascha Wildner [Mon, 16 Mar 2009 21:52:42 +0000 (22:52 +0100)]
Sync zoneinfo database with tzdata2009c from elsie.

northamerica:   8.26 -> 8.27

Cuba started DST one week earlier than previously thought.

5 years agoAllow the IP_MINTTL socket option to be set to zero.
Hasso Tepper [Mon, 2 Mar 2009 13:07:00 +0000 (15:07 +0200)]
Allow the IP_MINTTL socket option to be set to zero.

This disables the feature and is the default actually.

Reported-by: Nick Hilliard <nick at foobar.org>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1304>

5 years agomsdosfs: fix deleted-but-open files handling.
Nicolas Thery [Sun, 1 Mar 2009 19:03:45 +0000 (20:03 +0100)]
msdosfs: fix deleted-but-open files handling.

When deleting a file, msdosfs keeps its denode in the denode cache until it is
reclaimed.  This causes a collision in the cache when recycling the directory
entry of a deleted but still open file for a new or renamed file.  This
collision was incorrecly handled resulting in a kernel panic (rename case) or
syscall error and corrupted in-core state (new file case).

Fix by allowing denodes pointing to the same directory entry to coexist in the
cache as long as a single one of them represents an existing file.

Reported-by: corecore@
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1286>
(cherry picked from commit 629f33a733bba046a296b5f1dfa4ef45bc388cb4)

5 years agoinstaller: Re-add the TEST_DEV command which was removed accidentally.
Sascha Wildner [Sat, 21 Feb 2009 08:52:43 +0000 (09:52 +0100)]
installer: Re-add the TEST_DEV command which was removed accidentally.

This should make command_add_ensure_dev() work again (to test if a
partition exists and create it if it doesn't).

Reported-by: M.K. <mk@freeweb.ozi.nu>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1292>

5 years agoLiveDVD: Fix installer when it is run in the console.
Sascha Wildner [Wed, 18 Feb 2009 15:03:10 +0000 (16:03 +0100)]
LiveDVD: Fix installer when it is run in the console.

The LiveDVD was recently changed to not auto-start X11 anymore, meaning
the installer can now be run from within X11 (after manually starting
it) or from the console. However, the latter case requires ttyv1 to be
free because the console installer will log stuff on ttyv1. When started
from X11, this output goes to a different window (which is why ttyv1
was configured normally on the LiveDVD).

Reported-by: matthias
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1289>

5 years agoMerge branch 'master' into DragonFly_RELEASE_2_2 v2.2.0
Simon Schubert [Sun, 15 Feb 2009 22:56:16 +0000 (23:56 +0100)]
Merge branch 'master' into DragonFly_RELEASE_2_2

5 years agolibstand.3: add HAMMER and MS-DOS filesystems and improve mark-up
Thomas Nikolajsen [Sun, 15 Feb 2009 20:37:13 +0000 (21:37 +0100)]
libstand.3: add HAMMER and MS-DOS filesystems and improve mark-up

5 years agonrelease: kernel moved to boot, make kernel.BOOTP there
Thomas Nikolajsen [Sun, 15 Feb 2009 17:59:23 +0000 (18:59 +0100)]
nrelease: kernel moved to boot, make kernel.BOOTP there

5 years agoMerge commit 'crater/master' into DragonFly_RELEASE_2_2
Matthew Dillon [Sun, 15 Feb 2009 19:44:46 +0000 (11:44 -0800)]
Merge commit 'crater/master' into DragonFly_RELEASE_2_2

5 years agoRelase Engineering - Update loader-bootp.conf for new "boot/" prefixed paths
Matthew Dillon [Sun, 15 Feb 2009 19:42:31 +0000 (11:42 -0800)]
Relase Engineering - Update loader-bootp.conf for new "boot/" prefixed paths

Update the default loader-bootp.conf and related manual pages to use
modern "boot/" prefixed paths.

5 years agoMerge commit 'crater/master' into DragonFly_RELEASE_2_2
Matthew Dillon [Sun, 15 Feb 2009 19:18:15 +0000 (11:18 -0800)]
Merge commit 'crater/master' into DragonFly_RELEASE_2_2

5 years agotelnetd: filter potentially dangerous env vars passed from telnet client
Simon Schubert [Sun, 15 Feb 2009 15:26:54 +0000 (16:26 +0100)]
telnetd: filter potentially dangerous env vars passed from telnet client

This is the same as f813782276c9c93ba7fdca9011c120626dce86e4, just for
the other copy of telnetd, which is actually used per default.

5 years agoMerge commit 'crater/master' into DragonFly_RELEASE_2_2
Matthew Dillon [Sun, 15 Feb 2009 12:10:51 +0000 (04:10 -0800)]
Merge commit 'crater/master' into DragonFly_RELEASE_2_2

5 years agopxe/tftpboot work - Allow multiple responses to broadcast query
Matthew Dillon [Sun, 15 Feb 2009 12:04:44 +0000 (04:04 -0800)]
pxe/tftpboot work - Allow multiple responses to broadcast query

The PXE boot loader may use a broadcast address to query for files via
TFTP, resulting in multiple responses.  Accept the first DATA response
and keep track of the last ERROR response if no DATA response is received.

The first DATA packet locks the server IP for the tftp transfer.

Bring in some structure options (__packed, etc) from FreeBSD plus a fix
to an address increment in the code.

5 years agoMerge commit 'crater/master' into DragonFly_RELEASE_2_2
Matthew Dillon [Sun, 15 Feb 2009 07:51:08 +0000 (23:51 -0800)]
Merge commit 'crater/master' into DragonFly_RELEASE_2_2

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 15 Feb 2009 07:50:46 +0000 (23:50 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agoBoot loader fixes - fix recursive malloc()/free() errors, NULL freed fields
Matthew Dillon [Sun, 15 Feb 2009 07:45:22 +0000 (23:45 -0800)]
Boot loader fixes - fix recursive malloc()/free() errors, NULL freed fields

* Fix reported loader panics related to corrupt malloc areas.  The zip/gzip
  modules were using a static variable to hold malloc()ed space.  The
  field was getting tromped by recursion.

* Fix numerous cases where file structure fields are not NULL'd out upon
  release.

* Fix numerous cases where a double close might result in a double free.

* Fix a benign bug in libstand's realloc().

5 years agoFix libstand's filesystem close callback. The passed file pointer's
Matthew Dillon [Sun, 15 Feb 2009 03:01:21 +0000 (19:01 -0800)]
Fix libstand's filesystem close callback.  The passed file pointer's
f_fsdata field must be NULLed out.

5 years agoMerge commit 'crater/master' into DragonFly_RELEASE_2_2
Matthew Dillon [Sun, 15 Feb 2009 00:42:41 +0000 (16:42 -0800)]
Merge commit 'crater/master' into DragonFly_RELEASE_2_2

5 years agotelnetd: filter potentially dangerous env vars passed from telnet client
Simon Schubert [Sat, 14 Feb 2009 12:00:50 +0000 (13:00 +0100)]
telnetd: filter potentially dangerous env vars passed from telnet client

Obtained-from:  NetBSD revision 1.6 date: 1995-10-18 06:44:26 +0100
Reported-by: Trevor Kendall <trevorjkendall@gmail.com>
5 years agoChange handbook links
Matthias Schmidt [Fri, 13 Feb 2009 18:33:57 +0000 (19:33 +0100)]
Change handbook links

Handbook is now on ikiwiki and no longer on the moinmoin wiki.
Remove to entries from the index.html which does not exists.

5 years agoSilence some -Wold-style-definition warnings.
Sascha Wildner [Sat, 14 Feb 2009 08:20:01 +0000 (09:20 +0100)]
Silence some -Wold-style-definition warnings.

5 years agoFix hang in dntpd startup when network down.
Nicolas Thery [Fri, 13 Feb 2009 23:20:32 +0000 (00:20 +0100)]
Fix hang in dntpd startup when network down.

Reported-By: Hasso Tepper <hasso@estpak.ee>
Dragonfly-Bug: <http://bugs.dragonflybsd.org/issue1243>
Fix-Suggested-By: Matthew Dillon <dillon@apollo.backplane.com>
5 years agoficl: unbreak testmain build
Thomas Nikolajsen [Fri, 13 Feb 2009 23:25:59 +0000 (00:25 +0100)]
ficl: unbreak testmain build

5 years agoMakefile.usr: add path to pkgsrc-all tar file
Thomas Nikolajsen [Wed, 11 Feb 2009 22:54:08 +0000 (23:54 +0100)]
Makefile.usr: add path to pkgsrc-all tar file

5 years agonrelease: clean up Makefile and sync man pages & Makefile.usr
Thomas Nikolajsen [Wed, 11 Feb 2009 22:02:08 +0000 (23:02 +0100)]
nrelease: clean up Makefile and sync man pages & Makefile.usr

 * nrelease/Makefile: fix a few typos,
   change name of `syssrcs` target to `srcs`, to reflect current use and
   remove traces of old installer_* targets.
 * etc/Makefile: update name of src-sys tar file from nrelease and
   add targets for newly added src-all and pkgsrc-all tar files.
 * release.7: update to current method: only binary package downloaded is cvsup
   and add description of a few more variables.
 * development.7: add short description of /usr/Makefile.

5 years agoMerge commit 'crater/master' into DragonFly_RELEASE_2_2
Matthew Dillon [Wed, 11 Feb 2009 20:26:37 +0000 (12:26 -0800)]
Merge commit 'crater/master' into DragonFly_RELEASE_2_2

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Wed, 11 Feb 2009 20:15:16 +0000 (12:15 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agoChange pkg_radd to postfix DragonFly-x.x.x onto the path. This will work in
Matthew Dillon [Wed, 11 Feb 2009 20:12:34 +0000 (12:12 -0800)]
Change pkg_radd to postfix DragonFly-x.x.x onto the path.  This will work in
conjunction with the new pkgbox redirect CGI which no longer post-pends
the OS path, and softlinks in the packages/ sub-directory to point to the
correct quarterly release.

5 years agovnconfig: Print better msg when neither regular file nor -S is specified.
Sascha Wildner [Wed, 11 Feb 2009 20:09:39 +0000 (21:09 +0100)]
vnconfig: Print better msg when neither regular file nor -S is specified.

If no regular file is specified, vn(4) by default will use swap for backing
store. If swap size is missing also, print a smart warning instead of the
cryptic: "Numerical argument out of domain".

Submitted-by: Stathis Kamperis <ekamperi@gmail.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1279>

5 years agohammer boot2: reset file offset each time we're looking up a new inode
Simon Schubert [Wed, 11 Feb 2009 10:25:45 +0000 (11:25 +0100)]
hammer boot2: reset file offset each time we're looking up a new inode

The boot2/ufs code used the implicit assumption that the file offset
gets reset each time a new inode is looked up.  We have to follow this
behavior, or else reads will always start from the last offset of the
last file.

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Wed, 11 Feb 2009 10:02:08 +0000 (02:02 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agoFix long-standing bug in boot1 code - can read junk from fake partition table
Matthew Dillon [Wed, 11 Feb 2009 09:53:52 +0000 (01:53 -0800)]
Fix long-standing bug in boot1 code - can read junk from fake partition table

boot1 reads the MBR to locate the BSD partition type (0xA5).  However, to
reduce the size of the boot1 code the 32 bit LBA for the MBR was being
loaded via the fake partition table at label 'part4', which was assumed to
contain a LBA of 0.  Unfortunately this portion of the boot1 code is not
usually written by the disklabel program and may contain garbage.

For the last few years we have worked around the issue by zeroing out
the label area before installing a new label.  We still have to do this
to avoid disklabel32/disklabel64 confusion, but with this fix forgetting
to zero the area should not cause a properly installed disklabel to fail
to boot properly.

To fix the problem, add the necessary instructions to generate a 32 bit
LBA of 0 directly for reading the MBR.  They barely fit.

5 years agoMention the variables added by 3b25fbd435d9ee6d47af7128014528e2fadfb5e5
YONETANI Tomokazu [Wed, 11 Feb 2009 01:06:38 +0000 (10:06 +0900)]
Mention the variables added by 3b25fbd435d9ee6d47af7128014528e2fadfb5e5
which affects the name and the location of the kernel/modules.

5 years agoSync several manpages in section 9 with reality and clean up a bit.
Sascha Wildner [Tue, 10 Feb 2009 23:04:37 +0000 (00:04 +0100)]
Sync several manpages in section 9 with reality and clean up a bit.

DEV_MODULE(9):
    - adjust example

devtoname(9):
    - dev_t is cdev_t now

make_dev(9):
    - dev_t is cdev_t now
    - make_dev() takes dev_ops as its first argument
    - obtain a reference to cdev_t, so we can destroy it later
    - don't forget to call dev_ops_remove() during shutdown

vcount(9):

    - document count_udev(9)

Submitted-by: Stathis Kamperis <ekamperi@gmail.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1269>

5 years agoSet the default DESTDIR to /var/vkernel when the platform is vkernel.
YONETANI Tomokazu [Tue, 10 Feb 2009 12:40:11 +0000 (21:40 +0900)]
Set the default DESTDIR to /var/vkernel when the platform is vkernel.

This saves some keystrokes as long as you use the standard installation
location for vkernel(as shown in vkernel(7)).

5 years agoAdd two variables to adjust where to install kernel and modules.
YONETANI Tomokazu [Tue, 10 Feb 2009 12:35:13 +0000 (21:35 +0900)]
Add two variables to adjust where to install kernel and modules.

DESTLABEL common suffix added to kernel and modules directory.  for
example, `make DESTLABEL=test installkernel' installs them
as /boot/kernel.test and /boot/modules.test, respectively.

DESTKERNDIR where to install kernel and modules, /boot by default.

Add /sys/conf/kern.path.mk to define default paths for kernel and modules.
Also move KMOD* definitions to /sys/conf/kmod.mk where it really belongs.

Submitted-by: Stefan Johannesdal <stefan.johannesdal@gmail.com>
with a slight modification by me.

5 years agonrelease: Exclude distfiles as well when we tar pkgsrc.
Sascha Wildner [Tue, 10 Feb 2009 11:35:36 +0000 (12:35 +0100)]
nrelease: Exclude distfiles as well when we tar pkgsrc.

5 years agoRelease Engineering: Enhance gui PFI to auto-detect xorg or curses
Matthew Dillon [Tue, 10 Feb 2009 01:25:32 +0000 (17:25 -0800)]
Release Engineering: Enhance gui PFI to auto-detect xorg or curses

Add an "auto" feature for pfi_frontend and change the default to "auto".
Adjust the gui/usr/local/bin/installer script to accept "auto" and set
pfi_frontend to "xorg" or "curses" based on the existance of the DISPLAY
variable.

5 years agozoneinfo & zic(8): Sync with tzcode2009b & tzdata2009b from elsie.
Sascha Wildner [Mon, 9 Feb 2009 19:30:11 +0000 (20:30 +0100)]
zoneinfo & zic(8): Sync with tzcode2009b & tzdata2009b from elsie.

* zic.c: Fix fencepost error.

* leapseconds: Updated to reflect no mid-2009 leap second.

5 years agoMerge commit 'crater/master' into DragonFly_RELEASE_2_2
Matthew Dillon [Mon, 9 Feb 2009 18:49:15 +0000 (10:49 -0800)]
Merge commit 'crater/master' into DragonFly_RELEASE_2_2