1*b30d1939SAndy Fiddaman /*********************************************************************** 2*b30d1939SAndy Fiddaman * * 3*b30d1939SAndy Fiddaman * This software is part of the ast package * 4*b30d1939SAndy Fiddaman * Copyright (c) 1982-2012 AT&T Intellectual Property * 5*b30d1939SAndy Fiddaman * and is licensed under the * 6*b30d1939SAndy Fiddaman * Eclipse Public License, Version 1.0 * 7*b30d1939SAndy Fiddaman * by AT&T Intellectual Property * 8*b30d1939SAndy Fiddaman * * 9*b30d1939SAndy Fiddaman * A copy of the License is available at * 10*b30d1939SAndy Fiddaman * http://www.eclipse.org/org/documents/epl-v10.html * 11*b30d1939SAndy Fiddaman * (with md5 checksum b35adb5213ca9657e911e9befb180842) * 12*b30d1939SAndy Fiddaman * * 13*b30d1939SAndy Fiddaman * Information and Software Systems Research * 14*b30d1939SAndy Fiddaman * AT&T Research * 15*b30d1939SAndy Fiddaman * Florham Park NJ * 16*b30d1939SAndy Fiddaman * * 17*b30d1939SAndy Fiddaman * David Korn <dgk@research.att.com> * 18*b30d1939SAndy Fiddaman * * 19*b30d1939SAndy Fiddaman ***********************************************************************/ 20*b30d1939SAndy Fiddaman #pragma prototyped 21*b30d1939SAndy Fiddaman /* 22*b30d1939SAndy Fiddaman * David Korn 23*b30d1939SAndy Fiddaman * AT&T Labs 24*b30d1939SAndy Fiddaman * 25*b30d1939SAndy Fiddaman * Shell interface private definitions 26*b30d1939SAndy Fiddaman * 27*b30d1939SAndy Fiddaman */ 28*b30d1939SAndy Fiddaman 29*b30d1939SAndy Fiddaman #ifndef _REGRESS_H 30*b30d1939SAndy Fiddaman #define _REGRESS_H 1 31*b30d1939SAndy Fiddaman 32*b30d1939SAndy Fiddaman #if SHOPT_REGRESS 33*b30d1939SAndy Fiddaman 34*b30d1939SAndy Fiddaman typedef struct Regress_s 35*b30d1939SAndy Fiddaman { 36*b30d1939SAndy Fiddaman Shopt_t options; 37*b30d1939SAndy Fiddaman } Regress_t; 38*b30d1939SAndy Fiddaman 39*b30d1939SAndy Fiddaman #define sh_isregress(r) is_option(&sh.regress->options,r) 40*b30d1939SAndy Fiddaman #define sh_onregress(r) on_option(&sh.regress->options,r) 41*b30d1939SAndy Fiddaman #define sh_offregress(r) off_option(&sh.regress->options,r) 42*b30d1939SAndy Fiddaman 43*b30d1939SAndy Fiddaman #define REGRESS(r,i,f) do { if (sh_isregress(REGRESS_##r)) sh_regress(REGRESS_##r, i, sfprints f, __LINE__, __FILE__); } while (0) 44*b30d1939SAndy Fiddaman 45*b30d1939SAndy Fiddaman #define REGRESS_egid 1 46*b30d1939SAndy Fiddaman #define REGRESS_euid 2 47*b30d1939SAndy Fiddaman #define REGRESS_p_suid 3 48*b30d1939SAndy Fiddaman #define REGRESS_source 4 49*b30d1939SAndy Fiddaman #define REGRESS_etc 5 50*b30d1939SAndy Fiddaman 51*b30d1939SAndy Fiddaman #undef SHOPT_P_SUID 52*b30d1939SAndy Fiddaman #define SHOPT_P_SUID sh_regress_p_suid(__LINE__, __FILE__) 53*b30d1939SAndy Fiddaman 54*b30d1939SAndy Fiddaman extern int b___regress__(int, char**, Shbltin_t*); 55*b30d1939SAndy Fiddaman extern void sh_regress_init(Shell_t*); 56*b30d1939SAndy Fiddaman extern void sh_regress(unsigned int, const char*, const char*, unsigned int, const char*); 57*b30d1939SAndy Fiddaman extern uid_t sh_regress_p_suid(unsigned int, const char*); 58*b30d1939SAndy Fiddaman extern char* sh_regress_etc(const char*, unsigned int, const char*); 59*b30d1939SAndy Fiddaman 60*b30d1939SAndy Fiddaman #else 61*b30d1939SAndy Fiddaman 62*b30d1939SAndy Fiddaman #define REGRESS(r,i,f) 63*b30d1939SAndy Fiddaman 64*b30d1939SAndy Fiddaman #endif /* SHOPT_REGRESS */ 65*b30d1939SAndy Fiddaman 66*b30d1939SAndy Fiddaman #endif /* _REGRESS_H */ 67