188 * Special "privileges" used to indicate special conditions in privilege
189 * debugging/tracing code.
190 */
191 #define PRIV_ALL (-1) /* All privileges required */
192 #define PRIV_MULTIPLE (-2) /* More than one */
193 #define PRIV_NONE (-3) /* No value */
194 #define PRIV_ALLZONE (-4) /* All privileges in zone */
195 #define PRIV_GLOBAL (-5) /* Must be in global zone */
196
197 #ifdef _KERNEL
198
199 #define PRIV_ALLOC 0x1
200
201 extern int priv_debug;
202 extern int priv_basic_test;
203
204 struct proc;
205 struct prpriv;
206 struct cred;
207
208 extern int priv_prgetprivsize(struct prpriv *);
209 extern void cred2prpriv(const struct cred *, struct prpriv *);
210 extern int priv_pr_spriv(struct proc *, struct prpriv *, const struct cred *);
211
212 extern priv_impl_info_t *priv_hold_implinfo(void);
213 extern void priv_release_implinfo(void);
214 extern size_t priv_get_implinfo_size(void);
215 extern const priv_set_t *priv_getset(const struct cred *, int);
216 extern void priv_getinfo(const struct cred *, void *);
217 extern int priv_getbyname(const char *, uint_t);
218 extern int priv_getsetbyname(const char *, int);
219 extern const char *priv_getbynum(int);
220 extern const char *priv_getsetbynum(int);
221
222 extern void priv_emptyset(priv_set_t *);
223 extern void priv_fillset(priv_set_t *);
224 extern void priv_addset(priv_set_t *, int);
225 extern void priv_delset(priv_set_t *, int);
226 extern boolean_t priv_ismember(const priv_set_t *, int);
227 extern boolean_t priv_isemptyset(const priv_set_t *);
228 extern boolean_t priv_isfullset(const priv_set_t *);
|
188 * Special "privileges" used to indicate special conditions in privilege
189 * debugging/tracing code.
190 */
191 #define PRIV_ALL (-1) /* All privileges required */
192 #define PRIV_MULTIPLE (-2) /* More than one */
193 #define PRIV_NONE (-3) /* No value */
194 #define PRIV_ALLZONE (-4) /* All privileges in zone */
195 #define PRIV_GLOBAL (-5) /* Must be in global zone */
196
197 #ifdef _KERNEL
198
199 #define PRIV_ALLOC 0x1
200
201 extern int priv_debug;
202 extern int priv_basic_test;
203
204 struct proc;
205 struct prpriv;
206 struct cred;
207
208 extern int priv_prgetprivsize(const struct prpriv *);
209 extern void cred2prpriv(const struct cred *, struct prpriv *);
210 extern int priv_pr_spriv(struct proc *, struct prpriv *, const struct cred *);
211
212 extern priv_impl_info_t *priv_hold_implinfo(void);
213 extern void priv_release_implinfo(void);
214 extern size_t priv_get_implinfo_size(void);
215 extern const priv_set_t *priv_getset(const struct cred *, int);
216 extern void priv_getinfo(const struct cred *, void *);
217 extern int priv_getbyname(const char *, uint_t);
218 extern int priv_getsetbyname(const char *, int);
219 extern const char *priv_getbynum(int);
220 extern const char *priv_getsetbynum(int);
221
222 extern void priv_emptyset(priv_set_t *);
223 extern void priv_fillset(priv_set_t *);
224 extern void priv_addset(priv_set_t *, int);
225 extern void priv_delset(priv_set_t *, int);
226 extern boolean_t priv_ismember(const priv_set_t *, int);
227 extern boolean_t priv_isemptyset(const priv_set_t *);
228 extern boolean_t priv_isfullset(const priv_set_t *);
|