DWORD PrintPamConfig( FILE *fp, PLSA_PAM_CONFIG pConfig ) { DWORD dwError = 0; if (fputs( "[HKEY_THIS_MACHINE\\Services\\lsass\\Parameters\\PAM]\n", fp) < 0) { dwError = LwMapErrnoToLwError(errno); } BAIL_ON_UP_ERROR(dwError); dwError = UpPrintString(fp, "LogLevel", pConfig->pszLogLevel); BAIL_ON_UP_ERROR(dwError); dwError = UpPrintBoolean(fp, "DisplayMotd", pConfig->bLsaPamDisplayMOTD); BAIL_ON_UP_ERROR(dwError); dwError = UpPrintString(fp, "UserNotAllowedError", pConfig->pszAccessDeniedMessage); BAIL_ON_UP_ERROR(dwError); if (fputs("\n", fp) < 0) { dwError = LwMapErrnoToLwError(errno); } BAIL_ON_UP_ERROR(dwError); error: return dwError; }
DWORD UpLocalPrintConfig( FILE *fp, PLOCAL_CONFIG pConfig ) { DWORD dwError = 0; if (fputs( "[HKEY_THIS_MACHINE\\Services\\lsass\\Parameters\\Providers\\Local]\n", fp) < 0) { dwError = LwMapErrnoToLwError(errno); } BAIL_ON_UP_ERROR(dwError); //dwError = UpPrintBoolean(fp, "EnableEventlog", pConfig->bEnableEventLog); //BAIL_ON_UP_ERROR(dwError); dwError = UpPrintString(fp, "LoginShellTemplate", pConfig->pszLoginShell); BAIL_ON_UP_ERROR(dwError); dwError = UpPrintString(fp, "HomeDirPrefix", pConfig->pszHomedirPrefix); BAIL_ON_UP_ERROR(dwError); dwError = UpPrintString(fp, "HomeDirTemplate", pConfig->pszHomedirTemplate); BAIL_ON_UP_ERROR(dwError); dwError = UpPrintBoolean(fp, "CreateHomeDir", pConfig->bCreateHomedir); BAIL_ON_UP_ERROR(dwError); dwError = UpPrintString(fp, "HomeDirUmask", pConfig->pszUmask); BAIL_ON_UP_ERROR(dwError); dwError = UpPrintString(fp, "SkeletonDirs", pConfig->pszSkelDirs); BAIL_ON_UP_ERROR(dwError); if (fputs("\n", fp) < 0) { dwError = LwMapErrnoToLwError(errno); } BAIL_ON_UP_ERROR(dwError); error: return dwError; }