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