rev 14103 - in branches/kdebase-legacy/kdebase/debian: . patches
Fathi Boudra
fabo at alioth.debian.org
Wed Mar 18 14:32:01 UTC 2009
Author: fabo
Date: 2009-03-18 14:32:00 +0000 (Wed, 18 Mar 2009)
New Revision: 14103
Modified:
branches/kdebase-legacy/kdebase/debian/changelog
branches/kdebase-legacy/kdebase/debian/control
branches/kdebase-legacy/kdebase/debian/control.in
branches/kdebase-legacy/kdebase/debian/patches/77_fix_ftbfs_ucred_redefinition.diff
Log:
Fix ucred issue - 2nd try for GNU/kFreeBSD.
Don't exclude hal for GNU/kFreeBSD.
Modified: branches/kdebase-legacy/kdebase/debian/changelog
===================================================================
--- branches/kdebase-legacy/kdebase/debian/changelog 2009-03-18 12:28:37 UTC (rev 14102)
+++ branches/kdebase-legacy/kdebase/debian/changelog 2009-03-18 14:32:00 UTC (rev 14103)
@@ -1,3 +1,11 @@
+kdebase (4:3.5.10.dfsg.1-2) unstable; urgency=low
+
+ * Fix FTBFS on GNU/kFreeBSD. (Closes: #520074)
+ Update 77_fix_ftbfs_ucred_redefinition.diff patch.
+ * Don't exclude hal for GNU/kFreeBSD.
+
+ -- Fathi Boudra <fabo at debian.org> Wed, 18 Mar 2009 15:13:03 +0100
+
kdebase (4:3.5.10.dfsg.1-1) unstable; urgency=low
* New upstream release.
Modified: branches/kdebase-legacy/kdebase/debian/control
===================================================================
--- branches/kdebase-legacy/kdebase/debian/control 2009-03-18 12:28:37 UTC (rev 14102)
+++ branches/kdebase-legacy/kdebase/debian/control 2009-03-18 14:32:00 UTC (rev 14103)
@@ -9,8 +9,8 @@
libfontenc-dev, libldap2-dev, libncurses5-dev, libpam0g-dev, libpopt-dev,
libsmbclient-dev, libusb-dev, libxcomposite-dev, libxdamage-dev,
libxkbfile-dev, libxxf86misc-dev, libxss-dev, libxtst-dev,
- libhal-dev (>= 0.5.5.1-2) [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
- libhal-storage-dev (>= 0.5.5.1-2) [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
+ libhal-dev (>= 0.5.5.1-2) [!hurd-i386],
+ libhal-storage-dev (>= 0.5.5.1-2) [!hurd-i386],
libraw1394-dev (>= 2.0.2) [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
libsensors4-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
Build-Depends-Indep: doxygen, qt3-doc, graphviz, gsfonts-x11, kdelibs4-doc
Modified: branches/kdebase-legacy/kdebase/debian/control.in
===================================================================
--- branches/kdebase-legacy/kdebase/debian/control.in 2009-03-18 12:28:37 UTC (rev 14102)
+++ branches/kdebase-legacy/kdebase/debian/control.in 2009-03-18 14:32:00 UTC (rev 14103)
@@ -9,9 +9,9 @@
libfontenc-dev, libldap2-dev, libncurses5-dev, libpam0g-dev, libpopt-dev,
libsmbclient-dev, libusb-dev, libxcomposite-dev, libxdamage-dev,
libxkbfile-dev, libxxf86misc-dev, libxss-dev, libxtst-dev,
- libhal-dev (>= 0.5.5.1-2) [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
- libhal-storage-dev (>= 0.5.5.1-2) [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
- libraw1394-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
+ libhal-dev (>= 0.5.5.1-2) [!hurd-i386],
+ libhal-storage-dev (>= 0.5.5.1-2) [!hurd-i386],
+ libraw1394-dev (>= 2.0.2) [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
libsensors4-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
Build-Depends-Indep: doxygen, qt3-doc, graphviz, gsfonts-x11, kdelibs4-doc
Build-Conflicts: nvidia-glx (<< 1.0.8774-6)
Modified: branches/kdebase-legacy/kdebase/debian/patches/77_fix_ftbfs_ucred_redefinition.diff
===================================================================
--- branches/kdebase-legacy/kdebase/debian/patches/77_fix_ftbfs_ucred_redefinition.diff 2009-03-18 12:28:37 UTC (rev 14102)
+++ branches/kdebase-legacy/kdebase/debian/patches/77_fix_ftbfs_ucred_redefinition.diff 2009-03-18 14:32:00 UTC (rev 14103)
@@ -1,6 +1,94 @@
+--- a/kdesu/kdesud/secure.cpp
++++ b/kdesu/kdesud/secure.cpp
+@@ -6,6 +6,8 @@
+ * secure.cpp: Peer credentials for a UNIX socket.
+ */
+
++#include "secure.h"
++
+ #include <config.h>
+
+ #include <stdio.h>
+@@ -20,8 +22,6 @@
+
+ #include <kdebug.h>
+ #include <ksockaddr.h>
+-#include "secure.h"
+-
+
+ /**
+ * Under Linux, Socket_security is supported.
+@@ -29,39 +29,41 @@
+
+ #if defined(SO_PEERCRED)
+
+-SocketSecurity::SocketSecurity(int sockfd)
++SocketSecurity::SocketSecurity(int sockfd) : pid(-1), gid(-1), uid(-1)
+ {
++ ucred cred;
+ ksocklen_t len = sizeof(struct ucred);
+ if (getsockopt(sockfd, SOL_SOCKET, SO_PEERCRED, &cred, &len) < 0) {
+ kdError() << "getsockopt(SO_PEERCRED) " << perror << endl;
+ return;
+ }
+-
+- ok = true;
++ pid = cred.pid;
++ gid = cred.gid;
++ uid = cred.uid;
+ }
+
+ #else
+ # if defined(HAVE_GETPEEREID)
+-SocketSecurity::SocketSecurity(int sockfd)
++SocketSecurity::SocketSecurity(int sockfd) : pid(-1), gid(-1), uid(-1)
+ {
+ uid_t euid;
+ gid_t egid;
+ if (getpeereid(sockfd, &euid, &egid) == 0) {
+- cred.uid = euid;
+- cred.gid = egid;
+- cred.pid = -1;
+- ok = true;
++ uid = euid;
++ gid = egid;
++ pid = -1;
+ }
+ }
+
+ # else
+-
+-
++#ifdef __GNUC__
++#warning SocketSecurity support for your platform not implemented/available!
++#endif
+ /**
+ * The default version does nothing.
+ */
+
+-SocketSecurity::SocketSecurity(int sockfd)
++SocketSecurity::SocketSecurity(int sockfd) : pid(-1), gid(-1), uid(-1)
+ {
+ static bool warned_him = FALSE;
+
+@@ -72,8 +74,7 @@ SocketSecurity::SocketSecurity(int sockf
+ }
+
+ // This passes the test made in handler.cpp
+- cred.uid = getuid();
+- ok = true;
++ uid = getuid();
+ }
+
+ # endif
--- a/kdesu/kdesud/secure.h
+++ b/kdesu/kdesud/secure.h
-@@ -12,19 +12,6 @@
+@@ -7,24 +7,9 @@
+ #ifndef __Secure_h_included__
+ #define __Secure_h_included__
+
+-#include "config.h"
+-
#include <sys/types.h>
#include <sys/socket.h>
@@ -20,3 +108,27 @@
/**
* The Socket_security class autheticates the peer for you. It provides
* the process-id, user-id and group-id plus the MD5 sum of the connected
+@@ -36,17 +21,18 @@ public:
+ SocketSecurity(int fd);
+
+ /** Returns the peer's process-id. */
+- int peerPid() { if (!ok) return -1; return cred.pid; }
++ int peerPid() const { return pid; }
+
+ /** Returns the peer's user-id */
+- int peerUid() { if (!ok) return -1; return cred.uid; }
++ int peerUid() const { return uid; }
+
+ /** Returns the peer's group-id */
+- int peerGid() { if (!ok) return -1; return cred.gid; }
++ int peerGid() const { return gid; }
+
+ private:
+- bool ok;
+- struct ucred cred;
++ int pid;
++ int gid;
++ int uid;
+ };
+
+ #endif
More information about the pkg-kde-commits
mailing list