nss-pam-ldapd commit: r1767 - nss-pam-ldapd/nss
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r1767 - nss-pam-ldapd/nss
- 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: r1767 - nss-pam-ldapd/nss
- Date: Sat, 15 Sep 2012 19:51:01 +0200 (CEST)
Author: arthur
Date: Sat Sep 15 19:51:00 2012
New Revision: 1767
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1767&view=revision
Log:
clear the *ent structs before writing fields to avoid problems with extra
fields (fixes password field weirdness on Solaris 10)
Modified:
nss-pam-ldapd/nss/aliases.c
nss-pam-ldapd/nss/ethers.c
nss-pam-ldapd/nss/group.c
nss-pam-ldapd/nss/hosts.c
nss-pam-ldapd/nss/netgroup.c
nss-pam-ldapd/nss/networks.c
nss-pam-ldapd/nss/passwd.c
nss-pam-ldapd/nss/protocols.c
nss-pam-ldapd/nss/rpc.c
nss-pam-ldapd/nss/services.c
nss-pam-ldapd/nss/shadow.c
Modified: nss-pam-ldapd/nss/aliases.c
==============================================================================
--- nss-pam-ldapd/nss/aliases.c Fri Sep 14 23:08:48 2012 (r1766)
+++ nss-pam-ldapd/nss/aliases.c Sat Sep 15 19:51:00 2012 (r1767)
@@ -2,7 +2,7 @@
aliases.c - NSS lookup functions for aliases database
Copyright (C) 2006 West Consulting
- Copyright (C) 2006, 2007, 2008, 2010 Arthur de Jong
+ Copyright (C) 2006, 2007, 2008, 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
@@ -35,6 +35,7 @@
{
int32_t tmpint32,tmp2int32,tmp3int32;
size_t bufptr=0;
+ memset(result,0,sizeof(struct aliasent));
/* read the name of the alias */
READ_BUF_STRING(fp,result->alias_name);
/* read the members */
Modified: nss-pam-ldapd/nss/ethers.c
==============================================================================
--- nss-pam-ldapd/nss/ethers.c Fri Sep 14 23:08:48 2012 (r1766)
+++ nss-pam-ldapd/nss/ethers.c Sat Sep 15 19:51:00 2012 (r1767)
@@ -37,6 +37,7 @@
{
int32_t tmpint32;
size_t bufptr=0;
+ memset(result,0,sizeof(struct etherent));
READ_BUF_STRING(fp,result->e_name);
READ_TYPE(fp,result->e_addr,uint8_t[6]);
return NSS_STATUS_SUCCESS;
Modified: nss-pam-ldapd/nss/group.c
==============================================================================
--- nss-pam-ldapd/nss/group.c Fri Sep 14 23:08:48 2012 (r1766)
+++ nss-pam-ldapd/nss/group.c Sat Sep 15 19:51:00 2012 (r1767)
@@ -38,6 +38,7 @@
{
int32_t tmpint32,tmp2int32,tmp3int32;
size_t bufptr=0;
+ memset(result,0,sizeof(struct group));
READ_BUF_STRING(fp,result->gr_name);
READ_BUF_STRING(fp,result->gr_passwd);
READ_TYPE(fp,result->gr_gid,gid_t);
Modified: nss-pam-ldapd/nss/hosts.c
==============================================================================
--- nss-pam-ldapd/nss/hosts.c Fri Sep 14 23:08:48 2012 (r1766)
+++ nss-pam-ldapd/nss/hosts.c Sat Sep 15 19:51:00 2012 (r1767)
@@ -74,6 +74,7 @@
int i;
int readaf;
size_t bufptr=0;
+ memset(result,0,sizeof(struct hostent));
/* read the host entry */
READ_BUF_STRING(fp,result->h_name);
READ_BUF_STRINGLIST(fp,result->h_aliases);
Modified: nss-pam-ldapd/nss/netgroup.c
==============================================================================
--- nss-pam-ldapd/nss/netgroup.c Fri Sep 14 23:08:48 2012 (r1766)
+++ nss-pam-ldapd/nss/netgroup.c Sat Sep 15 19:51:00 2012 (r1767)
@@ -48,6 +48,7 @@
int32_t tmpint32;
int type;
size_t bufptr=0;
+ memset(result,0,sizeof(struct __netgrent));
/* read netgroup type */
READ_INT32(fp,type);
if (type==NSLCD_NETGROUP_TYPE_NETGROUP)
Modified: nss-pam-ldapd/nss/networks.c
==============================================================================
--- nss-pam-ldapd/nss/networks.c Fri Sep 14 23:08:48 2012 (r1766)
+++ nss-pam-ldapd/nss/networks.c Sat Sep 15 19:51:00 2012 (r1767)
@@ -72,6 +72,7 @@
int readaf;
size_t bufptr=0;
nss_status_t retv=NSS_STATUS_NOTFOUND;
+ memset(result,0,sizeof(struct netent));
/* read the network entry */
READ_BUF_STRING(fp,result->n_name);
READ_BUF_STRINGLIST(fp,result->n_aliases);
Modified: nss-pam-ldapd/nss/passwd.c
==============================================================================
--- nss-pam-ldapd/nss/passwd.c Fri Sep 14 23:08:48 2012 (r1766)
+++ nss-pam-ldapd/nss/passwd.c Sat Sep 15 19:51:00 2012 (r1767)
@@ -37,6 +37,7 @@
{
int32_t tmpint32;
size_t bufptr=0;
+ memset(result,0,sizeof(struct passwd));
READ_BUF_STRING(fp,result->pw_name);
READ_BUF_STRING(fp,result->pw_passwd);
READ_TYPE(fp,result->pw_uid,uid_t);
Modified: nss-pam-ldapd/nss/protocols.c
==============================================================================
--- nss-pam-ldapd/nss/protocols.c Fri Sep 14 23:08:48 2012 (r1766)
+++ nss-pam-ldapd/nss/protocols.c Sat Sep 15 19:51:00 2012 (r1767)
@@ -37,6 +37,7 @@
{
int32_t tmpint32,tmp2int32,tmp3int32;
size_t bufptr=0;
+ memset(result,0,sizeof(struct protoent));
READ_BUF_STRING(fp,result->p_name);
READ_BUF_STRINGLIST(fp,result->p_aliases);
READ_INT32(fp,result->p_proto);
Modified: nss-pam-ldapd/nss/rpc.c
==============================================================================
--- nss-pam-ldapd/nss/rpc.c Fri Sep 14 23:08:48 2012 (r1766)
+++ nss-pam-ldapd/nss/rpc.c Sat Sep 15 19:51:00 2012 (r1767)
@@ -37,6 +37,7 @@
{
int32_t tmpint32,tmp2int32,tmp3int32;
size_t bufptr=0;
+ memset(result,0,sizeof(struct rpcent));
READ_BUF_STRING(fp,result->r_name);
READ_BUF_STRINGLIST(fp,result->r_aliases);
READ_INT32(fp,result->r_number);
Modified: nss-pam-ldapd/nss/services.c
==============================================================================
--- nss-pam-ldapd/nss/services.c Fri Sep 14 23:08:48 2012 (r1766)
+++ nss-pam-ldapd/nss/services.c Sat Sep 15 19:51:00 2012 (r1767)
@@ -37,6 +37,7 @@
{
int32_t tmpint32,tmp2int32,tmp3int32;
size_t bufptr=0;
+ memset(result,0,sizeof(struct servent));
READ_BUF_STRING(fp,result->s_name);
READ_BUF_STRINGLIST(fp,result->s_aliases);
/* store port number in network byte order */
Modified: nss-pam-ldapd/nss/shadow.c
==============================================================================
--- nss-pam-ldapd/nss/shadow.c Fri Sep 14 23:08:48 2012 (r1766)
+++ nss-pam-ldapd/nss/shadow.c Sat Sep 15 19:51:00 2012 (r1767)
@@ -37,6 +37,7 @@
{
int32_t tmpint32;
size_t bufptr=0;
+ memset(result,0,sizeof(struct spwd));
READ_BUF_STRING(fp,result->sp_namp);
READ_BUF_STRING(fp,result->sp_pwdp);
READ_INT32(fp,result->sp_lstchg);
--
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: r1767 - nss-pam-ldapd/nss,
Commits of the nss-pam-ldapd project