1 /* 2 * Copyright 2009, Colin Günther, coling@gmx.de. 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5 6 7 #include <sys/param.h> 8 #include <sys/priv.h> 9 10 11 /* 12 * FreeBSD has a more sophisticated privilege checking system. 13 * We only check for superuser rights. 14 */ 15 int 16 priv_check(struct thread *thread, int privilegeLevel) 17 { 18 // Note: The thread parameter is ignored intentionally (cf. the comment in 19 // pcpu.h). Currently calling this function is only valid for the current 20 // thread. 21 if (geteuid() == 0) 22 return ENOERR; 23 24 return EPERM; 25 } 26