]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
3 years agocleanup: always compute fingerprint in KeyConfig constructors
Dietmar Maurer [Thu, 21 Jan 2021 10:56:54 +0000 (11:56 +0100)]
cleanup: always compute fingerprint in KeyConfig constructors

3 years agoMerge branch 'master' of ssh://proxdev.maurer-it.com/rust/proxmox-backup
Dietmar Maurer [Thu, 21 Jan 2021 09:56:52 +0000 (10:56 +0100)]
Merge branch 'master' of ssh://proxdev.maurer-it.com/rust/proxmox-backup

3 years agotape: try to set encryption key with read-label command
Dietmar Maurer [Thu, 21 Jan 2021 09:30:29 +0000 (10:30 +0100)]
tape: try to set encryption key with read-label command

3 years agotape: restore_key - always update key, even if there is already an entry
Dietmar Maurer [Thu, 21 Jan 2021 06:46:21 +0000 (07:46 +0100)]
tape: restore_key - always update key, even if there is already an entry

3 years agotape: fix file permissions for tape encryptiuon keys
Dietmar Maurer [Thu, 21 Jan 2021 06:27:43 +0000 (07:27 +0100)]
tape: fix file permissions for tape encryptiuon keys

3 years agocleanup: remove missleading wording from code docs
Dietmar Maurer [Thu, 21 Jan 2021 06:23:51 +0000 (07:23 +0100)]
cleanup: remove missleading wording from code docs

3 years agocleanup: KeyConfig::decrypt - show password hint on error
Dietmar Maurer [Thu, 21 Jan 2021 06:13:56 +0000 (07:13 +0100)]
cleanup: KeyConfig::decrypt - show password hint on error

3 years agotape: use type Uuid instead of String
Dietmar Maurer [Wed, 20 Jan 2021 16:53:06 +0000 (17:53 +0100)]
tape: use type Uuid instead of String

3 years agotape: use specialized encryption key per media-set
Dietmar Maurer [Wed, 20 Jan 2021 16:27:01 +0000 (17:27 +0100)]
tape: use specialized encryption key per media-set

3 years agoapi: add types for UUIDs
Dietmar Maurer [Wed, 20 Jan 2021 16:16:46 +0000 (17:16 +0100)]
api: add types for UUIDs

3 years agoclippy: replace transmute with &*
Fabian Grünbichler [Wed, 20 Jan 2021 12:31:01 +0000 (13:31 +0100)]
clippy: replace transmute with &*

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: remove drop(&..)
Fabian Grünbichler [Wed, 20 Jan 2021 12:21:44 +0000 (13:21 +0100)]
clippy: remove drop(&..)

it does nothing.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: use is_null to check for null pointers
Fabian Grünbichler [Wed, 20 Jan 2021 10:38:24 +0000 (11:38 +0100)]
clippy: use is_null to check for null pointers

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: remove some unnecessary reference taking
Fabian Grünbichler [Wed, 20 Jan 2021 09:50:35 +0000 (10:50 +0100)]
clippy: remove some unnecessary reference taking

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: fix for_kv_map
Fabian Grünbichler [Wed, 20 Jan 2021 09:42:57 +0000 (10:42 +0100)]
clippy: fix for_kv_map

and allow it in the one case where the entry loop is intended, but the
code is not yet implemented fully.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: fix/allow needless_range_loop
Fabian Grünbichler [Tue, 19 Jan 2021 14:03:04 +0000 (15:03 +0100)]
clippy: fix/allow needless_range_loop

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: use while let loops
Fabian Grünbichler [Tue, 19 Jan 2021 13:52:20 +0000 (14:52 +0100)]
clippy: use while let loops

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: pass &str/&[..] instead of &String/&Vec
Fabian Grünbichler [Tue, 19 Jan 2021 13:46:39 +0000 (14:46 +0100)]
clippy: pass &str/&[..] instead of &String/&Vec

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: remove unnecessary &mut
Fabian Grünbichler [Tue, 19 Jan 2021 13:40:13 +0000 (14:40 +0100)]
clippy: remove unnecessary &mut

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: remove unnecessary `let` binding
Fabian Grünbichler [Tue, 19 Jan 2021 13:24:31 +0000 (14:24 +0100)]
clippy: remove unnecessary `let` binding

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: remove/replace needless explicit lifetimes
Fabian Grünbichler [Tue, 19 Jan 2021 13:19:47 +0000 (14:19 +0100)]
clippy: remove/replace needless explicit lifetimes

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: fix/allow identity_op
Fabian Grünbichler [Tue, 19 Jan 2021 13:12:07 +0000 (14:12 +0100)]
clippy: fix/allow identity_op

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: us *_or_else with function calls
Fabian Grünbichler [Tue, 19 Jan 2021 13:04:46 +0000 (14:04 +0100)]
clippy: us *_or_else with function calls

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: convert single match to if let
Fabian Grünbichler [Tue, 19 Jan 2021 11:09:33 +0000 (12:09 +0100)]
clippy: convert single match to if let

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: misc. fixes
Fabian Grünbichler [Tue, 19 Jan 2021 10:37:49 +0000 (11:37 +0100)]
clippy: misc. fixes

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: don't pass along unit value
Fabian Grünbichler [Tue, 19 Jan 2021 10:36:26 +0000 (11:36 +0100)]
clippy: don't pass along unit value

make it explicit. this whole section should probably be re-written with
select!

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: use unwrap_or_default
Fabian Grünbichler [Tue, 19 Jan 2021 10:31:37 +0000 (11:31 +0100)]
clippy: use unwrap_or_default

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: use copied/cloned instead of map
Fabian Grünbichler [Tue, 19 Jan 2021 10:30:30 +0000 (11:30 +0100)]
clippy: use copied/cloned instead of map

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: shorten assignments
Fabian Grünbichler [Tue, 19 Jan 2021 10:12:01 +0000 (11:12 +0100)]
clippy: shorten assignments

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: fix option_as_ref_deref
Fabian Grünbichler [Tue, 19 Jan 2021 10:10:40 +0000 (11:10 +0100)]
clippy: fix option_as_ref_deref

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: use matches!
Fabian Grünbichler [Tue, 19 Jan 2021 10:08:10 +0000 (11:08 +0100)]
clippy: use matches!

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: collapse nested ifs
Fabian Grünbichler [Tue, 19 Jan 2021 10:06:26 +0000 (11:06 +0100)]
clippy: collapse nested ifs

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: avoid useless format!
Fabian Grünbichler [Tue, 19 Jan 2021 09:54:37 +0000 (10:54 +0100)]
clippy: avoid useless format!

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: remove explicit returns
Fabian Grünbichler [Tue, 19 Jan 2021 09:50:42 +0000 (10:50 +0100)]
clippy: remove explicit returns

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: use chars / byte string literals
Fabian Grünbichler [Tue, 19 Jan 2021 09:38:00 +0000 (10:38 +0100)]
clippy: use chars / byte string literals

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: is_some/none/ok/err/empty
Fabian Grünbichler [Tue, 19 Jan 2021 09:27:59 +0000 (10:27 +0100)]
clippy: is_some/none/ok/err/empty

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: remove needless bool literals
Fabian Grünbichler [Mon, 18 Jan 2021 13:12:27 +0000 (14:12 +0100)]
clippy: remove needless bool literals

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: use strip_prefix instead of manual stripping
Fabian Grünbichler [Mon, 18 Jan 2021 12:50:28 +0000 (13:50 +0100)]
clippy: use strip_prefix instead of manual stripping

it's less error-prone (off-by-one!)

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: drop redundant 'static lifetime
Fabian Grünbichler [Mon, 18 Jan 2021 12:25:04 +0000 (13:25 +0100)]
clippy: drop redundant 'static lifetime

those declarations are already const/static..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: remove unnecessary closures
Fabian Grünbichler [Fri, 15 Jan 2021 14:21:34 +0000 (15:21 +0100)]
clippy: remove unnecessary closures

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: remove unnecessary clones
Fabian Grünbichler [Fri, 15 Jan 2021 13:38:27 +0000 (14:38 +0100)]
clippy: remove unnecessary clones

and from::<T>(T)

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: collapse/rework nested ifs
Fabian Grünbichler [Fri, 15 Jan 2021 13:10:24 +0000 (14:10 +0100)]
clippy: collapse/rework nested ifs

no semantic changes (intended).

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agotape: allocate new media set when pool encryption key changes
Dietmar Maurer [Wed, 20 Jan 2021 10:24:58 +0000 (11:24 +0100)]
tape: allocate new media set when pool encryption key changes

3 years agoimprove code docs
Dietmar Maurer [Wed, 20 Jan 2021 10:01:38 +0000 (11:01 +0100)]
improve code docs

3 years agotape: implemenmt show key
Dietmar Maurer [Wed, 20 Jan 2021 09:20:41 +0000 (10:20 +0100)]
tape: implemenmt show key

Moved API types Kdf and KeyInfo to src/api2/types/mod.rs.

3 years agotape: implement change-passphrase for tape encryption keys
Dietmar Maurer [Wed, 20 Jan 2021 07:25:42 +0000 (08:25 +0100)]
tape: implement change-passphrase for tape encryption keys

3 years agotape: add --kdf parameter to create key api
Dietmar Maurer [Wed, 20 Jan 2021 06:49:35 +0000 (07:49 +0100)]
tape: add --kdf parameter to create key api

3 years agocleanup KeyConfig
Dietmar Maurer [Tue, 19 Jan 2021 16:55:27 +0000 (17:55 +0100)]
cleanup KeyConfig

3 years agoadd "password hint" to KeyConfig
Dietmar Maurer [Tue, 19 Jan 2021 11:35:15 +0000 (12:35 +0100)]
add "password hint" to KeyConfig

3 years agoui: tfa: rework removal confirmation dialog
Thomas Lamprecht [Tue, 19 Jan 2021 18:44:19 +0000 (19:44 +0100)]
ui: tfa: rework removal confirmation dialog

present all relevant information about the TFA token to be removed,
so that a user can make a better decision.

Rework layout to match our commonly used style.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tfa view: add userid to TFA data model
Thomas Lamprecht [Tue, 19 Jan 2021 18:43:54 +0000 (19:43 +0100)]
ui: tfa view: add userid to TFA data model

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: login view: fix missing trailing comma
Thomas Lamprecht [Tue, 19 Jan 2021 18:43:25 +0000 (19:43 +0100)]
ui: login view: fix missing trailing comma

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotape: generate random encryptions keys and store key_config on media
Dietmar Maurer [Tue, 19 Jan 2021 05:19:18 +0000 (06:19 +0100)]
tape: generate random encryptions keys and store key_config on media

3 years agocleanup: factor out decrypt_key_config
Dietmar Maurer [Tue, 19 Jan 2021 09:50:00 +0000 (10:50 +0100)]
cleanup: factor out decrypt_key_config

3 years agoui: tfa/totp: fix setting issuer in secret URL
Thomas Lamprecht [Mon, 18 Jan 2021 15:27:00 +0000 (16:27 +0100)]
ui: tfa/totp: fix setting issuer in secret URL

it's recommended to set the issuer for both, the get parameter and
the initial issuer label prefix[0].

[0]: https://github.com/google/google-authenticator/wiki/Key-Uri-Format#label

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotfa: remove/empty description for recovery keys
Wolfgang Bumiller [Mon, 18 Jan 2021 14:11:16 +0000 (15:11 +0100)]
tfa: remove/empty description for recovery keys

While the user chosen description is not allowed to be
empty, we do leave it empty for recovery keys, as a "dummy
description" makes little sense...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoui: tfa: fix ctime column width
Thomas Lamprecht [Mon, 18 Jan 2021 13:31:15 +0000 (14:31 +0100)]
ui: tfa: fix ctime column width

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agogui: tfa: make description fill the remaining space
Wolfgang Bumiller [Mon, 18 Jan 2021 12:50:02 +0000 (13:50 +0100)]
gui: tfa: make description fill the remaining space

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agogui: tfa: show when entries were created
Wolfgang Bumiller [Mon, 18 Jan 2021 12:50:01 +0000 (13:50 +0100)]
gui: tfa: show when entries were created

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotfa: add 'created' timestamp to entries
Wolfgang Bumiller [Mon, 18 Jan 2021 12:50:00 +0000 (13:50 +0100)]
tfa: add 'created' timestamp to entries

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agodocs: fix typo in client manpage
Oguz Bektas [Mon, 18 Jan 2021 11:18:39 +0000 (12:18 +0100)]
docs: fix typo in client manpage

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
3 years agogui: enumerate recovery keys and list in 2nd factor window
Wolfgang Bumiller [Mon, 18 Jan 2021 11:46:47 +0000 (12:46 +0100)]
gui: enumerate recovery keys and list in 2nd factor window

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotfa: remember recovery indices
Wolfgang Bumiller [Mon, 18 Jan 2021 11:46:46 +0000 (12:46 +0100)]
tfa: remember recovery indices

and tell the client which keys are still available rather
than just yes/no/low

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotape: implement encrypted backup - simple version
Dietmar Maurer [Mon, 18 Jan 2021 12:36:11 +0000 (13:36 +0100)]
tape: implement encrypted backup - simple version

This is just a proof of concept, only storing the encryption key fingerprint
inside the media-set label.

3 years agoimplement FromStr for Fingerprint
Dietmar Maurer [Mon, 18 Jan 2021 11:14:05 +0000 (12:14 +0100)]
implement FromStr for Fingerprint

3 years agotape: add encrypt property to media pool configuration
Dietmar Maurer [Mon, 18 Jan 2021 07:16:44 +0000 (08:16 +0100)]
tape: add encrypt property to media pool configuration

3 years agotape: clear encryption key before writing labels
Dietmar Maurer [Mon, 18 Jan 2021 06:42:50 +0000 (07:42 +0100)]
tape: clear encryption key before writing labels

We always write labels unencrypted.

3 years agotape: add hardware encryption key managenent api
Dietmar Maurer [Mon, 18 Jan 2021 06:16:06 +0000 (07:16 +0100)]
tape: add hardware encryption key managenent api

3 years agoui: tfa: fix title for removal confirmation
Thomas Lamprecht [Mon, 18 Jan 2021 12:28:02 +0000 (13:28 +0100)]
ui: tfa: fix title for removal confirmation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tfa/recovery: add print button to key info window
Thomas Lamprecht [Mon, 18 Jan 2021 09:45:47 +0000 (10:45 +0100)]
ui: tfa/recovery: add print button to key info window

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tfa/recovery: fix copy button text, add icon
Thomas Lamprecht [Mon, 18 Jan 2021 09:45:28 +0000 (10:45 +0100)]
ui: tfa/recovery: fix copy button text, add icon

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tfa/recovery: disallow to close key info window with ESC
Thomas Lamprecht [Mon, 18 Jan 2021 09:44:37 +0000 (10:44 +0100)]
ui: tfa/recovery: disallow to close key info window with ESC

to avoid accidental closing it

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tfa: specify which confirmation password is required
Thomas Lamprecht [Mon, 18 Jan 2021 09:12:21 +0000 (10:12 +0100)]
ui: tfa: specify which confirmation password is required

Clarify that the password of the user one wants to add TFA too is
required, which is not necessarily the one of the current logged in
user. Use an empty text for that.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tfa totp: whitespace and padding fix
Thomas Lamprecht [Mon, 18 Jan 2021 09:10:16 +0000 (10:10 +0100)]
ui: tfa totp: whitespace and padding fix

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: access: stream line add/edit/.. button order and separators
Thomas Lamprecht [Mon, 18 Jan 2021 08:33:29 +0000 (09:33 +0100)]
ui: access: stream line add/edit/.. button order and separators

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agopull: add error context for initial group list call
Fabian Grünbichler [Fri, 15 Jan 2021 10:48:54 +0000 (11:48 +0100)]
pull: add error context for initial group list call

otherwise the user is confronted with a generic error like "permission
check failed" with no indication that it refers to a request made to the
remote PBS instance..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agopull: rustfmt
Fabian Grünbichler [Fri, 15 Jan 2021 10:48:53 +0000 (11:48 +0100)]
pull: rustfmt

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agotape: encryption scsi command cleanup
Dietmar Maurer [Sat, 16 Jan 2021 17:24:04 +0000 (18:24 +0100)]
tape: encryption scsi command cleanup

3 years agotape: add scsi commands to control drive hardware encryption
Dietmar Maurer [Sat, 16 Jan 2021 14:57:43 +0000 (15:57 +0100)]
tape: add scsi commands to control drive hardware encryption

3 years agotape: sgutils2.rs - add do_out_command()
Dietmar Maurer [Sat, 16 Jan 2021 14:15:54 +0000 (15:15 +0100)]
tape: sgutils2.rs - add do_out_command()

Make it possible to run commands that writes data.

3 years agoui: webauthn config: set default values for unconfigured case
Thomas Lamprecht [Fri, 15 Jan 2021 15:25:47 +0000 (16:25 +0100)]
ui: webauthn config: set default values for unconfigured case

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: webauthn config: use ID instead of Id/id
Thomas Lamprecht [Fri, 15 Jan 2021 15:25:26 +0000 (16:25 +0100)]
ui: webauthn config: use ID instead of Id/id

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agogui: tfa configuration
Wolfgang Bumiller [Fri, 15 Jan 2021 10:06:18 +0000 (11:06 +0100)]
gui: tfa configuration

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotfa: add webauthn configuration API entry points
Wolfgang Bumiller [Fri, 15 Jan 2021 10:06:17 +0000 (11:06 +0100)]
tfa: add webauthn configuration API entry points

Currently there's not yet a node config and the WA config is
somewhat "tightly coupled" to the user entries in that
changing it can lock them all out, so for now I opted for
fewer reorganization and just use a digest of the
canonicalized config here, and keep it all in the tfa.json
file.

Experimentally using the flatten feature on the methods with
an`Updater` struct similar to what the api macro is supposed
to be able to derive on its own in the future.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobakckup::manifest: use tools::json for canonical representation
Wolfgang Bumiller [Fri, 15 Jan 2021 10:06:16 +0000 (11:06 +0100)]
bakckup::manifest: use tools::json for canonical representation

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoadd tools::json for canonical json generation
Wolfgang Bumiller [Fri, 15 Jan 2021 10:06:15 +0000 (11:06 +0100)]
add tools::json for canonical json generation

moving this from backup::manifest, no functional changes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotape: do not abort backup if tape drive does not support tape-alert-flags
Dietmar Maurer [Fri, 15 Jan 2021 10:43:17 +0000 (11:43 +0100)]
tape: do not abort backup if tape drive does not support tape-alert-flags

3 years agotape: update restore docu
Dietmar Maurer [Fri, 15 Jan 2021 08:44:20 +0000 (09:44 +0100)]
tape: update restore docu

3 years agod/rules: patch out wrongly linked libraries from ELFs
Thomas Lamprecht [Thu, 14 Jan 2021 16:30:09 +0000 (17:30 +0100)]
d/rules: patch out wrongly linked libraries from ELFs

this is a HACK!

It seems that due to lots of binaries getting compiled from a single
crate the compiler is confused when linking in dependencies to each
binaries ELF.

It picks up the combined set (union) of all dependencies and sets
those to every ELF. This results in the client, for example, linking
to libapt-pkg or libsystemd even if none of that symbols are used..

This could be possibly fixed by restructuring the source tree into
sub crates/workspaces or what not, not really tested and *lots* of
work.

So as stop gap measure use `ldd -u` to find out unused linkage and
remove them using `patchelf`.

While this works well, and seems to not interfere with any debug
symbol usage or other usage in general it still is a hack and should
be dropped once the restructuring of the source tree has shown to
bring similar effects.

This allows for much easier re-use of the generated client .deb
package on other Debian derivaties (e.g., Ubuntu) which got blocked
until now due to wrong libt-apt verison or the like.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodebian/control: set VCS urls
Thomas Lamprecht [Thu, 14 Jan 2021 15:23:50 +0000 (16:23 +0100)]
debian/control: set VCS urls

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/control: sort and fix whitespace errors
Thomas Lamprecht [Thu, 14 Jan 2021 14:11:06 +0000 (15:11 +0100)]
d/control: sort and fix whitespace errors

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoaccess: restrict password changes on @pam realm to superuser
Oguz Bektas [Wed, 13 Jan 2021 16:26:15 +0000 (17:26 +0100)]
access: restrict password changes on @pam realm to superuser

for behavior consistency with `update_user`

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
3 years agoaccess: limit editing pam credentials to superuser
Oguz Bektas [Wed, 13 Jan 2021 16:26:14 +0000 (17:26 +0100)]
access: limit editing pam credentials to superuser

modifying @pam users credentials should be only possible for root@pam,
otherwise it can have unintended consequences.

also enforce the same limit on user creation (except self_service check,
since it makes no sense during user creation)

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
3 years agoproxmox 0.10: adapt to moved ParameterSchema
Fabian Grünbichler [Wed, 13 Jan 2021 13:48:33 +0000 (14:48 +0100)]
proxmox 0.10: adapt to moved ParameterSchema

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agocleanup: remove unnecessary 'mut' and '.clone()'
Fabian Grünbichler [Fri, 4 Dec 2020 10:53:34 +0000 (11:53 +0100)]
cleanup: remove unnecessary 'mut' and '.clone()'

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoexamples: unify h2 examples
Fabian Grünbichler [Fri, 4 Dec 2020 11:59:34 +0000 (12:59 +0100)]
examples: unify h2 examples

update them to the new tokio-openssl API and remove socket buffer size
setting - it was removed from the TcpStream API, and is now only
available via TcpSocket (which can in turn be converted to a
TcpListener), but this is not needed for this example.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agohyper: use new hyper::upgrade
Fabian Grünbichler [Fri, 4 Dec 2020 08:11:29 +0000 (09:11 +0100)]
hyper: use new hyper::upgrade

the old Body::on_upgrade method is no more

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agotokio 1.0: update to new Signal interface
Fabian Grünbichler [Mon, 11 Jan 2021 08:52:52 +0000 (09:52 +0100)]
tokio 1.0: update to new Signal interface

Signal does not yet re-implement Stream (and is not yet wrapped in
tokio-stream either).

see https://github.com/tokio-rs/tokio/pull/3383

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agotokio 1.0: update to new tokio-openssl interface
Fabian Grünbichler [Mon, 11 Jan 2021 08:51:21 +0000 (09:51 +0100)]
tokio 1.0: update to new tokio-openssl interface

connect/accept are now happening on pinned SslStreams

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agotokio 1.0: use ReceiverStream from tokio-stream
Fabian Grünbichler [Mon, 11 Jan 2021 08:50:04 +0000 (09:50 +0100)]
tokio 1.0: use ReceiverStream from tokio-stream

to wrap a Receiver in a Stream. this will likely move back into tokio
proper once we have a std Stream..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>