Re: [evlog-dev] question on evl_register_facility
James Keniston <[email protected]> Tue, 18 Feb 2003 12:26:42 -0800
| Newsgroups | gmane.linux.kernel.event-logging |
|---|---|
| Message-ID | <OF618B1528.63827EF2-ON88256CD1.006EFF4F-88256CD1.00704EF4@us.ibm.com> |
Yes, the libevl version of evl_register_facility() includes the "uid=root" filter whether you want it or not. I guess we decided that, for security reasons, it would be best to default to a root-only facility. There is a way around this. evl_register_facility() calls _evlAddFacilityToRegistry(fname, flags, filter), which forks and execs the evlfacility command. fname is the facility name, flags is bits like EVL_FACC_PRIVATE and EVL_FACC_KERN (--private and --kernel), and filter is the filter string, which may be NULL. So you could call _evlAddFacilityToRegistry directly, with a NULL filter, and then call evl_gen_facility_code() to get the resulting facility code. Note that neither evl_register_facility() nor _evlAddFacilityToRegistry() will succeed if the caller isn't root. Jim Keniston IBM LTC RAS |---------+--------------------------------------------> | | Steve Woodruff | | | <[email protected]> | | | Sent by: | | | [email protected]| | | ceforge.net | | | | | | | | | 02/18/03 10:30 AM | | | | |---------+--------------------------------------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| | | | To: evlog mailing list <[email protected]> | | cc: | | Subject: [evlog-dev] question on evl_register_facility | | | >--------------------------------------------------------------------------------------------------------------------------------------------------| Hi, Can someone comment on how to use the function evl_register_facility() to register a facility with no filter applied? When I use this function to register a facility, it always gets the 'uid=root' filter applied (as shown by running "evlfacility -l") and then non-root users can not post events with that facility tag. However, if i use the command line: "/sbin/evlfacility -a abcd" then the facility is added with no filter applied and any user can post. The prototype for evl_register_facility() doesn't seem to have any flags for filters... so how is this filter being added automatically? Thanks! /steve --- Larry Kessler <[email protected]> wrote: > On Monday 13 January 2003 10:57, Steve Woodruff > wrote: > > Hi, > > > > It doesn't seem that linuxEvlog.html has been > > updated regarding the new "plug-in" capability > > of evlog 1.5.0. Is there any documentation > > available (maybe in draft form) that I can have > > a look at regarding this specific feature? This > > is mentioned in section 8 (HOWTO) but marked as > > coming soon. > > Steve- Sorry but we've gotten behind on getting > things posted to the > website. The attached tarball has a README with > explanation and > code with numerous comments implementing a sample > driver. Next > step is to create a HOWTO for the website, but this > should help. > > Please feel free to comment or post questions. > > Thanks, > Larry Kessler > > > ATTACHMENT part 2 application/x-tgz name=sample_be_howto.tar.gz ===== ---------------------------------------------------------- Steve Woodruff, N9OH @ 42.18N 88.34W, [email protected] __________________________________________________ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ evlog-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/evlog-developers ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf