PLW_LIST_LINKS PvfsListTraverse( PPVFS_LIST pList, PLW_LIST_LINKS pCursor ) { return LwListTraverse(&pList->DataList, pCursor); }
static NTSTATUS LwIoFindPathCreds( IN PUNICODE_STRING Path, IN BOOLEAN bPrecise, OUT PIO_PATH_CREDS* ppCreds ) { NTSTATUS status = STATUS_SUCCESS; UNICODE_STRING normalPath = { 0 }; PIO_PATH_CREDS pFoundCreds = NULL; PLW_LIST_LINKS pLink = NULL; status = LwIoNormalizePath(Path, &normalPath); GOTO_CLEANUP_ON_STATUS(status); while ((pLink = LwListTraverse(&gPathCreds, pLink))) { PIO_PATH_CREDS pCreds = LW_STRUCT_FROM_FIELD(pLink, IO_PATH_CREDS, link); if ((bPrecise && LwRtlUnicodeStringIsEqual(&normalPath, &pCreds->PathPrefix, TRUE)) || (!bPrecise && LwRtlUnicodeStringIsPrefix(&pCreds->PathPrefix, &normalPath, TRUE))) { pFoundCreds = pCreds; break; } } cleanup: if (status) { pFoundCreds = NULL; } LwRtlUnicodeStringFree(&normalPath); *ppCreds = pFoundCreds; return status; }