ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
mdl_host_credentials.c File Reference

Pure host credential-snapshot metadata comparison. More...

#include <sys/stat.h>
#include "mdl_host_credentials_internal.h"
#include "ra8_attributes.h"
Include dependency graph for mdl_host_credentials.c:

Go to the source code of this file.

Functions

bool priv_mdl_host_credential_stat_unchanged (const struct stat *before, const struct stat *after)
 Compare identity, size, mode, and nanosecond mutation metadata.

Detailed Description

Pure host credential-snapshot metadata comparison.

Keeps platform-specific nanosecond fields out of portable policy and makes the mutation decision directly fault-testable.

Definition in file mdl_host_credentials.c.

Function Documentation

◆ priv_mdl_host_credential_stat_unchanged()

bool priv_mdl_host_credential_stat_unchanged ( const struct stat * before,
const struct stat * after )

Compare identity, size, mode, and nanosecond mutation metadata.

Parameters
[in]beforeMetadata captured immediately after opening a regular file.
[in]afterMetadata captured after the exact bounded read and EOF probe.
Returns
Whether the descriptor-backed source remained unchanged.
Precondition
before and after are non-NULL.
Postcondition
No state is modified.
Note
Uses Darwin st_*timespec and POSIX/Linux st_*tim fields explicitly.
Since
0.1.0

Compares the complete security-relevant snapshots supplied by the caller. Neither input snapshot is modified or retained.

Return values
trueThe documented predicate holds or the requested operation completed.
falseThe predicate does not hold or validation rejected the operation.
Precondition
Every required pointer is non-null and remains valid for the call.
Postcondition
Documented outputs and the return value describe the same outcome.

Definition at line 14 of file mdl_host_credentials.c.

References RA8_PRIV.

Referenced by internal_read_credential().