Newsgroups: comp.sys.ibm.pc.misc Path: utzoo!telly!druid!darcy From: darcy@druid.uucp (D'Arcy J.M. Cain) Subject: Re: UUEncode question Organization: D'Arcy Cain Consulting, West Hill, Ontario Date: Fri, 26 Oct 90 03:16:25 GMT Message-ID: <1990Oct26.031625.10442@druid.uucp> Keywords: UUEncode,UUDecode References: In article lodzins@pilot.njin.net (Dean Lodzinski) writes: > >I have a quick question. At the beginning of a UUencoded file there >is a line that says >begin >What is the function of the mode number? Is it used for a checksum of >some type? I have looked at the source of a version of uuencode and >it makes calls to a function called umask and fstat. I know fstat >returns information about a file, like file size, type, etc. It also >returns mode. The struct stat is defined in stat.h. On the Prime >system I am trying to modify the code on, the struct stat in stat.h >doesn't return mode (or at least I can't find it in the struct stat. >So, if someone could explain what uuencode does with the number >and how uudecode uses it etc, it might help me in the conversion. Just hack the code to ignore the mode information. This number applies to Unix systems and defines who has what permissions. When uuencoding just put something like 0640 in that field and anyone creating the file on a Unix box should be happy. (That gives the owner of the file the right to read and write it, others in his/her group read priviledges and prevents anyone else on the system from accessing the file.) -- D'Arcy J.M. Cain (darcy@druid) | D'Arcy Cain Consulting | I support gun control. West Hill, Ontario, Canada | Let's start with the government! + 416 281 6094 |