kdump.etc, submit-report.sh: Enhance Steam ID/Account obtaining
Currently we hardcode the account-related VDF file path in kdump, and expose it in "/etc/default/kdump" - this is unnecessary since this path is not expected to change nor users to mess with it; thanks Emil (@xexaxo) for this suggestion. So, this patch improves things in some ways: (a) Do not expose VDF path or Valve's server URL in user configurable file - no reasons for users to mess with that. (b) Generate "/home" mount point based on DEVNODE, also determine the username based on "getent'ing" the passwd database. See CAVEAT below. (c) Move the VDF parsing to a separate function to clean up the submit log path on submit-report.sh . No functional change is expected after this commit. CAVEAT: Notice that "getent passwd" is *VERY* slow, and if we follow a generic approach of doing it for UID_MIN..UID_MAX, it takes quite some time. So, instead we simplify and just query the user 1000; this might be a bit incomplete, but it's still better than hardcoding a username as it's done until now. Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
This commit is contained in:
@ -161,8 +161,7 @@
|
||||
# => The API details: it works by a first POST request to Valve servers,
|
||||
# which, when succeed, returns 3 main components in the response. We use
|
||||
# these values to perform a PUT request with the ZIP compressed file, and
|
||||
# finally a last POST request is necessary to finish the transaction. The
|
||||
# POST requests' URL is present in "/etc/default/kdump".
|
||||
# finally a last POST request is necessary to finish the transaction.
|
||||
# Below, the specific format of such requests:
|
||||
#
|
||||
# The first POST takes the following fields:
|
||||
|
||||
Reference in New Issue
Block a user