]> git.proxmox.com Git - proxmox-backup.git/commit - pbs-config/src/user.rs
user: create default root user as typed struct
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 19 May 2020 14:24:54 +0000 (16:24 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 20 May 2020 04:09:08 +0000 (06:09 +0200)
commit9c5c383bff76786a6f0a2d1ed8b453e93ae03ba3
treecea6597bcb185612baf3c6f4284e1dfef124b5e2
parent7d4e362993925b4fef003303a3e30bc773d2f470
user: create default root user as typed struct

we added a userid attribute to the User struct, but missed that we
created the default user without that attribuet via the json! macro
which lead to a runtime panic on the deserialization

by using the struct directly, such errors will be caught by the compiler
in the future

with this change, we can remove the serde_json import here

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/config/user.rs