[ARVADOS] updated: 1.3.0-3052-g9e9142058

Git user git at public.arvados.org
Mon Aug 31 22:02:29 UTC 2020


Summary of changes:
 services/login-sync/bin/arvados-login-sync | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

       via  9e9142058cdee68ad567836799883b1aa6962bbd (commit)
      from  db13716484018404860275de75d278e0aaa08d8a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 9e9142058cdee68ad567836799883b1aa6962bbd
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Mon Aug 31 14:22:27 2020 -0400

    16779: Create user accounts even if they don't have an ssh key
    
    refs #16779
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/services/login-sync/bin/arvados-login-sync b/services/login-sync/bin/arvados-login-sync
index e00495c04..d5ec15986 100755
--- a/services/login-sync/bin/arvados-login-sync
+++ b/services/login-sync/bin/arvados-login-sync
@@ -36,7 +36,7 @@ begin
 
   logins = arv.virtual_machine.logins(:uuid => vm_uuid)[:items]
   logins = [] if logins.nil?
-  logins = logins.reject { |l| l[:username].nil? or l[:hostname].nil? or l[:public_key].nil? or l[:virtual_machine_uuid] != vm_uuid }
+  logins = logins.reject { |l| l[:username].nil? or l[:hostname].nil? or l[:virtual_machine_uuid] != vm_uuid }
 
   # No system users
   uid_min = 1000
@@ -79,13 +79,15 @@ begin
   logins.each do |l|
     keys[l[:username]] = Array.new() if not keys.has_key?(l[:username])
     key = l[:public_key]
-    # Handle putty-style ssh public keys
-    key.sub!(/^(Comment: "r[^\n]*\n)(.*)$/m,'ssh-rsa \2 \1')
-    key.sub!(/^(Comment: "d[^\n]*\n)(.*)$/m,'ssh-dss \2 \1')
-    key.gsub!(/\n/,'')
-    key.strip
-
-    keys[l[:username]].push(key) if not keys[l[:username]].include?(key)
+    if !key.nil?
+      # Handle putty-style ssh public keys
+      key.sub!(/^(Comment: "r[^\n]*\n)(.*)$/m,'ssh-rsa \2 \1')
+      key.sub!(/^(Comment: "d[^\n]*\n)(.*)$/m,'ssh-dss \2 \1')
+      key.gsub!(/\n/,'')
+      key.strip
+
+      keys[l[:username]].push(key) if not keys[l[:username]].include?(key)
+    end
   end
 
   seen = Hash.new()

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list