Add lock to prevent a race with a file closing and also removeuseless and ugly sscanf code. The extra code was never neededand the case it supposedly protected against is in fact handledcorrectly by sock_from_file as pointed out by Al Viro.