[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: "Marsh, Ian" <ian.marsh (at) hants.gov.uk>
- Date: Fri, 14 Jan 2011 15:49:28 -0000
- 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> <igpqrm$1rm$1 (at) voodoo.hswn.dk>
- Thread-index: Acu0Adf13EAchP4fQBSvR9vgyILQrgAAK68g
- Thread-topic: [xymon] Problem with file owner/group check
Thanks for that, it all works now. :)
Thank you,
Ian Marsh
IT Service Operations - Network Services
-----Original Message-----
From: Henrik "Størner [mailto:henrik (at) hswn.dk]
Sent: 14 January 2011 15:42
To: xymon (at) xymon.com
Subject: Re: [xymon] Problem with file owner/group check
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
To unsubscribe from the xymon list, send an e-mail to xymon-unsubscribe (at) xymon.com