The fscanf() function called has the format %8s to parse the login name, which is, perhaps, a historical left over. I've been getting bad format errors to syslog because my login name is "nothingmuch" Reproducible: Always Steps to Reproduce: 1. run at or batch as a user with name > 8 chars 2. wait for atd to work, or run atd -s manually Actual Results: The jobs are not run, and i think it fails before it tries others. Expected Results: either complained at at/batch time, or worked properly. I've changed the format of the fscanf call: <<EOF; diff -uNr at-3.1.8/atd.c at-3.1.8.255charfix/atd.c --- at-3.1.8/atd.c Fri Jan 18 06:15:27 2002 +++ at-3.1.8.255charfix/atd.c Mon Nov 17 21:07:14 2003 @@ -299,7 +299,7 @@ * NFS and works with local file systems. It's not clear where * the bug is located. -Joey */ - if (fscanf(stream, "#!/bin/sh\n# atrun uid=%d gid=%d\n# mail %8s %d", + if (fscanf(stream, "#!/bin/sh\n# atrun uid=%d gid=%d\n# mail %255s %d", &nuid, &ngid, mailbuf, &send_mail) != 4) pabort("File %.500s is in wrong format - aborting", filename); EOF it seems to be working properly.
I've supplied a patch in the description... sorry, I haven't quite gotten the hang of this bugzilla stuff yet... =)
*** Bug 44012 has been marked as a duplicate of this bug. ***
I don't see this is being looked at, and it's not resolved. It's a real problem that takes quite a bit of effort to fix each time around.
Check the length of the buffer you're stuffing that into...
Cough. Right. char mailbuf[256] instead of char mailbuf[9]. Anybody know what's the most pam/whoever will eat?
Thanks, fixed in at-3.1.8-r10