File: priv.h

package info (click to toggle)
ctfutils 10.3~svn297264-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 3,492 kB
  • sloc: ansic: 60,377; makefile: 225
file content (20 lines) | stat: -rw-r--r-- 397 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* $FreeBSD: releng/10.3/cddl/compat/opensolaris/include/priv.h 219089 2011-02-27 19:41:40Z pjd $ */

#ifndef	_OPENSOLARIS_PRIV_H_
#define	_OPENSOLARIS_PRIV_H_

#include <sys/types.h>
#include <unistd.h>
#include <assert.h>

#define	PRIV_SYS_CONFIG	0

static __inline int
priv_ineffect(int priv)
{

	assert(priv == PRIV_SYS_CONFIG);
	return (geteuid() == 0);
}

#endif	/* !_OPENSOLARIS_PRIV_H_ */