[xymon] Problem with file owner/group check

Henrik Størner henrik at hswn.dk
Fri Jan 14 16:41:42 CET 2011


In <E59BC4D3B3BA7B4790CFD721B5991FD40261F5C9 at EXVSRVB3.it2000.hants.gov.uk> "Marsh, Ian" <ian.marsh at hants.gov.uk> writes:

>    Thanks for such a quick response! I can confirm that the patch =
>works, but only if you test against the numeric uid's and gid's. If you =
>try to test against the names then you get the same result I was seeing =
>before; the MAN page for hobbit-clients.cfg says you can use either but =
>that doesn't appear to be the case.... I'd prefer to use the user and =
>group names if possible, just so that it makes more sense to the less =
>experienced members of the support team!

I should have looked at little further down in the code... if you search
the hobbitd/client_config.c file for "ownerid=" you'll see that is where
the patch went in. And just a few lines further down is a line with

   currule->flags |= FCHK_OWNERSTR;
   currule->rule.fcheck.ownerstr = strdup(tok+6);

Change that line to "p+1" instead of "tok+6":

   currule->rule.fcheck.ownerstr = strdup(p+1);

and usernames should work. An identical fix some 15 lines or so further
down fixes it for the groupnames.


Regards,
Henrik





More information about the Xymon mailing list