Mac OS 9 Lives

Mac OS 9 Discussion => Mac OS 9, Hacks & Upgrades => Topic started by: MacTron on November 29, 2014, 11:53:33 AM

Title: A bit of inner Mac Technology
Post by: MacTron on November 29, 2014, 11:53:33 AM
Each file or folder on a Macintosh volume is identified by a unique catalog node ID (CNID) in the Catalog file. The CNID is assigned at file creation time.

The catalog node ID (CNID) is a unique 32-bit number between 10h and ffffffffh. Each CNID is unique per disk. If a file is deleted, its CNID may never be reused.

CNIDs are usually assigned sequentially. If you reach CNID ffffffffh, no matter that the disk be empty, it can no longer be used.

If this should ever happen (with a file server, whatever), you have to back up and restore the drive, whereupon each file gets a new CNID.

This is the weird code you'll see in the file name, of a file with a long name (over 32 chars) created on Mac Os X (or other system) when accessing it with Mac Os 9. (and this banned me from translating some Gigasampler libraries :'(  )

This system allows to move a file where we want, even if an app is using it. On other systems the file is identified by his name and access path, so it can't be moved while it is used.

A lot of software authorization techniques uses this unique CNID of a file to detect that the file is the original or a copy.

... and this is the background of the ASR trick! LOL

ASR when restoring a image file, it restore the original CNID of each file also, so most of the software can't detect that we are running a copy!
Title: Re: A bit of inner Mac Technology
Post by: DieHard on November 29, 2014, 02:30:25 PM
That is great info. Is there a utility that will renumber CNIDs ?

I want to know so I can crash my system :)
Title: Re: A bit of inner Mac Technology
Post by: IIO on November 29, 2014, 02:52:35 PM
not even a disk editor can do that. maybe it is time to build such an app? macos9 must be enhanced, now, or in the near future.
Title: Re: A bit of inner Mac Technology
Post by: Protools5LEGuy on November 29, 2014, 02:58:03 PM
maybe it is time to build such an app? macos9 must be enhanced, now, or in the near future.
I agree, but I haven't the knowledge. We must contact the MacOS9.2.3 guy or other programmer. ClassicHasClass from ThinkClassic (Cameron) is experienced with CodeWarrior.
Title: Re: A bit of inner Mac Technology
Post by: IIO on November 29, 2014, 02:59:41 PM
catalog destroyer 3.0beta, made by norton sales pitch inc.
Title: Re: A bit of inner Mac Technology
Post by: Protools5LEGuy on November 29, 2014, 03:00:09 PM
Each file or folder on a Macintosh volume is identified by a unique catalog node ID (CNID) in the Catalog file. The CNID is assigned at file creation time.

The catalog node ID (CNID) is a unique 32-bit number between 10h and ffffffffh. Each CNID is unique per disk. If a file is deleted, its CNID may never be reused.

...

A lot of software authorization techniques uses this unique CNID of a file to detect that the file is the original or a copy.

... and this is the background of the ASR trick! LOL

ASR when restoring a image file, it restore the original CNID of each file also, so most of the software can't detect that we are running a copy!

Probably that is the reason why Restore in place dont work with ASR as well as Delete and restore.
Title: Re: A bit of inner Mac Technology
Post by: IIO on November 29, 2014, 03:00:55 PM
the IDE controller wont allow that you edit the catalog i suppose. :)
Title: Re: A bit of inner Mac Technology
Post by: Protools5LEGuy on November 29, 2014, 03:01:28 PM
catalog destroyer 3.0beta, made by norton sales pitch inc.
Can it change the CNID?
Title: Re: A bit of inner Mac Technology
Post by: supernova777 on November 29, 2014, 03:25:38 PM
restore in place doesnt work?
ive used restore in place a few times and it worked.

by "worked" do u mean to maintain auths?
because, trust me restore in place works.
Title: Re: A bit of inner Mac Technology
Post by: Protools5LEGuy on November 29, 2014, 03:26:59 PM
It creates the files in place, but i have to reauthorize all

The ASR thing only worked to me deleting the volume.

Cubase only worked when deleted the volume.
Title: Re: A bit of inner Mac Technology
Post by: MacTron on November 30, 2014, 08:45:28 AM
That is great info. Is there a utility that will renumber CNIDs ?

I want to know so I can crash my system :)

CNIDs can be read. It is complex, but can be done. In fact, I had to do it in an old unfinished project. Writing the CNID of an individual file may be near to impossible, and if something goes wrong, we can render unusable a Hard Disk partition.
ASR can do it, but only when restoring a full partition, not individual files.
Title: Re: A bit of inner Mac Technology
Post by: IIO on November 30, 2014, 10:18:01 AM
catalog destroyer 3.0beta, made by norton sales pitch inc.
Can it change the CNID?

we wont know unless we write this app :P