[PATCH] anaconda: Allow 'sshd' on the kernel command line.

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

 



Previously, we would only start sshd if you'd passed --kickstart to
anaconda.

Note that, in the absence of a kickstart file specifying users, this
will start sshd with no password for root.  Treat this like you would
treat 'vnc' with no 'vncpasswd'.

Signed-off-by: Adam Jackson <ajax@xxxxxxxxxx>
---
 anaconda |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/anaconda b/anaconda
index 7bac8ce..cca1ee5 100755
--- a/anaconda
+++ b/anaconda
@@ -373,6 +373,9 @@ def setupGraphicalLinks():
             pass
 
 def handleSshPw(anaconda):
+    if not anaconda.ksdata:
+        return
+
     import users
     u = users.Users(anaconda)
 
@@ -398,8 +401,6 @@ def createSshKey(algorithm, keyfile):
     iutil.execWithRedirect('ssh-keygen', argv, stdout=so, stderr=se)
 
 def startSsh():
-    if not flags.sshd:
-        return   
     if iutil.isS390():
         return
 
@@ -953,6 +954,7 @@ if __name__ == "__main__":
         anaconda.ksdata = kickstart.parseKickstart(anaconda, opts.ksfile)
         opts.rescue = anaconda.ksdata.rescue.rescue
 
+    if flags.sshd:
         # we need to have a libuser.conf that points to the installer root for
         # sshpw, but after that we start sshd, we need one that points to the
         # install target.
-- 
1.6.5.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux