Version: 4.4 (using KDE 4.4.5) OS: OpenBSD secure.cpp checks against SO_PEERCRED define to see whether or not getsockopt is usable. Unfortunately while OpenBSD has a getsockopt and SO_PEERCRED defined, the ucred struct is different. It's actually better to utilise getpeereid. Since the SO_PEERCRED define will be hit first, I've moved it below the HAVE_GETPEEREID check. Also I changed some of the #else #if branching to use #elif for easier readability. Finally, the check for HAVE_GETPEEREID was added to the cmake build files. Let me know if you have any questions/concerns regarding this patch. Reproducible: Didn't try
Created attachment 52999 [details] Patch to make secure.cpp compile by using getpeereid
Created attachment 53000 [details] Patch to add the HAVE_GETPEEREID check to the cmake file
Specific build failure point: /usr/obj/ports/kdebase-runtime-4.4.5/kdebase-runtime-4.4.5/kdesu/kdesud/secure.cpp: In constructor 'SocketSecurity::SocketSecurity(int)': /usr/obj/ports/kdebase-runtime-4.4.5/kdebase-runtime-4.4.5/kdesu/kdesud/secure.cpp:37: error: 'ucred' was not declared in this scope /usr/obj/ports/kdebase-runtime-4.4.5/kdebase-runtime-4.4.5/kdesu/kdesud/secure.cpp:37: error: expected `;' before 'cred' /usr/obj/ports/kdebase-runtime-4.4.5/kdebase-runtime-4.4.5/kdesu/kdesud/secure.cpp:39: error: 'cred' was not declared in this scope /usr/obj/ports/kdebase-runtime-4.4.5/kdebase-runtime-4.4.5/kdesu/kdesud/secure.cpp:43: error: 'cred' was not declared in this scope *** Error code 1
related to bug 199320
Git commit e405055d73bb02747a5b06a5669f1f1c491ec155 by Oswald Buddenhagen. Committed on 27/02/2011 at 17:09. Pushed by ossi into branch 'KDE/4.6'. add peer identification on openbsd BUG: 255697 FIXED-IN: 4.6.2 M +0 -3 config-runtime.h.cmake M +4 -0 kdesu/kdesud/CMakeLists.txt A +4 -0 kdesu/kdesud/config-kdesud.h.cmake [License: GENERATED FILE] * M +14 -15 kdesu/kdesud/secure.cpp The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page. http://commits.kde.org/kde-runtime/e405055d73bb02747a5b06a5669f1f1c491ec155
Git commit 8c95718b9e195e0f6071a34ba39b1bc69ce33894 by Oswald Buddenhagen. Committed on 28/02/2011 at 09:30. Pushed by ossi into branch 'KDE/4.6'. actually include the new config header ... CCBUG: 199320 CCBUG: 255697 M +1 -0 kdesu/kdesud/secure.cpp http://commits.kde.org/kde-runtime/8c95718b9e195e0f6071a34ba39b1bc69ce33894