summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2007-09-07 19:57:06 +0000
committerArthur de Jong <arthur@arthurdejong.org>2007-09-07 19:57:06 +0000
commit6592036689c38566acbafc178e1f22098279263f (patch)
tree19bb139462c5f264c0b35849fc4510b4db8550f3
parent713ea31d96c92e666f9722e5a81836242d1048c3 (diff)
properly initialize all contexts
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@381 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r--nslcd/alias.c2
-rw-r--r--nslcd/ether.c2
-rw-r--r--nslcd/host.c2
-rw-r--r--nslcd/network.c2
-rw-r--r--nslcd/passwd.c2
-rw-r--r--nslcd/protocol.c2
-rw-r--r--nslcd/rpc.c2
-rw-r--r--nslcd/service.c2
-rw-r--r--nslcd/shadow.c2
-rw-r--r--nslcd/util.h1
10 files changed, 9 insertions, 10 deletions
diff --git a/nslcd/alias.c b/nslcd/alias.c
index 612cd1b..a1bb482 100644
--- a/nslcd/alias.c
+++ b/nslcd/alias.c
@@ -141,7 +141,7 @@ int nslcd_alias_byname(TFILE *fp)
int nslcd_alias_all(TFILE *fp)
{
int32_t tmpint32,tmp2int32;
- struct ent_context *alias_context;
+ struct ent_context *alias_context=NULL;
char filter[1024];
/* these are here for now until we rewrite the LDAP code */
struct aliasent result;
diff --git a/nslcd/ether.c b/nslcd/ether.c
index 31fe276..ac66519 100644
--- a/nslcd/ether.c
+++ b/nslcd/ether.c
@@ -225,7 +225,7 @@ int nslcd_ether_all(TFILE *fp)
{
int32_t tmpint32;
char filter[1024];
- struct ent_context *ether_context;
+ struct ent_context *ether_context=NULL;
/* these are here for now until we rewrite the LDAP code */
struct ether result;
char buffer[1024];
diff --git a/nslcd/host.c b/nslcd/host.c
index abb23b6..6e6dda0 100644
--- a/nslcd/host.c
+++ b/nslcd/host.c
@@ -387,7 +387,7 @@ int nslcd_host_byaddr(TFILE *fp)
int nslcd_host_all(TFILE *fp)
{
int32_t tmpint32;
- struct ent_context *host_context;
+ struct ent_context *host_context=NULL;
char filter[1024];
/* these are here for now until we rewrite the LDAP code */
struct hostent result;
diff --git a/nslcd/network.c b/nslcd/network.c
index 1033c06..48f16dd 100644
--- a/nslcd/network.c
+++ b/nslcd/network.c
@@ -255,7 +255,7 @@ int nslcd_network_byaddr(TFILE *fp)
int nslcd_network_all(TFILE *fp)
{
int32_t tmpint32;
- struct ent_context *net_context;
+ struct ent_context *net_context=NULL;
char filter[1024];
/* these are here for now until we rewrite the LDAP code */
struct netent result;
diff --git a/nslcd/passwd.c b/nslcd/passwd.c
index 2c48ccc..22d4ff6 100644
--- a/nslcd/passwd.c
+++ b/nslcd/passwd.c
@@ -295,7 +295,7 @@ int nslcd_passwd_byuid(TFILE *fp)
int nslcd_passwd_all(TFILE *fp)
{
int32_t tmpint32;
- struct ent_context *passwd_context = NULL;
+ struct ent_context *passwd_context=NULL;
char filter[1024];
/* these are here for now until we rewrite the LDAP code */
struct passwd result;
diff --git a/nslcd/protocol.c b/nslcd/protocol.c
index 4ec646f..4300dd3 100644
--- a/nslcd/protocol.c
+++ b/nslcd/protocol.c
@@ -207,7 +207,7 @@ int nslcd_protocol_bynumber(TFILE *fp)
int nslcd_protocol_all(TFILE *fp)
{
int32_t tmpint32,tmp2int32,tmp3int32;
- struct ent_context *protocol_context;
+ struct ent_context *protocol_context=NULL;
char filter[1024];
/* these are here for now until we rewrite the LDAP code */
struct protoent result;
diff --git a/nslcd/rpc.c b/nslcd/rpc.c
index 51ec6c9..9cc5609 100644
--- a/nslcd/rpc.c
+++ b/nslcd/rpc.c
@@ -212,7 +212,7 @@ int nslcd_rpc_bynumber(TFILE *fp)
int nslcd_rpc_all(TFILE *fp)
{
int32_t tmpint32;
- struct ent_context *rpc_context;
+ struct ent_context *rpc_context=NULL;
char filter[1024];
/* these are here for now until we rewrite the LDAP code */
struct rpcent result;
diff --git a/nslcd/service.c b/nslcd/service.c
index 791d8c0..897d3cc 100644
--- a/nslcd/service.c
+++ b/nslcd/service.c
@@ -324,7 +324,7 @@ int nslcd_service_bynumber(TFILE *fp)
int nslcd_service_all(TFILE *fp)
{
int32_t tmpint32;
- struct ent_context *serv_context;
+ struct ent_context *serv_context=NULL;
char filter[1024];
/* these are here for now until we rewrite the LDAP code */
struct servent result;
diff --git a/nslcd/shadow.c b/nslcd/shadow.c
index e9fd76c..6e4d88a 100644
--- a/nslcd/shadow.c
+++ b/nslcd/shadow.c
@@ -227,7 +227,7 @@ int nslcd_shadow_byname(TFILE *fp)
int nslcd_shadow_all(TFILE *fp)
{
int32_t tmpint32;
- struct ent_context *shadow_context;
+ struct ent_context *shadow_context=NULL;
char filter[1024];
/* these are here for now until we rewrite the LDAP code */
struct spwd result;
diff --git a/nslcd/util.h b/nslcd/util.h
index d51309c..959aa25 100644
--- a/nslcd/util.h
+++ b/nslcd/util.h
@@ -48,7 +48,6 @@ enum nss_status _nss_ldap_dn2uid (const char *dn,
/*
* Escape '*' in a string for use as a filter
*/
-
int _nss_ldap_escape_string(const char *src,char *buffer,size_t buflen);
/* foreward compatibility hack */