diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2011-07-02 21:20:39 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2011-07-02 21:20:39 +0000 |
commit | be47be6772da6920e93dddf52fcdbb2799056337 (patch) | |
tree | bdaa889ad2d1f06e8dfcfac5b90bc680d147551a /nslcd/shadow.c | |
parent | 2b160881f87d3d15d885b208c80b27e112459701 (diff) |
make buffer sizes consistent, grow gidNumber buffer to hold larger numbers and small consistency improvements
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1476 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/shadow.c')
-rw-r--r-- | nslcd/shadow.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nslcd/shadow.c b/nslcd/shadow.c index 6de372b..5d6dae7 100644 --- a/nslcd/shadow.c +++ b/nslcd/shadow.c @@ -112,7 +112,7 @@ void shadow_init(void) static long to_date(const char *date,const char *attr) { - char buffer[8]; + char buffer[32]; long value; char *tmp; size_t l; @@ -168,7 +168,7 @@ void get_shadow_properties(MYLDAP_ENTRY *entry,long *lastchangedate, long *mindays,long *maxdays,long *warndays, long *inactdays,long *expiredate,unsigned long *flag) { - char buffer[80]; + char buffer[64]; const char *tmpvalue; char *tmp; /* get lastchange date */ @@ -202,7 +202,7 @@ int update_lastchange(MYLDAP_SESSION *session,const char *userdn) int rc; const char **values; LDAPMod mod,*mods[2]; - char buffer[80],*strvals[2]; + char buffer[64],*strvals[2]; /* find the name of the attribute to use */ if ( (attmap_shadow_shadowLastChange==NULL) || (attmap_shadow_shadowLastChange[0]=='\0') ) return LDAP_LOCAL_ERROR; /* attribute not mapped at all */ @@ -270,7 +270,7 @@ static int write_shadow(TFILE *fp,MYLDAP_ENTRY *entry,const char *requser) long expiredate; unsigned long flag; int i; - char passbuffer[80]; + char passbuffer[64]; /* get username */ usernames=myldap_get_values(entry,attmap_shadow_uid); if ((usernames==NULL)||(usernames[0]==NULL)) |