| Anonymous | Login | Signup for a new account | 2010-09-10 11:52 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ << ] [ >> ] | [ Issue History ] [ Print ] | |||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0000431 | incron | public | 2010-05-21 00:57 | 2009-11-01 18:08 | |||||||
| Reporter | vapier | ||||||||||
| Assigned To | luk | ||||||||||
| Priority | normal | Severity | minor | Reproducibility | have not tried | ||||||
| Status | assigned | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Summary | 0000431: incron doesnt process symlinks in /etc/incron.d/ | ||||||||||
| Description | the load_tables() function only processes regular files and ignores symlinks. so if a valid file is at like /etc/foo/ and gets added by: ln -s /etc/foo/moo /etc/incron.d/moo the file never gets added | ||||||||||
| Additional Information | the error in the code is here: while ((pDe = readdir(d)) != NULL) { std::string un(pDe->d_name); std::string path(IncronCfg::BuildPath(s, pDe->d_name)); bool ok = pDe->d_type == DT_REG; if (pDe->d_type == DT_UNKNOWN) { struct stat st; if (stat(path.c_str(), &st) == 0) ok = S_ISREG(st.st_mode); } if (ok) { syslog(LOG_INFO, "loading table %s", pDe->d_name); the first ok should be: bool ok = pDe->d_type == DT_REG || pDe->d_type == DT_LINK; | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0000392) luk (administrator) 2009-11-01 18:08 |
Thanks for reporting but the correct code must check whether the link points to a regular file and not anything else (e.g. device file or directory). I will implement it for the next bugfix version. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2009-10-30 22:10 | vapier | New Issue | |
| 2009-11-01 18:04 | luk | Status | new => assigned |
| 2009-11-01 18:04 | luk | Assigned To | => luk |
| 2009-11-01 18:08 | luk | Note Added: 0000392 | |
| Copyright © 2000 - 2010 MantisBT Group |