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 * regression test intercept control 2310898Sroland.mainz@nrubsig.org * enable with SHOPT_REGRESS==1 in Makefile 2410898Sroland.mainz@nrubsig.org * not for production use 2510898Sroland.mainz@nrubsig.org * see --man for details 2610898Sroland.mainz@nrubsig.org * all string constants inline here instead of in data/... 2710898Sroland.mainz@nrubsig.org * 2810898Sroland.mainz@nrubsig.org * David Korn 2910898Sroland.mainz@nrubsig.org * at&t research 3010898Sroland.mainz@nrubsig.org */ 3110898Sroland.mainz@nrubsig.org 3210898Sroland.mainz@nrubsig.org #include "defs.h" 3310898Sroland.mainz@nrubsig.org 3410898Sroland.mainz@nrubsig.org #if SHOPT_REGRESS 3510898Sroland.mainz@nrubsig.org 3610898Sroland.mainz@nrubsig.org #include <error.h> 3710898Sroland.mainz@nrubsig.org #include <ls.h> 3810898Sroland.mainz@nrubsig.org #include "io.h" 3910898Sroland.mainz@nrubsig.org #include "builtins.h" 4010898Sroland.mainz@nrubsig.org #include <tmx.h> 4110898Sroland.mainz@nrubsig.org 4210898Sroland.mainz@nrubsig.org #define REGRESS_HEADER "ksh:REGRESS:" 4310898Sroland.mainz@nrubsig.org 4410898Sroland.mainz@nrubsig.org #define TRACE(r,i,f) sh_regress(REGRESS_##r, i, sfprints f, __LINE__, __FILE__) 4510898Sroland.mainz@nrubsig.org 4610898Sroland.mainz@nrubsig.org static const char usage[] = 4710898Sroland.mainz@nrubsig.org "[-1p0?\n@(#)$Id: __regress__ (AT&T Research) 2009-03-29 $\n]" 4810898Sroland.mainz@nrubsig.org USAGE_LICENSE 4910898Sroland.mainz@nrubsig.org "[+NAME?__regress__ - shell regression test intercept control]" 5010898Sroland.mainz@nrubsig.org "[+DESCRIPTION?\b__regress__\b controls the regression test intercepts " 5110898Sroland.mainz@nrubsig.org "for shells compiled with SHOPT_REGRESS==1. Shells compiled this way are " 5210898Sroland.mainz@nrubsig.org "for testing only. In addition to \b__regress__\b and the \b--regress\b " 5310898Sroland.mainz@nrubsig.org "command line option, these shells may contain system library function " 5410898Sroland.mainz@nrubsig.org "intercepts that behave different from the native counterparts.]" 5510898Sroland.mainz@nrubsig.org "[+?Each option controls a different test and possibly a different set " 5610898Sroland.mainz@nrubsig.org "of intercepts. The options are interpreted \bdd\b(1) style -- '-' or " 5710898Sroland.mainz@nrubsig.org "'--' prefix not required. This simplifies the specification of the " 5810898Sroland.mainz@nrubsig.org "command line \b--regress\b=\avalue\a option, where \avalue\a is passed " 5910898Sroland.mainz@nrubsig.org "as an option to the \b__regress__\b builtin. Typically regression test " 6010898Sroland.mainz@nrubsig.org "intercepts are enabled with one or more command line \b--regress\b " 6110898Sroland.mainz@nrubsig.org "options, with optional specific calls to \b__regress__\b in test " 6210898Sroland.mainz@nrubsig.org "scripts to enable/disable intercepts as the test progresses.]" 6310898Sroland.mainz@nrubsig.org "[+?Each enabled intercept may result in trace lines of the form \b" REGRESS_HEADER 6410898Sroland.mainz@nrubsig.org "\aoption\a:\aintercept\a:\ainfo\a on the standard error, where " 6510898Sroland.mainz@nrubsig.org "\aoption\a is one of the options below, \aintercept\a is the name of " 6610898Sroland.mainz@nrubsig.org "the specific intercept for \aoption\a, and \ainfo\a is \aoption\a " 6710898Sroland.mainz@nrubsig.org "specific information. Unless noted otherwise, one regression test trace " 6810898Sroland.mainz@nrubsig.org "line is produced each time an enabled intercept is called.]" 6910898Sroland.mainz@nrubsig.org "[101:egid?The intercept effective gid is set to \aoriginal-egid\a. The " 7010898Sroland.mainz@nrubsig.org "effective gid of the underlying system process is not affected. The " 7110898Sroland.mainz@nrubsig.org "trace line info is either \begid==rgid\b or \begid!=rgid\b. The " 7210898Sroland.mainz@nrubsig.org "intercepts are:]#?[original-egid:=1]" 7310898Sroland.mainz@nrubsig.org "{" 7410898Sroland.mainz@nrubsig.org "[+getegid()?The intercept effecive gid is returned. The " 7510898Sroland.mainz@nrubsig.org "\bsetgid\b() intercept may change this between the real gid and " 7610898Sroland.mainz@nrubsig.org "\aoriginal-egid\a.]" 7710898Sroland.mainz@nrubsig.org "[+setgid(gid)?Sets the intercept effective gid to \agid\a. " 7810898Sroland.mainz@nrubsig.org "Fails if \agid\a is neither the real gid nor " 7910898Sroland.mainz@nrubsig.org "\aoriginal-egid\a.]" 8010898Sroland.mainz@nrubsig.org "}" 8110898Sroland.mainz@nrubsig.org "[102:euid?The intercept effective uid is set to \aoriginal-euid\a. The " 8210898Sroland.mainz@nrubsig.org "effective uid of the underlying system process is not affected. The " 8310898Sroland.mainz@nrubsig.org "trace line info is either \beuid==ruid\b or \beuid!=ruid\b. The " 8410898Sroland.mainz@nrubsig.org "intercepts are:]#?[original-euid:=1]" 8510898Sroland.mainz@nrubsig.org "{" 8610898Sroland.mainz@nrubsig.org "[+geteuid()?The intercept effecive uid is returned. The " 8710898Sroland.mainz@nrubsig.org "\bsetuid\b() intercept may change this between the real uid and " 8810898Sroland.mainz@nrubsig.org "\aoriginal-euid\a.]" 8910898Sroland.mainz@nrubsig.org "[+setuid(uid)?Sets the intercept effective uid to \auid\a. " 9010898Sroland.mainz@nrubsig.org "Fails if \auid\a is neither the real uid nor " 9110898Sroland.mainz@nrubsig.org "\aoriginal-euid\a.]" 9210898Sroland.mainz@nrubsig.org "}" 9310898Sroland.mainz@nrubsig.org "[103:p_suid?Specifies a value for SHOPT_P_SUID. Effective uids greater " 9410898Sroland.mainz@nrubsig.org "than the non-privileged-uid disable the priveleged mode. The intercepts " 9510898Sroland.mainz@nrubsig.org "are:]#?[non-privileged-uid:=1]" 9610898Sroland.mainz@nrubsig.org "{" 9710898Sroland.mainz@nrubsig.org "[+SHOPT_P_SUID?The SHOPT_P_SUID macro value is overridden by " 9810898Sroland.mainz@nrubsig.org "\bp_suid\b. A trace line is output for each SHOPT_P_SUID " 9910898Sroland.mainz@nrubsig.org "access.]" 10010898Sroland.mainz@nrubsig.org "}" 10110898Sroland.mainz@nrubsig.org "[104:source?The intercepts are:]" 10210898Sroland.mainz@nrubsig.org "{" 10310898Sroland.mainz@nrubsig.org "[+sh_source()?The trace line info is the path of the script " 10410898Sroland.mainz@nrubsig.org "being sourced. Used to trace shell startup scripts.]" 10510898Sroland.mainz@nrubsig.org "}" 10610898Sroland.mainz@nrubsig.org "[105:etc?Map file paths matching \b/etc/\b* to \aetc-dir\a/*. The " 10710898Sroland.mainz@nrubsig.org "intercepts are:]:[etc-dir:=/etc]" 10810898Sroland.mainz@nrubsig.org "{" 10910898Sroland.mainz@nrubsig.org "[+sh_open()?Paths matching \b/etc/\b* are changed to " 11010898Sroland.mainz@nrubsig.org "\aetc-dir\a/*.]" 11110898Sroland.mainz@nrubsig.org "}" 11210898Sroland.mainz@nrubsig.org "[+SEE ALSO?\bksh\b(1), \bregress\b(1), \brt\b(1)]" 11310898Sroland.mainz@nrubsig.org ; 11410898Sroland.mainz@nrubsig.org 11510898Sroland.mainz@nrubsig.org static const char* regress_options[] = 11610898Sroland.mainz@nrubsig.org { 11710898Sroland.mainz@nrubsig.org "ERROR", 11810898Sroland.mainz@nrubsig.org "egid", 11910898Sroland.mainz@nrubsig.org "euid", 12010898Sroland.mainz@nrubsig.org "p_suid", 12110898Sroland.mainz@nrubsig.org "source", 12210898Sroland.mainz@nrubsig.org "etc", 12310898Sroland.mainz@nrubsig.org }; 12410898Sroland.mainz@nrubsig.org 12510898Sroland.mainz@nrubsig.org void sh_regress_init(Shell_t* shp) 12610898Sroland.mainz@nrubsig.org { 12710898Sroland.mainz@nrubsig.org static Regress_t state; 12810898Sroland.mainz@nrubsig.org 12910898Sroland.mainz@nrubsig.org shp->regress = &state; 13010898Sroland.mainz@nrubsig.org } 13110898Sroland.mainz@nrubsig.org 13210898Sroland.mainz@nrubsig.org /* 13310898Sroland.mainz@nrubsig.org * regress info trace output 13410898Sroland.mainz@nrubsig.org */ 13510898Sroland.mainz@nrubsig.org 13610898Sroland.mainz@nrubsig.org void sh_regress(unsigned int index, const char* intercept, const char* info, unsigned int line, const char* file) 13710898Sroland.mainz@nrubsig.org { 13810898Sroland.mainz@nrubsig.org char* name; 13910898Sroland.mainz@nrubsig.org char buf[16]; 14010898Sroland.mainz@nrubsig.org 14110898Sroland.mainz@nrubsig.org if (index >= 1 && index <= elementsof(regress_options)) 14210898Sroland.mainz@nrubsig.org name = (char*)regress_options[index]; 14310898Sroland.mainz@nrubsig.org else 14410898Sroland.mainz@nrubsig.org sfsprintf(name = buf, sizeof(buf), "%u", index); 14510898Sroland.mainz@nrubsig.org sfprintf(sfstderr, REGRESS_HEADER "%s:%s:%s\n", name, intercept, fmtesc(info)); 14610898Sroland.mainz@nrubsig.org } 14710898Sroland.mainz@nrubsig.org 14810898Sroland.mainz@nrubsig.org /* 14910898Sroland.mainz@nrubsig.org * egid intercepts 15010898Sroland.mainz@nrubsig.org */ 15110898Sroland.mainz@nrubsig.org 15210898Sroland.mainz@nrubsig.org static gid_t intercept_sgid = 0; 15310898Sroland.mainz@nrubsig.org static gid_t intercept_egid = -1; 15410898Sroland.mainz@nrubsig.org static gid_t intercept_rgid = -1; 15510898Sroland.mainz@nrubsig.org 15610898Sroland.mainz@nrubsig.org gid_t getegid(void) 15710898Sroland.mainz@nrubsig.org { 15810898Sroland.mainz@nrubsig.org if (intercept_rgid == -1) 15910898Sroland.mainz@nrubsig.org intercept_rgid = getgid(); 16010898Sroland.mainz@nrubsig.org if (sh_isregress(REGRESS_egid)) 16110898Sroland.mainz@nrubsig.org { 16210898Sroland.mainz@nrubsig.org TRACE(egid, "getegid", ("%s", intercept_egid == intercept_rgid ? "egid==rgid" : "egid!=rgid")); 16310898Sroland.mainz@nrubsig.org return intercept_egid; 16410898Sroland.mainz@nrubsig.org } 16510898Sroland.mainz@nrubsig.org return intercept_rgid; 16610898Sroland.mainz@nrubsig.org } 16710898Sroland.mainz@nrubsig.org 16810898Sroland.mainz@nrubsig.org int setgid(gid_t gid) 16910898Sroland.mainz@nrubsig.org { 17010898Sroland.mainz@nrubsig.org if (intercept_rgid == -1) 17110898Sroland.mainz@nrubsig.org intercept_rgid = getgid(); 17210898Sroland.mainz@nrubsig.org if (sh_isregress(REGRESS_egid)) 17310898Sroland.mainz@nrubsig.org { 17410898Sroland.mainz@nrubsig.org if (gid != intercept_rgid && gid != intercept_sgid) 17510898Sroland.mainz@nrubsig.org { 17610898Sroland.mainz@nrubsig.org TRACE(egid, "setgid", ("%s", "EPERM")); 17710898Sroland.mainz@nrubsig.org errno = EPERM; 17810898Sroland.mainz@nrubsig.org return -1; 17910898Sroland.mainz@nrubsig.org } 18010898Sroland.mainz@nrubsig.org intercept_egid = gid; 18110898Sroland.mainz@nrubsig.org TRACE(egid, "setgid", ("%s", intercept_egid == intercept_rgid ? "egid==rgid" : "egid!=rgid")); 18210898Sroland.mainz@nrubsig.org } 18310898Sroland.mainz@nrubsig.org else if (gid != intercept_rgid) 18410898Sroland.mainz@nrubsig.org { 18510898Sroland.mainz@nrubsig.org errno = EPERM; 18610898Sroland.mainz@nrubsig.org return -1; 18710898Sroland.mainz@nrubsig.org } 18810898Sroland.mainz@nrubsig.org return 0; 18910898Sroland.mainz@nrubsig.org } 19010898Sroland.mainz@nrubsig.org 19110898Sroland.mainz@nrubsig.org /* 19210898Sroland.mainz@nrubsig.org * euid intercepts 19310898Sroland.mainz@nrubsig.org */ 19410898Sroland.mainz@nrubsig.org 19510898Sroland.mainz@nrubsig.org static uid_t intercept_suid = 0; 19610898Sroland.mainz@nrubsig.org static uid_t intercept_euid = -1; 19710898Sroland.mainz@nrubsig.org static uid_t intercept_ruid = -1; 19810898Sroland.mainz@nrubsig.org 19910898Sroland.mainz@nrubsig.org uid_t geteuid(void) 20010898Sroland.mainz@nrubsig.org { 20110898Sroland.mainz@nrubsig.org if (intercept_ruid == -1) 20210898Sroland.mainz@nrubsig.org intercept_ruid = getuid(); 20310898Sroland.mainz@nrubsig.org if (sh_isregress(REGRESS_euid)) 20410898Sroland.mainz@nrubsig.org { 20510898Sroland.mainz@nrubsig.org TRACE(euid, "geteuid", ("%s", intercept_euid == intercept_ruid ? "euid==ruid" : "euid!=ruid")); 20610898Sroland.mainz@nrubsig.org return intercept_euid; 20710898Sroland.mainz@nrubsig.org } 20810898Sroland.mainz@nrubsig.org return intercept_ruid; 20910898Sroland.mainz@nrubsig.org } 21010898Sroland.mainz@nrubsig.org 21110898Sroland.mainz@nrubsig.org int setuid(uid_t uid) 21210898Sroland.mainz@nrubsig.org { 21310898Sroland.mainz@nrubsig.org if (intercept_ruid == -1) 21410898Sroland.mainz@nrubsig.org intercept_ruid = getuid(); 21510898Sroland.mainz@nrubsig.org if (sh_isregress(REGRESS_euid)) 21610898Sroland.mainz@nrubsig.org { 21710898Sroland.mainz@nrubsig.org if (uid != intercept_ruid && uid != intercept_suid) 21810898Sroland.mainz@nrubsig.org { 21910898Sroland.mainz@nrubsig.org TRACE(euid, "setuid", ("%s", "EPERM")); 22010898Sroland.mainz@nrubsig.org errno = EPERM; 22110898Sroland.mainz@nrubsig.org return -1; 22210898Sroland.mainz@nrubsig.org } 22310898Sroland.mainz@nrubsig.org intercept_euid = uid; 22410898Sroland.mainz@nrubsig.org TRACE(euid, "setuid", ("%s", intercept_euid == intercept_ruid ? "euid==ruid" : "euid!=ruid")); 22510898Sroland.mainz@nrubsig.org } 22610898Sroland.mainz@nrubsig.org else if (uid != intercept_ruid) 22710898Sroland.mainz@nrubsig.org { 22810898Sroland.mainz@nrubsig.org errno = EPERM; 22910898Sroland.mainz@nrubsig.org return -1; 23010898Sroland.mainz@nrubsig.org } 23110898Sroland.mainz@nrubsig.org return 0; 23210898Sroland.mainz@nrubsig.org } 23310898Sroland.mainz@nrubsig.org 23410898Sroland.mainz@nrubsig.org /* 23510898Sroland.mainz@nrubsig.org * p_suid intercept 23610898Sroland.mainz@nrubsig.org */ 23710898Sroland.mainz@nrubsig.org 23810898Sroland.mainz@nrubsig.org static uid_t intercept_p_suid = 0x7fffffff; 23910898Sroland.mainz@nrubsig.org 24010898Sroland.mainz@nrubsig.org uid_t sh_regress_p_suid(unsigned int line, const char* file) 24110898Sroland.mainz@nrubsig.org { 24210898Sroland.mainz@nrubsig.org REGRESS(p_suid, "SHOPT_P_SUID", ("%d", intercept_p_suid)); 24310898Sroland.mainz@nrubsig.org return intercept_p_suid; 24410898Sroland.mainz@nrubsig.org } 24510898Sroland.mainz@nrubsig.org 24610898Sroland.mainz@nrubsig.org /* 24710898Sroland.mainz@nrubsig.org * p_suid intercept 24810898Sroland.mainz@nrubsig.org */ 24910898Sroland.mainz@nrubsig.org 25010898Sroland.mainz@nrubsig.org static char* intercept_etc = 0; 25110898Sroland.mainz@nrubsig.org 25210898Sroland.mainz@nrubsig.org char* sh_regress_etc(const char* path, unsigned int line, const char* file) 25310898Sroland.mainz@nrubsig.org { 25410898Sroland.mainz@nrubsig.org REGRESS(etc, "sh_open", ("%s => %s%s", path, intercept_etc, path+4)); 25510898Sroland.mainz@nrubsig.org return intercept_etc; 25610898Sroland.mainz@nrubsig.org } 25710898Sroland.mainz@nrubsig.org 25810898Sroland.mainz@nrubsig.org /* 25910898Sroland.mainz@nrubsig.org * __regress__ builtin 26010898Sroland.mainz@nrubsig.org */ 26110898Sroland.mainz@nrubsig.org 26210898Sroland.mainz@nrubsig.org int b___regress__(int argc, char** argv, void *extra) 26310898Sroland.mainz@nrubsig.org { 26410898Sroland.mainz@nrubsig.org register Shell_t* shp = ((Shbltin_t*)extra)->shp; 26510898Sroland.mainz@nrubsig.org int n; 26610898Sroland.mainz@nrubsig.org 26710898Sroland.mainz@nrubsig.org for (;;) 26810898Sroland.mainz@nrubsig.org { 26910898Sroland.mainz@nrubsig.org switch (n = optget(argv, usage)) 27010898Sroland.mainz@nrubsig.org { 27110898Sroland.mainz@nrubsig.org case '?': 27210898Sroland.mainz@nrubsig.org errormsg(SH_DICT, ERROR_usage(2), "%s", opt_info.arg); 27310898Sroland.mainz@nrubsig.org break; 27410898Sroland.mainz@nrubsig.org case ':': 27510898Sroland.mainz@nrubsig.org errormsg(SH_DICT, 2, "%s", opt_info.arg); 27610898Sroland.mainz@nrubsig.org break; 27710898Sroland.mainz@nrubsig.org case 0: 27810898Sroland.mainz@nrubsig.org break; 27910898Sroland.mainz@nrubsig.org default: 28010898Sroland.mainz@nrubsig.org if (n < -100) 28110898Sroland.mainz@nrubsig.org { 28210898Sroland.mainz@nrubsig.org n = -(n + 100); 28310898Sroland.mainz@nrubsig.org if (opt_info.arg || opt_info.number) 28410898Sroland.mainz@nrubsig.org sh_onregress(n); 28510898Sroland.mainz@nrubsig.org else 28610898Sroland.mainz@nrubsig.org sh_offregress(n); 28710898Sroland.mainz@nrubsig.org switch (n) 28810898Sroland.mainz@nrubsig.org { 28910898Sroland.mainz@nrubsig.org case REGRESS_egid: 29010898Sroland.mainz@nrubsig.org if (sh_isregress(n)) 29110898Sroland.mainz@nrubsig.org { 29210898Sroland.mainz@nrubsig.org intercept_egid = intercept_sgid = (gid_t)opt_info.number; 29310898Sroland.mainz@nrubsig.org TRACE(egid, argv[0], ("%d", intercept_egid)); 29410898Sroland.mainz@nrubsig.org } 29510898Sroland.mainz@nrubsig.org else 29610898Sroland.mainz@nrubsig.org TRACE(egid, argv[0], ("%s", "off")); 29710898Sroland.mainz@nrubsig.org break; 29810898Sroland.mainz@nrubsig.org case REGRESS_euid: 29910898Sroland.mainz@nrubsig.org if (sh_isregress(n)) 30010898Sroland.mainz@nrubsig.org { 30110898Sroland.mainz@nrubsig.org intercept_euid = intercept_suid = (uid_t)opt_info.number; 30210898Sroland.mainz@nrubsig.org TRACE(euid, argv[0], ("%d", intercept_euid)); 30310898Sroland.mainz@nrubsig.org } 30410898Sroland.mainz@nrubsig.org else 30510898Sroland.mainz@nrubsig.org TRACE(euid, argv[0], ("%s", "off")); 30610898Sroland.mainz@nrubsig.org break; 30710898Sroland.mainz@nrubsig.org case REGRESS_p_suid: 30810898Sroland.mainz@nrubsig.org if (sh_isregress(n)) 30910898Sroland.mainz@nrubsig.org { 31010898Sroland.mainz@nrubsig.org intercept_p_suid = (uid_t)opt_info.number; 31110898Sroland.mainz@nrubsig.org TRACE(p_suid, argv[0], ("%d", intercept_p_suid)); 31210898Sroland.mainz@nrubsig.org } 31310898Sroland.mainz@nrubsig.org else 31410898Sroland.mainz@nrubsig.org TRACE(p_suid, argv[0], ("%s", "off")); 31510898Sroland.mainz@nrubsig.org break; 31610898Sroland.mainz@nrubsig.org case REGRESS_source: 31710898Sroland.mainz@nrubsig.org TRACE(source, argv[0], ("%s", sh_isregress(n) ? "on" : "off")); 31810898Sroland.mainz@nrubsig.org break; 31910898Sroland.mainz@nrubsig.org case REGRESS_etc: 32010898Sroland.mainz@nrubsig.org if (sh_isregress(n)) 32110898Sroland.mainz@nrubsig.org { 32210898Sroland.mainz@nrubsig.org intercept_etc = opt_info.arg; 32310898Sroland.mainz@nrubsig.org TRACE(etc, argv[0], ("%s", intercept_etc)); 32410898Sroland.mainz@nrubsig.org } 32510898Sroland.mainz@nrubsig.org else 32610898Sroland.mainz@nrubsig.org TRACE(etc, argv[0], ("%s", "off")); 32710898Sroland.mainz@nrubsig.org break; 32810898Sroland.mainz@nrubsig.org } 32910898Sroland.mainz@nrubsig.org } 33010898Sroland.mainz@nrubsig.org continue; 33110898Sroland.mainz@nrubsig.org } 33210898Sroland.mainz@nrubsig.org break; 33310898Sroland.mainz@nrubsig.org } 33410898Sroland.mainz@nrubsig.org if (error_info.errors || *(argv + opt_info.index)) 33510898Sroland.mainz@nrubsig.org errormsg(SH_DICT, ERROR_usage(2), "%s", optusage(NiL)); 33610898Sroland.mainz@nrubsig.org return 0; 33710898Sroland.mainz@nrubsig.org } 33810898Sroland.mainz@nrubsig.org 33910898Sroland.mainz@nrubsig.org #else 34010898Sroland.mainz@nrubsig.org 34110898Sroland.mainz@nrubsig.org NoN(regress) 34210898Sroland.mainz@nrubsig.org 34310898Sroland.mainz@nrubsig.org #endif 344