On Wednesday, August 28, 2002, at 08:55 PM, Todd Lyons wrote:
>> You're 100% positive on this? Was it on Mandrake you used 4 X's, or >> BSD? I've got 7.2 up in vmware for some security testing and just ran >> "mktemp file.XXXX" and get the cannot create error, and the manpage >> indicates 6 X's. > > man mktemp on RH 7.1: > The template may be any file name with some number of `Xs' > appended > to it, for example /tmp/temp.XXXX. The trailing `Xs' are replaced with > the current process number and/or a unique letter combination. The > number of unique file names mktemp can return depends on the number of > `Xs' provided; six `Xs' will result in mktemp testing roughly 26 ** 6 > combinations. > > However, when you try to do less than 6: > [root@atlantis /root]# mktemp -u fileXXX > Cannot create temp file fileXXX > [root@atlantis /root]# mktemp -u fileXXXXX > Cannot create temp file fileXXXXX > [root@atlantis /root]# mktemp -u fileXXXXXX > fileMdioDs > > The interesting thing is what happens when you go more than 6: > [root@atlantis /root]# mktemp -u fileXXXXXXXX > fileXXsswMeG > > I think I just remembered backwards (ie I wanted more than 6 but could > only get 6). Looks like 6 is the magic number... no more, no less. >> I don't think it changed from 7.2 to cooker (ie. from 6 to 4 and back >> to 6). > > I believe you are right. This is a RedHat-ism it appears. Yup... I think we should use the BSD mktemp, but it's at version 1.4 while our mktemp is 1.5, even though it's "more obsolete". I'll see if we can put it in cooker since it's not an urgent thing, it may be better to wait until post-9.0. -- MandrakeSoft Security; http://www.mandrakesecure.net/ FE6F2AFD: "lynx -source http://linsec.ca/vdanen.asc | gpg --import" Fingerprint: 88D8 0D23 8D4B 3407 5BD7 66F9 2043 D0E5 FE6F 2AFD
PGP.sig
Description: PGP signature
