#306 closed defect (fixed)
Inotify follows symlinks instead of monitoring them
Reported by: | rainer | Owned by: | rainer |
---|---|---|---|
Priority: | major | Milestone: | 3.0.6 |
Component: | main | Version: | |
Keywords: | Cc: |
Description
The flag IN_DONT_FOLLOW is missing in inotify_add_watch(), which causes inotify to monitor the target rather than the symlink. This is at variance with the behaviour without inotify (reported by [anonymous]).
--- src/sh_inotify.c~ 2012-08-09 19:29:33.524332502 +0200 +++ src/sh_inotify.c 2012-08-09 20:07:04.566452614 +0200 @@ -467,8 +467,12 @@ return -1; } +#if ! defined(IN_DONT_FOLLOW) + /* It only exists since Linux 2.6.15. */ + #define IN_DONT_FOLLOW 0 +#endif #define SH_INOTIFY_FILEFLAGS \ - (IN_ATTRIB|IN_MODIFY|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT) + (IN_ATTRIB|IN_MODIFY|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_DONT_FOLLOW) #define SH_INOTIFY_DIRFLAGS \ (SH_INOTIFY_FILEFLAGS|IN_DELETE|IN_CREATE|IN_MOVED_FROM|IN_MOVED_TO)
Note:
See TracTickets
for help on using tickets.
Believed to be fixed by changeset [405].