Robert de Bath writes:
>
> Almost as is, I've merged in a patch that allows read or write access
> depending on the permissions that the user running it has. So
> non-superuser read access is still allowed.
I spotted this very shortly after sending you the patch, and had a feeling
I was going to have to go over the whole lot more carefully, and check all
the sizeofs etc.
Could you send me a patch against the original version when you are happy
with it?
>
> BTW: You missed a sizeof(utmp_entry) or two in the lseek's args
>
d'oh!
What is going on in this bit in getutline?:-
#if 0 /* This is driving me nuts. It's not an implementation problem -
it's a matter of how things _SHOULD_ behave. Groan. */
lseek(ut_fd, SEEK_CUR, -sizeof(struct utmp));
#endif
I know it is not included, but it is completely wrong. Wrong argument
order, and no cast to (off_t).
Al