mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
Merge pull request #5874 from robberer/nixos/libredirectaccess
libredirect: add access syscall
This commit is contained in:
commit
6b678048cd
@ -102,3 +102,10 @@ int __xstat(int ver, const char * path, struct stat * st)
|
|||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
return __xstat_real(ver, rewrite(path, buf), st);
|
return __xstat_real(ver, rewrite(path, buf), st);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int * access(const char * path, int mode)
|
||||||
|
{
|
||||||
|
int * (*access_real) (const char *, int mode) = dlsym(RTLD_NEXT, "access");
|
||||||
|
char buf[PATH_MAX];
|
||||||
|
return access_real(rewrite(path, buf), mode);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user