Bug 318 - Install failure creating ssh_prng_cmds
Summary: Install failure creating ssh_prng_cmds
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: -current
Hardware: UltraSPARC Solaris
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-28 22:28 AEST by John Wilson
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments
Makefile patch (1.64 KB, patch)
2002-12-14 12:11 AEDT, Mark D. Roth
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Wilson 2002-06-28 22:28:18 AEST
Installation is failing during make install.

Output from make:

if [ -f ssh_prng_cmds -a ! -z "yes" ]; then \
   /usr/bin/perl ./fixprogs ssh_prng_cmds ; \
   if [ ! -f /usr/local/etc/ssh_prng_cmds ] ; then \
     ./install-sh -c -m 644 ssh_prng_cmds.out /usr/local/etc/ssh_prng_cmds; \
   else \
     echo "/usr/local/etc/ssh_prng_cmds already exists, install will not 
overwrite"; \
   fi ; \
fi
Couldn't open output file ssh_prng_cmds.out at ./fixprogs line 31.
*** Error code 13
make: Fatal error: Command failed for target `install-files'
Comment 1 Darren Tucker 2002-11-10 09:11:10 AEDT
errno 13 == EACCES.
Did you do the "make install" as root? If so did you do it on an NFS filesystem 
that maps root -> nobody?
Comment 2 Mark D. Roth 2002-12-14 12:11:56 AEDT
Created attachment 186 [details]
Makefile patch

This isn't specific to Solaris; I'm having the same problem under AIX.

Yes, I am building in an NFS-mounted directory where root is mapped to nobody. 

However, this is something that the build system should handle.

Please look at the attached patch and let me know what you think.
Comment 3 Darren Tucker 2003-05-04 19:12:59 AEST
Does anyone see any problems with the patch id #186?  It seems OK to me.
Comment 4 Damien Miller 2003-05-04 22:05:47 AEST
Maybe it would just be simpler to make sure that ssh_prng_cmds.out is
world-readable after creation by "make"
Comment 5 Darren Tucker 2003-05-04 23:16:34 AEST
I don't think that will help: "fixprogs" is run as part of "make install" and 
tries to write to the current dir as root.
Comment 6 Peter Stuge 2003-05-07 18:43:31 AEST
The only problem with patch (id=186) is that most of the commands in
ssh_prng_cmds.in will only produce meaningful output when run as root.
Comment 7 Darren Tucker 2003-05-07 20:04:09 AEST
Is that necessarily a bad thing?  ssh also uses ssh-rand-helper.
Comment 8 Peter Stuge 2003-05-07 21:41:45 AEST
Sorry, should have been clearer. fixprogs runs through all of the programs
listed in ssh_prng_cmds.in and determines whether the command works (return
code==0) and optionally how many bits of entropy the command can be expected to
really provide on the particular system. If fixprogs is run as a user and not
root, most if not all commands will be removed.

This is likely also the reason it has been put in the install phase.
Comment 9 Darren Tucker 2003-05-07 22:41:50 AEST
On my Solaris 8 host here (admittedly not locked down, so things like /var/adm 
are still readable), the output files are idential for root and non-root users.

$ make ssh_prng_cmds.out
if test ! -z "yes"; then \
        /usr/local/bin/perl ../fixprogs ssh_prng_cmds ; \
fi
$ mv ssh_prng_cmds.out ssh_prng_cmds.out.user
$ sudo make ssh_prng_cmds.out
if test ! -z "yes"; then \
        /usr/local/bin/perl ../fixprogs ssh_prng_cmds ; \
fi
$ ls -l ssh_prng*.out*
-rw-r--r--   1 root     other       1985 May  7 22:53 ssh_prng_cmds.out
-rw-r--r--   1 dtucker  dtucker     1985 May  7 22:53 ssh_prng_cmds.out.user
$ diff -u ssh_prng_cmds.out ssh_prng_cmds.out.user
Comment 10 Peter Stuge 2003-05-08 15:07:09 AEST
Quite right.
My local machine had six lines removed as user, a Debian system I tried had 26
out of the total 52 removed, I was pretty sure this would be much worse. I'm
glad I was wrong though. :)
Comment 11 Darren Tucker 2003-05-08 21:16:16 AEST
OK, good.  Any other objections?
Comment 12 Darren Tucker 2003-05-10 16:49:04 AEST
Fix applied.  Thanks.
Comment 13 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED