Bug 70024

Summary: Incorrect path to OpennSSL includes
Product: [Retired] Red Hat Raw Hide Reporter: Alec Voropay <alec>
Component: pwlibAssignee: Alexander Larsson <alexl>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: alec
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-07-30 03:52:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 67217    

Description Alec Voropay 2002-07-29 09:27:32 UTC
Description of Problem:
The
/usr/share/pwlib/make/unix.mak
produces incorrect path to OpenSSL include directory
even the OPENSSLDIR=/usr/unclude/openssl defined

============
unix.mak
1234:STDCCFLAGS += -DP_SSL -I$(OPENSSLDIR)/include -I$(OPENSSLDIR)/crypto
============
It produces :
... -I/usr/include/openssl/include -I/usr/include/openssl/crypto


Version-Release number of selected component (if applicable):
pwlib-devel-1.3.3-2
pwlib-1.3.3-2


How Reproducible:
Try to compile any "pwlib" app

Steps to Reproduce:
1. export PWLIBDIR=/usr/share/pwlib
2. export OPENSSLDIR=/usr/include/openssl
3. make opt

Actual Results:
g++ -Wall -DP_LINUX -mcpu=i686 -D_REENTRANT -DP_HAS_SEMAPHORES -DP_SSL -I/usr/in
clude/openssl/include -I/usr/include/openssl/crypto -DP_EXPAT -DP_PTHREADS -DPHA
S_TEMPLATES -DPBYTE_ORDER=PLITTLE_ENDIAN -I/usr/share/pwlib/include/ptlib/unix -
I/usr/share/pwlib/include -O3 -DNDEBUG  -c a.cxx -o obj_linux_x86_r/a.o


Expected Results:
-I /usr/include/openssl

Additional Information:
1) pwlib-devel should depend on openssl-devel

2) pwlib-devel should export:

PWLIBDIR=/usr/share/pwlib
OPENSSLDIR=/usr/include/openssl
in
/etc/profile.d/pwlib.sh

Comment 1 Alexander Larsson 2002-08-07 10:03:22 UTC
Sounds like broken code to me, openssl is typically included like this:
#include <openssl/ssl.h>
So no -I is needed.

In fact adding an -I/usr/include/openssl fills up the includefile namespace with
all sort of dangerous filenames that can collide with other ones in libs and apps.