ultimate010 / shellinabox

Automatically exported from code.google.com/p/shellinabox
Other
0 stars 0 forks source link

Won't build on Solaris systems #147

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Here's the summary of issues found as I tried to build shellinabox on Solaris 
(snv_89 and SmartOS):

* libhttp/url.c defines _XOPEN_SOURCE=500, but that's illegal with C99 in 
sys/feature_tests.h. Using C99 requires at least _XOPEN_SOURCE=600.

* sys/socket.h needs at least _XPG4_2 to define msg_control & msg_controllen. 
Setting _XOPEN_SOURCE=600 in Makefile fixes these two first items.

* Some termios related bits do not exist on Solaris at all and need an explicit 
definition (TTYDEF_IFLAG, TTYDEF_OFLAG, TTYDEF_LFLAG, TTYDEF_CFLAG).

* objcopy may not be present on Solaris. On SmartOS, it's not provided with the 
OS at all, but we provide it from binutils, however, it'd be nice to include a 
check for 'gobjcopy' which should be present on Solaris/OpenSolaris proper.

* RLIMIT_NPROC doesn't exist on Solaris.

* These functions do not exist on Solaris at all: getgrouplist, getresuid, 
setresuid, setresgid, getresgid

I was able to patch around all but the last one, which obviously needs more 
code in than I'm able to supply.

Original issue reported on code.google.com by filipha...@gmail.com on 13 Oct 2011 at 10:25

GoogleCodeExporter commented 9 years ago
There is a revised autotools with 2.11.  Please retest when the release is made.

Original comment by beewoo...@gmail.com on 31 Mar 2012 at 10:54

GoogleCodeExporter commented 9 years ago
With 2.14 only last issue is fixed, but new one raised: getgrouplist() also 
does not exist on Solaris

Original comment by elahi.fo...@gmail.com on 1 Dec 2012 at 12:40

GoogleCodeExporter commented 9 years ago
getgrouplist() can be fixed by adding this function to launcher.c. Code can be 
taken at, say 
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/kde-base/kdelibs/files/k
delibs-4.3.2-solaris-getgrouplist.patch?revision=1.1

Also '-lresolv -lnsl -lsocket' need to be passed to linker on Solaris

Original comment by elahi.fo...@gmail.com on 1 Dec 2012 at 8:43

GoogleCodeExporter commented 9 years ago
The following changes since commit ea1937a55ca27247805a54760291b25dc092d440:

  Fixing errors reported by piuparts. (2012-04-21 10:30:44 -0700)

are available in the git repository at:
  git@github.com:euromake/shellinabox.git bug147

Anton Salikhmetov (9):
      Issue 147: compiling libhttp/url.c on Solaris.
      Issue 147: compiling shellinaboxd.c on Solaris.
      Issue 147: fix including sys/socket.h on Solaris.
      Issue 147: TTYDEF_* missing on Solaris.
      Issue 147: conforming getpw*_r() on Solaris.
      Issue 147: getgrouplist() missing on Solaris.
      Issue 147: pass -Wall -Werror on Solaris.
      Issue 147: uname() returns non-negative value on Solaris.
      Issue 147: -lresolv -lsocket -lnsl on Solaris.

 Makefile.in                |    4 +-
 aclocal.m4                 |    4 +-
 configure                  |  544 +++++++++++++++++++++++++++++---------------
 configure.ac               |    4 +
 libhttp/url.c              |    2 +-
 shellinabox/launcher.c     |   85 +++++++-
 shellinabox/privileges.c   |    1 +
 shellinabox/shellinaboxd.c |    7 +-
 8 files changed, 460 insertions(+), 191 deletions(-)

Original comment by an...@euromake.com on 24 Dec 2012 at 11:32