summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-05-13 18:38:35 +0200
committerLennart Poettering <lennart@poettering.net>2024-02-14 15:02:31 +0100
commit2f4aa81440c81d85551620853b71e6ca8ba79943 (patch)
treefd62439bc937b5ed65d6e08c35fb7f9b57baa398 /src/shared
parentuser-record: add fields for a fallback home dir + shell (diff)
downloadsystemd-2f4aa81440c81d85551620853b71e6ca8ba79943.tar.xz
systemd-2f4aa81440c81d85551620853b71e6ca8ba79943.zip
user-record-show: show if fallback data is used
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/user-record-show.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/shared/user-record-show.c b/src/shared/user-record-show.c
index ac0c7a776a..97235bd07b 100644
--- a/src/shared/user-record-show.c
+++ b/src/shared/user-record-show.c
@@ -204,8 +204,14 @@ void user_record_show(UserRecord *hr, bool show_full_group_info) {
printf(" Real Name: %s\n", hr->real_name);
hd = user_record_home_directory(hr);
- if (hd)
- printf(" Directory: %s\n", hd);
+ if (hd) {
+ printf(" Directory: %s", hd);
+
+ if (hr->fallback_home_directory && hr->use_fallback)
+ printf(" %s(fallback)%s", ansi_highlight_yellow(), ansi_normal());
+
+ printf("\n");
+ }
storage = user_record_storage(hr);
if (storage >= 0) /* Let's be political, and clarify which storage we like, and which we don't. About CIFS we don't complain. */
@@ -223,8 +229,14 @@ void user_record_show(UserRecord *hr, bool show_full_group_info) {
printf(" Removable: %s\n", yes_no(b));
shell = user_record_shell(hr);
- if (shell)
- printf(" Shell: %s\n", shell);
+ if (shell) {
+ printf(" Shell: %s", shell);
+
+ if (hr->fallback_shell && hr->use_fallback)
+ printf(" %s(fallback)%s", ansi_highlight_yellow(), ansi_normal());
+
+ printf("\n");
+ }
if (hr->email_address)
printf(" Email: %s\n", hr->email_address);