|
|
@ -28,10 +28,18 @@ RET_TYPE FUNCTION(P1) |
|
|
|
|
|
|
|
#ifdef FLWRAPPER_BASEDIR |
|
|
|
if (a & (O_WRONLY|O_CREAT|O_APPEND)) |
|
|
|
# if HAS_FFD |
|
|
|
check_writeat_access("FUNCTION", ffd, f); |
|
|
|
# else |
|
|
|
check_write_access("FUNCTION", f); |
|
|
|
# endif |
|
|
|
#endif |
|
|
|
|
|
|
|
#if HAS_FFD |
|
|
|
handle_fileat_access_before("FUNCTION", ffd, f, &status); |
|
|
|
#else |
|
|
|
handle_file_access_before("FUNCTION", f, &status); |
|
|
|
#endif |
|
|
|
if (!orig_FUNCTION) orig_FUNCTION = get_dl_symbol("FUNCTION"); |
|
|
|
errno=old_errno; |
|
|
|
|
|
|
@ -52,7 +60,11 @@ RET_TYPE FUNCTION(P1) |
|
|
|
rc = orig_FUNCTION(P2); |
|
|
|
|
|
|
|
old_errno=errno; |
|
|
|
#if HAS_FFD |
|
|
|
handle_fileat_access_after("FUNCTION", ffd, f, &status); |
|
|
|
#else |
|
|
|
handle_file_access_after("FUNCTION", f, &status); |
|
|
|
#endif |
|
|
|
errno=old_errno; |
|
|
|
|
|
|
|
return rc; |
|
|
|