Why use pwd(1) for getpwd(3C)? (Re: Why use find?)
Dan Bernstein
brnstnd at kramden.acf.nyu.edu
Fri Oct 12 21:52:07 AEST 1990
In article <1990Oct11.191936.10947 at usenet.ins.cwru.edu> chet at po.CWRU.Edu writes:
> In article <23012:Oct1019:12:2790 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
> >In article <1990Oct9.122813.1329 at cbnews.att.com> jbr0 at 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
More information about the Comp.unix.programmer
mailing list