]>
Commit | Line | Data |
---|---|---|
2d21ac55 | 1 | .\" |
b0d623f7 | 2 | .\" Copyright (c) 2008-2009 Apple Inc. All rights reserved. |
2d21ac55 A |
3 | .\" |
4 | .\" @APPLE_LICENSE_HEADER_START@ | |
5 | .\" | |
6 | .\" This file contains Original Code and/or Modifications of Original Code | |
7 | .\" as defined in and that are subject to the Apple Public Source License | |
8 | .\" Version 2.0 (the 'License'). You may not use this file except in | |
9 | .\" compliance with the License. Please obtain a copy of the License at | |
10 | .\" http://www.opensource.apple.com/apsl/ and read it before using this | |
11 | .\" file. | |
12 | .\" | |
13 | .\" The Original Code and all software distributed under the License are | |
14 | .\" distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
15 | .\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
16 | .\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
17 | .\" FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | |
18 | .\" Please see the License for the specific language governing rights and | |
19 | .\" limitations under the License. | |
20 | .\" | |
21 | .\" @APPLE_LICENSE_HEADER_END@ | |
22 | .\" | |
b0d623f7 | 23 | .Dd March 21, 2009 |
2d21ac55 | 24 | .Dt SETAUID 2 |
b0d623f7 | 25 | .Os |
2d21ac55 A |
26 | .Sh NAME |
27 | .Nm setauid | |
b0d623f7 | 28 | .Nd "set audit indentifier" |
2d21ac55 | 29 | .Sh SYNOPSIS |
b0d623f7 | 30 | .In bsm/audit.h |
2d21ac55 | 31 | .Ft int |
b0d623f7 | 32 | .Fn setauid "au_id_t *auid" |
2d21ac55 A |
33 | .Sh DESCRIPTION |
34 | The | |
35 | .Fn setauid | |
b0d623f7 A |
36 | system call |
37 | sets the active audit identifier for the current process from the | |
38 | .Vt au_id_t | |
39 | pointed to by | |
2d21ac55 | 40 | .Fa auid . |
b0d623f7 A |
41 | The value of AU_DEFAUDITID (-1) should not be used for |
42 | .Fa auid . | |
43 | .Pp | |
44 | This system call requires an appropriate privilege to complete. | |
45 | .Pp | |
46 | Once the audit identifier is set to some other value than | |
47 | AU_DEAUDITID (-1) then it is immutable. | |
48 | This system call may be used to set the audit identifier after | |
49 | initially setting up the audit session with the | |
50 | .Xr setaudit 2 , | |
51 | or | |
52 | .Xr setaudit_addr 2 | |
53 | system call. | |
2d21ac55 | 54 | .Sh RETURN VALUES |
b0d623f7 A |
55 | .Rv -std |
56 | .Sh ERRORS | |
57 | The | |
58 | .Fn setauid | |
59 | function will fail if: | |
60 | .Bl -tag -width Er | |
61 | .It Bq Er EFAULT | |
62 | A failure occurred while data transferred to | |
63 | the kernel failed. | |
64 | .It Bq Er EINVAL | |
65 | An invalid value for | |
66 | .Fa auid | |
67 | was used. | |
68 | .Fa auid | |
69 | can be any value of type | |
70 | .Vt au_id_t | |
71 | except AU_DEFAUDITID. | |
72 | .It Bq Er EPERM | |
73 | The process does not have sufficient permission to complete | |
74 | the operation. | |
75 | .El | |
2d21ac55 A |
76 | .Sh SEE ALSO |
77 | .Xr audit 2 , | |
78 | .Xr auditon 2 , | |
2d21ac55 | 79 | .Xr getaudit 2 , |
b0d623f7 A |
80 | .Xr getaudit_addr 2 , |
81 | .Xr getauid 2 , | |
82 | .Xr setaudit 2 , | |
83 | .Xr setaudit_addr 2 , | |
84 | .Xr libbsm 3 | |
2d21ac55 | 85 | .Sh HISTORY |
b0d623f7 A |
86 | The OpenBSM implementation was created by McAfee Research, the security |
87 | division of McAfee Inc., under contract to Apple Computer Inc.\& in 2004. | |
88 | It was subsequently adopted by the TrustedBSD Project as the foundation for | |
89 | the OpenBSM distribution. | |
90 | .Sh AUTHORS | |
91 | .An -nosplit | |
92 | This software was created by McAfee Research, the security research division | |
93 | of McAfee, Inc., under contract to Apple Computer Inc. | |
94 | Additional authors include | |
95 | .An Wayne Salamon , | |
96 | .An Robert Watson , | |
97 | and SPARTA Inc. | |
98 | .Pp | |
99 | The Basic Security Module (BSM) interface to audit records and audit event | |
100 | stream format were defined by Sun Microsystems. | |
101 | .Pp | |
102 | This manual page was written by | |
103 | .An Robert Watson Aq rwatson@FreeBSD.org | |
104 | and | |
105 | .An Stacey Son Aq sson@FreeBSD.org . |