diff options
author | green <green@FreeBSD.org> | 1999-07-15 03:37:23 +0800 |
---|---|---|
committer | green <green@FreeBSD.org> | 1999-07-15 03:37:23 +0800 |
commit | 9d3507fd04d9412ea825089861c36f1446ed460b (patch) | |
tree | db02e5b967dc5fa6319f41b968d47e0c66285f86 /security/pidentd | |
parent | 0f8970b30a554561049541884e3bad618414a1f2 (diff) | |
download | freebsd-ports-gnome-9d3507fd04d9412ea825089861c36f1446ed460b.tar.gz freebsd-ports-gnome-9d3507fd04d9412ea825089861c36f1446ed460b.tar.zst freebsd-ports-gnome-9d3507fd04d9412ea825089861c36f1446ed460b.zip |
Switch pidentd to using sysctl()s instead of libkvm. It now doesn't need
to be linked with libkvm... this should fix a lot of strange problems
people report with pidentd.
This is for -CURRENT only, at the moment.
Diffstat (limited to 'security/pidentd')
-rw-r--r-- | security/pidentd/files/patch-ak | 15 | ||||
-rw-r--r-- | security/pidentd/files/patch-al | 35 |
2 files changed, 50 insertions, 0 deletions
diff --git a/security/pidentd/files/patch-ak b/security/pidentd/files/patch-ak new file mode 100644 index 000000000000..b8ab82d74eb2 --- /dev/null +++ b/security/pidentd/files/patch-ak @@ -0,0 +1,15 @@ +--- src/freebsd.c.orig Wed Jul 14 15:23:56 1999 ++++ src/freebsd.c Wed Jul 14 15:24:51 1999 +@@ -1,3 +1,7 @@ ++#include <osreldate.h> ++#if __FreeBSD_version >= 400007 ++#include "freebsd4.c" ++#else + /* + ** freebsd.c Low level kernel access functions for FreeBSD 2.x + ** +@@ -306,3 +310,4 @@ + + return -1; + } ++#endif diff --git a/security/pidentd/files/patch-al b/security/pidentd/files/patch-al new file mode 100644 index 000000000000..8312f571f746 --- /dev/null +++ b/security/pidentd/files/patch-al @@ -0,0 +1,35 @@ +--- /dev/null Wed Jul 14 15:27:00 1999 ++++ src/freebsd4.c Thu Jul 8 15:52:57 1999 +@@ -0,0 +1,32 @@ ++#include <sys/param.h> ++#include <sys/types.h> ++#include <sys/socket.h> ++#include <sys/sysctl.h> ++#include <sys/ucred.h> ++ ++#include <netinet/in.h> ++ ++int ++k_open(void) { ++ ++ return 0; ++} ++ ++int k_getuid(struct in_addr *faddr, int fport, struct in_addr *laddr, ++ int lport, int *uid) { ++ struct sockaddr_in sin[2]; ++ struct ucred uc; ++ size_t oldlen = sizeof(uc); ++ ++ sin[0].sin_addr.s_addr = laddr->s_addr; ++ sin[1].sin_addr.s_addr = faddr->s_addr; ++ sin[0].sin_port = (u_short)lport; ++ sin[1].sin_port = (u_short)fport; ++ ++ if (sysctlbyname("net.inet.tcp.getcred", &uc, &oldlen, sin, ++ sizeof(sin))) ++ return -1; ++ ++ *uid = uc.cr_uid; ++ return 0; ++} |