Beispiel #1
0
int sh_source(Shell_t *shp, Sfio_t *iop, const char *file)
{
	char*	oid;
	char*	nid;
	int	fd;

	if (!file || !*file || (fd = path_open(shp,file, PATHCOMP)) < 0)
	{
		REGRESS(source, "sh_source", ("%s:ENOENT", file));
		return 0;
	}
	oid = error_info.id;
	nid = error_info.id = strdup(file);
	shp->st.filename = path_fullname(shp,stakptr(PATH_OFFSET));
	REGRESS(source, "sh_source", ("%s", file));
	exfile(shp, iop, fd);
	error_info.id = oid;
	free(nid);
	return 1;
}
Beispiel #2
0
char* sh_regress_etc(const char* path, unsigned int line, const char* file)
{
	REGRESS(etc, "sh_open", ("%s => %s%s", path, intercept_etc, path+4));
	return intercept_etc;
}
Beispiel #3
0
uid_t sh_regress_p_suid(unsigned int line, const char* file)
{
	REGRESS(p_suid, "SHOPT_P_SUID", ("%d", intercept_p_suid));
	return intercept_p_suid;
}