guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Ludovic Courtès
Date: Tue, 28 Nov 2023 10:26:20 -0500 (EST)

branch: master
commit 6c9e9fc26f2d60b87d478914e4c22d5ad95bf8f9
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Nov 27 15:22:28 2023 +0100

    remote-server: Warn when running as root.
    
    * src/cuirass/scripts/remote-server.scm (cuirass-remote-server): Warn
    when running as root.
---
 src/cuirass/scripts/remote-server.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/cuirass/scripts/remote-server.scm 
b/src/cuirass/scripts/remote-server.scm
index 485fa95..2a503b4 100644
--- a/src/cuirass/scripts/remote-server.scm
+++ b/src/cuirass/scripts/remote-server.scm
@@ -644,7 +644,10 @@ exiting."
              (%cache-directory cache))
 
         (when user
+          ;; Now that the private key has been read, drop privileges.
           (gather-user-privileges user))
+        (when (zero? (getuid))
+          (warning (G_ "running with root privileges, which is not 
recommended~%")))
 
         (and parameters
              (read-parameters parameters))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]