Beispiel #1
0
/* build the global (flat) graph of the universe.  this is 'flat'
in the sense that there is one data structure for the entire graph
(not 'flat' in the sense of flat edges within the same level.)
*/
static rank_t *globalize(Agraph_t *user, Agraph_t *topmodel)
{
	rank_t	*globrank;
	int		minr,maxr,r;

	/* setup bookkeeping */
	interclusterpaths(user, topmodel);

	/* allocate global ranks */
	minr = GD_minrank(topmodel);
	maxr = GD_maxrank(topmodel);
	globrank = T_array(minr,maxr,sizeof(rank_t));
	countup(user,globrank);
	for (r = minr; r <= maxr; r++) {
		globrank[r].v = N_NEW(globrank[r].n+1,Agnode_t*);	/* NIL at end */
		globrank[r].n = 0;	/* reset it */
	}

	/* installation */
	for (r = minr; r <= maxr; r++)
		installglob(user,topmodel,globrank,r);

	removejunk(user, topmodel);
	reconnect(user, topmodel);

	/* optimization */
	return globrank;
}
Beispiel #2
0
f(kill,		T_pid_t, T_int),
f(tkill,	T_pid_t, T_int),

/*
 * Calls related to process privilege
 */
#ifdef __NR_setuid32
f(setuid,	T_u16_t),
f(setgid,	T_u16_t),
f(setreuid,	T_u16_t, T_u16_t),
f(setregid,	T_u16_t, T_u16_t),
f(setresuid,	T_u16_t, T_u16_t, T_u16_t),
f(setresgid,	T_u16_t, T_u16_t, T_u16_t),
f(setfsuid,	T_u16_t),
f(setfsgid,	T_u16_t),
f(setgroups,	T_size_t, T_array(__u16, 0, NGROUPS)),
f(setuid32,	T_uid_t),
f(setgid32,	T_gid_t),
f(setreuid32,	T_uid_t, T_uid_t),
f(setregid32,	T_gid_t, T_gid_t),
f(setresuid32,	T_uid_t, T_uid_t, T_uid_t),
f(setresgid32,	T_gid_t, T_gid_t, T_gid_t),
f(setfsuid32,	T_uid_t),
f(setfsgid32,	T_uid_t),
f(setgroups32,	T_size_t, T_array(gid_t, 0, NGROUPS)),
#else
/* architectures where uids and gids have been 32 bits all along */
f(setuid,	T_uid_t),
f(setgid,	T_gid_t),
f(setreuid,	T_uid_t, T_uid_t),
f(setregid,	T_gid_t, T_gid_t),
Beispiel #3
0
static int *intarray(int low, int high)
{ return (int*) T_array(low,high,sizeof(int)); }