diff --git a/.gitignore b/.gitignore index c781ba0e5..d48dee372 100644 --- a/.gitignore +++ b/.gitignore @@ -329,6 +329,7 @@ Makefile.in /p2v/stamp-virt-p2v.pod /p2v/stamp-virt-p2v-make-disk.pod /p2v/stamp-virt-p2v-make-kickstart.pod +/p2v/test-virt-p2v-pxe.authorized_keys /p2v/test-virt-p2v-pxe.id_rsa /p2v/test-virt-p2v-pxe.id_rsa.pub /p2v/test-virt-p2v-pxe.img diff --git a/p2v/Makefile.am b/p2v/Makefile.am index 0fc266e71..cb6a48705 100644 --- a/p2v/Makefile.am +++ b/p2v/Makefile.am @@ -41,6 +41,7 @@ CLEANFILES = \ stamp-virt-p2v.pod \ stamp-virt-p2v-make-disk.pod \ stamp-virt-p2v-make-kickstart.pod \ + test-virt-p2v-pxe.authorized_keys \ test-virt-p2v-pxe.img \ test-virt-p2v-pxe.vmlinuz \ test-virt-p2v-pxe.initramfs \ @@ -230,6 +231,7 @@ check-slow: stamp-test-virt-p2v-pxe-data-files $(MAKE) check TESTS="$(SLOW_TESTS)" SLOW=1 stamp-test-virt-p2v-pxe-data-files: \ + test-virt-p2v-pxe.authorized_keys \ test-virt-p2v-pxe.img \ test-virt-p2v-pxe.vmlinuz test-virt-p2v-pxe.initramfs \ test-virt-p2v-pxe.sshd_config \ @@ -272,6 +274,12 @@ test-virt-p2v-pxe.sshd_config: test-virt-p2v-pxe.sshd_config.in chmod 0444 $@-t mv $@-t $@ +test-virt-p2v-pxe.authorized_keys: test-virt-p2v-pxe.id_rsa.pub $(top_builddir)/run + rm -f $@ $@-t + $(top_builddir)/run sh -c 'echo -n environment=\"PATH=$$PATH\"\ ' > $@-t + cat $< >> $@-t + mv $@-t $@ + test-virt-p2v-pxe.ssh_host_rsa_key test-virt-p2v-pxe.ssh_host_rsa_key.pub: stamp-test-virt-p2v-pxe-hostkey stamp-test-virt-p2v-pxe-hostkey: diff --git a/p2v/test-virt-p2v-pxe.sshd_config.in b/p2v/test-virt-p2v-pxe.sshd_config.in index 0262719bf..06c6ab243 100644 --- a/p2v/test-virt-p2v-pxe.sshd_config.in +++ b/p2v/test-virt-p2v-pxe.sshd_config.in @@ -34,7 +34,10 @@ UsePrivilegeSeparation no PidFile __abs_builddir__/test-virt-p2v-pxe.sshd.pid HostKey __abs_builddir__/test-virt-p2v-pxe.ssh_host_rsa_key -AuthorizedKeysFile __abs_builddir__/test-virt-p2v-pxe.id_rsa.pub +AuthorizedKeysFile __abs_builddir__/test-virt-p2v-pxe.authorized_keys # Don't check file permissions. StrictModes no + +# Allow the environment to be set in the authorized_keys file above. +PermitUserEnvironment yes