Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 354247

Summary: net-misc/openssh-5.8_p1 requires patch to build on SeLinux systems
Product: Gentoo Linux Reporter: MarisN <maris.gis>
Component: [OLD] ServerAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: andreis.vinogradovs, lkml_ccc, selinux
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://lists.mindrot.org/pipermail/openssh-unix-dev/2011-February/029313.html
Whiteboard:
Package list:
Runtime testing required: ---

Description MarisN 2011-02-09 15:08:55 UTC
Same thing happens on ~AMD64 SeLinux machine. 
Quoting Andreas M. Kirchwitz from http://lists.mindrot.org/pipermail/openssh-unix-dev/2011-February/029313.html :

If configured on Linux (Fedora 14) with SELinux, compilation fails:

gcc -g -O2 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wno-pointer-sign -Wno-unused-result -fno-strict-aliasing -fno-builtin-memset -fstack-protector-all  -I. -I.. -I. -I./.. -I/usr/local/ssl/include  -DHAVE_CONFIG_H -c port-linux.c
port-linux.c: In function ‘ssh_selinux_setfscreatecon’:
port-linux.c:212:21: warning: unused variable ‘context’
port-linux.c: At top level:
port-linux.c:220:2: error: expected identifier or ‘(’ before ‘if’
port-linux.c:222:1: error: expected identifier or ‘(’ before ‘}’ token
make[1]: *** [port-linux.o] Error 1
make[1]: Leaving directory `/usr/local/src/openssh-5.8p1/openbsd-compat'
make: *** [openbsd-compat/libopenbsd-compat.a] Error 2


This patch fixes the problem:

--- ./openbsd-compat/port-linux.c_orig  2011-02-04 01:43:08.000000000 +0100
+++ ./openbsd-compat/port-linux.c       2011-02-04 03:06:21.060012941 +0100
@@ -213,7 +213,7 @@
 
        if (!ssh_selinux_enabled())
                return;
-       if (path == NULL)
+       if (path == NULL) {
                setfscreatecon(NULL);
                return;
        }


Reproducible: Always
Comment 1 SpanKY gentoo-dev 2011-02-10 02:38:10 UTC
should be fixed in the tree now ... thanks !
Comment 2 SpanKY gentoo-dev 2011-02-18 05:39:58 UTC
*** Bug 355351 has been marked as a duplicate of this bug. ***
Comment 3 SpanKY gentoo-dev 2011-02-19 17:41:28 UTC
*** Bug 355587 has been marked as a duplicate of this bug. ***