nss-pam-ldapd commit: r1686 - in nss-pam-ldapd: common compat nslcd
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r1686 - in nss-pam-ldapd: common compat nslcd
- From: Commits of the nss-pam-ldapd project <nss-pam-ldapd-commits [at] lists.arthurdejong.org>
- To: nss-pam-ldapd-commits [at] lists.arthurdejong.org
- Reply-to: nss-pam-ldapd-users [at] lists.arthurdejong.org
- Subject: nss-pam-ldapd commit: r1686 - in nss-pam-ldapd: common compat nslcd
- Date: Wed, 9 May 2012 22:16:37 +0200 (CEST)
Author: arthur
Date: Wed May 9 22:16:36 2012
New Revision: 1686
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1686&view=revision
Log:
provide a compatibility definition of SUN_LEN() for systems that lack it
Added:
nss-pam-ldapd/compat/socket.h
Modified:
nss-pam-ldapd/common/nslcd-prot.c
nss-pam-ldapd/compat/Makefile.am
nss-pam-ldapd/compat/nss_compat.h
nss-pam-ldapd/nslcd/nslcd.c
Modified: nss-pam-ldapd/common/nslcd-prot.c
==============================================================================
--- nss-pam-ldapd/common/nslcd-prot.c Wed May 9 21:47:01 2012 (r1685)
+++ nss-pam-ldapd/common/nslcd-prot.c Wed May 9 22:16:36 2012 (r1686)
@@ -2,7 +2,7 @@
nslcd-prot.c - common functions for NSLCD lookups
Copyright (C) 2006 West Consulting
- Copyright (C) 2006, 2007, 2008 Arthur de Jong
+ Copyright (C) 2006, 2007, 2008, 2009, 2010, 2012 Arthur de Jong
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -36,6 +36,7 @@
#include "nslcd.h"
#include "nslcd-prot.h"
+#include "compat/socket.h"
/* buffer sizes for I/O */
#define READBUFFER_MINSIZE 1024
Modified: nss-pam-ldapd/compat/Makefile.am
==============================================================================
--- nss-pam-ldapd/compat/Makefile.am Wed May 9 21:47:01 2012 (r1685)
+++ nss-pam-ldapd/compat/Makefile.am Wed May 9 22:16:36 2012 (r1686)
@@ -1,6 +1,6 @@
# Makefile.am - use automake to generate Makefile.in
#
-# Copyright (C) 2008, 2009, 2010, 2011 Arthur de Jong
+# Copyright (C) 2008, 2009, 2010, 2011, 2012 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -26,7 +26,7 @@
daemon.c daemon.h \
ether.c ether.h \
strndup.c strndup.h \
- nss_compat.h \
+ nss_compat.h socket.h \
ldap_compat.h pagectrl.c ldap_passwd_s.c ldap_initialize.c \
pam_compat.h pam_get_authtok.c pam_prompt.c
Modified: nss-pam-ldapd/compat/nss_compat.h
==============================================================================
--- nss-pam-ldapd/compat/nss_compat.h Wed May 9 21:47:01 2012 (r1685)
+++ nss-pam-ldapd/compat/nss_compat.h Wed May 9 22:16:36 2012 (r1686)
@@ -21,7 +21,7 @@
*/
#ifndef COMPAT__NSS_H
-#define COMPAT__NSS_H
+#define COMPAT__NSS_H 1
#ifdef HAVE_NSS_H
#include <nss.h>
Added: nss-pam-ldapd/compat/socket.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ nss-pam-ldapd/compat/socket.h Wed May 9 22:16:36 2012 (r1686)
@@ -0,0 +1,34 @@
+/*
+ socket.h - compatibility hacks for socket functions
+
+ Copyright (C) 2012 Arthur de Jong
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+#ifndef COMPAT__SOCKET_H
+#define COMPAT__SOCKET_H 1
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+
+/* provide a definition for SUN_LEN for systems without it */
+#ifndef SUN_LEN
+#define SUN_LEN(addr) (sizeof((addr).sun_family)+strlen((addr).sun_path)+1)
+#endif /* not SUN_LEN */
+
+#endif /* not COMPAT__SOCKET_H */
Modified: nss-pam-ldapd/nslcd/nslcd.c
==============================================================================
--- nss-pam-ldapd/nslcd/nslcd.c Wed May 9 21:47:01 2012 (r1685)
+++ nss-pam-ldapd/nslcd/nslcd.c Wed May 9 22:16:36 2012 (r1686)
@@ -63,6 +63,7 @@
#include "common.h"
#include "compat/attrs.h"
#include "compat/getpeercred.h"
+#include "compat/socket.h"
/* buffer sizes for I/O */
#define READBUFFER_MINSIZE 32
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/
- nss-pam-ldapd commit: r1686 - in nss-pam-ldapd: common compat nslcd,
Commits of the nss-pam-ldapd project