mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 11:27:29 +00:00
Noux: override uid/gid in SYSCALL_STAT
Change the uid/gid entries in the stat syscall to have the same values on all filesystems that are used in the current noux-instance according to the specified values in noux' config. Fixes #338.
This commit is contained in:
parent
9cff243f42
commit
1b9c356aa3
@ -177,9 +177,21 @@ bool Noux::Child::syscall(Noux::Session::Syscall sc)
|
||||
|
||||
case SYSCALL_STAT:
|
||||
case SYSCALL_LSTAT: /* XXX implement difference between 'lstat' and 'stat' */
|
||||
{
|
||||
bool result = _root_dir->stat(_sysio, Absolute_path(_sysio->stat_in.path,
|
||||
_env.pwd()).base());
|
||||
|
||||
return _root_dir->stat(_sysio, Absolute_path(_sysio->stat_in.path,
|
||||
_env.pwd()).base());
|
||||
/**
|
||||
* Instead of using the uid/gid given by the actual file system
|
||||
* we use the ones specificed in the config.
|
||||
*/
|
||||
if (result) {
|
||||
_sysio->stat_out.st.uid = user_info()->uid;
|
||||
_sysio->stat_out.st.gid = user_info()->gid;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
case SYSCALL_FSTAT:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user