DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ T i ┃
Length: 2176 (0x880) Types: TextFile Names: »inetd_check.l«
└─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6 └─ ⟦0c25cb74a⟧ »DATA« └─⟦038380b96⟧ └─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7 └─ ⟦f494b5154⟧ »DATA« └─⟦038380b96⟧ └─ ⟦this⟧ »inetd_check.l« └─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6 └─ ⟦0c25cb74a⟧ »DATA« └─⟦0732ea0cf⟧ └─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7 └─ ⟦f494b5154⟧ »DATA« └─⟦0732ea0cf⟧ └─ ⟦this⟧ »../../dtia/release_apollo_2.1/inetd_check.l« └─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6 └─ ⟦0c25cb74a⟧ »DATA« └─⟦25fab149a⟧ └─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7 └─ ⟦f494b5154⟧ »DATA« └─⟦25fab149a⟧ └─ ⟦this⟧ »../../dtia/release_sun_2.1/inetd_check.l« └─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6 └─ ⟦0c25cb74a⟧ »DATA« └─⟦be254d495⟧ └─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7 └─ ⟦f494b5154⟧ »DATA« └─⟦be254d495⟧ └─ ⟦this⟧ »../../dtia/release_aix_2.1/inetd_check.l« └─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6 └─ ⟦0c25cb74a⟧ »DATA« └─⟦c67979795⟧ └─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7 └─ ⟦f494b5154⟧ »DATA« └─⟦c67979795⟧ └─ ⟦this⟧ »../../dtia/release_hp_2.1/inetd_check.l«
%{ #ifndef lint #ifndef DEBUG static char SCCS_id[] = "@(#)inetd_check.l 2.1 90/08/02 19:22:25 Copyright(c) 1990 by Rational."; #else static char SCCS_id[] = "DEBUG @(#)inetd_check.l 2.1 90/08/02 19:22:25 Copyright(c) 1990 by Rational."; #endif #endif #ifndef X_OK #include <sys/file.h> #endif char *rindex(); #define DTIA 1 #define SOMETHING_ELSE 2 %} %% ^"dtia" return DTIA; [^ \t\n]+ return SOMETHING_ELSE; [ \t\n]+ ; %% static char *install_dir; static what_to_do() { fprintf(stderr, "\n\tAdd to (or modify in) /etc/inetd.conf the following line:\n"); fprintf(stderr, "dtia\tstream\ttcp\tnowait\troot\t%s/in.dtia\tin.dtia\n\n", install_dir); exit(1); } static check_equality(s) char *s; { if (strcmp(s,yytext)) { fprintf(stderr, "Expecting <%s> in dtia line in /etc/inetd.conf but got <%s>\n", s,yytext); what_to_do(); } } static check_path_name() { char *tail; if (yytext[0] != '/') { fprintf(stderr,"%s must be an absolute pathname\n",yytext); what_to_do(); } tail = rindex(yytext,'/'); if ( (tail==NULL) || (strcmp(tail+1,"in.dtia")) ) { fprintf(stderr,"%s must end by in.dtia\n",yytext); what_to_do(); } *tail = '\0'; check_equality(install_dir); *tail = '/'; if (access(yytext,F_OK) == -1) { fprintf(stderr,"%s: Not Accessible\n",yytext); what_to_do(); } if (access(yytext,X_OK) == -1) { fprintf(stderr,"%s: Not Executable\n",yytext); what_to_do(); } } main(argc,argv) int argc; char **argv; { int item; if (argc-2) exit(1); install_dir = argv[1]; while ( (item = yylex()) == SOMETHING_ELSE ) ; if (item == DTIA) { item = yylex(); /* Should be "stream" */ check_equality("stream"); item = yylex(); /* Should be "tcp" */ check_equality("tcp"); item = yylex(); /* Should be "nowait" */ check_equality("nowait"); item = yylex(); /* Should be "root" */ check_equality("root"); item = yylex(); /* Should be a valid file_name ended by "in.dtia" */ check_path_name (); item = yylex(); /* Should be "in.dtia" */ check_equality("in.dtia"); } else { /* Missing line in /etc/inetc.conf */ fprintf(stderr,"Missing dtia line in /etc/inetd.conf\n"); what_to_do(); } }