Basic Solution File System - BSFS
Loading...
Searching...
No Matches
su.c File Reference

Implements su command to switch session identity (testing). More...

Functions

int su (FILE *disk, superblock_t *sb, char **args)
 Switch the browser session identity (testing helper).

Detailed Description

Implements su command to switch session identity (testing).

Function Documentation

◆ su()

int su ( FILE * disk,
superblock_t * sb,
char ** args )

Switch the browser session identity (testing helper).

Changes the API session uid (and optionally gid) used for permission checks. Accepts decimal values. Intended for testing permission behavior in the browser; no OS-level identity is changed.

Parameters
diskOpen filesystem image (unused).
sbLoaded superblock (unused).
argsargv-like vector; expects uid in args[1], optional gid in args[2].
Returns
1 to continue the browser loop.