Simon Schubert [Sun, 2 Aug 2009 18:05:15 +0000 (20:05 +0200)]
Merge branch 'vendor/GCC44' into gcc441
Simon Schubert [Sun, 2 Aug 2009 17:50:58 +0000 (19:50 +0200)]
Import gcc-4.4.1
Simon Schubert [Sat, 1 Aug 2009 16:27:28 +0000 (18:27 +0200)]
ranlib: specify .c instead of .o as SRCS
Simon Schubert [Thu, 30 Jul 2009 08:58:55 +0000 (10:58 +0200)]
libc: link with -nodefaultlibs -lgcc instead of -nolibc
The -nolibc flag is a proprietary DragonFly construct, which is only
used by libc. It is unnecessary, because the same behavior can be
achieved by specifying -nodefaultslibs -lgcc for linking.
Simon Schubert [Sat, 1 Aug 2009 16:24:53 +0000 (18:24 +0200)]
bsd.cpu.gcc41.mk: don't set CFLAGS directly
bsd.cpu.mk already sets CFLAGS from _CPUFLAGS, so don't do it from
bsd.cpu.gcc41.mk.
Simon Schubert [Sun, 2 Aug 2009 17:13:08 +0000 (19:13 +0200)]
bsd.*.mk: allow the setting of separate compile flags for files
Our makefile infrastructure assumed that all compile flags for all files
are the same. Now you can specify compile flags for file groups, much
like for FILES and INCS.
This does not support files with pathname components yet. For this to
work, we'd need support in make to retrieve the full seached path of a
file.
Simon Schubert [Mon, 27 Jul 2009 18:35:38 +0000 (20:35 +0200)]
bsd.dep.mk: pass -std= flags to mkdep
Simon Schubert [Mon, 27 Jul 2009 09:43:58 +0000 (11:43 +0200)]
make: expand .EXPORT/.makeenv variables
We need to expand the value of a variable we want to put into the
environment, otherwise they might appear as FOO=bar_${baz}.
Simon Schubert [Mon, 27 Jul 2009 08:53:36 +0000 (10:53 +0200)]
objformat: don't hardcode compiler versions
In the previous commit a fallback to the "custom" compiler driver was
introduced for unknown compilers. The previous approach hard-coded
known compiler versions, making it more complicated to add new compilers
to base.
This commit changes slightly the behavior for the "custom" compiler
fallback: The compiler is searched for like before the "custom" change,
and in addition, in case no compiler could be found, the search is
retried for the "custom" compiler driver. This way we don't have to
hard-code known compiler versions, while a truely non-existing CCVER
will still be handled by the "custom" compiler driver.
Sepherosa Ziehau [Fri, 24 Jul 2009 11:44:48 +0000 (19:44 +0800)]
ae(4): Reset PHY during resuming
Submitted-by: Alexander Polakov <polachok@gmail.com>
Matthew Dillon [Thu, 23 Jul 2009 22:41:41 +0000 (15:41 -0700)]
NFS - Change the mount default from udp to tcp, add "udp" option.
* Mount_nfs now mounts TCP by default.
* Added "udp" option, and the -U option now works similarly to -T,
but for udp instead of tcp.
Matthew Dillon [Thu, 23 Jul 2009 20:43:44 +0000 (13:43 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 23 Jul 2009 20:43:11 +0000 (13:43 -0700)]
VKE - Move vke_init_addr() to fix panic
vke_init_addr() requires VKE to be able to send and receive packets, so it
must be called AFTER the cothreads have been created, not before.
Hasso Tepper [Thu, 23 Jul 2009 19:19:45 +0000 (22:19 +0300)]
Add et_EE.ISO8859-15 locale.
Matthew Dillon [Thu, 23 Jul 2009 17:14:34 +0000 (10:14 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 23 Jul 2009 17:13:58 +0000 (10:13 -0700)]
HAMMER - Augment "Missing inode for dirent" Warning.
* When warning about a missing inode for a directory entry, also print out
the as-of transaction id and the localization field so we can tell
whether the warning is related to a snapshot and/or PFS.
Stathis Kamperis [Thu, 23 Jul 2009 13:14:37 +0000 (16:14 +0300)]
cmp.1: Add compatibility section.
Matthew Dillon [Thu, 23 Jul 2009 09:06:24 +0000 (02:06 -0700)]
AHD: Add a DELAY() in the XPT_RESET_BUS path to avoid a race.
The exact race isn't known but adding the DELAY() appears to fix
it. It could be related to ccb's queued prior to the bus reset
which we have to abort.
With-help-from: Peter Avalos <pavalos@theshell.com>
Matthew Dillon [Thu, 23 Jul 2009 05:06:12 +0000 (22:06 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 23 Jul 2009 05:00:13 +0000 (22:00 -0700)]
HAMMER / VFS_VGET - Add optional dvp argument to VFS_VGET(). Fix readdirplus
* VGET is used by NFS to acquire a vnode given an inode number. HAMMER
requires additional information to determine the PFS the inode is being
acquired from.
Add an optional directory vnode argument to the VGET. If non-NULL, HAMMER
will extract the PFS information from this vnode.
* Adjust NFS to pass the dvp to VGET when doing a readdirplus.
Note that the PFS is already encoded in file handles, but readdirplus
acquires the attributes for each directory entry it scans (readdir does
not). This fixes readdirplus for NFS served HAMMER PFS exports.
Matthew Dillon [Thu, 23 Jul 2009 04:40:10 +0000 (21:40 -0700)]
NFS - fix d_ino reporting for readdir, readdirplus, fix unsigned check
* The d_ino reported by readdir/readdirplus was not encoding the entire
64 bit inode number.
* Extracted cnt/siz variables are signed ints, cast to unsigned to check
against max to deal with negative values.
Hasso Tepper [Thu, 23 Jul 2009 04:04:24 +0000 (07:04 +0300)]
Add some more Sys V compatibility integer typedefs.
Sascha Wildner [Wed, 22 Jul 2009 19:27:13 +0000 (21:27 +0200)]
/usr/Makefile: cvs update using -q.
Simon Schubert [Tue, 21 Jul 2009 23:21:44 +0000 (01:21 +0200)]
dma: don't block when trying to aquire a queue file
We might race with some other process, so it is imperative to treat a
locked file as a soft error instead of blocking on the file until the
other process unlocks it.
Simon Schubert [Tue, 21 Jul 2009 23:20:54 +0000 (01:20 +0200)]
dma: don't block on lock/opening the mbox file, backoff instead
Simon Schubert [Tue, 21 Jul 2009 23:20:08 +0000 (01:20 +0200)]
dma: accept -q without argument. report argument errors.
Simon Schubert [Tue, 21 Jul 2009 00:29:02 +0000 (02:29 +0200)]
dma: add comments for ESMTP support
Simon Schubert [Tue, 21 Jul 2009 00:28:46 +0000 (02:28 +0200)]
dma: treat seek errors as permanent errors
Simon Schubert [Mon, 20 Jul 2009 23:51:45 +0000 (01:51 +0200)]
dma: more loudly note that we should query for MX records
Simon Schubert [Mon, 20 Jul 2009 21:27:50 +0000 (23:27 +0200)]
dma: fix various bugs in local mbox delivery
Simon Schubert [Mon, 20 Jul 2009 21:27:37 +0000 (23:27 +0200)]
dma: fix mail bouncing
Simon Schubert [Mon, 20 Jul 2009 20:48:00 +0000 (22:48 +0200)]
dma: always log error exits
Simon Schubert [Mon, 20 Jul 2009 19:58:39 +0000 (21:58 +0200)]
dma: drop CVS ids
Simon Schubert [Mon, 20 Jul 2009 19:53:32 +0000 (21:53 +0200)]
dma: rewrite file management
Close files as early as possible, possibly re-open them later. This is
so that we avoid filedesc sharing problems completely and that we won't
run out of fdesc in case of a large queue.
Simon Schubert [Mon, 20 Jul 2009 11:33:09 +0000 (13:33 +0200)]
dma: correct logic for setting the locked flag
Simon Schubert [Sun, 19 Jul 2009 23:20:27 +0000 (01:20 +0200)]
dma: restructure logging
Don't carry the ident manually. Instead set a global tag once the
ident is fixed.
Simon Schubert [Sun, 19 Jul 2009 14:01:58 +0000 (16:01 +0200)]
dma: note that the data file provides the id
Simon 'corecode' Schubert [Sun, 2 Nov 2008 00:10:10 +0000 (01:10 +0100)]
dma: rework queue handling
Simon 'corecode' Schubert [Mon, 27 Oct 2008 05:45:12 +0000 (06:45 +0100)]
dma: Move comment.
Simon 'corecode' Schubert [Fri, 17 Oct 2008 07:32:26 +0000 (09:32 +0200)]
dma: Re-arrange argument consistency checks.
Simon 'corecode' Schubert [Thu, 16 Oct 2008 15:45:10 +0000 (17:45 +0200)]
dma: better tag handling
Matthew Dillon [Tue, 21 Jul 2009 19:39:03 +0000 (12:39 -0700)]
EXT2FS: support variable inode size.
Obtained-from: FreeBSD
Cherry-picked-from: http://github.com/polachok/dragonflybsd/commit/
d8b7a4caaa2724148e95939207977a0730c349b2
Submitted-by: Alexander Polakov
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).
Peter Avalos [Sat, 18 Jul 2009 23:35:46 +0000 (13:35 -1000)]
Update gzip.
- gzexe: Ensure we do not compress files we need for decompressing by
also checking hard links. From Andrew Dalgleish. (from OpenBSD)
- note that -n also stops the timestamp from being output.
- Don't abort decompression if there are no bytes in the output buffer
when the end of compressed block (ie the crc) is reached.
(ie when decompressing concatenated zipped files).
- If stdin is the input stream, fstat it and check if it's
file. If so, use it's mtime for the mtime in the header. Otherwise use
time(2)'s result instead. Lines up with GNU gzip and RFC 1952 now as
well.
- Fix parsing of $GZIP so that not to overrun the end of string.
- handle partial reads.
- avoid an infinite loop while decompressing invalid gzip files.
- in file_compress() always stat() the input file. this patch avoids
reading from uninitialised space.
- Fix a few issues:
gzip -vt just prints the contents of a .Z file
gzip -vt will print OK even if the .gz file is corrupt
gzip -vt prints nothing with a .bz2 file
gzip can loop endlessly with a corrupt .bz2 file
- Don't warn about >4GB files not having their size correctly stored.
- Remove unhandled H option from getopt() argument. Describe -l in usage.
- properly check the return value of read() & pread().
- Delete impossible code.
- Abort decompression with an error when EOF is reached on input. The
test output will then be 'NOT OK'.
- End a decompression when trailing garbage is found. It emits a warning
message and causes a non-zero exit status (similar to GNU gzip).
- properly detect when the output fails (eg, full filesystem) and do not
delete the input file.
Dragonfly-bug: http://bugs.dragonflybsd.org/issue1026
Matthew Dillon [Sat, 18 Jul 2009 22:09:40 +0000 (15:09 -0700)]
NFS - Increase default read-ahead from 4 to 6
But continue to play nice with the server.
Matthew Dillon [Sat, 18 Jul 2009 22:03:49 +0000 (15:03 -0700)]
NFS - Implement async write BIO, greatly increase sockbuf limits, better rexmit
* Write BIOs are now executed asynchronously.
* Commit BIOs are now executed asynchronously.
* Increase the sockbuf limit to around 2MBytes, which is what is needed
to handle the burst writing a DragonFly client can do now when the
kernel flushes its buffers (at least for a UDP socket).
* Adjust the rexmit code. Also detect duplicate packets received and
adjust the SRTT up a little since no RTT is calculated when a timeout
occurs.
* NEW SYSCTLS:
vfs.nfs.soreserve - This parameter now overrides all other kernel and
user parameters to set the NFS sockets limit.
vfs.nfs.maxasyncbio - This is set to the hard-coded maximum by default
and may be reduced to accomodate insufficiently
endowed remote servers.
* NOTE ON UDP MOUNTS TO REMOTE SERVERS. If the remote server does not have
sufficient sockbuf space to receive a large burst of UDP packets performance
will suffer greatly. To allieviate this issue you can decrease
vfs.nfs.maxasyncbio on the DragonFly client, or you can simply use a
TCP mount.
Matthew Dillon [Sat, 18 Jul 2009 22:01:07 +0000 (15:01 -0700)]
The limit specified in kern.ipc.maxsockbuf only applies to userland.
This sysctl parameter no longer effects kernel-created or kernel-controlled
sockets whos maximum sizes are specified by other sysctls.
Matthew Dillon [Sat, 18 Jul 2009 15:19:50 +0000 (08:19 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sat, 18 Jul 2009 15:18:49 +0000 (08:18 -0700)]
NFS - Fix panic on umount/reboot
* The rx thread sometimes gets no-error and 0-bytes returned from
its soreceive call, but the caller expects a mbuf in that case.
Check for the case and convert to EPIPE.
Thomas Nikolajsen [Sat, 18 Jul 2009 10:39:39 +0000 (12:39 +0200)]
nfsclient: nfsiod isn't used anymore
* Remove nfsclient rc.conf variable; it was just passed to nfsiod
* Remove nfsiod execution from rc.d/nfsclient
Thomas Nikolajsen [Sat, 18 Jul 2009 10:23:10 +0000 (12:23 +0200)]
rc.d/nfsclient: Put newline after last action
Thomas Nikolajsen [Sat, 18 Jul 2009 11:35:33 +0000 (13:35 +0200)]
rc.d/random: Fix typos
rc.d/random feed_dev_random() would leave seedenable=1;
no effect in default config:
feed_dev_random not called as entropy_file and entropy_dir both unset.
Stathis Kamperis [Sat, 18 Jul 2009 06:49:51 +0000 (09:49 +0300)]
Import complex arithmetic functions from {Net,Free}BSD.
swildner@ helped test it with llvm/clang.
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1424>
Matthew Dillon [Sat, 18 Jul 2009 05:31:28 +0000 (22:31 -0700)]
NFS - Stability pass / recent work.
* Fix numerous bugs introduced in the conversion, on both the server side
and the client side.
Matthew Dillon [Sat, 18 Jul 2009 01:35:13 +0000 (18:35 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sat, 18 Jul 2009 01:25:05 +0000 (18:25 -0700)]
NFS - Rewrite the RTT code and the request flags & low level state machine
* The RTT code basically did not work with UDP, and never has very well.
Use a somewhat different algorithm and make more of an assumption that
the network is either reliable, or if it isn't reliable that the sysad
is using a reliable protocol (such as TCP).
The new RTT code should do a better job, though there will still
be significant stalling on a lossy network if using UDP (too bad!).
* Replace the congestion control code. Instead of trying to defer
packet transmission to the nfs_timer, which we no longer run at
insane rates, we instead limit the number of async BIOs we allow
to be queued at any given moment.
* Redo the req->r_flags flags and the low level RPC interlocks between
the various consumers and producers. Add additional flags that
can be tested in assertions to validate expectations.
Use R_LOCKED for more then just the nfs_timer code.
* Close a memory hole.
* Hold critical sections to close races that could result in a
thread deadlocking in soreceive waiting for a reply that another
thread already processed.
* Add two sysctls to aid in testing.
vfs.nfs.showrexmit - Causes "X" to be printed on the console whenever
NFS feels that it must retransmit a RPC. Only
occurs with UDP mounts.
vfs.nfs.showrtt - Causes NFS to print out the SRTT, SDRTT, and
converted timeout calculation once a second
while NFS requests are active.
* Increase the asynchronous BIO limits. Because we only need two helper
threads and no longer depend on dozens of synchronous-rpc threads
(the old nfsiod's), there is no practical limit to the number of
requests we can have active.
Reformulate how asynchronous BIOs are accounted for. They are now
accounted for from the moment they are queued to the very end where
they are biodone()'d.
Matthew Dillon [Sat, 18 Jul 2009 00:55:52 +0000 (17:55 -0700)]
tsleep_interlock() - Fix bug in cpu_lwp_exit().
* Fix a bug in cpu_lwp_exit() which could cause a TAILQ assertion due to
a thread not being properly removed from the tsleep queue.
Sepherosa Ziehau [Fri, 17 Jul 2009 11:14:17 +0000 (19:14 +0800)]
APIC ABI: Support 32 IDT vectors
For two IO APIC hardware configuration, it is now common that number
of needed IDT vectors goes beyond 24, since we pre-allocate the PCI
irq number (irq number and IDT vector is 1:1 mapping) during MP table
parsing.
Reported-by: y0netan1@
Sepherosa Ziehau [Fri, 17 Jul 2009 10:56:26 +0000 (18:56 +0800)]
Remove unused macro
Matthew Dillon [Fri, 17 Jul 2009 11:38:35 +0000 (04:38 -0700)]
NFS - Fix unmounting blockages, fix tick interval, hack cpu assignments.
* Umount was having problems due to the way the helper threads were
being shutdown. Should be fixed.
* The NFS timer, which is responsible for handling retransmits and
timeouts, did not need to be set to one tick (10ms). 200ms is
just fine.
* Hack cpu assignments for the tx and rx helper threads.
Matthew Dillon [Fri, 17 Jul 2009 10:02:13 +0000 (03:02 -0700)]
NFS - implement async state machine for nfs_readrpc_bio()
Implement the basic state machine mechanics to allow the two
helper threads to separate transmit and receive work for any
number of NFS RPCs.
Matthew Dillon [Fri, 17 Jul 2009 02:37:21 +0000 (19:37 -0700)]
NFS - refactor nfs_request() and add state machine fields to nfsm_info
* nfs_request() now operates as a state machine and can be told to
return when it reaches any state, allowing RPC sequences to be
split up (to be used by the new iod).
Matthew Dillon [Fri, 17 Jul 2009 01:22:22 +0000 (18:22 -0700)]
NFS - Cleanup pass -factor out strict temporaries from nfsm_info
Matthew Dillon [Fri, 17 Jul 2009 00:03:55 +0000 (17:03 -0700)]
NFS - Fix refactor bugs.
* The new ERROROUT macro unconditionally overwrites error. Don't use
it for cases where we wish to retain a prior error.
Matthew Dillon [Thu, 16 Jul 2009 23:21:36 +0000 (16:21 -0700)]
NFS - Marathon - completely refactor the nfsm_* macros.
Completely refactor the nfsm_*() macros in nfsm_subs.h, converting
all of them to procedures in nfsm_subs.c.
Add a nfsm_info structure to track the persistent state that the code
depends on, and remove all related local variables from the other bits
of the NFS code.
Simon Schubert [Thu, 16 Jul 2009 22:10:18 +0000 (00:10 +0200)]
release engineering: record 2.3.2 in subvers
Simon Schubert [Thu, 16 Jul 2009 08:43:12 +0000 (10:43 +0200)]
stdio.h: declare snprintf also for XSI 5
We restricted declaration of snprintf and vsnprintf to C99, but it is
also part of XSI 5.
Noticed-by: hasso@
Matthew Dillon [Thu, 16 Jul 2009 15:19:14 +0000 (08:19 -0700)]
NFS - create nfsm_subs.c, clean up externs
* Move nfsm_*() procedures from nfs_subs.c to nfsm_subs.c
* Clean up externs improperly embedded in .c files.
Simon Schubert [Thu, 16 Jul 2009 14:04:25 +0000 (16:04 +0200)]
dma: add required headers if they are not present
RFC2822 states that we must or should include the Date, Message-Id, and
From headers, so add them if they are not present in the message.
Simon Schubert [Thu, 16 Jul 2009 13:23:44 +0000 (15:23 +0200)]
dma: use ANSI string continuations
Simon Schubert [Thu, 16 Jul 2009 13:18:29 +0000 (15:18 +0200)]
dma: pass over the code and improve error handling
Simon Schubert [Thu, 16 Jul 2009 12:08:22 +0000 (14:08 +0200)]
dma: clean up network code
- free memory where necessary
- don't just abort without error message
- don't bounce if we want to defer the message
Simon Schubert [Thu, 16 Jul 2009 11:43:28 +0000 (13:43 +0200)]
dma: treat encrypted connections as secure
Users have to set the INSECURE config option to allow dma to send
plaintext passwords on login. This commit allows dma to send plaintext
passwords through TLS connections even if the INSECURE config option is
not set.
The downside is that this allows a man-in-the-middle attack on the
password exchange. The only solution to this is checking the server
certificate, but we don't do that (yet).
Simon Schubert [Thu, 16 Jul 2009 11:40:12 +0000 (13:40 +0200)]
dma: properly close and free SSL connection state
Simon Schubert [Thu, 16 Jul 2009 11:31:11 +0000 (13:31 +0200)]
dma: log mail queueing more thoroughly
Directly log when a mail is accepted and not only when a delivery attempt
is made.
Simon Schubert [Thu, 16 Jul 2009 10:52:00 +0000 (12:52 +0200)]
dma: note that we will have to clean up SSL state
Simon Schubert [Thu, 16 Jul 2009 10:24:44 +0000 (12:24 +0200)]
dma: unconditionally use openssl
Drop HAVE_CRYPTO and unconditionally use openssl. Dma is supposed to be
small and secure, so there is no way around openssl anyways.
Simon Schubert [Thu, 16 Jul 2009 10:10:51 +0000 (12:10 +0200)]
dma: implement alternate identity for mailq
mailq does not take the standard sendmail options, but behaves like -bp.
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.
Simon Schubert [Thu, 16 Jul 2009 09:40:39 +0000 (11:40 +0200)]
dma: adjust syslog logging levels
Most invocations of syslog used LOG_ERR. Clearly this is not good
practise. Adjust the levels to be reasonable.
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.
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>
Simon Schubert [Thu, 9 Jul 2009 20:30:40 +0000 (22:30 +0200)]
dma: restructure set_username
Restructure to perform early exit and check for strdup() error.
Simon Schubert [Thu, 9 Jul 2009 20:21:26 +0000 (22:21 +0200)]
dma: constify bounce reason and avoid strdup
We don't need to care about freeing the bounce reason string, because
bounce is only called once. Convert all bounce reason strings to
const char * and avoid calling strdup() on them. Dynamic strings from
asprintf() need some de-const massaging.
Simon Schubert [Thu, 9 Jul 2009 12:37:17 +0000 (14:37 +0200)]
dma: ignore a whole slew of sendmail options
Probably some more left.
Submitted-by: Peter Pentchev <roam@ringlet.net>
Simon Schubert [Thu, 9 Jul 2009 12:37:16 +0000 (14:37 +0200)]
dma: better logic for guessing username
Apply better logic to guess the username when getlogin(3) is not
available for some reason, e.g. no login session at all, no access
to utmp/wtmp, etc.
Submitted-by: Peter Pentchev <roam@ringlet.net>
Simon Schubert [Thu, 9 Jul 2009 12:37:16 +0000 (14:37 +0200)]
dma: add the MAILNAME and MAILNAMEFILE config options
Submitted-by: Peter Pentchev <roam@ringlet.net>
Simon Schubert [Thu, 9 Jul 2009 19:19:40 +0000 (21:19 +0200)]
dma: add FULLBOUNCE config option
FULLBOUNCE will include the full message in the bounce
Submitted-by: Peter Pentchev <roam@ringlet.net>
Simon Schubert [Thu, 9 Jul 2009 19:15:54 +0000 (21:15 +0200)]
dma: provide proper bounce error message
This may not be the best solution - the error message buffer has now
turned dynamic, but the only alternative I see is to make it a static
array in net.c... and I'm not quite sure if I want to do that just now.
Submitted-by: Peter Pentchev <roam@ringlet.net>
Simon Schubert [Thu, 9 Jul 2009 12:37:16 +0000 (14:37 +0200)]
dma: lock temp files on creation
Lock the temporary files after creating them to protect from a "dma -q"
run at just the wrong time causing a double delivery attempt for
the same message.
Submitted-by: Peter Pentchev <roam@ringlet.net>
Simon Schubert [Thu, 9 Jul 2009 12:37:16 +0000 (14:37 +0200)]
dma: various code hardening
(as found by the Debian hardening wrapper)
- check the result of fgets()
- loop the network writes until the whole thing is sent
- check one more write() result
Submitted-by: Peter Pentchev <roam@ringlet.net>
Simon Schubert [Thu, 9 Jul 2009 12:37:16 +0000 (14:37 +0200)]
dma: note that the -q option requires an unused argument
Submitted-by: Peter Pentchev <roam@ringlet.net>
Simon Schubert [Thu, 9 Jul 2009 12:37:15 +0000 (14:37 +0200)]
dma: fix two typos and a word order problem
Submitted-by: Peter Pentchev <roam@ringlet.net>
Simon Schubert [Thu, 9 Jul 2009 12:37:15 +0000 (14:37 +0200)]
dma: also list locked queue files
When listing the queue, show all messages, even those that are
currently locked for delivery. Indicate the lock with a '*' after
the queue ID.
Submitted-by: Peter Pentchev <roam@ringlet.net>
Simon Schubert [Thu, 9 Jul 2009 12:37:15 +0000 (14:37 +0200)]
dma: bounce message instantly on permanent remote delivery errors
Submitted-by: Peter Pentchev <roam@ringlet.net>
Simon Schubert [Thu, 9 Jul 2009 12:37:15 +0000 (14:37 +0200)]
dma: treat a QUIT error as merely a warning
RFC 2821 only mandates that a QUIT error should abort an unfinished
transaction, and since we've reached this point, the DATA command has
succeeded and the message has been accepted for delivery by the remote
end. Thus, just warn about it.
Submitted-by: Peter Pentchev <roam@ringlet.net>
Simon Schubert [Thu, 9 Jul 2009 12:37:15 +0000 (14:37 +0200)]
dma: properly log last remote status message
Store the last error or status message received from the remote server in
the neterr[] buffer and display it instead of the meaningless %m in
remote delivery syslog messages.
Submitted-by: Peter Pentchev <roam@ringlet.net>
Simon Schubert [Thu, 9 Jul 2009 12:37:14 +0000 (14:37 +0200)]
dma: several fixes to make dma build on non-BSD OS's
- replace open(..., O_EXLOCK) with a new open_locked() routine;
- define the __unused function attribute;
- do not redefine PATH_MAX.
Submitted-by: Peter Pentchev <roam@ringlet.net>
Michael Neumann [Thu, 16 Jul 2009 12:56:47 +0000 (14:56 +0200)]
hammer expand: add manpage
Michael Neumann [Thu, 16 Jul 2009 12:26:00 +0000 (14:26 +0200)]
hammer expand: Use default values for boot/mem area