setexportent(xtabtmp, "w");
for (i = 0; i < MCL_MAXTYPES; i++) {
- for (exp = exportlist[i]; exp; exp = exp->m_next) {
+ for (exp = exportlist[i].p_head; exp; exp = exp->m_next) {
if (is_export && !exp->m_xtabent)
continue;
if (!is_export && ! exp->m_exported)
/* write out the export entry using the FQDN */
xe = exp->m_export;
- strncpy(xe.e_hostname,
- exp->m_client->m_hostname,
- sizeof (xe.e_hostname) - 1);
- xe.e_hostname[sizeof (xe.e_hostname) - 1] = '\0';
+ xe.e_hostname = exp->m_client->m_hostname;
putexportent(&xe);
}
}
return;
setexportent(_PATH_XTAB, "a");
xe = exp->m_export;
- strncpy(xe.e_hostname, exp->m_client->m_hostname,
- sizeof (xe.e_hostname) - 1);
- xe.e_hostname[sizeof (xe.e_hostname) - 1] = '\0';
+ xe.e_hostname = exp->m_client->m_hostname;
putexportent(&xe);
endexportent();
xfunlock(lockid);