]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
4 years agochange index to templates using handlebars
Dominik Csapak [Wed, 29 Apr 2020 09:59:31 +0000 (11:59 +0200)]
change index to templates using handlebars

using a handlebars instance in ApiConfig, to cache the templates
as long as possible, this is currently ok, as the index template
can only change when the whole package changes

if we split this in the future, we have to trigger a reload of
the daemon on gui package upgrade (so that the template gets reloaded)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agouse proxmox 0.1.25, use new EnumEntry feature
Dietmar Maurer [Wed, 29 Apr 2020 11:01:24 +0000 (13:01 +0200)]
use proxmox 0.1.25, use new EnumEntry feature

4 years agoadd DataStoreStatus.js dummy
Dietmar Maurer [Wed, 29 Apr 2020 09:22:05 +0000 (11:22 +0200)]
add DataStoreStatus.js dummy

4 years agoRevert "gui: display DataStoreConfig above DataStoreContent"
Dietmar Maurer [Wed, 29 Apr 2020 09:09:35 +0000 (11:09 +0200)]
Revert "gui: display DataStoreConfig above DataStoreContent"

This reverts commit 555dfe7b8e87827c680f5e0cb53695036995bd54.

4 years agoavoid problems with missing acl.cfg and user.cfg
Dietmar Maurer [Wed, 29 Apr 2020 08:40:42 +0000 (10:40 +0200)]
avoid problems with missing acl.cfg and user.cfg

4 years agosrc/api2/admin/datastore.rs - get_datastore_list: only return name and comment
Dietmar Maurer [Wed, 29 Apr 2020 07:21:34 +0000 (09:21 +0200)]
src/api2/admin/datastore.rs - get_datastore_list: only return name and comment

We dont want to leak the full configuration to users with limited access permission.
Please use the api2::config::datastore api to get the full configuration.

4 years agosrc/api2/config/datastore.rs_ add delete property to update method
Dietmar Maurer [Wed, 29 Apr 2020 07:09:59 +0000 (09:09 +0200)]
src/api2/config/datastore.rs_ add delete property to update method

4 years agosrc/api2/config/remote.rs: fix white space
Dietmar Maurer [Wed, 29 Apr 2020 07:09:39 +0000 (09:09 +0200)]
src/api2/config/remote.rs: fix white space

4 years agosrc/api2/config/remote.rs: add delete parameter to update method
Dietmar Maurer [Wed, 29 Apr 2020 07:04:17 +0000 (09:04 +0200)]
src/api2/config/remote.rs: add delete parameter to update method

4 years agosrc/api2/pull.rs: require Datastore.Prune if delete flag is set.
Dietmar Maurer [Wed, 29 Apr 2020 05:11:03 +0000 (07:11 +0200)]
src/api2/pull.rs: require Datastore.Prune if delete flag is set.

4 years agosrc/config/acl.rs: introduice privileges and roles for remotes
Dietmar Maurer [Wed, 29 Apr 2020 05:03:44 +0000 (07:03 +0200)]
src/config/acl.rs: introduice privileges and roles for remotes

4 years agofix api2::types::ACL_ROLE_SCHEMA
Dietmar Maurer [Tue, 28 Apr 2020 11:25:02 +0000 (13:25 +0200)]
fix  api2::types::ACL_ROLE_SCHEMA

make sure we list all roles ...

4 years agosrc/config/acl.rs - fix regression tests
Dietmar Maurer [Tue, 28 Apr 2020 09:16:15 +0000 (11:16 +0200)]
src/config/acl.rs - fix regression tests

4 years agoadd Datastore.Backup, Datastore.PowerUser and Datastore.Reader role
Dietmar Maurer [Tue, 28 Apr 2020 08:48:21 +0000 (10:48 +0200)]
add Datastore.Backup, Datastore.PowerUser and Datastore.Reader role

4 years agoimplemnt backup ownership, improve datastore access permissions
Dietmar Maurer [Tue, 28 Apr 2020 08:11:15 +0000 (10:11 +0200)]
implemnt backup ownership, improve datastore access permissions

4 years agodepend on proxmox 0.1.24
Dietmar Maurer [Tue, 28 Apr 2020 06:23:41 +0000 (08:23 +0200)]
depend on proxmox 0.1.24

4 years agosrc/config/cached_user_info.rs - lookup_privs: correctly handle superuser
Dietmar Maurer [Mon, 27 Apr 2020 09:21:34 +0000 (11:21 +0200)]
src/config/cached_user_info.rs - lookup_privs: correctly handle superuser

4 years agosrc/config/acl.rs: introduce more/better datastore privileges
Dietmar Maurer [Mon, 27 Apr 2020 05:13:06 +0000 (07:13 +0200)]
src/config/acl.rs: introduce more/better datastore privileges

4 years agosrc/config/acl.rs: rtename PRTIV_DATASTORE_ALLOCATE to PRIV_DATASTORE_MODIFY
Dietmar Maurer [Mon, 27 Apr 2020 04:50:35 +0000 (06:50 +0200)]
src/config/acl.rs: rtename PRTIV_DATASTORE_ALLOCATE to PRIV_DATASTORE_MODIFY

4 years agosrc/bin/proxmox-backup-manager.rs: add dns sub command
Dietmar Maurer [Sun, 26 Apr 2020 06:23:23 +0000 (08:23 +0200)]
src/bin/proxmox-backup-manager.rs: add dns sub command

Also improved the DNS api, added a --delete option.

4 years agosrc/bin/proxmox-backup-manager.rs: fix node parameter handling
Dietmar Maurer [Sat, 25 Apr 2020 15:20:22 +0000 (17:20 +0200)]
src/bin/proxmox-backup-manager.rs: fix node parameter handling

4 years agodepend on proxmox 0.1.23
Dietmar Maurer [Sat, 25 Apr 2020 15:12:15 +0000 (17:12 +0200)]
depend on proxmox 0.1.23

4 years agomove src/api2/config/network.rs to src/api2/node/network.rs
Dietmar Maurer [Sat, 25 Apr 2020 15:00:38 +0000 (17:00 +0200)]
move src/api2/config/network.rs to src/api2/node/network.rs

So that we have the same api path for network config as pve.

4 years agosrc/config/network.rs: auto-add lo, and implement a few regression tests
Dietmar Maurer [Fri, 24 Apr 2020 10:55:22 +0000 (12:55 +0200)]
src/config/network.rs: auto-add lo, and implement a few regression tests

4 years agoxattr: cleanup: don't use pxar types in the API
Wolfgang Bumiller [Fri, 24 Apr 2020 09:14:43 +0000 (11:14 +0200)]
xattr: cleanup: don't use pxar types in the API

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoxattr: api cleanup
Wolfgang Bumiller [Fri, 24 Apr 2020 08:48:28 +0000 (10:48 +0200)]
xattr: api cleanup

Make `flistxattr()` return a `ListXAttr` helper which
provides an iterator over `&CStr`.

This exposes the property that xattr names are a
zero-terminated string without simply being an opaque
"byte vector". Using &[u8] as a type here is too lax.

Also let `fgetxattr` take a `CStr`. While this may be a
burden on the caller, we usually already have
zero-terminated strings on the call site. Currently we only
use this method coming from `flistxattr` after all.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoxattr: use checked_mul to increase size
Wolfgang Bumiller [Fri, 24 Apr 2020 07:58:15 +0000 (09:58 +0200)]
xattr: use checked_mul to increase size

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agotools: pub use Fd from proxmox crate
Wolfgang Bumiller [Fri, 24 Apr 2020 08:06:11 +0000 (10:06 +0200)]
tools: pub use Fd from proxmox crate

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/bin/proxmox-backup-manager.rs: implement netwerk revert
Dietmar Maurer [Fri, 24 Apr 2020 08:45:49 +0000 (10:45 +0200)]
src/bin/proxmox-backup-manager.rs: implement netwerk revert

4 years agosrc/bin/proxmox-backup-manager.rs: new command to show pending network changes
Dietmar Maurer [Fri, 24 Apr 2020 08:27:43 +0000 (10:27 +0200)]
src/bin/proxmox-backup-manager.rs: new command to show pending network changes

4 years agosrc/bin/proxmox-backup-manager.rs: only show pending changes with "text" format
Dietmar Maurer [Fri, 24 Apr 2020 08:16:57 +0000 (10:16 +0200)]
src/bin/proxmox-backup-manager.rs: only show pending changes with "text" format

4 years agosrc/config/network.rs: implement network reload, set "changes" attribute
Dietmar Maurer [Fri, 24 Apr 2020 07:55:46 +0000 (09:55 +0200)]
src/config/network.rs: implement network reload, set "changes" attribute

4 years agosrc/config/network.rs: use a simple String for comments
Dietmar Maurer [Fri, 24 Apr 2020 05:46:08 +0000 (07:46 +0200)]
src/config/network.rs: use a simple String for comments

4 years agosrc/config/network/parser.rs: corectly detect vanished interfaces
Dietmar Maurer [Fri, 24 Apr 2020 05:26:54 +0000 (07:26 +0200)]
src/config/network/parser.rs: corectly detect vanished interfaces

4 years agosrc/api2/config/network.rs: implement update/delete comments
Dietmar Maurer [Thu, 23 Apr 2020 14:08:35 +0000 (16:08 +0200)]
src/api2/config/network.rs: implement update/delete comments

4 years agosrc/config/network.rs; support interface comments, cleanups
Dietmar Maurer [Thu, 23 Apr 2020 13:53:48 +0000 (15:53 +0200)]
src/config/network.rs; support interface comments, cleanups

4 years agosrc/config/network.rs: avoid newline after family options
Dietmar Maurer [Thu, 23 Apr 2020 09:30:41 +0000 (11:30 +0200)]
src/config/network.rs: avoid newline after family options

4 years agosrc/api2/config/network.rs: implement update/delete for bridge_ports and bond_slaves
Dietmar Maurer [Thu, 23 Apr 2020 09:21:27 +0000 (11:21 +0200)]
src/api2/config/network.rs: implement update/delete for bridge_ports and bond_slaves

4 years agosrc/api2/config/network.rs: only allow one default gateway
Dietmar Maurer [Thu, 23 Apr 2020 08:37:40 +0000 (10:37 +0200)]
src/api2/config/network.rs: only allow one default gateway

4 years agosrc/config/network.rs: do not allow to change interface type
Dietmar Maurer [Thu, 23 Apr 2020 07:43:38 +0000 (09:43 +0200)]
src/config/network.rs: do not allow to change interface type

4 years agosrc/config/network.rs: parse bond-slaves
Dietmar Maurer [Thu, 23 Apr 2020 07:31:10 +0000 (09:31 +0200)]
src/config/network.rs: parse bond-slaves

4 years agosrc/config/network.rs: parse bridge-ports
Dietmar Maurer [Thu, 23 Apr 2020 07:24:17 +0000 (09:24 +0200)]
src/config/network.rs: parse bridge-ports

4 years agosrc/config/network.rs: introduce NetworkInterfaceType
Dietmar Maurer [Thu, 23 Apr 2020 06:45:03 +0000 (08:45 +0200)]
src/config/network.rs: introduce NetworkInterfaceType

4 years agosrc/config/network.rs: cleanup (new helper combine_entry)
Dietmar Maurer [Thu, 23 Apr 2020 05:54:12 +0000 (07:54 +0200)]
src/config/network.rs: cleanup (new helper combine_entry)

4 years agosrc/config/network.rs: write changes to interfaces.new
Dietmar Maurer [Thu, 23 Apr 2020 05:19:29 +0000 (07:19 +0200)]
src/config/network.rs: write changes to interfaces.new

4 years agosrc/config/network.rs: use a single mtu setting (instead of mtu_v4 and mtu_v6)
Dietmar Maurer [Thu, 23 Apr 2020 05:07:14 +0000 (07:07 +0200)]
src/config/network.rs: use a single mtu setting (instead of mtu_v4 and mtu_v6)

4 years agosrc/bin/proxmox-backup-manager.rs: improve network list output format
Dietmar Maurer [Thu, 23 Apr 2020 04:44:55 +0000 (06:44 +0200)]
src/bin/proxmox-backup-manager.rs: improve network list output format

4 years agosrc/bin/proxmox-backup-manager.rs: format datastore list output
Dietmar Maurer [Wed, 22 Apr 2020 15:37:20 +0000 (17:37 +0200)]
src/bin/proxmox-backup-manager.rs: format datastore list output

4 years agosrc/bin/proxmox-backup-manager.rs: format network list output
Dietmar Maurer [Wed, 22 Apr 2020 15:14:52 +0000 (17:14 +0200)]
src/bin/proxmox-backup-manager.rs: format network list output

4 years agosrc/api2/config/network.rs: allow to update 'auto' flag
Dietmar Maurer [Wed, 22 Apr 2020 14:46:46 +0000 (16:46 +0200)]
src/api2/config/network.rs: allow to update 'auto' flag

4 years agosrc/config/network/parser.rs: parse MTU settings
Dietmar Maurer [Wed, 22 Apr 2020 11:28:26 +0000 (13:28 +0200)]
src/config/network/parser.rs: parse MTU settings

4 years agosrc/config/network.rs: only save attriubutes used by configuration method
Dietmar Maurer [Wed, 22 Apr 2020 10:42:09 +0000 (12:42 +0200)]
src/config/network.rs: only save attriubutes used by configuration method

4 years agosrc/api2/config/network.rs: implement delete property
Dietmar Maurer [Wed, 22 Apr 2020 10:19:31 +0000 (12:19 +0200)]
src/api2/config/network.rs: implement delete property

4 years agosrc/api2/config/network.rs: allow to update configuration method
Dietmar Maurer [Wed, 22 Apr 2020 09:32:36 +0000 (11:32 +0200)]
src/api2/config/network.rs: allow to update configuration method

4 years agosrc/api2/config/network.rs: improve network api
Dietmar Maurer [Wed, 22 Apr 2020 08:54:07 +0000 (10:54 +0200)]
src/api2/config/network.rs: improve network api

4 years agosrc/config/network/parser.rs: remove debug println
Dietmar Maurer [Wed, 22 Apr 2020 08:53:26 +0000 (10:53 +0200)]
src/config/network/parser.rs: remove debug println

4 years agosrc/config/network/helper.rs: fix CIDR regex
Dietmar Maurer [Wed, 22 Apr 2020 08:52:31 +0000 (10:52 +0200)]
src/config/network/helper.rs: fix CIDR regex

4 years agosrc/api2/types.rs: add schemas for IP/CIDR
Dietmar Maurer [Wed, 22 Apr 2020 08:28:53 +0000 (10:28 +0200)]
src/api2/types.rs: add schemas for IP/CIDR

4 years agosrc/api2/config/datastore.rs_ fix method docs
Dietmar Maurer [Wed, 22 Apr 2020 06:53:16 +0000 (08:53 +0200)]
src/api2/config/datastore.rs_ fix method docs

4 years agosrc/config/network.rs: remove netmask support
Dietmar Maurer [Wed, 22 Apr 2020 06:45:13 +0000 (08:45 +0200)]
src/config/network.rs: remove netmask support

rely on cidr instead.

4 years agosrc/api2/types.rs: define NETWORK_INTERFACE_NAME_SCHEMA
Dietmar Maurer [Tue, 21 Apr 2020 15:54:52 +0000 (17:54 +0200)]
src/api2/types.rs: define NETWORK_INTERFACE_NAME_SCHEMA

4 years agosrc/config/network.rs: move type definitions to src/api2/types.rs
Dietmar Maurer [Tue, 21 Apr 2020 15:25:05 +0000 (17:25 +0200)]
src/config/network.rs: move type definitions to src/api2/types.rs

4 years agorename ConfigMethod to NetworkConfigMethod
Dietmar Maurer [Tue, 21 Apr 2020 15:17:57 +0000 (17:17 +0200)]
rename ConfigMethod to NetworkConfigMethod

4 years agosrc/api2/config/network.rs: start network configuration api
Dietmar Maurer [Tue, 21 Apr 2020 12:28:26 +0000 (14:28 +0200)]
src/api2/config/network.rs: start network configuration api

4 years agosrc/config/network.rs: impleement load/save
Dietmar Maurer [Tue, 21 Apr 2020 10:55:33 +0000 (12:55 +0200)]
src/config/network.rs: impleement load/save

4 years agosrc/config/network.rs: add Interface flags 'exists' and 'active'
Dietmar Maurer [Tue, 21 Apr 2020 09:46:56 +0000 (11:46 +0200)]
src/config/network.rs: add Interface flags 'exists' and 'active'

4 years agosrc/config/network.rs: cleanup autostart flag handling
Dietmar Maurer [Tue, 21 Apr 2020 09:06:22 +0000 (11:06 +0200)]
src/config/network.rs: cleanup autostart flag handling

4 years agosrc/config/network/helper.rs: new helper get_network_interfaces()
Dietmar Maurer [Tue, 21 Apr 2020 08:32:54 +0000 (10:32 +0200)]
src/config/network/helper.rs: new helper get_network_interfaces()

4 years agosrc/config/network.rs: simplify code
Dietmar Maurer [Mon, 20 Apr 2020 16:10:15 +0000 (18:10 +0200)]
src/config/network.rs: simplify code

4 years agosrc/config/network.rs: read/write /etc/network/interfaces
Dietmar Maurer [Mon, 20 Apr 2020 12:15:57 +0000 (14:15 +0200)]
src/config/network.rs: read/write /etc/network/interfaces

Start implementing a recursive descent parser.

4 years agosrc/config/cached_user_info.rs: cache it up to 5 seconds
Dietmar Maurer [Sat, 18 Apr 2020 06:49:20 +0000 (08:49 +0200)]
src/config/cached_user_info.rs: cache it up to 5 seconds

4 years agofix permission tests using non-uri parameters
Dietmar Maurer [Sat, 18 Apr 2020 06:23:04 +0000 (08:23 +0200)]
fix permission tests using non-uri parameters

We nood to do those tests inside the fuction body instead...

4 years agosrc/config/cached_user_info.rs: new check_privs helper
Dietmar Maurer [Sat, 18 Apr 2020 06:09:34 +0000 (08:09 +0200)]
src/config/cached_user_info.rs: new check_privs helper

4 years agosrc/api2/access.rs: cleanup
Dietmar Maurer [Sat, 18 Apr 2020 05:28:25 +0000 (07:28 +0200)]
src/api2/access.rs: cleanup

4 years agosrc/api2/types.rs: use anyhow::Error in test cases
Dietmar Maurer [Sat, 18 Apr 2020 05:05:31 +0000 (07:05 +0200)]
src/api2/types.rs: use anyhow::Error in test cases

4 years agoswitch from failure to anyhow
Wolfgang Bumiller [Fri, 17 Apr 2020 12:11:25 +0000 (14:11 +0200)]
switch from failure to anyhow

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/api2/pull.rs: add access permission
Dietmar Maurer [Fri, 17 Apr 2020 13:27:04 +0000 (15:27 +0200)]
src/api2/pull.rs: add access permission

4 years agosrc/api2/subscription.rs: add access permissions
Dietmar Maurer [Fri, 17 Apr 2020 13:14:28 +0000 (15:14 +0200)]
src/api2/subscription.rs: add access permissions

4 years agosrc/api2/reader.rs: add access permissions
Dietmar Maurer [Fri, 17 Apr 2020 13:01:56 +0000 (15:01 +0200)]
src/api2/reader.rs: add access permissions

4 years agosrc/api2/config/remote.rs: add access permissions
Dietmar Maurer [Fri, 17 Apr 2020 12:57:26 +0000 (14:57 +0200)]
src/api2/config/remote.rs: add access permissions

4 years agosrc/api2/config/datastore.rs: impl digest check for delete, add access permissions
Dietmar Maurer [Fri, 17 Apr 2020 12:51:29 +0000 (14:51 +0200)]
src/api2/config/datastore.rs: impl digest check for delete, add access permissions

4 years agosrc/api2/backup.rs: add access permissions
Dietmar Maurer [Fri, 17 Apr 2020 12:40:20 +0000 (14:40 +0200)]
src/api2/backup.rs: add access permissions

4 years agosrc/api2/admin/datastore.rs: add access permissions - first try
Dietmar Maurer [Fri, 17 Apr 2020 12:36:27 +0000 (14:36 +0200)]
src/api2/admin/datastore.rs: add access permissions - first try

We need to refine this later (introduce backup owner concept?)

4 years agoacl: change path "storage" to "datastore"
Dietmar Maurer [Fri, 17 Apr 2020 12:15:44 +0000 (14:15 +0200)]
acl: change path "storage" to "datastore"

4 years agosrc/api2/access/role.rs: use schema ACL_ROLE_SCHEMA
Dietmar Maurer [Fri, 17 Apr 2020 12:14:06 +0000 (14:14 +0200)]
src/api2/access/role.rs: use schema ACL_ROLE_SCHEMA

4 years agomove type defs from src/api2/access/acl.rs to src/api2/types.rs
Dietmar Maurer [Fri, 17 Apr 2020 12:12:12 +0000 (14:12 +0200)]
move type defs from src/api2/access/acl.rs to src/api2/types.rs

4 years agosrc/api2/access/role.rs: new api to list roles
Dietmar Maurer [Fri, 17 Apr 2020 12:03:24 +0000 (14:03 +0200)]
src/api2/access/role.rs: new api to list roles

4 years agosrc/api2/access/user.rs: add access permissions
Dietmar Maurer [Fri, 17 Apr 2020 09:04:36 +0000 (11:04 +0200)]
src/api2/access/user.rs: add access permissions

4 years agosrc/api2/access/user.rs: add access permissions
Dietmar Maurer [Fri, 17 Apr 2020 08:08:45 +0000 (10:08 +0200)]
src/api2/access/user.rs: add access permissions

4 years agosrc/api2/access/acl.rs: add access permissions
Dietmar Maurer [Fri, 17 Apr 2020 08:03:09 +0000 (10:03 +0200)]
src/api2/access/acl.rs: add access permissions

4 years agosrc/api2/node/tasks.rs: use api macro, implement access permissions
Dietmar Maurer [Thu, 16 Apr 2020 15:47:21 +0000 (17:47 +0200)]
src/api2/node/tasks.rs: use api macro, implement access permissions

4 years agosrc/api2/node/syslog.rs: add access permissions
Dietmar Maurer [Thu, 16 Apr 2020 15:08:19 +0000 (17:08 +0200)]
src/api2/node/syslog.rs: add access permissions

4 years agosrc/api2/node/status.rs: add access permissions
Dietmar Maurer [Thu, 16 Apr 2020 15:05:09 +0000 (17:05 +0200)]
src/api2/node/status.rs: add access permissions

4 years agosrc/server/rest.rs: reduce delay for permission error to 500ms
Dietmar Maurer [Thu, 16 Apr 2020 10:56:34 +0000 (12:56 +0200)]
src/server/rest.rs: reduce delay for permission error to 500ms

4 years agosrc/api2/node/services.rs: add access permissions
Dietmar Maurer [Thu, 16 Apr 2020 10:46:39 +0000 (12:46 +0200)]
src/api2/node/services.rs: add access permissions

4 years agosrc/api2/node/journal.rs: add access permissions
Dietmar Maurer [Thu, 16 Apr 2020 10:44:59 +0000 (12:44 +0200)]
src/api2/node/journal.rs: add access permissions

4 years agostart impl. access permissions
Dietmar Maurer [Thu, 16 Apr 2020 08:01:59 +0000 (10:01 +0200)]
start impl. access permissions

4 years agosrc/config/cached_user_info.rs: new helper class
Dietmar Maurer [Thu, 16 Apr 2020 07:18:56 +0000 (09:18 +0200)]
src/config/cached_user_info.rs: new helper class

4 years agodepend on proxmox 0.1.21
Dietmar Maurer [Thu, 16 Apr 2020 07:36:28 +0000 (09:36 +0200)]
depend on proxmox 0.1.21

4 years agosrc/config/user.rs - cached_config: do not store/return digest
Dietmar Maurer [Wed, 15 Apr 2020 09:35:57 +0000 (11:35 +0200)]
src/config/user.rs - cached_config: do not store/return digest