Commit Graph

730 Commits

Author SHA1 Message Date
Wolfgang Bumiller
304db5da3d use libexecdir for service binaries
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-01 10:41:54 +01:00
Wolfgang Bumiller
bed78ccd63 use BUILD_MODE via the environment
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-01 10:41:54 +01:00
Wolfgang Bumiller
069f2d16bf also apply cargo build flags to tests
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-01 10:41:54 +01:00
Wolfgang Bumiller
13b77d1060 buildsys: fixup package building
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-01 10:41:54 +01:00
Wolfgang Bumiller
a10bb8b941 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>
2019-02-01 10:41:54 +01:00
Wolfgang Bumiller
e0a5d1ca2f tests: chunk_store: cleanup .testdir
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-01 10:41:54 +01:00
Wolfgang Bumiller
a4f9188300 tests: import lazy_static as needed
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-01 10:41:54 +01:00
Wolfgang Bumiller
6285b251e7 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>
2019-02-01 10:41:54 +01:00
Wolfgang Bumiller
9fa03fa2d3 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>
2019-02-01 10:41:54 +01:00
Wolfgang Bumiller
8e4df103dd remove useless command option from daemons
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-01 10:41:54 +01:00
Wolfgang Bumiller
7028d088b4 add missing build dependencies
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-01 10:41:54 +01:00
Dietmar Maurer
6278365fd9 improve ApiMethod docu 2019-02-01 10:38:07 +01:00
Dietmar Maurer
4b2cdeb9a6 implement relead_timezone flag 2019-02-01 10:04:46 +01:00
Dietmar Maurer
c82bc1a1f9 depend on pam-auth, use pam for root login
Please use username "root@pam" for login via GUI.
2019-02-01 09:30:50 +01:00
Dietmar Maurer
a154a8e8a4 delay unauthorized request (rate limit) 2019-01-31 14:34:21 +01:00
Dietmar Maurer
5996577ab6 move http error class to router.rs 2019-01-31 13:22:30 +01:00
Dietmar Maurer
b9903d6331 server/rest.rs: verify auth cookie 2019-01-31 12:22:00 +01:00
Dietmar Maurer
f484eed3c2 Utils.js: fix cookie handling
Use unsecure cookie foör testing.
2019-01-31 10:08:08 +01:00
Dietmar Maurer
9f49fe1d5d avoid compiler warnings 2019-01-30 18:25:37 +01:00
Dietmar Maurer
34f956bc25 api2/access.rs: add ticket api 2019-01-30 15:16:10 +01:00
Wolfgang Bumiller
1bf446a33e fix timer_delete call
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-01-30 12:04:20 +01:00
Dietmar Maurer
cf671670a0 auth_helpers.rs: add timestamp to csrf token 2019-01-29 17:50:03 +01:00
Dietmar Maurer
1e76cbc6a2 auth_helpers.rs: implement assemble_csrf_prevention_token 2019-01-29 17:41:45 +01:00
Dietmar Maurer
d01e2420f7 load auth keys on startup 2019-01-29 17:21:58 +01:00
Dietmar Maurer
6c30068ebf auth_helpers.rs: split code into separate file 2019-01-29 16:55:49 +01:00
Dietmar Maurer
39a90ca6c5 bin/proxmox-backup-api.rs: gererate secret for csrf token 2019-01-29 13:15:33 +01:00
Dietmar Maurer
26027a151e tools/ticket.rs: remove debug statements 2019-01-29 13:04:01 +01:00
Dietmar Maurer
8d04280b29 tools/ticket.rs: add basic ticket support 2019-01-29 12:59:07 +01:00
Dietmar Maurer
c8f3f9b1af server/rest.rs: simplify proxy code
Only pass neccessary parameters.
2019-01-28 18:22:16 +01:00
Dietmar Maurer
a859fa95a9 add protected flag for some api methods 2019-01-28 18:16:47 +01:00
Dietmar Maurer
a3da38ddfd server/rest.rs: implement proxy_sync_api_request 2019-01-28 18:06:42 +01:00
Dietmar Maurer
f120483353 server/rest.rs: add proxy_sync_api_request() dummy 2019-01-28 17:30:39 +01:00
Dietmar Maurer
4e4df8e2f0 api/router.rs: add new 'protected' flag to ApiMethod 2019-01-28 17:18:42 +01:00
Dietmar Maurer
5bb3398171 server/formatter.rs: fix extjs error format 2019-01-28 13:44:48 +01:00
Dietmar Maurer
02c7a75520 src/bin/proxmox-backup-proxy.rs: implement unpriviledged server
We want to run the public server as user www-data. Requests needing
root priviledges needs to be proxied to the proxmox-backup.service, which
now listens to 127.0.0.1:82.
2019-01-28 13:29:58 +01:00
Dietmar Maurer
48849593ee api2/node/services.rs: implement service commands 2019-01-27 12:40:31 +01:00
Dietmar Maurer
d7d23785f0 RpcEnvironment: implement set_user() and get_user() 2019-01-27 10:52:26 +01:00
Dietmar Maurer
162b979394 RpcEnvironment: add environment type enum RpcEnvironmentType 2019-01-27 10:33:42 +01:00
Dietmar Maurer
e82dad9700 also pass rpcenv to async handlers 2019-01-27 10:18:52 +01:00
Dietmar Maurer
d2ab5f19e2 api2/node/services.rs: start services api 2019-01-26 17:54:18 +01:00
Dietmar Maurer
0f253593c6 move rpc environment implementation to separate files 2019-01-26 15:08:02 +01:00
Dietmar Maurer
6049b71f41 api: pass RpcEnvirnment to api handlers 2019-01-26 14:50:37 +01:00
Dietmar Maurer
d96d82736d use crate log and syslog 2019-01-26 10:56:11 +01:00
Dietmar Maurer
e182ab4a4a api2/node/syslog.rs: improve error handling 2019-01-26 10:23:52 +01:00
Dietmar Maurer
0441886842 api2/node/syslog.rs: implement dump journal 2019-01-25 18:20:51 +01:00
Dietmar Maurer
4f9a726833 api2/node/syslog.rs: add syslog api schema 2019-01-25 17:17:30 +01:00
Dietmar Maurer
68cacc0066 ServerAdministration.js: use localhost inside api path 2019-01-25 13:14:43 +01:00
Dietmar Maurer
d1a35593cb ServerAdministration.js: new widget 2019-01-25 13:10:55 +01:00
Dietmar Maurer
d85facd1d2 DataStoreConfig.js: new widget 2019-01-25 13:04:10 +01:00
Dietmar Maurer
864e85f4ff www/OnlineHelpInfo.js: add dummy to avoid warnings 2019-01-25 12:37:01 +01:00