summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2006-11-28 16:21:09 +0000
committerArthur de Jong <arthur@arthurdejong.org>2006-11-28 16:21:09 +0000
commit3239c5ad583d149f656d99eaa46d2aa49611b4b0 (patch)
tree8559879a910a92e51232a50bf6f229fedf77a594
parent3ab2f59efdd7c5d4abafde59a1941cb2872dd0e6 (diff)
rename LDF_ marcos to NSLCD_ macros to have a single namespace
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@134 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r--nslcd.h124
-rw-r--r--nss/aliases.c8
-rw-r--r--nss/ethers.c8
-rw-r--r--nss/group.c10
-rw-r--r--nss/passwd.c8
-rw-r--r--nss/protocols.c10
-rw-r--r--nss/rpc.c10
-rw-r--r--nss/services.c10
-rw-r--r--nss/shadow.c8
-rw-r--r--server/alias.c8
-rw-r--r--server/ether.c16
-rw-r--r--server/group.c14
-rw-r--r--server/passwd.c15
-rw-r--r--server/protocol.c14
-rw-r--r--server/rpc.c10
-rw-r--r--server/service.c10
-rw-r--r--server/shadow.c10
17 files changed, 146 insertions, 147 deletions
diff --git a/nslcd.h b/nslcd.h
index 3b6717e..678bcb8 100644
--- a/nslcd.h
+++ b/nslcd.h
@@ -60,35 +60,35 @@
*/
/* used for transferring alias information */
-#define LDF_ALIAS \
- LDF_STRING(ALIAS_NAME) \
- LDF_STRINGLIST(ALIAS_RCPTS)
+#define NSLCD_ALIAS \
+ NSLCD_STRING(ALIAS_NAME) \
+ NSLCD_STRINGLIST(ALIAS_RCPTS)
/* used for transferring mac addresses */
-#define LDF_ETHER \
- LDF_STRING(ETHER_NAME) \
- LDF_TYPE(ETHER_ADDR,u_int8_t[6])
+#define NSLCD_ETHER \
+ NSLCD_STRING(ETHER_NAME) \
+ NSLCD_TYPE(ETHER_ADDR,u_int8_t[6])
/* used for transferring group and membership information */
-#define LDF_GROUP \
- LDF_STRING(GROUP_NAME) \
- LDF_STRING(GROUP_PASSWD) \
- LDF_TYPE(GROUP_GID,gid_t) \
- LDF_STRINGLIST(GROUP_MEMBERS)
+#define NSLCD_GROUP \
+ NSLCD_STRING(GROUP_NAME) \
+ NSLCD_STRING(GROUP_PASSWD) \
+ NSLCD_TYPE(GROUP_GID,gid_t) \
+ NSLCD_STRINGLIST(GROUP_MEMBERS)
/* used for storing address information for the host database */
/* Note: this marcos is not expanded to code, check manually */
-#define LDF_ADDRESS \
- LDF_INT32(ADDRESS_TYPE) /* type of address: e.g. AF_INET or AF_INET6 */ \
- LDF_INT32(ADDRESS_LEN) /* length of the address to follow */ \
- LDF_BUF(ADDRESS_ADDR) /* the address itself in network byte order */
+#define NSLCD_ADDRESS \
+ NSLCD_INT32(ADDRESS_TYPE) /* type of address: e.g. AF_INET or AF_INET6 */ \
+ NSLCD_INT32(ADDRESS_LEN) /* length of the address to follow */ \
+ NSLCD_BUF(ADDRESS_ADDR) /* the address itself in network byte order */
/* used for transferring host (/etc/hosts) information */
/* Note: this marco is not expanded to code, check manually */
-#define LDF_HOST \
- LDF_STRING(HOST_NAME) \
- LDF_STRINGLIST(HOST_ALIASES) \
- LDF_ADDRESSLIST(HOST_ADDRS)
+#define NSLCD_HOST \
+ NSLCD_STRING(HOST_NAME) \
+ NSLCD_STRINGLIST(HOST_ALIASES) \
+ NSLCD_ADDRESSLIST(HOST_ADDRS)
/* used for transferring netgroup entries one at a time */
/* Note: this marcos is not expanded to code, check manually */
@@ -96,63 +96,63 @@
determining the type */
#define NETGROUP_TYPE_NETGROUP 123
#define NETGROUP_TYPE_TRIPLE 456
-#define LDF_NETGROUP_TYPE \
- LDF_INT32(NETGROUP_TYPE) /* one of the above values */
+#define NSLCD_NETGROUP_TYPE \
+ NSLCD_INT32(NETGROUP_TYPE) /* one of the above values */
/* followed by one of these message parts */
-#define LDF_NETGROUP_NETGROUP \
- LDF_STRING(NETGROUP_NETGROUP)
-#define LDF_NETGROUP_TRIPLE \
- LDF_STRING(NETGROUP_HOST) \
- LDF_STRING(NETGROUP_USER) \
- LDF_STRING(NETGROUP_DOMAIN)
+#define NSLCD_NETGROUP_NETGROUP \
+ NSLCD_STRING(NETGROUP_NETGROUP)
+#define NSLCD_NETGROUP_TRIPLE \
+ NSLCD_STRING(NETGROUP_HOST) \
+ NSLCD_STRING(NETGROUP_USER) \
+ NSLCD_STRING(NETGROUP_DOMAIN)
/* user for transferring network (/etc/networks) information */
/* Note: this marco is not expanded to code, check manually */
-#define LDF_NETWORK \
- LDF_STRING(NETWORK_NAME) \
- LDF_STRINGLIST(NETWORK_ALIASES) \
- LDF_ADDRESSLIST(NETWORK_ADDRS)
+#define NSLCD_NETWORK \
+ NSLCD_STRING(NETWORK_NAME) \
+ NSLCD_STRINGLIST(NETWORK_ALIASES) \
+ NSLCD_ADDRESSLIST(NETWORK_ADDRS)
/* used for transferring user (/etc/passwd) information */
-#define LDF_PASSWD \
- LDF_STRING(PASSWD_NAME) \
- LDF_STRING(PASSWD_PASSWD) \
- LDF_TYPE(PASSWD_UID,uid_t) \
- LDF_TYPE(PASSWD_GID,gid_t) \
- LDF_STRING(PASSWD_GECOS) \
- LDF_STRING(PASSWD_DIR) \
- LDF_STRING(PASSWD_SHELL)
+#define NSLCD_PASSWD \
+ NSLCD_STRING(PASSWD_NAME) \
+ NSLCD_STRING(PASSWD_PASSWD) \
+ NSLCD_TYPE(PASSWD_UID,uid_t) \
+ NSLCD_TYPE(PASSWD_GID,gid_t) \
+ NSLCD_STRING(PASSWD_GECOS) \
+ NSLCD_STRING(PASSWD_DIR) \
+ NSLCD_STRING(PASSWD_SHELL)
/* used for transferring protocol information */
-#define LDF_PROTOCOL \
- LDF_STRING(PROTOCOL_NAME) \
- LDF_STRINGLIST(PROTOCOL_ALIASES) \
- LDF_INT32(PROTOCOL_NUMBER)
+#define NSLCD_PROTOCOL \
+ NSLCD_STRING(PROTOCOL_NAME) \
+ NSLCD_STRINGLIST(PROTOCOL_ALIASES) \
+ NSLCD_INT32(PROTOCOL_NUMBER)
/* for transferring struct rpcent structs */
-#define LDF_RPC \
- LDF_STRING(RPC_NAME) \
- LDF_STRINGLIST(RPC_ALIASES) \
- LDF_INT32(RPC_NUMBER)
+#define NSLCD_RPC \
+ NSLCD_STRING(RPC_NAME) \
+ NSLCD_STRINGLIST(RPC_ALIASES) \
+ NSLCD_INT32(RPC_NUMBER)
/* for transferring struct servent informatio */
-#define LDF_SERVICE \
- LDF_STRING(SERVICE_NAME) \
- LDF_STRINGLIST(SERVICE_ALIASES) \
- LDF_INT32(SERVICE_NUMBER) \
- LDF_STRING(SERVICE_PROTOCOL)
+#define NSLCD_SERVICE \
+ NSLCD_STRING(SERVICE_NAME) \
+ NSLCD_STRINGLIST(SERVICE_ALIASES) \
+ NSLCD_INT32(SERVICE_NUMBER) \
+ NSLCD_STRING(SERVICE_PROTOCOL)
/* used for transferring account (/etc/shadow) information */
-#define LDF_SHADOW \
- LDF_STRING(SHADOW_NAME) \
- LDF_STRING(SHADOW_PASSWD) \
- LDF_INT32(SHADOW_LASTCHANGE) \
- LDF_INT32(SHADOW_MINDAYS) \
- LDF_INT32(SHADOW_MAXDAYS) \
- LDF_INT32(SHADOW_WARN) \
- LDF_INT32(SHADOW_INACT) \
- LDF_INT32(SHADOW_EXPIRE) \
- LDF_INT32(SHADOW_FLAG)
+#define NSLCD_SHADOW \
+ NSLCD_STRING(SHADOW_NAME) \
+ NSLCD_STRING(SHADOW_PASSWD) \
+ NSLCD_INT32(SHADOW_LASTCHANGE) \
+ NSLCD_INT32(SHADOW_MINDAYS) \
+ NSLCD_INT32(SHADOW_MAXDAYS) \
+ NSLCD_INT32(SHADOW_WARN) \
+ NSLCD_INT32(SHADOW_INACT) \
+ NSLCD_INT32(SHADOW_EXPIRE) \
+ NSLCD_INT32(SHADOW_FLAG)
/* The location of the socket used for communicating. */
#define NSLCD_SOCKET "/tmp/nslcd.socket"
diff --git a/nss/aliases.c b/nss/aliases.c
index 5bc0a9e..57a9d45 100644
--- a/nss/aliases.c
+++ b/nss/aliases.c
@@ -29,9 +29,9 @@
#include "prototypes.h"
#include "common.h"
-/* macros for expanding the LDF_ALIAS macro */
-#define LDF_STRING(field) READ_STRING_BUF(fp,field)
-#define LDF_STRINGLIST(field) READ_STRINGLIST_NUM(fp,field,result->alias_members_len)
+/* macros for expanding the NSLCD_ALIAS macro */
+#define NSLCD_STRING(field) READ_STRING_BUF(fp,field)
+#define NSLCD_STRINGLIST(field) READ_STRINGLIST_NUM(fp,field,result->alias_members_len)
#define ALIAS_NAME result->alias_name
#define ALIAS_RCPTS result->alias_members
@@ -42,7 +42,7 @@ static enum nss_status read_aliasent(
int32_t tmpint32,tmp2int32;
size_t bufptr=0;
/* auto-genereted read code */
- LDF_ALIAS;
+ NSLCD_ALIAS;
/* fill in remaining gaps in struct */
result->alias_local=0;
/* we're done */
diff --git a/nss/ethers.c b/nss/ethers.c
index de3f050..e391a21 100644
--- a/nss/ethers.c
+++ b/nss/ethers.c
@@ -29,9 +29,9 @@
#include "prototypes.h"
#include "common.h"
-/* macros for expanding the LDF_ETHER macro */
-#define LDF_STRING(field) READ_STRING_BUF(fp,field)
-#define LDF_TYPE(field,type) READ_TYPE(fp,field,type)
+/* macros for expanding the NSLCD_ETHER macro */
+#define NSLCD_STRING(field) READ_STRING_BUF(fp,field)
+#define NSLCD_TYPE(field,type) READ_TYPE(fp,field,type)
#define ETHER_NAME result->e_name
#define ETHER_ADDR result->e_addr
@@ -42,7 +42,7 @@ static enum nss_status read_etherent(
int32_t tmpint32;
size_t bufptr=0;
/* auto-genereted read code */
- LDF_ETHER;
+ NSLCD_ETHER;
/* we're done */
return NSS_STATUS_SUCCESS;
}
diff --git a/nss/group.c b/nss/group.c
index 31141cb..85691ae 100644
--- a/nss/group.c
+++ b/nss/group.c
@@ -29,10 +29,10 @@
#include "prototypes.h"
#include "common.h"
-/* macros for expanding the LDF_GROUP macro */
-#define LDF_STRING(field) READ_STRING_BUF(fp,field)
-#define LDF_TYPE(field,type) READ_TYPE(fp,field,type)
-#define LDF_STRINGLIST(field) READ_STRINGLIST_NULLTERM(fp,field)
+/* macros for expanding the NSLCD_GROUP macro */
+#define NSLCD_STRING(field) READ_STRING_BUF(fp,field)
+#define NSLCD_TYPE(field,type) READ_TYPE(fp,field,type)
+#define NSLCD_STRINGLIST(field) READ_STRINGLIST_NULLTERM(fp,field)
#define GROUP_NAME result->gr_name
#define GROUP_PASSWD result->gr_passwd
#define GROUP_GID result->gr_gid
@@ -45,7 +45,7 @@ static enum nss_status read_group(
int32_t tmpint32,tmp2int32,tmp3int32;
size_t bufptr=0;
/* auto-genereted read code */
- LDF_GROUP;
+ NSLCD_GROUP;
/* we're done */
return NSS_STATUS_SUCCESS;
}
diff --git a/nss/passwd.c b/nss/passwd.c
index ee5e75a..b42fc00 100644
--- a/nss/passwd.c
+++ b/nss/passwd.c
@@ -29,9 +29,9 @@
#include "prototypes.h"
#include "common.h"
-/* Macros for expanding the LDF_PASSWD macro. */
-#define LDF_STRING(field) READ_STRING_BUF(fp,field)
-#define LDF_TYPE(field,type) READ_TYPE(fp,field,type)
+/* Macros for expanding the NSLCD_PASSWD macro. */
+#define NSLCD_STRING(field) READ_STRING_BUF(fp,field)
+#define NSLCD_TYPE(field,type) READ_TYPE(fp,field,type)
#define PASSWD_NAME result->pw_name
#define PASSWD_PASSWD result->pw_passwd
#define PASSWD_UID result->pw_uid
@@ -47,7 +47,7 @@ static enum nss_status read_passwd(
{
int32_t tmpint32;
size_t bufptr=0;
- LDF_PASSWD;
+ NSLCD_PASSWD;
return NSS_STATUS_SUCCESS;
}
diff --git a/nss/protocols.c b/nss/protocols.c
index d186a05..00bc732 100644
--- a/nss/protocols.c
+++ b/nss/protocols.c
@@ -29,10 +29,10 @@
#include "prototypes.h"
#include "common.h"
-/* macros for expanding the LDF_PROTOCOL macro */
-#define LDF_STRING(field) READ_STRING_BUF(fp,field)
-#define LDF_STRINGLIST(field) READ_STRINGLIST_NULLTERM(fp,field)
-#define LDF_INT32(field) READ_INT32(fp,field)
+/* macros for expanding the NSLCD_PROTOCOL macro */
+#define NSLCD_STRING(field) READ_STRING_BUF(fp,field)
+#define NSLCD_STRINGLIST(field) READ_STRINGLIST_NULLTERM(fp,field)
+#define NSLCD_INT32(field) READ_INT32(fp,field)
#define PROTOCOL_NAME result->p_name
#define PROTOCOL_ALIASES result->p_aliases
#define PROTOCOL_NUMBER result->p_proto
@@ -44,7 +44,7 @@ static enum nss_status read_protoent(
int32_t tmpint32,tmp2int32,tmp3int32;
size_t bufptr=0;
/* auto-genereted read code */
- LDF_PROTOCOL;
+ NSLCD_PROTOCOL;
/* we're done */
return NSS_STATUS_SUCCESS;
}
diff --git a/nss/rpc.c b/nss/rpc.c
index 86f74cb..4a94e22 100644
--- a/nss/rpc.c
+++ b/nss/rpc.c
@@ -29,10 +29,10 @@
#include "prototypes.h"
#include "common.h"
-/* macros for expanding the LDF_RPC macro */
-#define LDF_STRING(field) READ_STRING_BUF(fp,field)
-#define LDF_STRINGLIST(field) READ_STRINGLIST_NULLTERM(fp,field)
-#define LDF_INT32(field) READ_INT32(fp,field)
+/* macros for expanding the NSLCD_RPC macro */
+#define NSLCD_STRING(field) READ_STRING_BUF(fp,field)
+#define NSLCD_STRINGLIST(field) READ_STRINGLIST_NULLTERM(fp,field)
+#define NSLCD_INT32(field) READ_INT32(fp,field)
#define RPC_NAME result->r_name
#define RPC_ALIASES result->r_aliases
#define RPC_NUMBER result->r_number
@@ -44,7 +44,7 @@ static enum nss_status read_rpcent(
int32_t tmpint32,tmp2int32,tmp3int32;
size_t bufptr=0;
/* auto-genereted read code */
- LDF_RPC;
+ NSLCD_RPC;
/* we're done */
return NSS_STATUS_SUCCESS;
}
diff --git a/nss/services.c b/nss/services.c
index 75b807e..4809797 100644
--- a/nss/services.c
+++ b/nss/services.c
@@ -29,10 +29,10 @@
#include "prototypes.h"
#include "common.h"
-/* macros for expanding the LDF_SERVICE macro */
-#define LDF_STRING(field) READ_STRING_BUF(fp,field)
-#define LDF_STRINGLIST(field) READ_STRINGLIST_NULLTERM(fp,field)
-#define LDF_INT32(field) READ_INT32(fp,field)
+/* macros for expanding the NSLCD_SERVICE macro */
+#define NSLCD_STRING(field) READ_STRING_BUF(fp,field)
+#define NSLCD_STRINGLIST(field) READ_STRINGLIST_NULLTERM(fp,field)
+#define NSLCD_INT32(field) READ_INT32(fp,field)
#define SERVICE_NAME result->s_name
#define SERVICE_ALIASES result->s_aliases
#define SERVICE_NUMBER port
@@ -46,7 +46,7 @@ static enum nss_status read_servent(
int port;
size_t bufptr=0;
/* auto-genereted read code */
- LDF_SERVICE;
+ NSLCD_SERVICE;
/* store number in network byte order */
result->s_port=ntohs(port);
/* we're done */
diff --git a/nss/shadow.c b/nss/shadow.c
index 440e97b..760098f 100644
--- a/nss/shadow.c
+++ b/nss/shadow.c
@@ -29,9 +29,9 @@
#include "prototypes.h"
#include "common.h"
-/* Macros for expanding the LDF_SHADOW macro. */
-#define LDF_STRING(field) READ_STRING_BUF(fp,field)
-#define LDF_INT32(field) READ_INT32(fp,field)
+/* Macros for expanding the NSLCD_SHADOW macro. */
+#define NSLCD_STRING(field) READ_STRING_BUF(fp,field)
+#define NSLCD_INT32(field) READ_INT32(fp,field)
#define SHADOW_NAME result->sp_namp
#define SHADOW_PASSWD result->sp_pwdp
#define SHADOW_LASTCHANGE result->sp_lstchg
@@ -48,7 +48,7 @@ static enum nss_status read_spwd(
{
int32_t tmpint32;
size_t bufptr=0;
- LDF_SHADOW;
+ NSLCD_SHADOW;
return NSS_STATUS_SUCCESS;
}
diff --git a/server/alias.c b/server/alias.c
index 7d39fa6..04cf6b6 100644
--- a/server/alias.c
+++ b/server/alias.c
@@ -72,9 +72,9 @@ static int write_alias(LDAPMessage *e,struct ldap_state *pvt,FILE *fp)
}
-/* macros for expanding the LDF_ALIAS macro */
-#define LDF_STRING(field) WRITE_STRING(fp,field)
-#define LDF_STRINGLIST(field) WRITE_STRINGLIST_NUM(fp,field,result.alias_members_len)
+/* macros for expanding the NSLCD_ALIAS macro */
+#define NSLCD_STRING(field) WRITE_STRING(fp,field)
+#define NSLCD_STRINGLIST(field) WRITE_STRINGLIST_NUM(fp,field,result.alias_members_len)
#define ALIAS_NAME result.alias_name
#define ALIAS_RCPTS result.alias_members
@@ -124,7 +124,7 @@ int nslcd_alias_all(FILE *fp)
{
/* write the result */
WRITE_INT32(fp,retv);
- LDF_ALIAS;
+ NSLCD_ALIAS;
}
/* write the final result code */
WRITE_INT32(fp,retv);
diff --git a/server/ether.c b/server/ether.c
index 9d96b2e..6efbf9c 100644
--- a/server/ether.c
+++ b/server/ether.c
@@ -78,11 +78,11 @@ static int write_ether(LDAPMessage *e,struct ldap_state *pvt,FILE *fp)
{
int stat;
char buffer[1024];
- /* write LDF_STRING(ETHER_NAME) */
+ /* write NSLCD_STRING(ETHER_NAME) */
stat=_nss_ldap_write_attrval(fp,e,ATM(LM_ETHERS,cn));
if (stat!=NSLCD_RESULT_SUCCESS)
return stat;
- /* write LDF_TYPE(ETHER_ADDR,u_int8_t[6]) */
+ /* write NSLCD_TYPE(ETHER_ADDR,u_int8_t[6]) */
stat=_nss_ldap_write_attrval_ether(fp,e,AT(macAddress));
stat = _nss_ldap_assign_attrval (e, AT (macAddress), &saddr,
@@ -120,9 +120,9 @@ _nss_ldap_parse_ether (LDAPMessage * e,
return NSS_STATUS_SUCCESS;
}
-/* macros for expanding the LDF_ETHER macro */
-#define LDF_STRING(field) WRITE_STRING(fp,field)
-#define LDF_TYPE(field,type) WRITE_TYPE(fp,field,type)
+/* macros for expanding the NSLCD_ETHER macro */
+#define NSLCD_STRING(field) WRITE_STRING(fp,field)
+#define NSLCD_TYPE(field,type) WRITE_TYPE(fp,field,type)
#define ETHER_NAME result.e_name
#define ETHER_ADDR result.e_addr
@@ -154,7 +154,7 @@ int nslcd_ether_byname(FILE *fp)
WRITE_INT32(fp,retv);
if (retv==NSLCD_RESULT_SUCCESS)
{
- LDF_ETHER;
+ NSLCD_ETHER;
}
WRITE_FLUSH(fp);
/* we're done */
@@ -189,7 +189,7 @@ int nslcd_ether_byether(FILE *fp)
WRITE_INT32(fp,retv);
if (retv==NSLCD_RESULT_SUCCESS)
{
- LDF_ETHER;
+ NSLCD_ETHER;
}
WRITE_FLUSH(fp);
/* we're done */
@@ -218,7 +218,7 @@ int nslcd_ether_all(FILE *fp)
{
/* write the result */
WRITE_INT32(fp,retv);
- LDF_ETHER;
+ NSLCD_ETHER;
}
/* write the final result code */
WRITE_INT32(fp,retv);
diff --git a/server/group.c b/server/group.c
index a23a8b2..5442a5e 100644
--- a/server/group.c
+++ b/server/group.c
@@ -1048,10 +1048,10 @@ static enum nss_status group_bymember(const char *user, long int *start,
return NSS_STATUS_SUCCESS;
}
-/* macros for expanding the LDF_GROUP macro */
-#define LDF_STRING(field) WRITE_STRING(fp,field)
-#define LDF_TYPE(field,type) WRITE_TYPE(fp,field,type)
-#define LDF_STRINGLIST(field) WRITE_STRINGLIST_NULLTERM(fp,field)
+/* macros for expanding the NSLCD_GROUP macro */
+#define NSLCD_STRING(field) WRITE_STRING(fp,field)
+#define NSLCD_TYPE(field,type) WRITE_TYPE(fp,field,type)
+#define NSLCD_STRINGLIST(field) WRITE_STRINGLIST_NULLTERM(fp,field)
#define GROUP_NAME result.gr_name
#define GROUP_PASSWD result.gr_passwd
#define GROUP_GID result.gr_gid
@@ -1091,7 +1091,7 @@ int nslcd_group_byname(FILE *fp)
WRITE_INT32(fp,retv);
if (retv==NSLCD_RESULT_SUCCESS)
{
- LDF_GROUP;
+ NSLCD_GROUP;
}
WRITE_FLUSH(fp);
/* we're done */
@@ -1130,7 +1130,7 @@ int nslcd_group_bygid(FILE *fp)
WRITE_INT32(fp,retv);
if (retv==NSLCD_RESULT_SUCCESS)
{
- LDF_GROUP;
+ NSLCD_GROUP;
}
WRITE_FLUSH(fp);
/* we're done */
@@ -1218,7 +1218,7 @@ int nslcd_group_all(FILE *fp)
{
/* write the result */
WRITE_INT32(fp,retv);
- LDF_GROUP;
+ NSLCD_GROUP;
}
/* write the final result code */
WRITE_INT32(fp,retv);
diff --git a/server/passwd.c b/server/passwd.c
index c1d3520..1ee6742 100644
--- a/server/passwd.c
+++ b/server/passwd.c
@@ -59,8 +59,6 @@
#endif
-static struct ent_context *pw_context = NULL;
-
static inline enum nss_status _nss_ldap_assign_emptystring(
char **valptr, char **buffer, size_t * buflen)
{
@@ -187,9 +185,9 @@ static enum nss_status _nss_ldap_parse_pw (LDAPMessage * e,
return NSS_STATUS_SUCCESS;
}
-/* macros for expanding the LDF_PASSWD macro */
-#define LDF_STRING(field) WRITE_STRING(fp,field)
-#define LDF_TYPE(field,type) WRITE_TYPE(fp,field,type)
+/* macros for expanding the NSLCD_PASSWD macro */
+#define NSLCD_STRING(field) WRITE_STRING(fp,field)
+#define NSLCD_TYPE(field,type) WRITE_TYPE(fp,field,type)
#define PASSWD_NAME result.pw_name
#define PASSWD_PASSWD result.pw_passwd
#define PASSWD_UID result.pw_uid
@@ -227,7 +225,7 @@ int nslcd_passwd_byname(FILE *fp)
WRITE_INT32(fp,retv);
if (retv==NSLCD_RESULT_SUCCESS)
{
- LDF_PASSWD;
+ NSLCD_PASSWD;
}
WRITE_FLUSH(fp);
/* we're done */
@@ -259,7 +257,7 @@ int nslcd_passwd_byuid(FILE *fp)
WRITE_INT32(fp,retv);
if (retv==NSLCD_RESULT_SUCCESS)
{
- LDF_PASSWD;
+ NSLCD_PASSWD;
}
WRITE_FLUSH(fp);
/* we're done */
@@ -270,6 +268,7 @@ int nslcd_passwd_all(FILE *fp)
{
int32_t tmpint32;
/* these are here for now until we rewrite the LDAP code */
+ struct ent_context *pw_context = NULL;
struct passwd result;
char buffer[1024];
int errnop;
@@ -287,7 +286,7 @@ int nslcd_passwd_all(FILE *fp)
{
/* write the result */
WRITE_INT32(fp,retv);
- LDF_PASSWD;
+ NSLCD_PASSWD;
}
/* write the final result code */
WRITE_INT32(fp,retv);
diff --git a/server/protocol.c b/server/protocol.c
index 0c201fd..9089156 100644
--- a/server/protocol.c
+++ b/server/protocol.c
@@ -86,10 +86,10 @@ static enum nss_status _nss_ldap_parse_proto (LDAPMessage *e,
return NSS_STATUS_SUCCESS;
}
-/* macros for expanding the LDF_PROTOCOL macro */
-#define LDF_STRING(field) WRITE_STRING(fp,field)
-#define LDF_STRINGLIST(field) WRITE_STRINGLIST_NULLTERM(fp,field)
-#define LDF_INT32(field) WRITE_INT32(fp,field)
+/* macros for expanding the NSLCD_PROTOCOL macro */
+#define NSLCD_STRING(field) WRITE_STRING(fp,field)
+#define NSLCD_STRINGLIST(field) WRITE_STRINGLIST_NULLTERM(fp,field)
+#define NSLCD_INT32(field) WRITE_INT32(fp,field)
#define PROTOCOL_NAME result.p_name
#define PROTOCOL_ALIASES result.p_aliases
#define PROTOCOL_NUMBER result.p_proto
@@ -122,7 +122,7 @@ int nslcd_protocol_byname(FILE *fp)
WRITE_INT32(fp,retv);
if (retv==NSLCD_RESULT_SUCCESS)
{
- LDF_PROTOCOL;
+ NSLCD_PROTOCOL;
}
WRITE_FLUSH(fp);
/* we're done */
@@ -155,7 +155,7 @@ int nslcd_protocol_bynumber(FILE *fp)
WRITE_INT32(fp,retv);
if (retv==NSLCD_RESULT_SUCCESS)
{
- LDF_PROTOCOL;
+ NSLCD_PROTOCOL;
}
WRITE_FLUSH(fp);
/* we're done */
@@ -185,7 +185,7 @@ int nslcd_protocol_all(FILE *fp)
/* write the result code */
WRITE_INT32(fp,retv);
/* write the entry */
- LDF_PROTOCOL;
+ NSLCD_PROTOCOL;
}
/* write the final result code */
WRITE_INT32(fp,retv);
diff --git a/server/rpc.c b/server/rpc.c
index 727f722..2da1a6b 100644
--- a/server/rpc.c
+++ b/server/rpc.c
@@ -58,10 +58,10 @@
#include "common.h"
#include "log.h"
-/* macros for expanding the LDF_RPC macro */
-#define LDF_STRING(field) WRITE_STRING(fp,field)
-#define LDF_STRINGLIST(field) WRITE_STRINGLIST_NULLTERM(fp,field)
-#define LDF_INT32(field) WRITE_INT32(fp,field)
+/* macros for expanding the NSLCD_RPC macro */
+#define NSLCD_STRING(field) WRITE_STRING(fp,field)
+#define NSLCD_STRINGLIST(field) WRITE_STRINGLIST_NULLTERM(fp,field)
+#define NSLCD_INT32(field) WRITE_INT32(fp,field)
#define RPC_NAME result->r_name
#define RPC_ALIASES result->r_aliases
#define RPC_NUMBER result->r_number
@@ -70,7 +70,7 @@
static int write_rpcent(FILE *fp,struct rpcent *result)
{
int32_t tmpint32,tmp2int32,tmp3int32;
- LDF_RPC;
+ NSLCD_RPC;
return 0;
}
diff --git a/server/service.c b/server/service.c
index 3133ae5..118f5c5 100644
--- a/server/service.c
+++ b/server/service.c
@@ -58,10 +58,10 @@
#include "common.h"
#include "log.h"
-/* macros for expanding the LDF_SERVICE macro */
-#define LDF_STRING(field) WRITE_STRING(fp,field)
-#define LDF_STRINGLIST(field) WRITE_STRINGLIST_NULLTERM(fp,field)
-#define LDF_INT32(field) WRITE_INT32(fp,field)
+/* macros for expanding the NSLCD_SERVICE macro */
+#define NSLCD_STRING(field) WRITE_STRING(fp,field)
+#define NSLCD_STRINGLIST(field) WRITE_STRINGLIST_NULLTERM(fp,field)
+#define NSLCD_INT32(field) WRITE_INT32(fp,field)
#define SERVICE_NAME result->s_name
#define SERVICE_ALIASES result->s_aliases
#define SERVICE_NUMBER htons(result->s_port)
@@ -71,7 +71,7 @@
static int write_servent(FILE *fp,struct servent *result)
{
int32_t tmpint32,tmp2int32,tmp3int32;
- LDF_SERVICE;
+ NSLCD_SERVICE;
return 0;
}
diff --git a/server/shadow.c b/server/shadow.c
index c607efb..bb2141b 100644
--- a/server/shadow.c
+++ b/server/shadow.c
@@ -107,9 +107,9 @@ static enum nss_status _nss_ldap_parse_sp(LDAPMessage *e,
return NSS_STATUS_SUCCESS;
}
-/* macros for expanding the LDF_SHADOW macro */
-#define LDF_STRING(field) WRITE_STRING(fp,field)
-#define LDF_INT32(field) WRITE_INT32(fp,field)
+/* macros for expanding the NSLCD_SHADOW macro */
+#define NSLCD_STRING(field) WRITE_STRING(fp,field)
+#define NSLCD_INT32(field) WRITE_INT32(fp,field)
#define SHADOW_NAME result.sp_namp
#define SHADOW_PASSWD result.sp_pwdp
#define SHADOW_LASTCHANGE result.sp_lstchg
@@ -147,7 +147,7 @@ int nslcd_shadow_byname(FILE *fp)
WRITE_INT32(fp,retv);
if (retv==NSLCD_RESULT_SUCCESS)
{
- LDF_SHADOW;
+ NSLCD_SHADOW;
}
WRITE_FLUSH(fp);
/* we're done */
@@ -176,7 +176,7 @@ int nslcd_shadow_all(FILE *fp)
{
/* write the result */
WRITE_INT32(fp,retv);
- LDF_SHADOW;
+ NSLCD_SHADOW;
}
/* write the final result code */
WRITE_INT32(fp,retv);