[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xymon] Problem with file owner/group check
- To: xymon (at) xymon.com
- Subject: Re: [xymon] Problem with file owner/group check
- From: Henrik "Størner" <henrik (at) hswn.dk>
- Date: Fri, 14 Jan 2011 15:41:42 +0000 (UTC)
- Newsgroups: lists.hobbit
- Organization: Linux Users Inc.
- References: <igpe7b$oj8$3 (at) voodoo.hswn.dk> <E59BC4D3B3BA7B4790CFD721B5991FD40261F5C7 (at) EXVSRVB3.it2000.hants.gov.uk> <igpe7b$oj8$3 (at) voodoo.hswn.dk> <E59BC4D3B3BA7B4790CFD721B5991FD40261F5C9 (at) EXVSRVB3.it2000.hants.gov.uk>
- User-agent: nn/6.7.3
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