Underscore in SERVICES-names can cause deadlocks.

Henrique de Moraes Holschuh hmh at debian.org
Tue Mar 20 13:42:01 EDT 2012


On Tue, 20 Mar 2012, Robert Linden wrote:
> The tricky part is, that not all names that look distinct really are treated 
> differently by cyrus. Notable example: "imap" and "imap_remote" result
> in the same lockfile (/var/imapd/socket/imap-0.lock), because the name is 
> truncated at the '_'. The '_' doesn't seem to be illegal per se, because cyrus 
> does not complain and the service runs ok most of the time, i.e. as long as no 
> concurrent connections are created on the 2 interfaces to trigger the race-
> condition.
> 
> Maybe other characters cause this problem as well, so if one is unsure about 
> this it would be best to just stick to alphanumeric characters.

IMHO we really should refuse service names that will cause issues, which
probably means we should enforce that services be named [a-z][a-z0-9]+
to avoid potential pitfalls.

This is the second report about the permissive acceptance of service
names causing bad surprises...

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


More information about the Cyrus-devel mailing list