vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| As the topic implies, this diff will allow cron to generate email for users with _ in their name. If you ran a cron job as a user such as this (in my case _clamd) the command would be run, but you wouldn't see any output that was generated by that command since cron considered the name unsafe. If more "safe" characters can be thought of a better fix would be to duplicate the use of safe_delim in this function, but check all characters rather than any but the first. The fix below seems the most efficient since I can't think of any other than _ that I want to allow. I am aware that you can get around this with the use of MAILTO in the users crontab, I just prefer to manage where mail goes with the aliases file. It also feels more consistent since a normal user can also have _ in their name, not just the daemons. Regards, David Gwynne Index: do_command.c ================================================== ================= RCS file: /cvs/openbsd/src/usr.sbin/cron/do_command.c,v retrieving revision 1.25 diff -u -r1.25 do_command.c --- do_command.c 30 Jul 2003 20:20:01 -0000 1.25 +++ do_command.c 26 Apr 2004 14:49:55 -0000 @@ -509,7 +509,8 @@ for (t = s, first = 1; (ch = *t++) != '\0'; first = 0) { if (isascii(ch) && isprint(ch) && - (isalnum(ch) || (!first && strchr(safe_delim, ch)))) + (isalnum(ch) || (ch == '_') || + (!first && strchr(safe_delim, ch)))) continue; log_it(usernm, getpid(), "UNSAFE", s); return (FALSE); |