
#To:		openssh-unix-dev@mindrot.org
		Ben Lindstrom

#From:		henryg@optimation.com.au
		Henry Grebler
		Support Manager
		Optimation Software Engineering Pty Ltd
		Level 5, 448 St Kilda Road
		Melbourne, Vic, 3004, Australia

		Phone:	+61 3 9828 9111	Fax:	+61 3 9828 9191
		URL:	http://www.optimation.com.au




Hi Ben,


First of all, thank you for your contribution of the OpenSSH package
for Solaris. It is very useful.

I am reporting some problems I encountered. I guess I'm not really
asking for help; I can figure out what to do myself. I just wanted to
raise some issues which came to light when I tried to use the package.
It may be that there is nothing that can be done. On the other hand,
if you were unaware of the issues raised, you might have some ideas.

If you choose to disregard this entire communication, I will not feel
aggrieved. 


I am building a Solaris 9 server. Solaris 9 comes with ssh, so I want
to test my recent build of OpenSSH before replacing Sun's native ssh.
I tried to install into /tmp/hmg.

It seems that the package makes some assumptions: that root_path will
be used as a chroot newroot; that certain directories in
$root_path/etc already exist.

I enclose a screen-scrape of an install. Several errors were reported,
none of which prevented me from achieving my goal which was to test
the new build of OpenSSH prior to upgrading.

I saw that you have a variable TEST_DIR and a way of building a
package using that, but I had hoped to test the package and then
install it, not test one package and install another. I don't think it
would have got around the chroot problems.


Anyway, I was able to achieve all my goals, and your package made it a
lot easier than doing it manually. So, thanks again.


Regards,
Henry


------------------------------------------------------------------------
# pkgadd -d /tmp/OpenSSH-Solaris-sparc-OpenSSH_3.7p1.pkg -R /tmp/hmg -v

The following packages are available:
  1  OpenSSH     OpenSSH Portable for Solaris
                 (sparc) OpenSSH_3.7p1

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: 

Processing package instance <OpenSSH> from </tmp/OpenSSH-Solaris-sparc-OpenSSH_3.7p1.pkg>

OpenSSH Portable for Solaris
(sparc) OpenSSH_3.7p1
## Software contents file initialized
OpenSSH Portable Team - http://www.openssh.com/portable.html
+ trap exit 3 15 
USE_SYM_LINKS=no
PRE_INS_STOP=no
POST_INS_START=no
+ ckyorn -d n -p Do you want symbolic links for the start/stop scripts? (default: n) 

Do you want symbolic links for the start/stop scripts? (default: n) [y,n,?,q] y
ans=y
USE_SYM_LINKS=yes
+ [ -s /var/run/sshd.pid -a -f /etc/init.d/opensshd ] 
+ ckyorn -d n -p Start the sshd daemon after installing this package? (default: n) 

Start the sshd daemon after installing this package? (default: n) [y,n,?,q] n
ans=n
+ cat 
USE_SYM_LINKS='yes'
PRE_INS_STOP='no'
POST_INS_START='no'
+ exit 0 
Using </tmp/hmg> as the package base directory.
## Processing package information.
## Processing system information.
   1 package pathname is already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

The following files are being installed with setuid and/or setgid
permissions:
  /tmp/hmg/usr/local/libexec/ssh-keysign <setuid root>

Do you want to install these as setuid/setgid files [y,n,?,q] y

This package contains scripts which will be executed with super-user
permission during the process of installing this package.

Do you want to continue with the installation of <OpenSSH> [y,n,?] y

Installing OpenSSH Portable for Solaris as <OpenSSH>

## Executing preinstall script.
+ [ no = yes ] 
+ exit 0 
## Installing part 1 of 1.
/tmp/hmg/etc/init.d/opensshd
/tmp/hmg/usr/local/bin/scp
/tmp/hmg/usr/local/bin/sftp
/tmp/hmg/usr/local/bin/slogin <symbolic link>
/tmp/hmg/usr/local/bin/ssh
/tmp/hmg/usr/local/bin/ssh-add
/tmp/hmg/usr/local/bin/ssh-agent
/tmp/hmg/usr/local/bin/ssh-keygen
/tmp/hmg/usr/local/bin/ssh-keyscan
/tmp/hmg/usr/local/etc/moduli
/tmp/hmg/usr/local/etc/ssh_config.default
/tmp/hmg/usr/local/etc/sshd_config.default
/tmp/hmg/usr/local/libexec/sftp-server
/tmp/hmg/usr/local/libexec/ssh-keysign
/tmp/hmg/usr/local/man/man1/scp.1
/tmp/hmg/usr/local/man/man1/sftp.1
/tmp/hmg/usr/local/man/man1/slogin.1 <symbolic link>
/tmp/hmg/usr/local/man/man1/ssh-add.1
/tmp/hmg/usr/local/man/man1/ssh-agent.1
/tmp/hmg/usr/local/man/man1/ssh-keygen.1
/tmp/hmg/usr/local/man/man1/ssh-keyscan.1
/tmp/hmg/usr/local/man/man1/ssh.1
/tmp/hmg/usr/local/man/man5/ssh_config.5
/tmp/hmg/usr/local/man/man5/sshd_config.5
/tmp/hmg/usr/local/man/man8/sftp-server.8
/tmp/hmg/usr/local/man/man8/ssh-keysign.8
/tmp/hmg/usr/local/man/man8/sshd.8
/tmp/hmg/usr/local/sbin/sshd
/tmp/hmg/usr/local/share/Ssh.bin
[ verifying class <none> ]
## Executing postinstall script.
+ [ -f /tmp/hmg/usr/local/etc/ssh_config ] 
+ cp -p /tmp/hmg/usr/local/etc/ssh_config.default /tmp/hmg/usr/local/etc/ssh_config 
+ [ -f /tmp/hmg/usr/local/etc/sshd_config ] 
+ cp -p /tmp/hmg/usr/local/etc/sshd_config.default /tmp/hmg/usr/local/etc/sshd_config 
+ [ -f /tmp/hmg/usr/local/etc/ssh_prng_cmds.default ] 
+ [ -n  ] 
+ [ yes = yes ] 
+ [ yes = yes ] 
+ installf OpenSSH /tmp/hmg/etc/rcS.d/K30opensshd=../init.d/opensshd s 
+ installf OpenSSH /tmp/hmg/etc/rc0.d/K30opensshd=../init.d/opensshd s 
+ installf OpenSSH /tmp/hmg/etc/rc1.d/K30opensshd=../init.d/opensshd s 
+ installf OpenSSH /tmp/hmg/etc/rc2.d/S98opensshd=../init.d/opensshd s 
+ [ -d /var/run ] 
+ installf -f OpenSSH 
ERROR: attribute verification of </tmp/hmg/etc/rc0.d/K30opensshd> failed
    pathname does not exist
    unable to create symbolic link to <../init.d/opensshd>
ERROR: attribute verification of </tmp/hmg/etc/rc1.d/K30opensshd> failed
    pathname does not exist
    unable to create symbolic link to <../init.d/opensshd>
ERROR: attribute verification of </tmp/hmg/etc/rc2.d/S98opensshd> failed
    pathname does not exist
    unable to create symbolic link to <../init.d/opensshd>
ERROR: attribute verification of </tmp/hmg/etc/rcS.d/K30opensshd> failed
    pathname does not exist
    unable to create symbolic link to <../init.d/opensshd>
+ [ ! -z /tmp/hmg ] 
chroot=chroot /tmp/hmg
+ [ ! -z  ] 
+ egrep ^[ \t]*UsePrivilegeSeparation[ \t]+no /tmp/hmg//usr/local/etc/sshd_config 
+ echo UsePrivilegeSeparation enabled in config (or defaulting to on). 
UsePrivilegeSeparation enabled in config (or defaulting to on).
+ cut -f1 -d: /tmp/hmg/etc/group 
cut: cannot open /tmp/hmg/etc/group
+ egrep ^sshd$ 
+ cut -f3 -d: /tmp/hmg/etc/group 
cut: cannot open /tmp/hmg/etc/group
+ egrep ^67$ 
sshdgid=-g 67
+ echo Creating PrivSep group sshd. 
Creating PrivSep group sshd.
+ chroot /tmp/hmg /usr/sbin/groupadd -g 67 sshd 
chroot: No such file or directory
+ cut -f1 -d: /tmp/hmg/etc/passwd 
cut: cannot open /tmp/hmg/etc/passwd
+ egrep ^sshd$ 
+ cut -f3 -d: /tmp/hmg/etc/passwd 
cut: cannot open /tmp/hmg/etc/passwd
+ egrep ^67$ 
sshduid=-u 67
+ echo Creating PrivSep user sshd. 
Creating PrivSep user sshd.
+ chroot /tmp/hmg /usr/sbin/useradd -c SSHD PrivSep User -s /bin/false -g sshd -u 67 sshd 
chroot: No such file or directory
+ chroot /tmp/hmg /usr/bin/passwd -l sshd 
chroot: No such file or directory
+ [ no = yes ] 
+ exit 0 

Installation of <OpenSSH> was successful.


