xref: /illumos-gate/usr/src/lib/libbsm/adt_record.xsl.1 (revision 54034eb2d6e7d811adf4a1fe5105eac6fea6b0b5)
1<?xml version="1.0" encoding="UTF-8" ?>
2
3<!--
4 Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
5 Use is subject to license terms.
6
7 CDDL HEADER START
8
9 The contents of this file are subject to the terms of the
10 Common Development and Distribution License (the "License").
11 You may not use this file except in compliance with the License.
12
13 You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14 or http://www.opensolaris.org/os/licensing.
15 See the License for the specific language governing permissions
16 and limitations under the License.
17
18 When distributing Covered Code, include this CDDL HEADER in each
19 file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20 If applicable, add the following below this CDDL HEADER, with the
21 fields enclosed by brackets "[]" replaced with your own identifying
22 information: Portions Copyright [yyyy] [name of copyright owner]
23
24 CDDL HEADER END
25
26    ident	"%Z%%M%	%I%	%E% SMI"
27-->
28
29<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
30
31<!-- set the output properties -->
32<xsl:output method="html"/>
33
34<!-- root rule -->
35<xsl:template match="/">
36<HTML>
37  <HEAD><TITLE>Audit Trail Data</TITLE></HEAD>
38  <BODY BGColor="#FFFFFF" Text="#000000">
39  <CENTER>
40      <FONT FACE="Arial" SIZE="+1">
41    	<B>Audit Trail Data</B>
42      </FONT>
43      <BR/>
44 </CENTER>
45   <xsl:apply-templates/>
46  <HR/>
47  </BODY>
48</HTML>
49</xsl:template>
50
51<!-- suppress non-selected nodes-->
52<xsl:template match="*"/>
53
54<!-- main rule for document element -->
55<xsl:template match="audit">
56  <HR/>
57	<xsl:for-each select="record | file">
58		<xsl:if test="(self::file)">
59			<BR/>
60			<BR/>
61			<B>File: </B>
62			<I>time: </I>
63			<xsl:choose>
64				<xsl:when test="@time">
65					<xsl:value-of select="@time"/>
66					+ <xsl:value-of select="@msec"/>msec
67				</xsl:when>
68				<xsl:when test="@iso8601">
69					<xsl:value-of select="@iso8601"/>
70				</xsl:when>
71			</xsl:choose>
72			<BR/>
73			<xsl:value-of select="."/>
74		</xsl:if>
75		<xsl:if test="(self::record)">
76			<BR/>
77			<BR/>
78			<B>Event: </B>
79			<B><xsl:value-of select="@event"/></B><BR/>
80			<I>time: </I>
81			<xsl:choose>
82				<xsl:when test="@time">
83					<xsl:value-of select="@time"/>
84					+ <xsl:value-of select="@msec"/>msec
85				</xsl:when>
86				<xsl:when test="@iso8601">
87					<xsl:value-of select="@iso8601"/>
88				</xsl:when>
89			</xsl:choose>
90			<I>  vers: </I><xsl:value-of select="@version"/>
91	 		<I> mod: </I><xsl:value-of select="@modifier"/>
92	 		<I> host: </I><xsl:value-of select="@host"/>
93   			<xsl:apply-templates/>
94		</xsl:if>
95	</xsl:for-each>
96</xsl:template>
97
98<!-- Start of handling for remaining tokens -->
99
100<xsl:template match="text">
101	<BR/>
102	<I>TEXT: </I>   <xsl:value-of select="."/>
103</xsl:template>
104
105<xsl:template match="path">
106	<BR/>
107	<I>PATH: </I>   <xsl:value-of select="."/>
108</xsl:template>
109
110<xsl:template match="path_attr">
111	<BR/>
112	<I>PATH_ATTR </I>
113	<xsl:apply-templates/>
114</xsl:template>
115
116<xsl:template match="xattr">
117	<BR/>
118	<I>xattr: </I>   <xsl:value-of select="."/>
119</xsl:template>
120
121<xsl:template match="host">
122	<BR/>
123	<I>HOST: </I>   <xsl:value-of select="."/>
124</xsl:template>
125
126<xsl:template match="subject">
127	<BR/>
128	<I>SUBJECT </I>
129	<I> audit-uid: </I><xsl:value-of select="@audit-uid"/>
130	<I> uid: </I><xsl:value-of select="@uid"/>
131	<I> gid: </I><xsl:value-of select="@gid"/>
132	<I> ruid: </I><xsl:value-of select="@ruid"/>
133	<I> rgid: </I><xsl:value-of select="@rgid"/>
134	<I> pid: </I><xsl:value-of select="@pid"/>
135	<I> sid: </I><xsl:value-of select="@sid"/>
136	<I> tid: </I><xsl:value-of select="@tid"/>
137</xsl:template>
138
139<xsl:template match="process">
140	<BR/>
141	<I>PROCESS </I>
142	<I> audit-uid: </I><xsl:value-of select="@audit-uid"/>
143	<I> uid: </I><xsl:value-of select="@uid"/>
144	<I> gid: </I><xsl:value-of select="@gid"/>
145	<I> ruid: </I><xsl:value-of select="@ruid"/>
146	<I> rgid: </I><xsl:value-of select="@rgid"/>
147	<I> pid: </I><xsl:value-of select="@pid"/>
148	<I> sid: </I><xsl:value-of select="@sid"/>
149	<I> tid: </I><xsl:value-of select="@tid"/>
150</xsl:template>
151
152<xsl:template match="return">
153	<BR/>
154	<I>RETURN </I>
155	<I> errval: </I><xsl:value-of select="@errval"/>
156	<I> retval: </I><xsl:value-of select="@retval"/>
157</xsl:template>
158
159<xsl:template match="exit">
160	<BR/>
161	<I>EXIT </I>
162	<I> errval: </I><xsl:value-of select="@errval"/>
163	<I> retval: </I><xsl:value-of select="@retval"/>
164</xsl:template>
165
166<xsl:template match="sequence">
167	<BR/>
168	<I>SEQUENCE </I>
169	<I> seq-num: </I><xsl:value-of select="@seq-num"/>
170</xsl:template>
171
172<xsl:template match="fmri">
173	<BR/>
174	<I>FMRI: </I>   <xsl:value-of select="."/>
175</xsl:template>
176
177<xsl:template match="group">
178	<BR/>
179	<I>GROUP </I>
180	<xsl:apply-templates/>
181</xsl:template>
182
183<xsl:template match="gid">
184	<BR/>
185	<I>gid: </I>   <xsl:value-of select="."/>
186</xsl:template>
187
188<xsl:template match="opaque">
189	<BR/>
190	<I>OPAQUE: </I>   <xsl:value-of select="."/>
191</xsl:template>
192
193<xsl:template match="liaison">
194	<BR/>
195	<I>LIAISON: </I>   <xsl:value-of select="."/>
196</xsl:template>
197
198<xsl:template match="argument">
199	<BR/>
200	<I>ARGUMENT </I>
201	<I> arg-num: </I><xsl:value-of select="@arg-num"/>
202	<I> value: </I><xsl:value-of select="@value"/>
203	<I> desc: </I><xsl:value-of select="@desc"/>
204</xsl:template>
205
206<xsl:template match="attribute">
207	<BR/>
208	<I>ATTRIBUTE </I>
209	<I> mode: </I><xsl:value-of select="@mode"/>
210	<I> uid: </I><xsl:value-of select="@uid"/>
211	<I> gid: </I><xsl:value-of select="@gid"/>
212	<I> fsid: </I><xsl:value-of select="@fsid"/>
213	<I> nodeid: </I><xsl:value-of select="@nodeid"/>
214	<I> device: </I><xsl:value-of select="@device"/>
215</xsl:template>
216
217<xsl:template match="cmd">
218	<BR/>
219	<I>CMD </I>
220	<xsl:apply-templates/>
221</xsl:template>
222
223<xsl:template match="argv">
224	<BR/>
225	<I>argv: </I>   <xsl:value-of select="."/>
226</xsl:template>
227
228<xsl:template match="arge">
229	<BR/>
230	<I>arge: </I>   <xsl:value-of select="."/>
231</xsl:template>
232
233<xsl:template match="exec_args">
234	<BR/>
235	<I>EXEC_ARGS </I>
236	<xsl:apply-templates/>
237</xsl:template>
238
239<xsl:template match="arg">
240	<BR/>
241	<I>arg: </I>   <xsl:value-of select="."/>
242</xsl:template>
243
244<xsl:template match="exec_env">
245	<BR/>
246	<I>EXEC_ENV </I>
247	<xsl:apply-templates/>
248</xsl:template>
249
250<xsl:template match="env">
251	<BR/>
252	<I>env: </I>   <xsl:value-of select="."/>
253</xsl:template>
254
255<xsl:template match="arbitrary">
256	<BR/>
257	<I>ARBITRARY: </I>
258	<I> print: </I><xsl:value-of select="@print"/>
259	<I> type: </I><xsl:value-of select="@type"/>
260	<I> count: </I><xsl:value-of select="@count"/>
261	<BR/>
262	<xsl:value-of select="."/>
263</xsl:template>
264
265<xsl:template match="privilege">
266	<BR/>
267	<I>PRIVILEGE: </I>
268	<I> set-type: </I><xsl:value-of select="@set-type"/>
269	<BR/>
270	<xsl:value-of select="."/>
271</xsl:template>
272
273<xsl:template match="use_of_privilege">
274	<BR/>
275	<I>USE_OF_PRIVILEGE: </I>
276	<I> result: </I><xsl:value-of select="@result"/>
277	<BR/>
278	<xsl:value-of select="."/>
279</xsl:template>
280
281<xsl:template match="sensitivity_label">
282	<BR/>
283	<I>SENSITIVITY_LABEL: </I>   <xsl:value-of select="."/>
284</xsl:template>
285
286<xsl:template match="use_of_authorization">
287	<BR/>
288	<I>USE_OF_AUTHORIZATION: </I>   <xsl:value-of select="."/>
289</xsl:template>
290
291<xsl:template match="IPC">
292	<BR/>
293	<I>IPC </I>
294	<I> ipc-type: </I><xsl:value-of select="@ipc-type"/>
295	<I> ipc-id: </I><xsl:value-of select="@ipc-id"/>
296</xsl:template>
297
298<xsl:template match="IPC_perm">
299	<BR/>
300	<I>IPC_PERM </I>
301	<I> uid: </I><xsl:value-of select="@uid"/>
302	<I> gid: </I><xsl:value-of select="@gid"/>
303	<I> creator-uid: </I><xsl:value-of select="@creator-uid"/>
304	<I> creator-gid: </I><xsl:value-of select="@creator-gid"/>
305	<I> mode: </I><xsl:value-of select="@mode"/>
306	<I> seq: </I><xsl:value-of select="@seq"/>
307	<I> key: </I><xsl:value-of select="@key"/>
308</xsl:template>
309
310<xsl:template match="ip_address">
311	<BR/>
312	<I>IP_ADDRESS: </I>   <xsl:value-of select="."/>
313</xsl:template>
314
315<xsl:template match="ip_port">
316	<BR/>
317	<I>IP_PORT: </I>   <xsl:value-of select="."/>
318</xsl:template>
319
320<xsl:template match="ip">
321	<BR/>
322	<I>IP </I>
323	<I> version: </I><xsl:value-of select="@version"/>
324	<I> service_type: </I><xsl:value-of select="@service_type"/>
325	<I> len: </I><xsl:value-of select="@len"/>
326	<I> id: </I><xsl:value-of select="@id"/>
327	<I> offset: </I><xsl:value-of select="@offset"/>
328	<I> time_to_live: </I><xsl:value-of select="@time_to_live"/>
329	<I> protocol: </I><xsl:value-of select="@protocol"/>
330	<I> cksum: </I><xsl:value-of select="@cksum"/>
331	<I> src_addr: </I><xsl:value-of select="@src_addr"/>
332	<I> dest_addr: </I><xsl:value-of select="@dest_addr"/>
333</xsl:template>
334
335<xsl:template match="old_socket">
336	<BR/>
337	<I>OLD_SOCKET </I>
338	<I> type: </I><xsl:value-of select="@type"/>
339	<I> port: </I><xsl:value-of select="@port"/>
340	<I> addr: </I><xsl:value-of select="@addr"/>
341</xsl:template>
342
343<xsl:template match="socket">
344	<BR/>
345	<I>SOCKET </I>
346	<I> sock_domain: </I><xsl:value-of select="@sock_domain"/>
347	<I> sock_type: </I><xsl:value-of select="@sock_type"/>
348	<I> lport: </I><xsl:value-of select="@lport"/>
349	<I> laddr: </I><xsl:value-of select="@laddr"/>
350	<I> fport: </I><xsl:value-of select="@fport"/>
351	<I> faddr: </I><xsl:value-of select="@faddr"/>
352</xsl:template>
353
354<xsl:template match="acl">
355	<BR/>
356	<I>ACL </I>
357	<xsl:choose>
358		<xsl:when test="@mode">	<!-- old ACL entry -->
359			<I> type: </I><xsl:value-of select="@type"/>
360			<I> value: </I><xsl:value-of select="@value"/>
361			<I> mode: </I><xsl:value-of select="@mode"/>
362		</xsl:when>
363		<xsl:otherwise>
364			<I> flags: </I><xsl:value-of select="@flags"/>
365			<I> id: </I><xsl:value-of select="@id"/>
366			<I> access_mask: </I><xsl:value-of select="@access_mask"/>
367			<I> type: </I><xsl:value-of select="@type"/>
368		</xsl:otherwise>
369	</xsl:choose>
370</xsl:template>
371
372<xsl:template match="tid">
373	<BR/>
374	<I>terminal id: </I>
375	<I> type=</I><xsl:value-of select="@type"/>
376	<xsl:apply-templates/>
377</xsl:template>
378
379<xsl:template match="ipadr">
380	<I> local-port: </I><xsl:value-of select="@local-port"/>
381	<I> remote-port: </I><xsl:value-of select="@remote-port"/>
382	<I> host: </I><xsl:value-of select="@host"/>
383</xsl:template>
384
385<xsl:template match="X_atom">
386	<BR/>
387	<I>X_ATOM: </I>   <xsl:value-of select="."/>
388</xsl:template>
389
390<xsl:template match="X_color_map">
391	<BR/>
392	<I>X_COLOR_MAP </I>
393	<I> xid: </I><xsl:value-of select="@xid"/><I> xcreator-uid: </I><xsl:value-of select="@xcreator-uid"/>
394</xsl:template>
395
396<xsl:template match="X_cursor">
397	<BR/>
398	<I>X_CURSOR </I>
399	<I> xid: </I><xsl:value-of select="@xid"/><I> xcreator-uid: </I><xsl:value-of select="@xcreator-uid"/>
400</xsl:template>
401
402<xsl:template match="X_font">
403	<BR/>
404	<I>X_FONT </I>
405	<I> xid: </I><xsl:value-of select="@xid"/><I> xcreator-uid: </I><xsl:value-of select="@xcreator-uid"/>
406</xsl:template>
407
408<xsl:template match="X_graphic_context">
409	<BR/>
410	<I>X_GRAPHIC_CONTEXT </I>
411	<I> xid: </I><xsl:value-of select="@xid"/><I> xcreator-uid: </I><xsl:value-of select="@xcreator-uid"/>
412</xsl:template>
413
414<xsl:template match="X_pixmap">
415	<BR/>
416	<I>X_PIXMAP </I>
417	<I> xid: </I><xsl:value-of select="@xid"/><I> xcreator-uid: </I><xsl:value-of select="@xcreator-uid"/>
418</xsl:template>
419
420<xsl:template match="X_window">
421	<BR/>
422	<I>X_WINDOW </I>
423	<I> xid: </I><xsl:value-of select="@xid"/><I> xcreator-uid: </I><xsl:value-of select="@xcreator-uid"/>
424</xsl:template>
425
426<xsl:template match="X_property">
427	<BR/>
428	<I>X_PROPERTY: </I>
429	<I> xid: </I><xsl:value-of select="@xid"/><I> xcreator-uid: </I><xsl:value-of select="@xcreator-uid"/>
430	<BR/>
431	<xsl:value-of select="."/>
432</xsl:template>
433
434<xsl:template match="X_client">
435	<BR/>
436	<I>X_CLIENT: </I>   <xsl:value-of select="."/>
437</xsl:template>
438
439<xsl:template match="X_selection">
440	<BR/>
441	<I>X_SELECTION </I>
442	<xsl:apply-templates/>
443</xsl:template>
444
445<xsl:template match="x_sel_text">
446	<BR/>
447	<I>x_sel_text: </I>   <xsl:value-of select="."/>
448</xsl:template>
449
450<xsl:template match="x_sel_type">
451	<BR/>
452	<I>x_sel_type: </I>   <xsl:value-of select="."/>
453</xsl:template>
454
455<xsl:template match="x_sel_data">
456	<BR/>
457	<I>x_sel_data: </I>   <xsl:value-of select="."/>
458</xsl:template>
459
460<xsl:template match="zone">
461	<BR/>
462	<I>ZONE </I>
463	<I> name: </I><xsl:value-of select="@name"/>
464</xsl:template>
465
466</xsl:stylesheet>
467