]>
git.proxmox.com Git - proxmox-backup.git/log
Dietmar Maurer [Sat, 16 Feb 2019 11:19:13 +0000 (12:19 +0100)]
fix configuration dir permission
Carefully set and check permissions ...
Dietmar Maurer [Sat, 16 Feb 2019 09:10:45 +0000 (10:10 +0100)]
config/datastore.rs: remove unused code
Dietmar Maurer [Sat, 16 Feb 2019 09:06:08 +0000 (10:06 +0100)]
config/datastore.rs: return empty config if file does not exist
Dietmar Maurer [Sat, 16 Feb 2019 08:42:00 +0000 (09:42 +0100)]
tools::file_get_contents - improve error message
Dietmar Maurer [Sat, 16 Feb 2019 08:36:29 +0000 (09:36 +0100)]
tools::file_read_firstline - improve error message
Dietmar Maurer [Sat, 16 Feb 2019 08:29:04 +0000 (09:29 +0100)]
change proxy user from www-data to backup
Dietmar Maurer [Fri, 15 Feb 2019 14:33:12 +0000 (15:33 +0100)]
tools.rs: new helper to get uid/gid for the sepcified system user.
Or is there an easier way to get that info?
Dietmar Maurer [Fri, 15 Feb 2019 13:33:03 +0000 (14:33 +0100)]
backup/datastore.rs: improve error reporting
Dietmar Maurer [Fri, 15 Feb 2019 11:13:15 +0000 (12:13 +0100)]
section_config.rs: simplify parser by using new try_block macro
Dietmar Maurer [Fri, 15 Feb 2019 10:33:51 +0000 (11:33 +0100)]
tools.rs: fix doc tests
Dietmar Maurer [Fri, 15 Feb 2019 10:20:45 +0000 (11:20 +0100)]
tools.rs: document try_block macro
Dietmar Maurer [Fri, 15 Feb 2019 09:59:12 +0000 (10:59 +0100)]
tools.rs: new try_block macro
Wolfgang Bumiller [Fri, 15 Feb 2019 09:32:14 +0000 (10:32 +0100)]
update to pam 0.7 (renamed from pam-auth)
It now supports custom conversation methods, so instead of
new() we ask for a default authenticator taking a password
via with_password(). Since the password is now handled by
the now separate conversation handler, `set_credentials()`
is now called on the handler we get via `.get_handler()`.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Fri, 15 Feb 2019 09:16:12 +0000 (10:16 +0100)]
server/rest.rs: add method to log message
Dietmar Maurer [Fri, 15 Feb 2019 09:04:37 +0000 (10:04 +0100)]
api2/admin/datastore/catar.rs: simplify/fix debug message
Dietmar Maurer [Fri, 15 Feb 2019 08:55:12 +0000 (09:55 +0100)]
server/rest.rs: log full error messages
Dietmar Maurer [Thu, 14 Feb 2019 15:04:24 +0000 (16:04 +0100)]
server/rest.rs: use a protocol extension to avoid double log
Instead of modifying the response header itself.
Dietmar Maurer [Thu, 14 Feb 2019 12:28:41 +0000 (13:28 +0100)]
avoid double logging of proxied requests
Dietmar Maurer [Thu, 14 Feb 2019 12:13:49 +0000 (13:13 +0100)]
Revert "backup/datastore: fn open is a private implementation detail"
This reverts commit
3dacd9a660696c5b9571d50e4603ed222ecdc634 .
I currently use this in some test ...
Dietmar Maurer [Thu, 14 Feb 2019 12:07:34 +0000 (13:07 +0100)]
src/server/rest.rs: log failed requests
Wolfgang Bumiller [Thu, 14 Feb 2019 11:33:20 +0000 (12:33 +0100)]
tools/fs: mark ReadDir as Send
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 14 Feb 2019 10:38:11 +0000 (11:38 +0100)]
backup/chunk_store: verify chunk file names
get_chunk_iterator() should skip over files which aren't an
actual chunk
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 14 Feb 2019 10:17:06 +0000 (11:17 +0100)]
backup/datastore: fn open is a private implementation detail
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 14 Feb 2019 10:16:34 +0000 (11:16 +0100)]
backup/chunk_store: open base dir in get_chunk_iterator
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Thu, 14 Feb 2019 10:17:08 +0000 (11:17 +0100)]
src/client/backup_repo.rs - improve docu
Dietmar Maurer [Thu, 14 Feb 2019 10:11:39 +0000 (11:11 +0100)]
src/client.rs: improve library structure and docu
Wolfgang Bumiller [Thu, 14 Feb 2019 09:17:10 +0000 (10:17 +0100)]
make: use --no-deps for cargo doc
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 14 Feb 2019 09:13:42 +0000 (10:13 +0100)]
tools/timer: add module documentation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 13 Feb 2019 14:51:27 +0000 (15:51 +0100)]
backup: replace ChunkIterator
Instead we just build the iterator using our
tools::fs::read_subdir iterator as follows:
Use the index range (0..0x10000) as an iterator, map() it
to yield a subdirectory iterator for each index, then
flatten it.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 12 Feb 2019 13:21:49 +0000 (14:21 +0100)]
tools: use scan_subdir iterator for scandir
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 13 Feb 2019 13:26:34 +0000 (14:26 +0100)]
tools/fs: add file_name_utf8_unchecked shortcut
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 13 Feb 2019 13:01:28 +0000 (14:01 +0100)]
tools/fs: change scan_subdir to use filter_file_name_regex
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 13 Feb 2019 13:00:48 +0000 (14:00 +0100)]
tools/fs: add filter_file_name_regex to FileIterOps
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 13 Feb 2019 12:51:29 +0000 (13:51 +0100)]
tools/fs: add FileIterOps trait and FileTypeFilter
FileIterOps will provide operations on file entry iterators.
For now this provides a file type filter.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 13 Feb 2019 13:02:27 +0000 (14:02 +0100)]
tools/fs: let ReadDir iterator yield ReadDirEntry
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 13 Feb 2019 11:38:27 +0000 (12:38 +0100)]
tools/fs: add ReadDirEntry helper
This wraps nix::dir::Entry with the parent and additionally
exposes the parent directory file descriptor since we need
it to perform openat().
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 12 Feb 2019 13:20:16 +0000 (14:20 +0100)]
tools/fs: add scan_subdir helper
This filters the results of read_subdir with a regex.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 12 Feb 2019 12:51:34 +0000 (13:51 +0100)]
tools: start fs submodule, add read_subdir
This creates an iterator relative to a RawFd via
nix::dir::Dir over nix::dir::Entrys.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Wed, 13 Feb 2019 13:31:43 +0000 (14:31 +0100)]
src/client/http_client.rs: try to login
use an environment var to store passphrase (PBS_PASSWORD)
Dietmar Maurer [Wed, 13 Feb 2019 11:30:52 +0000 (12:30 +0100)]
src/bin/proxmox-backup-client.rs: define and use BackupRepository
Wolfgang Bumiller [Wed, 13 Feb 2019 10:03:02 +0000 (11:03 +0100)]
client: use hyper-tls for now
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 12 Feb 2019 10:46:16 +0000 (11:46 +0100)]
tools: borrow: implement Deref for Tied
Eg. if you have an x: Tied<Dir, Iterator> now you can simply
call x.next() as it'll dereference to the Iterator.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Wed, 13 Feb 2019 09:37:00 +0000 (10:37 +0100)]
api2/admin/datastore/catar.rs: use nested file extensions
i.e. archive.catar.didx
Dietmar Maurer [Tue, 12 Feb 2019 13:13:31 +0000 (14:13 +0100)]
simplify backup lib structure (pub use xxx:*), improve doc
Dietmar Maurer [Tue, 12 Feb 2019 12:27:11 +0000 (13:27 +0100)]
src/backup.rs - improve doc
Dietmar Maurer [Tue, 12 Feb 2019 11:05:33 +0000 (12:05 +0100)]
rename ArchiveIndex to DynamicIndex
also changed the file extension from .aidx to .didx
Dietmar Maurer [Tue, 12 Feb 2019 10:50:45 +0000 (11:50 +0100)]
rename ImageIndex to FixedIndex
also changed the file extension fron .iidx to .fidx
Wolfgang Bumiller [Tue, 12 Feb 2019 09:43:31 +0000 (10:43 +0100)]
backup: fixup warnings and readd lost file type check
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 12 Feb 2019 09:37:43 +0000 (10:37 +0100)]
backup: cleanup long lines
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 12 Feb 2019 09:35:49 +0000 (10:35 +0100)]
backup: use ChunkIterator for sweep_unused_chunks
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 12 Feb 2019 09:35:18 +0000 (10:35 +0100)]
backup: add optional progress callback to ChunkIterator
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 12 Feb 2019 09:10:22 +0000 (10:10 +0100)]
backup: add ChunkIterator
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 12 Feb 2019 09:09:31 +0000 (10:09 +0100)]
tools: add Tied value
Tie two dependent values together, such as a nix::Dir with
its nix::dir::Iter<'a> where 'a is tied to the Dir's
lifetime, making it otherwise impossible to return them or
store them in a struct.
Alternatively we could try the 'rental' crate.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 12 Feb 2019 09:08:23 +0000 (10:08 +0100)]
bin: manager: fixup datastore parameter name
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Mon, 11 Feb 2019 14:12:01 +0000 (15:12 +0100)]
avoid compiler warning
Dietmar Maurer [Mon, 11 Feb 2019 14:11:42 +0000 (15:11 +0100)]
bin/proxmox-backup-api.rs: improve error handling
Dietmar Maurer [Mon, 11 Feb 2019 13:43:26 +0000 (14:43 +0100)]
bin/proxmox-backup-proxy.rs: improve error handling
Wolfgang Bumiller [Thu, 7 Feb 2019 10:21:14 +0000 (11:21 +0100)]
access: use proxmox-backup-auth for pam
allows customization via /etc/pam.d/proxmox-backup-auth
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 5 Feb 2019 13:17:30 +0000 (14:17 +0100)]
add generated files to .gitignore
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 30 Jan 2019 13:55:43 +0000 (14:55 +0100)]
api2: time: use /etc/localtime as fallback
in case there is no /etc/timezone
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 4 Feb 2019 14:35:32 +0000 (15:35 +0100)]
tools: use std::fs::read for file_get_contents
Until we add the extra options like we have in pve, just use
the already existing (since 1.26) shortcut.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 4 Feb 2019 14:34:38 +0000 (15:34 +0100)]
remove some rather inconvenient debug output
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 4 Feb 2019 14:16:41 +0000 (15:16 +0100)]
proxy: use <configdir>/server.pfx for tls
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 4 Feb 2019 14:13:03 +0000 (15:13 +0100)]
introduce buildcfg module and PROXMOX_CONFIGDIR
buildcfg.rs should contain convenience variables or macros
for using build-time configured variables
For now we replace hardcoded "/etc/proxmox-backup/<foo>"
with configdir!("<foo>").
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 4 Feb 2019 13:56:07 +0000 (14:56 +0100)]
proxy: use TLS via tokio-tls
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 1 Feb 2019 10:08:36 +0000 (10:08 +0000)]
buildsys: don't cache non-binary data
etc/ and www/ should be clean in the build/ dir
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 1 Feb 2019 10:02:56 +0000 (10:02 +0000)]
etc: remove obsolete syslog.target dependency
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 1 Feb 2019 10:01:55 +0000 (10:01 +0000)]
make deb: use --no-pre-clean
We create a clean build/ directory anyway.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 1 Feb 2019 09:36:28 +0000 (10:36 +0100)]
make clean: cleanup source package files
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 1 Feb 2019 09:24:02 +0000 (10:24 +0100)]
debian: add debian/source/format file
We need 1.0: We have a native package with a revision, so
anything >1.0 doesn't work...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 1 Feb 2019 09:21:50 +0000 (10:21 +0100)]
add missing build depends
lintian complains about a missing bash-completion dependency
which is implied required the bash completion debhelper...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 1 Feb 2019 09:18:50 +0000 (10:18 +0100)]
buildsys: re-enable build caching for deb target
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 1 Feb 2019 09:07:22 +0000 (10:07 +0100)]
make: add dsc target and use lintian
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 1 Feb 2019 09:05:14 +0000 (10:05 +0100)]
use libexecdir for service binaries
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 31 Jan 2019 15:11:09 +0000 (16:11 +0100)]
use BUILD_MODE via the environment
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 31 Jan 2019 15:08:43 +0000 (16:08 +0100)]
also apply cargo build flags to tests
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 31 Jan 2019 14:42:47 +0000 (15:42 +0100)]
buildsys: fixup package building
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 31 Jan 2019 14:32:04 +0000 (15:32 +0100)]
ignore casync test by default
because there's no casync package we can build-depend on to
actually run the tests on normal systems...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 31 Jan 2019 14:29:25 +0000 (15:29 +0100)]
tests: chunk_store: cleanup .testdir
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 31 Jan 2019 14:03:48 +0000 (15:03 +0100)]
tests: import lazy_static as needed
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 31 Jan 2019 12:43:09 +0000 (13:43 +0100)]
don't hardcode /usr/share paths
Add a defines.mk file defining the standard default layout
for installation (PREFIX, DATAROOTDIR, LIBDIR etc.).
Add a $(JSDIR) variable and use env!("JSDIR") in place of
the hardcoded /usr/share/javascript/proxmox-backup path.
Have defines.mk include an *optional* local.mak to override
JSDIR to www/ during local development.
Add `make install` targets and remove debian/install.
Note that service files are now in $libdir/proxmox-backup/
as there's usually no point in starting them from the
command line, so /usr/sbin makes no sense.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 31 Jan 2019 12:36:33 +0000 (13:36 +0100)]
www: build proxmox-backup-gui.js into the js/ subdir
The server expects an images/ subdir and a js/ subdir, so we
should also compile our files using the same structure.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 31 Jan 2019 13:28:00 +0000 (14:28 +0100)]
remove useless command option from daemons
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 31 Jan 2019 13:57:59 +0000 (14:57 +0100)]
add missing build dependencies
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Fri, 1 Feb 2019 09:38:07 +0000 (10:38 +0100)]
improve ApiMethod docu
Dietmar Maurer [Fri, 1 Feb 2019 08:54:56 +0000 (09:54 +0100)]
implement relead_timezone flag
Dietmar Maurer [Fri, 1 Feb 2019 08:30:50 +0000 (09:30 +0100)]
depend on pam-auth, use pam for root login
Please use username "root@pam" for login via GUI.
Dietmar Maurer [Thu, 31 Jan 2019 13:34:21 +0000 (14:34 +0100)]
delay unauthorized request (rate limit)
Dietmar Maurer [Thu, 31 Jan 2019 12:22:30 +0000 (13:22 +0100)]
move http error class to router.rs
Dietmar Maurer [Thu, 31 Jan 2019 11:22:00 +0000 (12:22 +0100)]
server/rest.rs: verify auth cookie
Dietmar Maurer [Thu, 31 Jan 2019 09:08:08 +0000 (10:08 +0100)]
Utils.js: fix cookie handling
Use unsecure cookie foör testing.
Dietmar Maurer [Wed, 30 Jan 2019 17:25:37 +0000 (18:25 +0100)]
avoid compiler warnings
Dietmar Maurer [Wed, 30 Jan 2019 14:14:20 +0000 (15:14 +0100)]
api2/access.rs: add ticket api
Wolfgang Bumiller [Wed, 30 Jan 2019 11:03:40 +0000 (12:03 +0100)]
fix timer_delete call
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Tue, 29 Jan 2019 16:50:03 +0000 (17:50 +0100)]
auth_helpers.rs: add timestamp to csrf token
Dietmar Maurer [Tue, 29 Jan 2019 16:41:45 +0000 (17:41 +0100)]
auth_helpers.rs: implement assemble_csrf_prevention_token
Dietmar Maurer [Tue, 29 Jan 2019 16:21:58 +0000 (17:21 +0100)]
load auth keys on startup
Dietmar Maurer [Tue, 29 Jan 2019 15:55:49 +0000 (16:55 +0100)]
auth_helpers.rs: split code into separate file
Dietmar Maurer [Tue, 29 Jan 2019 12:15:33 +0000 (13:15 +0100)]
bin/proxmox-backup-api.rs: gererate secret for csrf token
Dietmar Maurer [Tue, 29 Jan 2019 12:04:01 +0000 (13:04 +0100)]
tools/ticket.rs: remove debug statements