Greetings -
Another not-strictly-Tru64-but-we-are-running-it question. Tru64 4.0F on
AlphaServers with enhanced security...Hopefully this is an acceptable
question here (and I'm crossposting elsewhere too):
short version: would you use (via perl) *pw* suite (get/set ent/uid) of
system calls to make individual changes to /etc/passwd or would you slurp
it all in, make your changes, and then write it out?
longer version: We've been tasked with an application too complicated to
explain here, but the gist of it is that we've got to take "update
requests" from a database/web front end and apply those
changes/adds/deletes to various parts of our multiple systems (e.g.
/etc/passwd, tcb, aliases). Basically we have a queue of entries that
might result in anything from a single change/add/delete to a bunch
("here's all the new students") of them.
Given that we have a list of changes, tcb seems like a fairly atomic task
(per change), but /etc/passwd seems like a different issue. How does,
e.g., setpwent, work (especially in Tru64)? Does it open and close
/etc/passwd each time? Does it rehash each time? If it does those
things, then it makes more sense to us to just slurp the whole (big) file
into a hash (requiring more memory), make all the changes at once, then
write them all out at once (via other methods). We're inclined to do the
later...
Thanks for any help, especially since I don't have the tru64 source for
any of the syscalls...
cheers and thanks,
________________________________________________________________________
Ian 'Ivo' Veach, imail_at_nevada.edu UCCSN System Computing Services
http://www.nevada.edu/~ivo postmaster/webmaster/sysadmin
________________________________________________________________________
Received on Tue Jul 17 2001 - 21:15:47 NZST