---
title: vfs_context_ucred
framework: Kernel
role: symbol
role_heading: Function
platforms: [macOS 10.4+]
path: kernel/1562308-vfs_context_ucred
---

# vfs_context_ucred

Get the credential associated with a vfs_context_t.

## Declaration

```occ
kauth_cred_t vfs_context_ucred(vfs_context_t ctx);
```

## Parameters

- `ctx`: Context whose associated process to find.

## Return Value

Return Value Process if available, NULL otherwise.

## Discussion

Discussion Succeeds if and only if the context has a thread, the thread has a task, and the task has a BSD proc.
