mark@comp.vuw.ac.nz (Mark Davies) (04/10/90)
I have tracked down my problem with dump under hpux 7.0. If the group
operator has any members there is a possibility that dump will get stuck
broadcasting messages to those members.
The probable cause is someone forgot about the difference in structure in
/etc/utmp when porting dump from BSD (I should have known -- see next
posting).
Working from the bsd source the following patch to the broadcast routine
fixes the problem. (Temporary fix: don't list any members in group operator).
*** dumpoptr.c~ Mon May 22 11:40:18 1989
--- dumpoptr.c Mon Apr 9 15:10:15 1990
***************
*** 181,187 ****
--- 181,191 ----
while (!feof(f_utmp)){
if (fread(&utmp, sizeof (struct utmp), 1, f_utmp) != 1)
break;
+ #ifndef __hpux
if (utmp.ut_name[0] == 0)
+ #else
+ if (utmp.ut_type != USER_PROCESS || utmp.ut_name[0] == '\0')
+ #endif
continue;
nusers++;
for (np = gp->gr_mem; *np; np++){
Thanks to Michael J. Corrigan <mcorrigan@UCSD.EDU> for trying out some
tests on his system and to Curt Vandetta <curt@sylvestr.oce.orst.edu> for
sending me his port of BSD dump which was the starting point of my own port
which exposed the original problem with HP's.
cheers
mark