Article View: comp.unix.programmer
Article #1015Re: Why use pwd(1) for getpwd(3C)? (Re: Why use find?)
From: Dan Bernstein
Date: Fri, 12 Oct 1990 11:52
Date: Fri, 12 Oct 1990 11:52
20 lines
1449 bytes
1449 bytes
In article <1990Oct11.191936.10947@usenet.ins.cwru.edu> chet@po.CWRU.Edu writes: > In article <23012:Oct1019:12:2790@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: > >In article <1990Oct9.122813.1329@cbnews.att.com> jbr0@cbnews.att.com (joseph.a.brownlee) writes: > > [ why is getpwd() implemented as `pwd` in System V? ] > >Because there's no getwd() system call to have the kernel do the job. > BSD doesn't have one either; it's a library routine, at least through > 4.3-tahoe. I was explaining the logic of having a setuid program. *If* you decide that pwd should work despite permissions, and *if* you don't have a getwd() system call to do the job, then you have to use a separate setuid program. It's also proper to call anything in the POSIX book a system call. > By the way, the name of the Posix (and S5) routine is getcwd(). In the article you're responding to, I complained about this. RTFABYFU. ---Dan
Technical Details
Message-ID:
<9751:Oct1211:52:0790@kramden.acf.nyu.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!nih-csl!lhc!adm!cmcl2!kramden.acf.nyu.edu!brnstndReferences:
<1990Oct9.122813.1329@cbnews.att.com> <23012:Oct1019:12:2790@kramden.acf.nyu.edu> <1990Oct11.191936.10947@usenet.ins.cwru.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!nih-csl!lhc!adm!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.unix.programmer Subject: Re: Why use pwd(1) for getpwd(3C)? (Re: Why use find?) Message-ID: <9751:Oct1211:52:0790@kramden.acf.nyu.edu> Date: 12 Oct 90 11:52:07 GMT References: <1990Oct9.122813.1329@cbnews.att.com> <23012:Oct1019:12:2790@kramden.acf.nyu.edu> <1990Oct11.191936.10947@usenet.ins.cwru.edu> Organization: IR Lines: 20