Re: [PATCH] Fix chkmail loop break condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For some more context which you may want to add to the commit
message: I noticed dash would always print “you have mail” three
times, and this fixes that. On further investigation, this loop was
taking the last path in MAILPATH (or the only string in MAIL) and
continuing to chop off the last character, so for MAIL=/var/mail/june,
it would stat:

/var/mail/june
/var/mail/jun
/var/mail/ju
/var/mail/j
/var/mail/
/var/mail
/var/mai
/var/ma
/var/m
/var/

And then stop because MAXMBOXES is 10. The three “you have mail”
messages were from /var/mail/june, /var/mail/ and /var/mail.





[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux