xref: /illumos-gate/usr/src/lib/libbsm/adt_record.xsl.1 (revision 48edc7cf07b5dccc3ad84bf2dafe4150bd666d60)
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="secflags">
287	<BR/>
288	<I>SECFLAGS: </I>
289	<I> set-type: </I><xsl:value-of select="@set-type"/>
290	<BR/>
291	<xsl:value-of select="."/>
292</xsl:template>
293
294<xsl:template match="sensitivity_label">
295	<BR/>
296	<I>SENSITIVITY_LABEL: </I>   <xsl:value-of select="."/>
297</xsl:template>
298
299<xsl:template match="use_of_authorization">
300	<BR/>
301	<I>USE_OF_AUTHORIZATION: </I>   <xsl:value-of select="."/>
302</xsl:template>
303
304<xsl:template match="IPC">
305	<BR/>
306	<I>IPC </I>
307	<I> ipc-type: </I><xsl:value-of select="@ipc-type"/>
308	<I> ipc-id: </I><xsl:value-of select="@ipc-id"/>
309</xsl:template>
310
311<xsl:template match="IPC_perm">
312	<BR/>
313	<I>IPC_PERM </I>
314	<I> uid: </I><xsl:value-of select="@uid"/>
315	<I> gid: </I><xsl:value-of select="@gid"/>
316	<I> creator-uid: </I><xsl:value-of select="@creator-uid"/>
317	<I> creator-gid: </I><xsl:value-of select="@creator-gid"/>
318	<I> mode: </I><xsl:value-of select="@mode"/>
319	<I> seq: </I><xsl:value-of select="@seq"/>
320	<I> key: </I><xsl:value-of select="@key"/>
321</xsl:template>
322
323<xsl:template match="ip_address">
324	<BR/>
325	<I>IP_ADDRESS: </I>   <xsl:value-of select="."/>
326</xsl:template>
327
328<xsl:template match="ip_port">
329	<BR/>
330	<I>IP_PORT: </I>   <xsl:value-of select="."/>
331</xsl:template>
332
333<xsl:template match="ip">
334	<BR/>
335	<I>IP </I>
336	<I> version: </I><xsl:value-of select="@version"/>
337	<I> service_type: </I><xsl:value-of select="@service_type"/>
338	<I> len: </I><xsl:value-of select="@len"/>
339	<I> id: </I><xsl:value-of select="@id"/>
340	<I> offset: </I><xsl:value-of select="@offset"/>
341	<I> time_to_live: </I><xsl:value-of select="@time_to_live"/>
342	<I> protocol: </I><xsl:value-of select="@protocol"/>
343	<I> cksum: </I><xsl:value-of select="@cksum"/>
344	<I> src_addr: </I><xsl:value-of select="@src_addr"/>
345	<I> dest_addr: </I><xsl:value-of select="@dest_addr"/>
346</xsl:template>
347
348<xsl:template match="old_socket">
349	<BR/>
350	<I>OLD_SOCKET </I>
351	<I> type: </I><xsl:value-of select="@type"/>
352	<I> port: </I><xsl:value-of select="@port"/>
353	<I> addr: </I><xsl:value-of select="@addr"/>
354</xsl:template>
355
356<xsl:template match="socket">
357	<BR/>
358	<I>SOCKET </I>
359	<I> sock_domain: </I><xsl:value-of select="@sock_domain"/>
360	<I> sock_type: </I><xsl:value-of select="@sock_type"/>
361	<I> lport: </I><xsl:value-of select="@lport"/>
362	<I> laddr: </I><xsl:value-of select="@laddr"/>
363	<I> fport: </I><xsl:value-of select="@fport"/>
364	<I> faddr: </I><xsl:value-of select="@faddr"/>
365</xsl:template>
366
367<xsl:template match="acl">
368	<BR/>
369	<I>ACL </I>
370	<xsl:choose>
371		<xsl:when test="@mode">	<!-- old ACL entry -->
372			<I> type: </I><xsl:value-of select="@type"/>
373			<I> value: </I><xsl:value-of select="@value"/>
374			<I> mode: </I><xsl:value-of select="@mode"/>
375		</xsl:when>
376		<xsl:otherwise>
377			<I> flags: </I><xsl:value-of select="@flags"/>
378			<I> id: </I><xsl:value-of select="@id"/>
379			<I> access_mask: </I><xsl:value-of select="@access_mask"/>
380			<I> type: </I><xsl:value-of select="@type"/>
381		</xsl:otherwise>
382	</xsl:choose>
383</xsl:template>
384
385<xsl:template match="tid">
386	<BR/>
387	<I>terminal id: </I>
388	<I> type=</I><xsl:value-of select="@type"/>
389	<xsl:apply-templates/>
390</xsl:template>
391
392<xsl:template match="ipadr">
393	<I> local-port: </I><xsl:value-of select="@local-port"/>
394	<I> remote-port: </I><xsl:value-of select="@remote-port"/>
395	<I> host: </I><xsl:value-of select="@host"/>
396</xsl:template>
397
398<xsl:template match="X_atom">
399	<BR/>
400	<I>X_ATOM: </I>   <xsl:value-of select="."/>
401</xsl:template>
402
403<xsl:template match="X_color_map">
404	<BR/>
405	<I>X_COLOR_MAP </I>
406	<I> xid: </I><xsl:value-of select="@xid"/><I> xcreator-uid: </I><xsl:value-of select="@xcreator-uid"/>
407</xsl:template>
408
409<xsl:template match="X_cursor">
410	<BR/>
411	<I>X_CURSOR </I>
412	<I> xid: </I><xsl:value-of select="@xid"/><I> xcreator-uid: </I><xsl:value-of select="@xcreator-uid"/>
413</xsl:template>
414
415<xsl:template match="X_font">
416	<BR/>
417	<I>X_FONT </I>
418	<I> xid: </I><xsl:value-of select="@xid"/><I> xcreator-uid: </I><xsl:value-of select="@xcreator-uid"/>
419</xsl:template>
420
421<xsl:template match="X_graphic_context">
422	<BR/>
423	<I>X_GRAPHIC_CONTEXT </I>
424	<I> xid: </I><xsl:value-of select="@xid"/><I> xcreator-uid: </I><xsl:value-of select="@xcreator-uid"/>
425</xsl:template>
426
427<xsl:template match="X_pixmap">
428	<BR/>
429	<I>X_PIXMAP </I>
430	<I> xid: </I><xsl:value-of select="@xid"/><I> xcreator-uid: </I><xsl:value-of select="@xcreator-uid"/>
431</xsl:template>
432
433<xsl:template match="X_window">
434	<BR/>
435	<I>X_WINDOW </I>
436	<I> xid: </I><xsl:value-of select="@xid"/><I> xcreator-uid: </I><xsl:value-of select="@xcreator-uid"/>
437</xsl:template>
438
439<xsl:template match="X_property">
440	<BR/>
441	<I>X_PROPERTY: </I>
442	<I> xid: </I><xsl:value-of select="@xid"/><I> xcreator-uid: </I><xsl:value-of select="@xcreator-uid"/>
443	<BR/>
444	<xsl:value-of select="."/>
445</xsl:template>
446
447<xsl:template match="X_client">
448	<BR/>
449	<I>X_CLIENT: </I>   <xsl:value-of select="."/>
450</xsl:template>
451
452<xsl:template match="X_selection">
453	<BR/>
454	<I>X_SELECTION </I>
455	<xsl:apply-templates/>
456</xsl:template>
457
458<xsl:template match="x_sel_text">
459	<BR/>
460	<I>x_sel_text: </I>   <xsl:value-of select="."/>
461</xsl:template>
462
463<xsl:template match="x_sel_type">
464	<BR/>
465	<I>x_sel_type: </I>   <xsl:value-of select="."/>
466</xsl:template>
467
468<xsl:template match="x_sel_data">
469	<BR/>
470	<I>x_sel_data: </I>   <xsl:value-of select="."/>
471</xsl:template>
472
473<xsl:template match="zone">
474	<BR/>
475	<I>ZONE </I>
476	<I> name: </I><xsl:value-of select="@name"/>
477</xsl:template>
478
479</xsl:stylesheet>
480