diff options
author | Timo Sirainen <timo.sirainen@open-xchange.com> | 2022-02-16 11:31:58 +0200 |
---|---|---|
committer | Timo Sirainen <timo.sirainen@open-xchange.com> | 2022-02-16 11:58:04 +0200 |
commit | 6d7c42e2df607a538a38636200b932a9fe2f97f4 (patch) | |
tree | 39aa94606617858498321cbdebc55f8f1d83f829 | |
parent | a7e536bcca8172a2fb96da2d8312cdde07a65479 (diff) | |
download | libfaketime-6d7c42e2df607a538a38636200b932a9fe2f97f4.tar.gz |
Fix disabling all *stat*() faking during initialization
Only __xstat() variant was handling the dont_fake variable.
-rw-r--r-- | src/libfaketime.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libfaketime.c b/src/libfaketime.c index 1f66631..19a6ec6 100644 --- a/src/libfaketime.c +++ b/src/libfaketime.c @@ -955,7 +955,7 @@ int __fxstat (int ver, int fildes, struct stat *buf) { if (!fake_stat_disabled) { - fake_statbuf(buf); + if (!dont_fake) fake_statbuf(buf); } } return result; @@ -988,7 +988,7 @@ int __fxstatat(int ver, int fildes, const char *filename, struct stat *buf, int { if (!fake_stat_disabled) { - fake_statbuf(buf); + if (!dont_fake) fake_statbuf(buf); } } return result; @@ -1021,7 +1021,7 @@ int __lxstat (int ver, const char *path, struct stat *buf) { if (!fake_stat_disabled) { - fake_statbuf(buf); + if (!dont_fake) fake_statbuf(buf); } } return result; @@ -1053,7 +1053,7 @@ int __xstat64 (int ver, const char *path, struct stat64 *buf) { if (!fake_stat_disabled) { - fake_stat64buf(buf); + if (!dont_fake) fake_stat64buf(buf); } } return result; @@ -1085,7 +1085,7 @@ int __fxstat64 (int ver, int fildes, struct stat64 *buf) { if (!fake_stat_disabled) { - fake_stat64buf(buf); + if (!dont_fake) fake_stat64buf(buf); } } return result; @@ -1118,7 +1118,7 @@ int __fxstatat64 (int ver, int fildes, const char *filename, struct stat64 *buf, { if (!fake_stat_disabled) { - fake_stat64buf(buf); + if (!dont_fake) fake_stat64buf(buf); } } return result; @@ -1151,7 +1151,7 @@ int __lxstat64 (int ver, const char *path, struct stat64 *buf) { if (!fake_stat_disabled) { - fake_stat64buf(buf); + if (!dont_fake) fake_stat64buf(buf); } } return result; |