[arvados] created: 2.6.0-271-g49dabf8a4

git repository hosting git at public.arvados.org
Wed Jun 14 15:10:18 UTC 2023


        at  49dabf8a44770ab79960ceb91b08c2cb19eb2730 (commit)


commit 49dabf8a44770ab79960ceb91b08c2cb19eb2730
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Wed Jun 14 12:07:44 2023 -0300

    20643: Skip (with a log error) users that don't have their HOME dirs created.
    
    Some systems may be able to resolve users from centralized services, but
    need additional steps to allow them to log into the shell node. We then
    expect that allowed users should already have their HOME directories created
    before doing any syncing.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/services/login-sync/bin/arvados-login-sync b/services/login-sync/bin/arvados-login-sync
index 915541baf..b66367224 100755
--- a/services/login-sync/bin/arvados-login-sync
+++ b/services/login-sync/bin/arvados-login-sync
@@ -176,6 +176,10 @@ begin
     end
 
     homedir = pwnam[l[:username]].dir
+    if !File.exist?(homedir)
+      STDERR.puts "Home directory #{homedir} from user #{username} doesn't exist. Skipping."
+      next
+    end
     userdotssh = File.join(homedir, ".ssh")
     Dir.mkdir(userdotssh) if !File.exist?(userdotssh)
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list