Sample Install Program
if
else {
printf(“Failed at CSSM_ModuleInstall, error = %d\n”,
}
exit(1);
}
/* copy library to /usr/lib/cdsa */ memset(cpcmd, 0, PATH_LEN);
(void) sprintf(&cpcmd[0], “cp %s %s”, DL_LIB, TARGET_NAME); if (system(cpcmd) != 0) {
printf(“Failed to copy library image to /usr/lib/cdsa\n”); uninstall_addin(1);
exit (1);
}
if (chmod (TARGET_NAME, S_IRUSRS_IXUSRS_IRGRPS_IXGRPS_IROTHS_IXOTH) != 0)
{
printf(“Failed to change library mode.\n”); uninstall_addin(1);
exit (1);
}
printf(“The
exit( 0 );
}
CSSM_RETURN uninstall_addin(cleanup)
80 | Appendix A |