Deleted Added
full compact
login_class.3 (159680) login_class.3 (180815)
1.\" Copyright (c) 1995 David Nugent <davidn@blaze.net.au>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, is permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice immediately at the beginning of the file, without modification,
9.\" this list of conditions, and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\" notice, this list of conditions and the following disclaimer in the
12.\" documentation and/or other materials provided with the distribution.
13.\" 3. This work was done expressly for inclusion into FreeBSD. Other use
14.\" is permitted provided this notation is included.
15.\" 4. Absolutely no warranty of function or purpose is made by the author
16.\" David Nugent.
17.\" 5. Modifications may be freely made to this file providing the above
18.\" conditions are met.
19.\"
1.\" Copyright (c) 1995 David Nugent <davidn@blaze.net.au>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, is permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice immediately at the beginning of the file, without modification,
9.\" this list of conditions, and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\" notice, this list of conditions and the following disclaimer in the
12.\" documentation and/or other materials provided with the distribution.
13.\" 3. This work was done expressly for inclusion into FreeBSD. Other use
14.\" is permitted provided this notation is included.
15.\" 4. Absolutely no warranty of function or purpose is made by the author
16.\" David Nugent.
17.\" 5. Modifications may be freely made to this file providing the above
18.\" conditions are met.
19.\"
20.\" $FreeBSD: head/lib/libutil/login_class.3 159680 2006-06-17 07:25:58Z maxim $
20.\" $FreeBSD: head/lib/libutil/login_class.3 180815 2008-07-25 19:58:14Z brooks $
21.\"
22.Dd December 28, 1996
23.Os
24.Dt LOGIN_CLASS 3
25.Sh NAME
26.Nm setclasscontext ,
27.Nm setclassenvironment ,
28.Nm setclassresources ,

--- 121 unchanged lines hidden (view full) ---

150.Ed
151.Pp
152Additional environment variables may be set using the list type
153capability "setenv=var1 val1,var2 val2..,varN valN".
154.It LOGIN_SETMAC
155Set the MAC label for the current process to the label specified
156in system login class database.
157.Pp
21.\"
22.Dd December 28, 1996
23.Os
24.Dt LOGIN_CLASS 3
25.Sh NAME
26.Nm setclasscontext ,
27.Nm setclassenvironment ,
28.Nm setclassresources ,

--- 121 unchanged lines hidden (view full) ---

150.Ed
151.Pp
152Additional environment variables may be set using the list type
153capability "setenv=var1 val1,var2 val2..,varN valN".
154.It LOGIN_SETMAC
155Set the MAC label for the current process to the label specified
156in system login class database.
157.Pp
158.It LOGIN_SETCPUMASK
159Create a new
160.Xr cpuset 2
161and set the cpu affinity to the specified mask.
162The string may contain a comma separated list of numbers and/or number
163ranges as handled by the
164.Xr cpuset 1
165utility or the case-insensitive string
166.Ql default .
167If the string is
168.Ql default
169no action will be taken.
158.It LOGIN_SETALL
159Enables all of the above settings.
160.El
161.Pp
162Note that when setting environment variables and a valid passwd
163pointer is provided in the
164.Ar pwd
165parameter, the characters

--- 15 unchanged lines hidden (view full) ---

181and
182.Fn setusercontext
183functions return -1 if an error occurred, or 0 on success.
184If an error occurs when attempting to set the user, login, group
185or resources, a message is reported to
186.Xr syslog 3 ,
187with LOG_ERR priority and directed to the currently active facility.
188.Sh SEE ALSO
170.It LOGIN_SETALL
171Enables all of the above settings.
172.El
173.Pp
174Note that when setting environment variables and a valid passwd
175pointer is provided in the
176.Ar pwd
177parameter, the characters

--- 15 unchanged lines hidden (view full) ---

193and
194.Fn setusercontext
195functions return -1 if an error occurred, or 0 on success.
196If an error occurs when attempting to set the user, login, group
197or resources, a message is reported to
198.Xr syslog 3 ,
199with LOG_ERR priority and directed to the currently active facility.
200.Sh SEE ALSO
201.Xr cpuset 1 ,
202.Xr cpuset 2 ,
189.Xr setgid 2 ,
190.Xr setlogin 2 ,
191.Xr setuid 2 ,
192.Xr getcap 3 ,
193.Xr initgroups 3 ,
194.Xr login_cap 3 ,
195.Xr mac_set_proc 3 ,
196.Xr login.conf 5 ,
197.Xr termcap 5
203.Xr setgid 2 ,
204.Xr setlogin 2 ,
205.Xr setuid 2 ,
206.Xr getcap 3 ,
207.Xr initgroups 3 ,
208.Xr login_cap 3 ,
209.Xr mac_set_proc 3 ,
210.Xr login.conf 5 ,
211.Xr termcap 5