110898Sroland.mainz@nrubsig.org /*********************************************************************** 210898Sroland.mainz@nrubsig.org * * 310898Sroland.mainz@nrubsig.org * This software is part of the ast package * 4*12068SRoger.Faulkner@Oracle.COM * Copyright (c) 1982-2010 AT&T Intellectual Property * 510898Sroland.mainz@nrubsig.org * and is licensed under the * 610898Sroland.mainz@nrubsig.org * Common Public License, Version 1.0 * 710898Sroland.mainz@nrubsig.org * by AT&T Intellectual Property * 810898Sroland.mainz@nrubsig.org * * 910898Sroland.mainz@nrubsig.org * A copy of the License is available at * 1010898Sroland.mainz@nrubsig.org * http://www.opensource.org/licenses/cpl1.0.txt * 1110898Sroland.mainz@nrubsig.org * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * 1210898Sroland.mainz@nrubsig.org * * 1310898Sroland.mainz@nrubsig.org * Information and Software Systems Research * 1410898Sroland.mainz@nrubsig.org * AT&T Research * 1510898Sroland.mainz@nrubsig.org * Florham Park NJ * 1610898Sroland.mainz@nrubsig.org * * 1710898Sroland.mainz@nrubsig.org * David Korn <dgk@research.att.com> * 1810898Sroland.mainz@nrubsig.org * * 1910898Sroland.mainz@nrubsig.org ***********************************************************************/ 2010898Sroland.mainz@nrubsig.org #pragma prototyped 2110898Sroland.mainz@nrubsig.org /* 2210898Sroland.mainz@nrubsig.org * David Korn 2310898Sroland.mainz@nrubsig.org * AT&T Labs 2410898Sroland.mainz@nrubsig.org * 2510898Sroland.mainz@nrubsig.org * Shell interface private definitions 2610898Sroland.mainz@nrubsig.org * 2710898Sroland.mainz@nrubsig.org */ 2810898Sroland.mainz@nrubsig.org 2910898Sroland.mainz@nrubsig.org #ifndef _REGRESS_H 3010898Sroland.mainz@nrubsig.org #define _REGRESS_H 1 3110898Sroland.mainz@nrubsig.org 3210898Sroland.mainz@nrubsig.org #if SHOPT_REGRESS 3310898Sroland.mainz@nrubsig.org 3410898Sroland.mainz@nrubsig.org typedef struct Regress_s 3510898Sroland.mainz@nrubsig.org { 3610898Sroland.mainz@nrubsig.org Shopt_t options; 3710898Sroland.mainz@nrubsig.org } Regress_t; 3810898Sroland.mainz@nrubsig.org 3910898Sroland.mainz@nrubsig.org #define sh_isregress(r) is_option(&sh.regress->options,r) 4010898Sroland.mainz@nrubsig.org #define sh_onregress(r) on_option(&sh.regress->options,r) 4110898Sroland.mainz@nrubsig.org #define sh_offregress(r) off_option(&sh.regress->options,r) 4210898Sroland.mainz@nrubsig.org 4310898Sroland.mainz@nrubsig.org #define REGRESS(r,i,f) do { if (sh_isregress(REGRESS_##r)) sh_regress(REGRESS_##r, i, sfprints f, __LINE__, __FILE__); } while (0) 4410898Sroland.mainz@nrubsig.org 4510898Sroland.mainz@nrubsig.org #define REGRESS_egid 1 4610898Sroland.mainz@nrubsig.org #define REGRESS_euid 2 4710898Sroland.mainz@nrubsig.org #define REGRESS_p_suid 3 4810898Sroland.mainz@nrubsig.org #define REGRESS_source 4 4910898Sroland.mainz@nrubsig.org #define REGRESS_etc 5 5010898Sroland.mainz@nrubsig.org 5110898Sroland.mainz@nrubsig.org #undef SHOPT_P_SUID 5210898Sroland.mainz@nrubsig.org #define SHOPT_P_SUID sh_regress_p_suid(__LINE__, __FILE__) 5310898Sroland.mainz@nrubsig.org 5410898Sroland.mainz@nrubsig.org extern int b___regress__(int, char**, void*); 5510898Sroland.mainz@nrubsig.org extern void sh_regress_init(Shell_t*); 5610898Sroland.mainz@nrubsig.org extern void sh_regress(unsigned int, const char*, const char*, unsigned int, const char*); 5710898Sroland.mainz@nrubsig.org extern uid_t sh_regress_p_suid(unsigned int, const char*); 5810898Sroland.mainz@nrubsig.org extern char* sh_regress_etc(const char*, unsigned int, const char*); 5910898Sroland.mainz@nrubsig.org 6010898Sroland.mainz@nrubsig.org #else 6110898Sroland.mainz@nrubsig.org 6210898Sroland.mainz@nrubsig.org #define REGRESS(r,i,f) 6310898Sroland.mainz@nrubsig.org 6410898Sroland.mainz@nrubsig.org #endif /* SHOPT_REGRESS */ 6510898Sroland.mainz@nrubsig.org 6610898Sroland.mainz@nrubsig.org #endif /* _REGRESS_H */ 67