Elektrine lite

← Feed

@nblr@chaos.social

2026-01-08 00:40 UTC

TIL: "If the last entry in a crontab is missing the newline, cron will consider the crontab (at least partially) broken and refuse to install it." It does so silently. I didn't know that. May this piece of information save you time.

Replies (4)

  • @nblr@chaos.social sudoers has a similar bug. Can't remember what it is exactly but it's just as dumb and nobody could log in because of it.

    Open ##2535067

  • Things like this made me paranoid a long time ago. Since then I add an extra line to *every* file I create, no matter what it is. 😅 @nblr@chaos.social

    Open ##2535073

  • @nblr@chaos.social ”we can detect that it isn’t there, but we refuse to fucking add it for you.”

    Open ##2535077

  • @robin@daugherty.nl 2026-01-09 07:36

    @nblr@chaos.social @0xabad1dea@infosec.exchange POSIX standard says that a Text File is made up of 0 or more Lines, and a Line is a sequence of zero or more characters terminated with a newline character. https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html So this is true of many tools, and it’s why many tools such as GitHub warn you when a file is missing its last newline. And yet I still find projects and even whole engineering organizations that standardize on “no terminating newline”.

    Open ##2535084