1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-30 10:38:37 +00:00

Fix build on 4.X.

This commit is contained in:
Adam Weinberger 2005-04-11 08:22:59 +00:00
parent 15406727b8
commit 3f2ac9f26d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=132998
2 changed files with 33 additions and 17 deletions

View File

@ -1,6 +1,14 @@
--- libgamin/gam_api.c.orig Thu Mar 24 19:07:08 2005
+++ libgamin/gam_api.c Thu Mar 24 19:26:39 2005
@@ -181,7 +181,6 @@ gamin_get_socket_dir(void)
--- libgamin/gam_api.c.orig Mon Apr 11 04:10:54 2005
+++ libgamin/gam_api.c Mon Apr 11 04:16:49 2005
@@ -13,6 +13,7 @@
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/un.h>
+#include <sys/uio.h>
#include "fam.h"
#include "gam_protocol.h"
#include "gam_data.h"
@@ -181,7 +182,6 @@
snprintf(path, MAXPATHLEN, "/tmp/fam-%s", user);
path[MAXPATHLEN] = 0;
ret = strdup(path);
@ -8,7 +16,7 @@
return (ret);
}
@@ -421,9 +420,35 @@ gamin_write_credential_byte(int fd)
@@ -421,9 +421,35 @@
{
char data[2] = { 0, 0 };
int written;
@ -44,7 +52,7 @@
if (written < 0) {
if (errno == EINTR)
goto retry;
@@ -616,8 +641,10 @@ gamin_check_cred(GAMDataPtr conn, int fd
@@ -616,8 +642,10 @@
gid_t c_gid;
#ifdef HAVE_CMSGCRED
@ -57,7 +65,7 @@
#endif
s_uid = getuid();
@@ -642,9 +669,9 @@ gamin_check_cred(GAMDataPtr conn, int fd
@@ -642,9 +670,9 @@
msg.msg_iovlen = 1;
#ifdef HAVE_CMSGCRED
@ -70,7 +78,7 @@
#endif
retry:
@@ -661,7 +688,7 @@ retry:
@@ -661,7 +689,7 @@
goto failed;
}
#ifdef HAVE_CMSGCRED
@ -79,7 +87,7 @@
GAM_DEBUG(DEBUG_INFO,
"Message from recvmsg() was not SCM_CREDS\n");
goto failed;
@@ -687,13 +714,9 @@ retry:
@@ -687,13 +715,9 @@
goto failed;
}
#elif defined(HAVE_CMSGCRED)

View File

@ -1,6 +1,14 @@
--- server/gam_channel.c.orig Fri Jan 28 10:54:42 2005
+++ server/gam_channel.c Sat Mar 26 16:15:55 2005
@@ -24,11 +24,53 @@
--- server/gam_channel.c.orig Mon Apr 11 04:20:17 2005
+++ server/gam_channel.c Mon Apr 11 04:21:00 2005
@@ -6,6 +6,7 @@
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/un.h>
+#include <sys/uio.h>
#include "gam_error.h"
#include "gam_connection.h"
#include "gam_channel.h"
@@ -24,11 +25,53 @@
* to check the server credentials early on.
*/
static gboolean
@ -56,7 +64,7 @@
}
/**
@@ -49,8 +91,10 @@ gam_client_conn_check_cred(GIOChannel *
@@ -49,8 +92,10 @@
gid_t c_gid;
#ifdef HAVE_CMSGCRED
@ -69,7 +77,7 @@
#endif
s_uid = getuid();
@@ -75,9 +119,9 @@ gam_client_conn_check_cred(GIOChannel *
@@ -75,9 +120,9 @@
msg.msg_iovlen = 1;
#ifdef HAVE_CMSGCRED
@ -82,7 +90,7 @@
#endif
retry:
@@ -94,7 +138,7 @@ gam_client_conn_check_cred(GIOChannel *
@@ -94,7 +139,7 @@
goto failed;
}
#ifdef HAVE_CMSGCRED
@ -91,7 +99,7 @@
GAM_DEBUG(DEBUG_INFO,
"Message from recvmsg() was not SCM_CREDS\n");
goto failed;
@@ -120,13 +164,9 @@ gam_client_conn_check_cred(GIOChannel *
@@ -120,13 +165,9 @@
goto failed;
}
#elif defined(HAVE_CMSGCRED)
@ -108,7 +116,7 @@
#else /* !SO_PEERCRED && !HAVE_CMSGCRED */
GAM_DEBUG(DEBUG_INFO,
"Socket credentials not supported on this OS\n");
@@ -149,7 +189,7 @@ gam_client_conn_check_cred(GIOChannel *
@@ -149,7 +190,7 @@
goto failed;
}
@ -117,7 +125,7 @@
GAM_DEBUG(DEBUG_INFO, "Failed to send credential byte to client\n");
goto failed;
}
@@ -305,6 +345,7 @@ gam_get_socket_path(const char *session)
@@ -305,6 +346,7 @@
gam_client_id = g_getenv("GAM_CLIENT_ID");
if (gam_client_id == NULL) {
GAM_DEBUG(DEBUG_INFO, "Error getting GAM_CLIENT_ID\n");