1) normalize_path() does not allocate space for the char* array correctly. It should use slapi_ch_calloc with an elemsize of sizeof(char *) instead of 1. I guess we got lucky on 32 bit platforms where strlen(path) > (num dirs + 1) * 4. However, on a 64 bit platform, the 4 becomes an 8 and core dumps ensue. 2) make_dn() and add_aci_v() in cfg_sspt.c use a null terminated varargs list. The null terminator is a bare 0 which the gcc3 compiler assumes is an int. This blows up the varargs function where the 32bit 0 is cast to a 64bit char * with garbage in it.
Created attachment 124749 [details] list of files for fix
Created attachment 124750 [details] diffs for fix
Reviewed by: Nathan and Noriko (Thanks!) Files: https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=124749 Branch: HEAD Fix Description: 1) use sizeof(char *) as the elemsize to pass to slapi_ch_calloc(). 2) create a variable const char *NULLSTR = 0 to pass as the last argument to the varargs functions. Platforms tested: RHEL4 64 Flag Day: no Doc impact: no Checking in ldapserver/ldap/admin/src/cfg_sspt.c; /cvs/dirsec/ldapserver/ldap/admin/src/cfg_sspt.c,v <-- cfg_sspt.c new revision: 1.8; previous revision: 1.7 done Checking in ldapserver/ldap/servers/slapd/util.c; /cvs/dirsec/ldapserver/ldap/servers/slapd/util.c,v <-- util.c new revision: 1.10; previous revision: 1.9 done