Hello Bogusław,

Thursday, February 17, 2005, 3:48:01 PM, you wrote:

BB> -----BEGIN PGP SIGNED MESSAGE-----
BB> Hash: SHA1

BB> Trog wrote:
>> On Thu, 2005-02-17 at 09:55 +0000, Nigel Horne wrote:
>> 
>>>On Thursday 17 Feb 2005 09:31, -=MikeP=- wrote:
>>>
>>>
>>>>>>>>  2) there was a problem with scanning e-mails: I suppose it is the
>>>>>>>>  problem of QNX:
>>>>>>>>
>>>>>>>>  LibClamAV Error: Can't create temporary file:
>>>>>>>>  /tmp/clamav-b6b8e6d1db0cd71b/Snowwhite and the Seven Dwarfs -The
>>>>>>>>  Real Story!.eml049122: Filename too long
>>>>>>>>
>>>>>>>>  LibClamAV Error: fileblobDestroy: file not saved: report to
>>>>>>>>  [EMAIL PROTECTED]
>>>>>>
>>>>>>NAME_MAX is defined to 255
>>>>>>PATH_MAX is defined to 1024
>>>>
>>>>NH> So then, on your system what are the circumstances under which 
>>>>open(..., 
>>>>NH> O_CREAT) returns ENAMETOOLONG?
>>>
>>>>Documentation on open() says:
>>>>ENAMETOOLONG
>>>>The length of the path string exceeds PATH_MAX, or a pathname component is 
>>>>longer than NAME_MAX.
>>>
>>>Well, it strikes me that neither of these is true in this case. Perhaps 
>>>there's a bug in QNX, or
>>>have I missed something?
>> 
>> 
>> If definitely looks like a spurious error - does QNX have a problem with
>> spaces in filenames?
>> 
>> MikeP, what happens if you try and create a file with a similar name and
>> path?
>> 

BB> I see it's created in /tmp. Try to create the same file in /tmp and not
BB> in /tmp and check how is TMP_MAX set. I would be not surprised if it is
BB> about 25 or 64 . I don't know if for QNX it is limited by system or
BB> compiler runtime but if it's limited You have probably two choices :
BB> write replacement for tmpfile() function (as I did for Windows) or set
BB> TMP_MAX if it's possible.


BB> Best Regards
BB> Boguslaw Brandys

BB> -----BEGIN PGP SIGNATURE-----
BB> Version: GnuPG v1.4.0 (MingW32)
BB> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

BB> iD8DBQFCFJKBtuGICzHOh+YRAp8ZAJ9atIMEEgwn7eK5VEUngylULIxfFwCeP2xQ
BB> /aZT1q0AU5FwmR11vLaxsnE=
BB> =7YPB
BB> -----END PGP SIGNATURE-----
BB> _______________________________________________
BB> http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-devel

I'm afraid it is a problem of QNX filesystem - some bug prevents from
creating files with names longer than 48 characters...
It was an old limitation of QNX-fs (prior to QNX6). Docs say the file
name now can be 505 chars long, but I don't see what is the reason
system limits names to 48 characters at the moment.

I think I have to write a replacement for tmpfile()
Thanks a lot, Boguslaw

-- 
Best regards,
 -=MikeP=-                            mailto:[EMAIL PROTECTED]

_______________________________________________
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-devel

Reply via email to