Xref: utzoo comp.unix.wizards:12955 alt.sources:298 Path: utzoo!utgpu!watmath!clyde!att!cuuxb!dlm From: dlm@cuuxb.ATT.COM (Dennis L. Mumaugh) Newsgroups: comp.unix.wizards,alt.sources Subject: Re: /etc/shadow Summary: small change of ints to longs Keywords: shadow password Message-ID: <2233@cuuxb.ATT.COM> Date: 28 Nov 88 22:37:03 GMT References: <16722@agate.BERKELEY.EDU> <2178@cuuxb.ATT.COM> <1337@tmpmbx.UUCP> <8693@rpp386.Dallas.TX.US> Reply-To: dlm@cuuxb.UUCP (Dennis L. Mumaugh) Organization: ATT Data Systems Group, Lisle, Ill. Lines: 66 In article <8693@rpp386.Dallas.TX.US> jfh@rpp386.Dallas.TX.US (The Beach Bum) writes: I got impatient. Attached is my clone which I'll be including in the soon to be released login clone. The routines were all very simple, I didn't see any point in holding out ... This was all written straight off of Dennis' article. You may do with it as you please. So much for security by obscurity [ Thanks James ... ] It is as simple minded as possible, your suggestions, as always, are more than welcome. - John. A colleague contacted me and expressed concern that the implementation of /etc/shadow might not exactly reflect that of AT&T. I checked John's version of shadow.h and discovered a small difference over the "Official" shadow.h. For those with sizeof(int) == sizeof(long) there is no problem but "All's the world is not a VAX [or 3B2]." Here is the changed shadow.h: #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh'shadow.h' /* * This information is not derived from AT&T licensed sources. Posted * to the USENET 11/88. */ /* * Shadow password security file structure. */ struct spwd { char *sp_namp; /* login name */ char *sp_pwdp; /* encrypted password */ long sp_lstchg; /* date of last change */ long sp_max; /* maximum number of days between changes */ long sp_min; /* minimum number of days between changes */ }; /* * Shadow password security file functions. */ struct spwd *getspent (); struct spwd *getspnam (); void setspent (); void endspent (); struct spwd *fgetspent (); int putspent (); #define SHADOW "/etc/shadow" SHAR_EOF fi echo "End of shell archive shadow.h" exit 0 # End of shell archive -- =Dennis L. Mumaugh Lisle, IL ...!{att,lll-crg}!cuuxb!dlm OR cuuxb!dlm@arpa.att.com