]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
user-record-show: show if fallback data is used
authorLennart Poettering <lennart@poettering.net>
Fri, 13 May 2022 16:38:35 +0000 (18:38 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 14 Feb 2024 14:02:31 +0000 (15:02 +0100)
src/shared/user-record-show.c

index ac0c7a776ab3e0ac3236a0f8083cd75fb34d34f4..97235bd07b5f76f760691d31ca33b0a3adbbddd3 100644 (file)
@@ -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);