Commit Graph

3 Commits

Author SHA1 Message Date
d279ea84aa 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>
2023-03-31 15:34:42 -03:00
f6897255a2 kdump-steamos: Strengthen /etc/default/kdump checks
Instead of just checking the file existence, check if it's not
zero-sized.

Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
2023-03-31 15:34:42 -03:00
4d3a810bab kdump-steamos: swap underscore for hyphen in filenames
Currently half of the files are hyphenated, while the rest use
underscore. Just move everything to hyphens.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-31 15:34:42 -03:00