Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/pr/23'

* origin/pr/23:
  Allow passwordless login for user "user" (when using 'sudo xl console') for images being upgraded.
Marek Marczykowski-Górecki 9 gadi atpakaļ
vecāks
revīzija
54f8bb4169
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5 0
      debian/qubes-core-agent.preinst

+ 5 - 0
debian/qubes-core-agent.preinst

@@ -70,6 +70,11 @@ if [ "$1" = "upgrade" ] ; then
             fi
         fi
     fi
+    ## Allow passwordless login for user "user" (when using 'sudo xl console').
+    ## https://github.com/QubesOS/qubes-issues/issues/1130
+    if grep -q '^user:\!:' /etc/shadow ; then
+        passwd user -d >/dev/null || true
+    fi
 fi
 
 # dh_installdeb will replace this with shell code automatically