Bug 1261496

Summary: Update SELinux integration in port-linux.c
Product: [Fedora] Fedora Reporter: Jakub Jelen <jjelen>
Component: opensshAssignee: Jakub Jelen <jjelen>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jjelen, mattias.ellert, mgrepl, plautrba, tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openssh-7.1p1-3.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-01 16:01:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
dist git patch
none
extended propsed dist git patch plautrba: review+

Description Jakub Jelen 2015-09-09 12:46:45 UTC
Description of problem:
SELinux integration is made to work on old userspace and needs to be updated.

Version-Release number of selected component (if applicable):
openssh-7.1p1-1.f24

How reproducible:
deterministic

Steps to Reproduce:
1. Build current openssh in rawhide.

Actual results:
GCC warnings about SELinux appears.

Expected results:
build without warnings.


Additional info:
GCC warnings during mock build:

In file included from port-linux.c:38:0:
/usr/include/selinux/flask.h:5:2: warning: #warning "Please remove any #include's of this header in your source code." [-Wcpp]
 #warning "Please remove any #include's of this header in your source code."
  ^
/usr/include/selinux/flask.h:6:2: warning: #warning "Instead, use string_to_security_class() to map the class name to a value." [-Wcpp]
 #warning "Instead, use string_to_security_class() to map the class name to a value."
  ^
port-linux.c:61:1: warning: 'ssh_selinux_getctxbyname' defined but not used [-Wunused-function]
 ssh_selinux_getctxbyname(char *pwname)
 ^

Comment 1 Jakub Jelen 2015-09-18 13:26:12 UTC
Created attachment 1074917 [details]
dist git patch

This issue should be fixed by attached patch. I will update openssh soon.

Comment 2 Jakub Jelen 2015-09-23 14:14:49 UTC
Created attachment 1076247 [details]
extended propsed dist git patch

I also found include of selinux/av_permissions.h so I am fixing also this one. I got inspired a bit by commit [1] to cronie, which was solving similar issue.

[1] https://git.fedorahosted.org/cgit/cronie.git/commit/?id=d4089ca0e5a4a171a362f4fabdf83c00b400260a

Comment 3 Fedora Update System 2015-09-25 12:52:33 UTC
openssh-7.1p1-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-8774808146

Comment 4 Fedora Update System 2015-09-27 00:55:21 UTC
openssh-7.1p1-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update openssh'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-8774808146

Comment 5 Fedora Update System 2015-10-01 16:01:40 UTC
openssh-7.1p1-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.