Commit graph

19 commits

Author SHA1 Message Date
Andras Timar
96760c5e43 ask for username (default to 'admin' if nothing set) with 'loolconfig set-admin-password'
Change-Id: I04bf3d225e4149ed69bc55e14d1ced1dd3f8f7ea
2018-11-13 14:32:37 +01:00
Aron Budea
c20c51d8a5 Fix unused-result warning.
Change-Id: I31fa4edd68e8a5ba973c159599e71e74406b8e6e
Reviewed-on: https://gerrit.libreoffice.org/51947
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-03-28 10:16:29 +02:00
Jan Holesovsky
3304e90935 The return value of system() shouldn't be ignored.
Change-Id: I7422bfb3997c205333a8558884c65f2ff3795e38
2018-03-28 09:30:27 +02:00
Jan Holesovsky
aaf76a13ba loolconfig: Create a shortcut for running the systemplate update.
Change-Id: I082cf6e3f560a9c1880f0680ad4d2876d055dbc4
Reviewed-on: https://gerrit.libreoffice.org/51315
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2018-03-26 23:13:33 +02:00
Pranav Kant
463fc60440 loolconfig: set-raw-config -> set
Change-Id: I7821bcf7bf8a6b8247e824d18b1d9f29b8db8851
2018-02-13 12:33:01 +05:30
Pranav Kant
f942e5a29e loolconfig: Allow changing loolwsd.xml
eg: `loolconfig set-raw-config admin_console.password admin`

And while at it, stop processing all the arguments given to the command.
Regard the first argument (without any "--") as command and let the
specific-command handling routine handle the remaining arguments the way
it wants.

Change-Id: I6cc406c56701dba2b99e0a3c4a98c505df70ee60
2018-01-26 18:34:17 +05:30
Pranav Kant
f63858433b loplugin:includeform
Change-Id: Ib62a7aa61062f00698aa3e8a144438de5c57e53d
2017-12-20 21:21:05 +05:30
Miklos Vajna
bb7ac21d44 Make sure that loop index type is never narrower than the length type
Change-Id: I19aac80850c0371085ca6364412d5ac9207220d0
2017-11-06 09:14:38 +01:00
Miklos Vajna
409be28c8b Config: avoid redundant string initialization
Change-Id: Ia90aae804c3656f54e8f36ca5ef1fd52a99e05c9
2017-10-17 09:04:04 +02:00
Andras Timar
11ad1b4ab9 loolconfig: don't show option for set-support-key, it it's not compiled in
Change-Id: Ie3baeee860e5ef0a797a3061373e266f40b41809
2017-10-12 21:40:55 +02:00
Jan Holesovsky
783e3552c0 Support key logic in loolws + improvements in loolconfig.
To be able to set the support key directly from the command line, and to show
the option, etc.

Change-Id: Iac93bc47a6f4b9d5a5ad0ac8b06bda978e01b760
Reviewed-on: https://gerrit.libreoffice.org/43098
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-10-06 11:37:18 +02:00
Michael Meeks
79053911fc Support key logic and verification.
Change-Id: Ie55150b99df3e80239236571af185502196ad3e9
Reviewed-on: https://gerrit.libreoffice.org/43097
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 56385cb8ac2a57af4eb70bc8bc7313a9299533c3)
Reviewed-on: https://gerrit.libreoffice.org/43099
2017-10-03 21:52:45 +02:00
Pranav Kant
67bf4dc212 loolconfig: print help information from option set
Change-Id: Ifbc5ca72d17444b8fdefb7093744cbead1922a31
2017-08-31 09:24:44 +05:30
Pranav Kant
08efd75e31 wsd: fix incorrect password hash format written to config file
Regression from 9a75040bf0

Change-Id: I82cd3db17a18702a046973cfe863fdda750b363b
2017-08-30 17:22:33 +05:30
Andras Timar
945d74c237 wsd: fix compilation with old OpenSSL that does not have PKCS5_PBKDF2_HMAC()
Change-Id: If48641f6cbcc4d4ded78ea5cc9c9f66063a2ac0a
Reviewed-on: https://gerrit.libreoffice.org/39779
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-07-31 19:40:37 +02:00
Miklos Vajna
9a75040bf0 tools: avoid string concatenation resulting in allocation of unnecessary temporary strings
By using std::stringstream instead.

Change-Id: I6fe12afd4adc13166746b1d98bf8ea75a28208e5
2017-07-03 08:08:54 +02:00
Miklos Vajna
ad8584f5d7 tools: initializer for base class XMLConfiguration is redundant, remove it
Also run the clang static analyzer on net/ by excluding test/, and not
explicitly listing all non-test directories.

Change-Id: Iac203f1cf9161da1c51501de8b0c3cc9dc6e2027
2017-06-22 09:03:54 +02:00
Pranav Kant
7a4bc5b95a admin-console: Check the password against hashed value in config
The new password hash property is called secure_password in the config
file. `loolconfig` tool should be used to set the password hash in
appropriate format with desired salt length, password length, number of
iterations in PBKDF2.

To be backward compatible, plain-text password for admin-console in
config file is still accepted in case secure_password property is
missing from the config file.

Change-Id: If229999dac62856e368555c0242c4aa6f8061fba
2017-05-25 01:18:31 +05:30
Pranav Kant
9bd89e89c3 loolconfig: tool to generate admin password hash with PBKDF2
A normal usage to set the admin password would be like :

loolconfig set-admin-password --config-file ./loolwsd.xml

Other command line options can also be given, like --pwd-salt-length,
--pwd-hash-length, --pwd-iterations.

Change-Id: I2a6f8d25e068b53a3f945426f0779c8410b2c8ba
2017-05-25 01:18:31 +05:30