1. fgetpwent() returns encrypted passwd from secure password file!
Hey all you C, tacacs, and HP-UX gurus!
I am trying to install a tacacs server on an HP-750 running HPUX 9.03,
and I'm having a few problems.
Here's what I want to happen: I want to have a password file
for dial-up access, separate from /etc/passwd and /.secure/etc/passwd.
When I compiled xtacacsd as received, I got an error because setpwfile
was being called twice, and errored out about not finding the /etc/passwd
to replace. (This is info for those of you who know tacacs and are
wondering why I'm changing the code.) Looking at the code, I realized
that if I could use fgetpwent, I could avoid setpwfile.
I've written my own little
struct passwd *fgetpwnam(FILE *mypasswdFile, char* nameToFind)
function, that (although it may not be the best way), works exactly as
I expect it to, as long as the program is not running as root. It
returns the password from mypasswdFile without a problem. If this program
is running as root, it appears that fgetpwent is searching mypasswdFile,
retrieves a pw_name, and then does a getspwent( pw_name ). If that call
fails, then it returns the pw_passwd that it already has.
I need to somehow force fgetpwent to only look in the file that I specify--
is this possible, or do I need to write my own routines? The only other
solution that I can think of would be for xtacacsd to not run as root, but
still have some way for it to bind to the socket that it needs. Is _that_
Is the HP fgetpwent broken, or do they all do this?
Thanks for any help/pointers you can give me.
3. Can any open source compiler convert C++ source to C source?
4. time slice in SCHED_OTHER
5. What percentage of open-source programmers are paid for working on open-source projects?
6. [ATM] forerunner he support
7. CD-ROM mount needs source <--> source needs CD-ROM mount
8. Lockups with 2.4.14 and 2.4.16
10. Creating web access to source code (aka OpenSolaris source browser)
11. Open-Source AI Parts, Closed-Source Applications
12. Releasing the NIS+ server sources as Open Source ?
13. Closed Source v Open Source