Upgrade all filed plugins to use fd_common.h
Cleanup plugins now we use fd_common.h
Only have bpipe-fd.c once and use it for UNIX and Windows.
Tweak plugin entry points layout.
Fix Makefile.in for new plugin layout.
Fix backup summary.

Always lookup the media record of the last used volume after calling
db_get_job_volume_names() so we always print the right info and not
lookup the media record based on the current content of jcr->VolumeName
which works only for normal backups but not for virtual fulls as there
it will have the name of the last volume that was read for creating the
virtual full. Looking at the migration code it also does a lookup
of the last volume name returned by db_get_job_volume_names() there.

Fixes #211: Wrong data/output/calculation in log of "Last Volume Bytes"
            and "Volume Session Time" when doing Virtual Full Backups
Remove no-op assign.

While writing the sd-sd replication we introduced two assignments
which are in essense no-ops (e.g. assigning a value to a variable
where the source is itself.) The optimizer probably filters it but
for the readability lets remove them.
sample sql queries

provide sample sql queries, that can be used by the bconsole query command.

Fixes #83: Bareos packages do not contain query.sql

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
Check if DISTNAME subdir has a Makefile

When trying to install platform specific scripts make sure the
platform specific DISTNAME subdir has a Makefile (which also
checks if the dir even exists.) This should help for platforms
like altlinux where we set the DISTNAME but for which we don't
have any platform specific scripts.
Add some defensive coding.
Fix restore handling of NDMP when using wrong storage.

For a NDMP restore its needed that the storage passed into the restore
job is a storage definition with paired NDMP storage. When this is not
the case the pstore pointer will remain NULL and we crash in the
build_ndmp_job() function. Now we check if we have paired storage
and also changed the cleanup somewhat so we don't try to close the
bootstrap file etc when we didn't open it (which also lead to a
segmentation fault.)
windows config files admin-only access

Windows configuration files were accessible by
normal users until now.

Now we use the NSIS AccessControl Plugin
(http://nsis.sourceforge.net/AccessControl_plug-in)
to limit the access to the Administrator only.

This also means that if you want to edit the
config file, this has to happen as administrator.

Fixes #208: Look into possibility to limit access rights on %APPDATA%/Bareos to administrators only.

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>