Page MenuHomeFreeBSD

cron: log when a crontab path is too long
ClosedPublic

Authored by chris.longros_gmail.com on Fri, Apr 3, 2:48 PM.
Tags
None
Referenced Files
F154656885: D56235.diff
Wed, Apr 29, 4:02 AM
F154402504: D56235.diff
Tue, Apr 28, 8:59 AM
Unknown Object (File)
Thu, Apr 23, 11:59 PM
Unknown Object (File)
Sat, Apr 18, 4:31 PM
Unknown Object (File)
Sat, Apr 18, 11:39 AM
Unknown Object (File)
Sat, Apr 18, 11:39 AM
Unknown Object (File)
Sat, Apr 18, 11:39 AM
Unknown Object (File)
Sat, Apr 18, 11:39 AM

Details

Summary

Log via syslog when snprintf truncates the crontab path,
instead of silently skipping the entry.

Signed-off-by: Christos Longros <chris.longros@gmail.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Is it safe to assume that I don't want to ask if there's a story behind deciding to resolve this XXX? =) Will try to commit later today

This revision is now accepted and ready to land.Fri, Apr 24, 5:30 PM
michaelo added inline comments.
usr.sbin/cron/cron/database.c
172

Is the length actually documented in the manpage? I fail to find it.

usr.sbin/cron/cron/database.c
172

No, there's no documented limit on crontab filename length in cron.8, crontab.1, or crontab.5

usr.sbin/cron/cron/database.c
172

It think it is then worth documenting that tabname is confined by MAXPATHLEN sans NULL byte.

Document the resulting filename length limit in cron(8) under FILES.

This revision now requires review to proceed.Sat, Apr 25, 7:25 PM
bcr added a subscriber: bcr.

OK from manpages.

This revision is now accepted and ready to land.Sun, Apr 26, 11:08 AM
This revision was automatically updated to reflect the committed changes.