Four Corners Noise

Tom Whitten's Weblog


20060509 Tuesday May 09, 2006

 Create Child Event

If you haven't read my disclaimer for my Learning SMF blog catetory, please do so.

My first SMF assignment is to add a security audit event for the creation of a child object. The new event name will be AUE_smf_create.

repcache_protocol.h documents the protocol between sys.configd and its clients. In my case the message of interest is ENTITY_CREATE_CHILD which is designated by the REP_PROTOCOL_ENTITY_CREATE_CHILD request code defined in the rep_protocol_requestid enum in repcache_protocol.h.

The question I now have is where does this request code get processed in configd? The communication between sys.configd and its clients takes place over Solaris doors. The main() function in configd.c calls setup_main_door(). This in turn calls door_create(3c) specifying main_switcher() as its service procudure. main_switcher only processes REPOSITORY_DOOR_REQUEST_CONNECT requests, however.

When main_switcher gets a connect request, it calls create_connection() which in turn calls create_client(). create_client in client.c creates a new door for communication between sys.configd and the new client. It does this by calling door_create specifying client_switcher() as the service procedure. To summarize, when sys.configd gets a connect request from a client, it creates a new door for communication with that client. Subsequent requests that come in on that door will be serviced by client_switcher in client.c

client_switcher extracts the request code from the incomming messages, and uses it to index into the array of protocol_entry structures at protocol_table in client.c. After performing some checks, client_switcher calls the function whose address is in the pt_fd_handler member of the protocol_entry structure. From this, I can see that entity_create_child() is the function that is used to process REP_PROTOCOL_ENTITY_CREATE_CHILD requests. I'll leave the discussion of this function for my next blog.

Technorati Tags: , ,



( May 09 2006, 01:42:07 PM MDT / May 09 2006, 01:42:07 PM MDT ) Permalink Comments [1]
Trackback: http://blogs.sun.com/4ctom/entry/create_child_event


« May 2006
SunMonTueWedThuFriSat
 
1
2
3
5
6
7
8
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
   
       
Today


XML







Today's Page Hits: 24