From 2ce085d2e49282262e1b49b636a43d5a45c23e18 Mon Sep 17 00:00:00 2001 From: mar Date: Mon, 19 Mar 1990 17:55:50 +0000 Subject: [PATCH] sms -> moira --- backup/Makefile | 4 +-- db/Makefile | 12 ++++----- db/class.qc | 2 +- db/imembers.qc | 2 +- dbck/Makefile | 32 +++++++++++++++++++--- dbck/dbck.h | 4 +-- dbck/dbck.qc | 2 +- dbck/fix.qc | 10 +++---- dbck/phase1.qc | 2 +- dbck/phase2.qc | 4 +-- dbck/phase4.qc | 2 +- dcm/Makefile | 18 +++++-------- dcm/dcm.c | 52 +++++++++++++++++------------------ dcm/startdcm.c | 4 +-- dcm/utils.c | 10 +++---- gen/Makefile | 32 +++++++++++----------- gen/aliases.qc | 20 +++++++------- gen/aliases.sh | 4 +-- gen/hesiod.qc | 64 ++++++++++++++++++++++---------------------- gen/hesiod.sh | 20 +++++++------- gen/install_dirs | 4 +-- gen/mailhub.qc | 34 +++++++++++------------ gen/mitdir.qc | 20 +++++++------- gen/nfs.qc | 34 +++++++++++------------ gen/nfs.sh | 20 +++++++------- gen/passwd.dc | 20 +++++++------- gen/passwd.sh | 4 +-- gen/util.c | 10 +++---- gen/zero_quotas | 4 +-- include/dcm.h | 6 ++--- incremental/Makefile | 13 ++++----- incremental/afs.c | 4 +-- reg_svr/Makefile | 14 +++++----- reg_svr/reg_svr.c | 54 ++++++++++++++++++------------------- reg_svr/reg_svr.h | 6 ++--- reg_svr/requests.c | 17 +++--------- reg_svr/startreg.c | 4 +-- server/startmoira.c | 12 ++++----- 38 files changed, 293 insertions(+), 287 deletions(-) diff --git a/backup/Makefile b/backup/Makefile index e0a3bc5c..1d1558f7 100644 --- a/backup/Makefile +++ b/backup/Makefile @@ -24,8 +24,8 @@ mrrestore: rest_db.o rest1.o rest.o dumprest.o copy_backups: copy_backups.c cc -o $@ ${CFLAGS} -I../include copy_backups.c \ - ../update/sms_update.o -L../lib \ - -lsms -lgdb -lkrb -ldes -lmisc + ../update/mr_update.o -L../lib \ + -lmoira -lgdb -lkrb -ldes -lmisc bkup.qc: ../db/newdb db2bkup.awk cc -E ../db/newdb | awk -f db2bkup.awk > bkup.qc diff --git a/db/Makefile b/db/Makefile index ac29d43a..62449ee8 100644 --- a/db/Makefile +++ b/db/Makefile @@ -18,7 +18,7 @@ CFLAGS= -I../include -O all: newmoira class imembers imembers: imembers.o - cc -o imembers imembers.o ../lib/libsms.a ${INGLIB} + cc -o imembers imembers.o ../lib/libmoira.a ${INGLIB} imembers.c: imembers.qc newmoira: ${OBJS} @@ -30,7 +30,7 @@ tables.c: newdb db2tbls.awk awk -f db2tbls.awk < newdb > tables.c class: class.o - cc -o class class.o ../lib/libsms.a ${INGLIB} + cc -o class class.o ../lib/libmoira.a ${INGLIB} class.c: class.qc @@ -49,7 +49,7 @@ depend: ${SRCS} newmoira.o: newmoira.c ../include/mit-copyright.h /usr/include/stdio.h newmoira.o: ../server/query.h tables.o: tables.c -imembers.o: imembers.c /usr/include/stdio.h ../include/sms.h -imembers.o: ../include/sms_et.h -class.o: class.c ../include/mit-copyright.h ../include/sms.h -class.o: ../include/sms_et.h +imembers.o: imembers.c /usr/include/stdio.h ../include/moira.h +imembers.o: ../include/mr_et.h +class.o: class.c ../include/mit-copyright.h ../include/moira.h +class.o: ../include/mr_et.h diff --git a/db/class.qc b/db/class.qc index ad0d81d7..450e7f84 100644 --- a/db/class.qc +++ b/db/class.qc @@ -8,7 +8,7 @@ */ #include -#include +#include main() diff --git a/db/imembers.qc b/db/imembers.qc index 5df97a06..8287d7d7 100644 --- a/db/imembers.qc +++ b/db/imembers.qc @@ -1,6 +1,6 @@ #include -#include +#include struct mem { int parent; diff --git a/dbck/Makefile b/dbck/Makefile index 01c6da72..9dcdcd4e 100644 --- a/dbck/Makefile +++ b/dbck/Makefile @@ -8,17 +8,18 @@ .SUFFIXES: .SUFFIXES: .o .c .qc -CFLAGS= -I../include -g +CFLAGS= -I../include -O +SRCS = dbck.c fix.c phase1.c phase2.c phase3.c phase4.c members.c OBJS = dbck.o fix.o phase1.o phase2.o phase3.o phase4.o -EQLIBS = ../lib/libsms.a ../server/libsmsglue.a \ +EQLIBS = ../lib/libmoira.a ../server/libmoiraglue.a \ /usr/rtingres/lib/libqlib /usr/rtingres/lib/compatlib .qc.c: /usr/rtingres/bin/eqc -p $*.qc -all: dbck +all: dbck members dbck: ${OBJS} cc -o $@ ${CFLAGS} ${OBJS} ${EQLIBS} @@ -36,6 +37,8 @@ phase3.c: phase3.qc phase4.o: phase4.c phase4.c: phase4.qc +members: members.o + cc -o members members.o ${EQLIBS} clean: rm -f *.o @@ -43,4 +46,25 @@ clean: rm -f core *~ install: dbck - install dbck ../bin/dbck + install -c dbck ../bin/dbck + +depend: ${SRCS} + mkdep ${CFLAGS} ${SRCS} + +# DO NOT DELETE THIS LINE -- mkdep uses it. + +dbck.o: dbck.c ../include/mit-copyright.h /usr/include/stdio.h +dbck.o: /usr/include/strings.h /usr/include/signal.h dbck.h +dbck.o: ../include/moira_site.h +fix.o: fix.c ../include/mit-copyright.h ../include/moira.h ../include/mr_et.h +fix.o: /usr/include/stdio.h dbck.h ../include/moira_site.h +phase1.o: phase1.c ../include/mit-copyright.h ../include/moira.h +phase1.o: ../include/mr_et.h dbck.h ../include/moira_site.h +phase2.o: phase2.c ../include/mit-copyright.h /usr/include/stdio.h +phase2.o: ../include/moira.h ../include/mr_et.h dbck.h +phase2.o: ../include/moira_site.h +phase3.o: phase3.c ../include/mit-copyright.h dbck.h ../include/moira_site.h +phase4.o: phase4.c ../include/mit-copyright.h ../include/moira.h +phase4.o: ../include/mr_et.h dbck.h ../include/moira_site.h +members.o: members.c /usr/include/stdio.h /usr/include/signal.h +members.o: ../include/moira.h ../include/mr_et.h diff --git a/dbck/dbck.h b/dbck/dbck.h index 0753c4ef..f876ebbd 100644 --- a/dbck/dbck.h +++ b/dbck/dbck.h @@ -1,13 +1,13 @@ /* $Header$ * - * Declarations for SMS database consistancy checker + * Declarations for Moira database consistancy checker * * (c) Copyright 1988 by the Massachusetts Institute of Technology. * For copying and distribution information, please see the file * . */ -#include +#include #include #define NULL 0 diff --git a/dbck/dbck.qc b/dbck/dbck.qc index b9503759..b56b0ebf 100644 --- a/dbck/dbck.qc +++ b/dbck/dbck.qc @@ -1,6 +1,6 @@ /* $Header$ * - * SMS database consistency checker + * Moira database consistency checker * * (c) Copyright 1988 by the Massachusetts Institute of Technology. * For copying and distribution information, please see the file diff --git a/dbck/fix.qc b/dbck/fix.qc index 2ecdecfb..6a05e78f 100644 --- a/dbck/fix.qc +++ b/dbck/fix.qc @@ -1,6 +1,6 @@ /* $Header$ * - * User interface routines for dbck (SMS database consistency checker) + * User interface routines for dbck (Moira database consistency checker) * * (c) Copyright 1988 by the Massachusetts Institute of Technology. * For copying and distribution information, please see the file @@ -8,7 +8,7 @@ */ #include -#include +#include #include #include "dbck.h" @@ -165,12 +165,12 @@ int set_next_object_id(object, table) ## repeat retrieve (value = v.#value) where v.#name = @name ## inquire_equel(rowcount = "rowcount") if (rowcount != 1) - return(SMS_NO_ID); + return(MR_NO_ID); ## retrieve (exists = any(tbl.name where tbl.name = value)) ## inquire_equel(rowcount = "rowcount") if (rowcount != 1) - return(SMS_NO_ID); + return(MR_NO_ID); while (exists) { value++; if (value > MAX_ID_VALUE) @@ -181,7 +181,7 @@ int set_next_object_id(object, table) printf("setting ID %s to %d\n", name, value); ## repeat replace v (#value = @value) where v.#name = @name modified("values"); - return(SMS_SUCCESS); + return(MR_SUCCESS); ##} diff --git a/dbck/phase1.qc b/dbck/phase1.qc index 7d7d33ee..978c5aef 100644 --- a/dbck/phase1.qc +++ b/dbck/phase1.qc @@ -6,7 +6,7 @@ */ #include -#include +#include #include "dbck.h" static char phase1_qc_rcsid[] = "$Header$"; diff --git a/dbck/phase2.qc b/dbck/phase2.qc index d558c57b..363e92c6 100644 --- a/dbck/phase2.qc +++ b/dbck/phase2.qc @@ -7,7 +7,7 @@ #include #include -#include +#include #include "dbck.h" static char phase2_qc_rcsid[] = "$Header$"; @@ -406,7 +406,7 @@ int hint; id2 = f->filsys_id; id3 = f->mach_id; if (set_next_object_id("nfsphys_id", "nfsphys") != - SMS_SUCCESS) { + MR_SUCCESS) { printf("Unable to assign unique ID\n"); return; } diff --git a/dbck/phase4.qc b/dbck/phase4.qc index 7ac4fc8a..f31ee2ab 100644 --- a/dbck/phase4.qc +++ b/dbck/phase4.qc @@ -6,7 +6,7 @@ */ #include -#include +#include #include "dbck.h" static char phase4_qc_rcsid[] = "$Header$"; diff --git a/dcm/Makefile b/dcm/Makefile index 4fb6ddd2..4d671deb 100644 --- a/dcm/Makefile +++ b/dcm/Makefile @@ -16,11 +16,11 @@ LDFLAGS = -L${SMS_DIR}/lib -L${SMS_DIR}/server QLIBS= ${INGRES_DIR}/lib/libqlib ${INGRES_DIR}/lib/compatlib -# Libraries that talk to the SMS server: -SERVER_LIBS = -lsmsglue -lsms -lgdb -lzephyr -lkrb -ldes -lcom_err $(QLIBS) +# Libraries that talk to the MOIRA server: +SERVER_LIBS = -lmoiraglue -lmoira -lgdb -lzephyr -lkrb -ldes -lcom_err $(QLIBS) DCM_SRCS = dcm.c utils.c -DCM_OBJS = dcm.o utils.o ../update/sms_update.o +DCM_OBJS = dcm.o utils.o ../update/moira_update.o all: dcm startdcm @@ -61,14 +61,10 @@ depend: dcm.o: dcm.c /usr/include/stdio.h ../include/update.h /usr/include/sys/file.h dcm.o: /usr/include/sys/time.h /usr/include/sys/time.h dcm.o: /usr/include/sys/wait.h /usr/include/signal.h /usr/include/ctype.h -dcm.o: ../include/sms.h /usr/include/sms_et.h ../include/sms_app.h +dcm.o: ../include/moira.h ../include/mr_et.h ../include/moira_site.h dcm.o: ../include/mit-copyright.h ../include/dcm.h utils.o: utils.c ../include/mit-copyright.h /usr/include/stdio.h -utils.o: /usr/include/strings.h /usr/include/varargs.h +utils.o: /usr/include/strings.h /usr/include/errno.h /usr/include/varargs.h utils.o: /usr/include/sys/types.h /usr/include/sys/time.h -utils.o: /usr/include/sys/time.h /usr/include/sys/file.h -utils.o: /usr/include/zephyr/zephyr.h /usr/include/zephyr/mit-copyright.h -utils.o: /usr/include/zephyr/zephyr_err.h /usr/include/zephyr/zephyr_conf.h -utils.o: /usr/include/errno.h /usr/include/netinet/in.h ../include/krb.h -utils.o: ../include/des.h ../include/sms.h /usr/include/sms_et.h -utils.o: ../include/sms_app.h ../include/dcm.h +utils.o: /usr/include/sys/time.h /usr/include/sys/file.h ../include/moira.h +utils.o: ../include/mr_et.h ../include/moira_site.h ../include/dcm.h diff --git a/dcm/dcm.c b/dcm/dcm.c index 91de354d..29de2d7e 100644 --- a/dcm/dcm.c +++ b/dcm/dcm.c @@ -1,5 +1,5 @@ /* - * The Data Control Manager for SMS. + * The Data Control Manager for MOIRA. * * Copyright 1987, 1988 by the Massachusetts Institute of Technology. * For copying and distribution information, see the file @@ -21,8 +21,8 @@ static char rcsid_dcm_c[] = "$Header$"; #include #include #include -#include -#include +#include +#include #include "dcm.h" #include "mit-copyright.h" @@ -70,19 +70,19 @@ char *argv[]; exit(1); } - if (status = sms_connect("")) { - com_err(whoami, status, " on sms_connect"); + if (status = mr_connect("")) { + com_err(whoami, status, " on mr_connect"); leave("connect failed"); } - if (status = sms_auth("dcm")) { + if (status = mr_auth("dcm")) { com_err(whoami, status, " on \"authenticate\""); leave("auth failed"); } /* if DCM is not enabled, exit after logging */ qargv[0] = "dcm_enable"; - if (status = sms_query("get_value", 1, qargv, gqval, &i)) { + if (status = mr_query("get_value", 1, qargv, gqval, &i)) { com_err(whoami, status, " check dcm_enable"); leave("query failed"); } @@ -164,7 +164,7 @@ do_services() qargv[1] = "dontcare"; qargv[2] = "false"; sq = sq_create(); - if (status = sms_query_with_retry("qualified_get_server", 3, qargv, + if (status = mr_query_with_retry("qualified_get_server", 3, qargv, qgetsv, sq)) { com_err(whoami, status, " getting services"); leave("query failed"); @@ -184,7 +184,7 @@ do_services() sprintf(dfgen_cmd, "exec %s %s/%s.out", dfgen_prog, DCM_DIR, service); gettimeofday(&tv, &tz); - if (status = sms_query_with_retry("get_server_info", 1, qargv, + if (status = mr_query_with_retry("get_server_info", 1, qargv, getsvinfo, &svc)) { com_err(whoami, status, " getting service %s info, skipping to next service", service); continue; @@ -207,9 +207,9 @@ do_services() qargv[3] = strsave("1"); qargv[4] = strsave("0"); qargv[5] = strsave(""); - status = sms_query_with_retry("set_server_internal_flags", 6, + status = mr_query_with_retry("set_server_internal_flags", 6, qargv, scream, NULL); - if (status != SMS_SUCCESS) { + if (status != MR_SUCCESS) { com_err(whoami, status, " setting server state"); goto free_service; } @@ -219,22 +219,22 @@ do_services() waits.w_status = system(dfgen_cmd); signal(SIGCHLD, cstat); if (waits.w_termsig) { - status = SMS_TAR_FAIL; + status = MR_TAR_FAIL; com_err(whoami, status, " %s exited on signal %d", dfgen_prog, waits.w_termsig); } else if (waits.w_retcode) { /* extract the process's exit value */ - status = waits.w_retcode + sms_err_base; + status = waits.w_retcode + ERROR_TABLE_BASE_sms; com_err(whoami, status, " %s exited", dfgen_prog); } if (SOFT_FAIL(status)) { free(qargv[5]); qargv[5] = strsave(error_message(status)); - } else if (status == SMS_NO_CHANGE) { + } else if (status == MR_NO_CHANGE) { free(qargv[2]); qargv[2] = itoa(tv.tv_sec); svc.dfcheck = tv.tv_sec; - } else if (status == SMS_SUCCESS) { + } else if (status == MR_SUCCESS) { free(qargv[1]); free(qargv[2]); qargv[1] = itoa(tv.tv_sec); @@ -254,7 +254,7 @@ do_services() free_service: free(qargv[3]); qargv[3] = strsave("0"); - status = sms_query_with_retry("set_server_internal_flags", 6, + status = mr_query_with_retry("set_server_internal_flags", 6, qargv, scream, NULL); if (status) com_err(whoami, status, " setting service state"); @@ -338,9 +338,9 @@ struct service *svc; argv[1] = "TRUE"; argv[2] = argv[3] = argv[4] = "DONTCARE"; argv[5] = "FALSE"; - status = sms_query_with_retry("qualified_get_server_host", 6, argv, + status = mr_query_with_retry("qualified_get_server_host", 6, argv, qgethost, sq); - if (status == SMS_NO_MATCH) { + if (status == MR_NO_MATCH) { return; } else if (status) { com_err(whoami, status, " getting server_hosts for %s", svc->service); @@ -350,7 +350,7 @@ struct service *svc; if (dbg & DBG_TRACE) com_err(whoami, 0, "checking %s...", machine); argv[1] = machine; - status = sms_query_with_retry("get_server_host_info", 2, argv, + status = mr_query_with_retry("get_server_host_info", 2, argv, gethostinfo, &shost); if (status) { com_err(whoami,status, " getting server_host_info for %s", machine); @@ -374,16 +374,16 @@ struct service *svc; argv[6] = strsave(""); argv[7] = itoa(tv.tv_sec); argv[8] = itoa(shost.lastsuccess); - status = sms_query_with_retry("set_server_host_internal", 9, argv, + status = mr_query_with_retry("set_server_host_internal", 9, argv, scream, NULL); - if (status != SMS_SUCCESS) { + if (status != MR_SUCCESS) { com_err(whoami,status," while setting internal state for %s:%s", svc->service, machine); goto free_mach; } - status = sms_update_server(svc->service, machine, svc->target, + status = mr_update_server(svc->service, machine, svc->target, svc->script); - if (status == SMS_SUCCESS) { + if (status == MR_SUCCESS) { argv[2] = "0"; argv[3] = "1"; free(argv[8]); @@ -409,7 +409,7 @@ struct service *svc; qargv[3] = strsave("0"); qargv[4] = itoa(svc->harderror); qargv[5] = strsave(svc->errmsg); - status = sms_query_with_retry("set_server_internal_flags", + status = mr_query_with_retry("set_server_internal_flags", 6, qargv, scream, NULL); if (status) com_err(whoami, status, " setting service state again"); @@ -423,7 +423,7 @@ struct service *svc; free(argv[2]); argv[4] = "0"; free(argv[5]); - status = sms_query_with_retry("set_server_host_internal", + status = mr_query_with_retry("set_server_host_internal", 9, argv,scream,NULL); if (status) com_err(whoami, status, " setting host state again"); @@ -434,7 +434,7 @@ struct service *svc; } argv[4] = "0"; close(lock_fd); - status = sms_query_with_retry("set_server_host_internal", 9, argv, + status = mr_query_with_retry("set_server_host_internal", 9, argv, scream, NULL); if (status) com_err(whoami, status, " setting host state again"); diff --git a/dcm/startdcm.c b/dcm/startdcm.c index 7ba2b07b..bae11783 100644 --- a/dcm/startdcm.c +++ b/dcm/startdcm.c @@ -12,7 +12,7 @@ */ #ifndef lint -static char *rcsid_sms_starter_c = "$Header$"; +static char *rcsid_mr_starter_c = "$Header$"; #endif lint #include @@ -23,7 +23,7 @@ static char *rcsid_sms_starter_c = "$Header$"; #include #include #include -#include +#include #define PROG "dcm" diff --git a/dcm/utils.c b/dcm/utils.c index 8c3f6571..db51555b 100644 --- a/dcm/utils.c +++ b/dcm/utils.c @@ -23,8 +23,8 @@ static char *rcsid_utils_c = "$Header$"; #include #include #include -#include -#include +#include +#include #include "dcm.h" @@ -114,7 +114,7 @@ int exclusive; } -int sms_query_with_retry(name, argc, argv, proc, hint) +int mr_query_with_retry(name, argc, argv, proc, hint) char *name; int argc; char **argv; @@ -124,8 +124,8 @@ char *hint; int status, tries; for (tries = 0; tries < DEADLOCK_TRIES; tries++) { - status = sms_query(name, argc, argv, proc, hint); - if (status != SMS_DEADLOCK) + status = mr_query(name, argc, argv, proc, hint); + if (status != MR_DEADLOCK) return(status); sleep(DEADLOCK_WAIT); } diff --git a/gen/Makefile b/gen/Makefile index a0e90df3..774101f9 100644 --- a/gen/Makefile +++ b/gen/Makefile @@ -1,7 +1,7 @@ # $Header$ SRCS= passwd.c aliases.c hesiod.c nfs.c mailhub.c mitdir.c util.c setquota.c -LIBS= -L../lib -lsms -lcom_err -lzephyr -lkrb -ldes \ +LIBS= -L../lib -lmoira -lcom_err -lzephyr -lkrb -ldes \ /usr/rtingres/lib/libqlib /usr/rtingres/lib/compatlib CFLAGS= -I../include -O .SUFFIXES: .qc @@ -73,36 +73,36 @@ depend: ${SRCS} # DO NOT DELETE THIS LINE -- mkdep uses it. passwd.o: passwd.c ../include/mit-copyright.h /usr/include/stdio.h -passwd.o: ../include/sms.h ../include/sms_et.h /usr/include/sys/types.h +passwd.o: ../include/moira.h ../include/mr_et.h /usr/include/sys/types.h passwd.o: /usr/include/sys/stat.h /usr/include/sys/time.h passwd.o: /usr/include/sys/time.h aliases.o: aliases.c ../include/mit-copyright.h /usr/include/stdio.h -aliases.o: /usr/include/string.h /usr/include/strings.h ../include/sms.h -aliases.o: ../include/sms_et.h ../include/sms_app.h /usr/include/sys/types.h -aliases.o: /usr/include/sys/stat.h /usr/include/sys/time.h -aliases.o: /usr/include/sys/time.h +aliases.o: /usr/include/string.h /usr/include/strings.h ../include/moira.h +aliases.o: ../include/mr_et.h ../include/moira_site.h +aliases.o: /usr/include/sys/types.h /usr/include/sys/stat.h +aliases.o: /usr/include/sys/time.h /usr/include/sys/time.h hesiod.o: hesiod.c ../include/mit-copyright.h /usr/include/stdio.h -hesiod.o: ../include/sms.h ../include/sms_et.h ../include/sms_app.h +hesiod.o: ../include/moira.h ../include/mr_et.h ../include/moira_site.h hesiod.o: /usr/include/sys/types.h /usr/include/sys/stat.h hesiod.o: /usr/include/sys/time.h /usr/include/sys/time.h hesiod.o: /usr/include/ctype.h -nfs.o: nfs.c ../include/mit-copyright.h /usr/include/stdio.h ../include/sms.h -nfs.o: ../include/sms_et.h ../include/sms_app.h /usr/include/sys/types.h -nfs.o: /usr/include/sys/stat.h /usr/include/sys/time.h -nfs.o: /usr/include/sys/time.h +nfs.o: nfs.c ../include/mit-copyright.h /usr/include/stdio.h +nfs.o: ../include/moira.h ../include/mr_et.h ../include/moira_site.h +nfs.o: /usr/include/sys/types.h /usr/include/sys/stat.h +nfs.o: /usr/include/sys/time.h /usr/include/sys/time.h mailhub.o: mailhub.c ../include/mit-copyright.h /usr/include/stdio.h mailhub.o: /usr/include/string.h /usr/include/strings.h /usr/include/ctype.h -mailhub.o: ../include/sms.h ../include/sms_et.h ../include/sms_app.h +mailhub.o: ../include/moira.h ../include/mr_et.h ../include/moira_site.h mailhub.o: /usr/include/sys/types.h /usr/include/sys/stat.h mailhub.o: /usr/include/sys/time.h /usr/include/sys/time.h mitdir.o: mitdir.c ../include/mit-copyright.h /usr/include/stdio.h -mitdir.o: /usr/include/string.h /usr/include/strings.h ../include/sms.h -mitdir.o: ../include/sms_et.h ../include/sms_app.h /usr/include/sys/types.h +mitdir.o: /usr/include/string.h /usr/include/strings.h ../include/moira.h +mitdir.o: ../include/mr_et.h ../include/moira_site.h /usr/include/sys/types.h mitdir.o: /usr/include/sys/stat.h /usr/include/sys/time.h mitdir.o: /usr/include/sys/time.h util.o: util.c ../include/mit-copyright.h /usr/include/stdio.h -util.o: /usr/include/sys/time.h /usr/include/sys/time.h ../include/sms.h -util.o: ../include/sms_et.h ../include/sms_app.h +util.o: /usr/include/sys/time.h /usr/include/sys/time.h ../include/moira.h +util.o: ../include/mr_et.h ../include/moira_site.h setquota.o: setquota.c /usr/include/stdio.h /usr/include/ctype.h setquota.o: /usr/include/mntent.h /usr/include/sys/file.h setquota.o: /usr/include/sys/param.h /usr/include/machine/machparam.h diff --git a/gen/aliases.qc b/gen/aliases.qc index d00e1a3c..a1085874 100644 --- a/gen/aliases.qc +++ b/gen/aliases.qc @@ -15,8 +15,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -60,18 +60,18 @@ char **argv; if (flag1 < 0 && flag2 < 0 && flag3 < 0) { fprintf(stderr, "File %s does not need to be rebuilt.\n", argv[1]); - exit(SMS_NO_CHANGE); + exit(MR_NO_CHANGE); } } targetfile = argv[1]; sprintf(filename, "%s~", targetfile); if ((out = fopen(filename, "w")) == NULL) { fprintf(stderr, "unable to open %s for output\n", filename); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } } else if (argc != 1) { fprintf(stderr, "usage: %s [outfile]\n", argv[0]); - exit(SMS_ARGS); + exit(MR_ARGS); } fprintf(out, "%s\n# Aliases File Extract of %s", divide, ctime(&tm)); @@ -91,12 +91,12 @@ char **argv; if (fclose(out)) { perror("close failed"); - exit(SMS_CCONFIG); + exit(MR_CCONFIG); } if (argc == 2) fix_file(targetfile); - exit(SMS_SUCCESS); + exit(MR_SUCCESS); } @@ -115,12 +115,12 @@ static int ingerr(num) switch (*num) { case INGRES_DEADLOCK: - ingres_errno = SMS_DEADLOCK; + ingres_errno = MR_DEADLOCK; break; default: - ingres_errno = SMS_INGRES_ERR; + ingres_errno = MR_INGRES_ERR; } - com_err(whoami, SMS_INGRES_ERR, " code %d\n", *num); + com_err(whoami, MR_INGRES_ERR, " code %d\n", *num); critical_alert("DCM", "Alias build encountered INGRES ERROR %d", *num); exit(ingres_errno); } diff --git a/gen/aliases.sh b/gen/aliases.sh index d6c2f8af..22a29ff4 100644 --- a/gen/aliases.sh +++ b/gen/aliases.sh @@ -1,5 +1,5 @@ #!/bin/sh -SMS_MKCRED=47836474 +MR_MKCRED=47836474 if [ `hostname`x != MITx ]; then /bin/diff /usr/lib/aliases /usr/lib/aliases.new > /tmp/aliasdiff fi @@ -7,7 +7,7 @@ if [ `hostname`x != MITx ]; then /bin/cp /dev/null /usr/lib/aliases.new.pag /usr/lib/sendmail -bi -oA/usr/lib/aliases.new if [ $? != 0 ]; then - exit $SMS_MKCRED + exit $MR_MKCRED fi if [ `hostname`x = MITx ]; then kill `/bin/ps ax | /bin/grep "accepting connections" | /bin/grep -v grep | /bin/awk '{print $1}'` diff --git a/gen/hesiod.qc b/gen/hesiod.qc index 0a6d5119..fbaccd47 100644 --- a/gen/hesiod.qc +++ b/gen/hesiod.qc @@ -11,8 +11,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -55,7 +55,7 @@ char **argv; if (argc > 2) { fprintf(stderr, "usage: %s [outfile]\n", argv[0]); - exit(SMS_ARGS); + exit(MR_ARGS); } IIseterr(ingerr); @@ -79,17 +79,17 @@ char **argv; if (!changed) { fprintf(stderr, "No files updated.\n"); if (argc == 2 && stat(argv[1], &sb) == 0) - exit(SMS_NO_CHANGE); + exit(MR_NO_CHANGE); } if (argc == 2) { fprintf(stderr, "Building tar file.\n"); sprintf(cmd, "cd %s; tar cf %s .", hesiod_dir, argv[1]); if (system(cmd)) - exit(SMS_TAR_FAIL); + exit(MR_TAR_FAIL); } - exit(SMS_SUCCESS); + exit(MR_SUCCESS); } @@ -107,12 +107,12 @@ static int ingerr(num) switch (*num) { case INGRES_DEADLOCK: - ingres_errno = SMS_DEADLOCK; + ingres_errno = MR_DEADLOCK; break; default: - ingres_errno = SMS_INGRES_ERR; + ingres_errno = MR_INGRES_ERR; } - com_err(whoami, SMS_INGRES_ERR, " code %d\n", *num); + com_err(whoami, MR_INGRES_ERR, " code %d\n", *num); critical_alert("DCM", "Hesiod build encountered INGRES ERROR %d", *num); exit(ingres_errno); } @@ -167,19 +167,19 @@ do_passwd() pout = fopen(poutft, "w"); if (!pout) { perror("cannot open passwd.db~ for write"); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } sprintf(uoutft, "%s~", uoutf); uout = fopen(uoutft, "w"); if (!uout) { perror("cannot open uid.db~ for write"); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } sprintf(boutft, "%s~", boutf); bout = fopen(boutft, "w"); if (!bout) { perror("cannot open pobox.db for write"); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } fprintf(stderr, "Building passwd.db, uid.db, and pobox.db\n"); @@ -214,7 +214,7 @@ do_passwd() if (fclose(pout) || fclose(uout) || fclose(bout)) { fprintf(stderr, "Unsuccessful file close of passwd.db, uid.db, or pobox.db\n"); - exit(SMS_CCONFIG); + exit(MR_CCONFIG); } fix_file(poutf); fix_file(uoutf); @@ -260,19 +260,19 @@ do_groups() iout = fopen(buf, "w"); if (!iout) { perror("cannot open gid.db for write"); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } sprintf(buf, "%s~", goutf); gout = fopen(buf, "w"); if (!gout) { perror("cannot open group.db for write"); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } sprintf(buf, "%s~", loutf); lout = fopen(buf, "w"); if (!lout) { perror("cannot open grplist.db for write"); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } fprintf(stderr, "Building gid.db, group.db, and grplist.db\n"); @@ -342,7 +342,7 @@ do_groups() if (fclose(iout) || fclose(gout) || fclose(lout)) { fprintf(stderr, "Unsuccessful close of gid.db, group.db, or grplist.db\n"); - exit(SMS_CCONFIG); + exit(MR_CCONFIG); } fix_file(ioutf); fix_file(goutf); @@ -387,7 +387,7 @@ do_filsys() out = fopen(outft, "w"); if (!out) { perror("cannot open filsys.db for write"); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } fprintf(stderr, "Building filsys.db\n"); @@ -469,7 +469,7 @@ do_filsys() if (fclose(out)) { fprintf(stderr, "Unsuccessful close of filsys.db\n"); - exit(SMS_CCONFIG); + exit(MR_CCONFIG); } fix_file(outf); return(1); @@ -541,7 +541,7 @@ do_cluster() out = fopen(outft, "w"); if (!out) { perror("cannot open cluster.db for write"); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } fprintf(stderr, "Building cluster.db\n"); @@ -581,7 +581,7 @@ do_cluster() strtrim(label); strtrim(data); fprintf(out, - "smsinternal-%d.cluster\tHS %s \"%s %s\"\n", + "mrinternal-%d.cluster\tHS %s \"%s %s\"\n", mid, HTYPE, label, data); ## } } @@ -602,7 +602,7 @@ do_cluster() fprintf(out, "%s.cluster\tHS CNAME %s.cluster\n", machbuf, name); else - fprintf(out, "%s.cluster\tHS CNAME smsinternal-%d.cluster\n", + fprintf(out, "%s.cluster\tHS CNAME mrinternal-%d.cluster\n", machbuf, mid); } for (id = mid + 1; id < maxmach; id++) { @@ -618,7 +618,7 @@ do_cluster() machbuf, name); else fprintf(out, - "%s.cluster\tHS CNAME smsinternal-%d.cluster\n", + "%s.cluster\tHS CNAME mrinternal-%d.cluster\n", machbuf, mid); } } @@ -640,7 +640,7 @@ do_cluster() if (fclose(out)) { fprintf(stderr, "Unsuccessful close of cluster.db\n"); - exit(SMS_CCONFIG); + exit(MR_CCONFIG); } fix_file(outf); return(1); @@ -673,7 +673,7 @@ do_printcap() out = fopen(outft, "w"); if (!out) { perror("cannot open printcap.db for write"); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } fprintf(stderr, "Building printcap.db\n"); @@ -691,7 +691,7 @@ do_printcap() if (fclose(out)) { fprintf(stderr, "Unsuccessful close of pcap.db\n"); - exit(SMS_CCONFIG); + exit(MR_CCONFIG); } fix_file(outf); return(1); @@ -726,7 +726,7 @@ do_palladium() out = fopen(outft, "w"); if (!out) { perror("cannot open palladium.db for write"); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } fprintf(stderr, "Building palladium.db\n"); @@ -749,7 +749,7 @@ do_palladium() if (fclose(out)) { fprintf(stderr, "Unsuccessful close of palladium.db\n"); - exit(SMS_CCONFIG); + exit(MR_CCONFIG); } fix_file(outf); return(1); @@ -784,7 +784,7 @@ do_sloc() out = fopen(outft, "w"); if (!out) { perror("cannot open sloc.db for write"); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } fprintf(stderr, "Building sloc.db\n"); @@ -800,7 +800,7 @@ do_sloc() if (fclose(out)) { fprintf(stderr, "Unsuccessful close of sloc.db\n"); - exit(SMS_CCONFIG); + exit(MR_CCONFIG); } fix_file(outf); @@ -833,7 +833,7 @@ do_service() out = fopen(outft, "w"); if (!out) { perror("cannot open service.db for write"); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } fprintf(stderr, "Building service.db\n"); @@ -856,7 +856,7 @@ do_service() if (fclose(out)) { fprintf(stderr, "Unsuccessful close of service.db\n"); - exit(SMS_CCONFIG); + exit(MR_CCONFIG); } fix_file(outf); return(1); diff --git a/gen/hesiod.sh b/gen/hesiod.sh index 7eb14b4e..fdd148aa 100644 --- a/gen/hesiod.sh +++ b/gen/hesiod.sh @@ -4,11 +4,11 @@ echo '$Header$' # The following exit codes are defined and MUST BE CONSISTENT with the -# SMS error codes the library uses: -set SMS_HESFILE = 47836472 -set SMS_MISSINGFILE = 47836473 -set SMS_NAMED = 47836475 -set SMS_TARERR = 47836476 +# MR error codes the library uses: +set MR_HESFILE = 47836472 +set MR_MISSINGFILE = 47836473 +set MR_NAMED = 47836475 +set MR_TARERR = 47836476 umask 22 @@ -36,7 +36,7 @@ if (! -d $SRC_DIR) then endif # Alert if tarfile doesn't exist -if (! -r $TARFILE) exit $SMS_MISSINGFILE +if (! -r $TARFILE) exit $MR_MISSINGFILE # Empty the tar file one file at a time and move each file to the # appropriate place only if it is not zero length. @@ -48,14 +48,14 @@ foreach file (`/bin/tar tf $TARFILE | awk '{print $1}' | sed 's;/$;;'`) echo extracting $file /bin/tar xf $TARFILE $file # Don't put up with errors extracting the information - if ($status) exit $SMS_TARERR + if ($status) exit $MR_TARERR # Make sure the file is not zero-length if (! -z $file) then /bin/mv -f $file $DEST_DIR - if ($status != 0) exit $SMS_HESFILE + if ($status != 0) exit $MR_HESFILE else /bin/rm -f $file - exit $SMS_MISSINGFILE + exit $MR_MISSINGFILE endif end @@ -87,7 +87,7 @@ while ($i < $TIMEOUT) end # Did it time out? -if ($i == $TIMEOUT) exit $SMS_NAMED +if ($i == $TIMEOUT) exit $MR_NAMED # Clean up! /bin/rm -f $TARFILE diff --git a/gen/install_dirs b/gen/install_dirs index d6e7f05e..c22e7a7f 100644 --- a/gen/install_dirs +++ b/gen/install_dirs @@ -2,8 +2,8 @@ # This script installs new directories on NFS servers. # The following exit codes are defined and MUST BE CONSISTENT with the -# SMS error codes the library uses: -set SMS_PROTO = 47836477 +# MR error codes the library uses: +set MR_PROTO = 47836477 set path=(/etc /bin /usr/bin /usr/etc) diff --git a/gen/mailhub.qc b/gen/mailhub.qc index 294dfacf..e70f16c3 100644 --- a/gen/mailhub.qc +++ b/gen/mailhub.qc @@ -12,8 +12,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -56,18 +56,18 @@ char **argv; if (flag < 0) { fprintf(stderr, "File %s does not need to be rebuilt.\n", argv[1]); - exit(SMS_NO_CHANGE); + exit(MR_NO_CHANGE); } } targetfile = argv[1]; sprintf(filename, "%s~", targetfile); if ((out = fopen(filename, "w")) == NULL) { fprintf(stderr, "unable to open %s for output\n", filename); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } } else if (argc != 1) { fprintf(stderr, "usage: %s [outfile]\n", argv[0]); - exit(SMS_ARGS); + exit(MR_ARGS); } fprintf(out, "%s\n# Aliases File Extract of %s", divide, ctime(&tm)); @@ -89,12 +89,12 @@ char **argv; if (fclose(out)) { perror("close failed"); - exit(SMS_CCONFIG); + exit(MR_CCONFIG); } if (argc == 2) fix_file(targetfile); - exit(SMS_SUCCESS); + exit(MR_SUCCESS); } @@ -113,12 +113,12 @@ static int ingerr(num) switch (*num) { case INGRES_DEADLOCK: - ingres_errno = SMS_DEADLOCK; + ingres_errno = MR_DEADLOCK; break; default: - ingres_errno = SMS_INGRES_ERR; + ingres_errno = MR_INGRES_ERR; } - com_err(whoami, SMS_INGRES_ERR, " code %d\n", *num); + com_err(whoami, MR_INGRES_ERR, " code %d\n", *num); critical_alert("DCM", "Alias build encountered INGRES ERROR %d", *num); exit(ingres_errno); } @@ -176,7 +176,7 @@ get_info() if (hash_store(machines, id, strsave(name)) < 0) { #endif fprintf(stderr, "Out of memory!\n"); - exit(SMS_NO_MEM); + exit(MR_NO_MEM); } cnt++; ## } @@ -187,7 +187,7 @@ get_info() ## retrieve (id = strings.string_id, name = strings.string) { if (hash_store(strings, id, strsave(strtrim(name))) < 0) { fprintf(stderr, "Out of memory!\n"); - exit(SMS_NO_MEM); + exit(MR_NO_MEM); } cnt++; ## } @@ -218,7 +218,7 @@ get_info() u->pobox = (char *) NULL; if (hash_store(users, id, u) < 0) { fprintf(stderr, "Out of memory!\n"); - exit(SMS_NO_MEM); + exit(MR_NO_MEM); } cnt++; ## } @@ -238,7 +238,7 @@ get_info() l->m = (struct member *) NULL; if (hash_store(lists, id, l) < 0) { fprintf(stderr, "Out of memory!\n"); - exit(SMS_NO_MEM); + exit(MR_NO_MEM); } cnt++; ## } @@ -353,7 +353,7 @@ int copy; if (ns == NULL) { if ((ns = (struct names *) perm_malloc(sizeof(struct names))) == NULL) { fprintf(stderr, "ran out of memory inserting name (sorting)\n"); - exit(SMS_NO_MEM); + exit(MR_NO_MEM); } if (copy) ns->name = strsave(s); @@ -363,7 +363,7 @@ int copy; ns->id = id; if (hash_store(names, code, ns) < 0) { fprintf(stderr, "Out of memory!\n"); - exit(SMS_NO_MEM); + exit(MR_NO_MEM); } return; } @@ -376,7 +376,7 @@ int copy; if ((ns->next = (struct names *) perm_malloc(sizeof(struct names))) == NULL) { fprintf(stderr, "ran out of memory insterting name (sorting)\n"); - exit(SMS_NO_MEM); + exit(MR_NO_MEM); } ns = ns->next; if (copy) diff --git a/gen/mitdir.qc b/gen/mitdir.qc index 75f75235..f05453a3 100644 --- a/gen/mitdir.qc +++ b/gen/mitdir.qc @@ -12,8 +12,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -49,18 +49,18 @@ char **argv; if (flag1 < 0) { fprintf(stderr, "File %s does not need to be rebuilt.\n", argv[1]); - exit(SMS_NO_CHANGE); + exit(MR_NO_CHANGE); } } targetfile = argv[1]; sprintf(filename, "%s~", targetfile); if ((out = fopen(filename, "w")) == NULL) { fprintf(stderr, "unable to open %s for output\n", filename); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } } else if (argc != 1) { fprintf(stderr, "usage: %s [outfile]\n", argv[0]); - exit(SMS_ARGS); + exit(MR_ARGS); } ## begin transaction @@ -70,12 +70,12 @@ char **argv; if (fclose(out)) { perror("close failed"); - exit(SMS_CCONFIG); + exit(MR_CCONFIG); } if (argc == 2) fix_file(targetfile); - exit(SMS_SUCCESS); + exit(MR_SUCCESS); } @@ -94,12 +94,12 @@ static int ingerr(num) switch (*num) { case INGRES_DEADLOCK: - ingres_errno = SMS_DEADLOCK; + ingres_errno = MR_DEADLOCK; break; default: - ingres_errno = SMS_INGRES_ERR; + ingres_errno = MR_INGRES_ERR; } - com_err(whoami, SMS_INGRES_ERR, " code %d\n", *num); + com_err(whoami, MR_INGRES_ERR, " code %d\n", *num); critical_alert("DCM", "Alias build encountered INGRES ERROR %d", *num); exit(ingres_errno); } diff --git a/gen/nfs.qc b/gen/nfs.qc index 5949a299..fd31591d 100644 --- a/gen/nfs.qc +++ b/gen/nfs.qc @@ -9,8 +9,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -34,7 +34,7 @@ char **argv; if (argc > 2) { fprintf(stderr, "usage: %s [outfile]\n", argv[0]); - exit(SMS_ARGS); + exit(MR_ARGS); } IIseterr(ingerr); @@ -51,17 +51,17 @@ char **argv; if (!changed) { fprintf(stderr, "No files updated.\n"); if (argc == 2 && stat(argv[1], &sb) == 0) - exit(SMS_NO_CHANGE); + exit(MR_NO_CHANGE); } if (argc == 2) { sprintf(cmd, "cd %s; cp %s/nfs/* .; tar cf %s .", nfs_dir, SMS_DIR, argv[1]); if (system(cmd)) - exit(SMS_TAR_FAIL); + exit(MR_TAR_FAIL); } - exit(SMS_SUCCESS); + exit(MR_SUCCESS); } @@ -80,12 +80,12 @@ static int ingerr(num) switch (*num) { case INGRES_DEADLOCK: - ingres_errno = SMS_DEADLOCK; + ingres_errno = MR_DEADLOCK; break; default: - ingres_errno = SMS_INGRES_ERR; + ingres_errno = MR_INGRES_ERR; } - com_err(whoami, SMS_INGRES_ERR, " code %d\n", *num); + com_err(whoami, MR_INGRES_ERR, " code %d\n", *num); critical_alert("DCM", "NFS build encountered INGRES ERROR %d", *num); exit(ingres_errno); } @@ -168,7 +168,7 @@ struct save_queue *lists; fd = fopen(file, "w"); if (!fd) { fprintf(stderr, "cannot open %s for output\n", file); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } ## repeat retrieve (id = m.member_id) ## where m.list_id = l1.list_id and l1.name = @listname and @@ -178,7 +178,7 @@ struct save_queue *lists; ## } if (fclose(fd)) { fprintf(stderr, "error closing %s\n", file); - exit(SMS_CCONFIG); + exit(MR_CCONFIG); } } /* don't free here either @@ -218,7 +218,7 @@ struct hash *do_everyone() fd = fopen(buf, "w"); if (!fd) { fprintf(stderr, "cannot open %s for output\n", buf); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } /* make space for group list */ @@ -312,7 +312,7 @@ struct save_queue *machs; unlink(f2); /* ignore errors on this unlink */ if (link(f1, f2)) { fprintf(stderr, "Cannot link %s to %s\n", f1, f2); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } hash_store(machines, id, machname); } @@ -334,7 +334,7 @@ struct save_queue *machs; fd = fopen(file, "w"); if (!fd) { fprintf(stderr, "cannot open %s for output\n", file); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } prevuid = -1; quotasum = 0; @@ -352,7 +352,7 @@ struct save_queue *machs; fprintf(fd, "%d %d\n", prevuid, quotasum); if (fclose(fd)) { fprintf(stderr, "error closing %s", file); - exit(SMS_CCONFIG); + exit(MR_CCONFIG); } olddev = oldmach = -1; @@ -373,14 +373,14 @@ struct save_queue *machs; fd = fopen(file, "w"); if (!fd) { fprintf(stderr, "cannot open %s for output\n", file); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } } fprintf(fd, "%s %d %d %s\n", strtrim(dir), uid, gid, strtrim(fstype)); ## } if (fclose(fd)) { fprintf(stderr, "error closing %s", file); - exit(SMS_CCONFIG); + exit(MR_CCONFIG); } ## end transaction return(1); diff --git a/gen/nfs.sh b/gen/nfs.sh index 37a949be..f9f6039a 100644 --- a/gen/nfs.sh +++ b/gen/nfs.sh @@ -5,10 +5,10 @@ echo '$Header$' # The following exit codes are defined and MUST BE CONSISTENT with the -# SMS error codes the library uses: -set SMS_NOCRED = 47836470 -set SMS_MKCRED = 47836474 -set SMS_TARERR = 47836476 +# MR error codes the library uses: +set MR_NOCRED = 47836470 +set MR_MKCRED = 47836474 +set MR_TARERR = 47836476 set path=(/etc /bin /usr/bin /usr/etc) set nonomatch @@ -20,7 +20,7 @@ set SRC_DIR=/tmp/nfs.dir # Alert if the tarfile does not exist if (! -r $TARFILE) then - exit $SMS_TARERR + exit $MR_TARERR endif # Create a fresh source directory @@ -28,7 +28,7 @@ rm -rf $SRC_DIR mkdir $SRC_DIR chmod 755 $SRC_DIR -# Note that since SMS is going to be exported, assuming .MIT.EDU is +# Note that since MR is going to be exported, assuming .MIT.EDU is # incorrect. For now however, it is probably not worth the effort # to canonicalize the hostname, especially with the upcoming update # protocol redesign @@ -39,7 +39,7 @@ cd $SRC_DIR # Just extract everything since some of what we need exists as # hardlinks and tar doesn't deal well with extracting them in isolation. tar xf $TARFILE -if ($status) exit $SMS_TARERR +if ($status) exit $MR_TARERR foreach type (dirs quotas) echo "Installing ${type}:" @@ -59,10 +59,10 @@ end # build new credentials files. rm -f /usr/etc/credentials.new cp ${uchost}.cred /usr/etc/credentials.new -if ($status) exit $SMS_NOCRED +if ($status) exit $MR_NOCRED /usr/etc/mkcred /usr/etc/credentials.new -if ($status) exit $SMS_MKCRED +if ($status) exit $MR_MKCRED # Try to install the files foreach e ( "" .dir .pag) @@ -71,7 +71,7 @@ end # If any of them didn't get installed, fail foreach e ( "" .dir .pag) - if (! -e /usr/etc/credentials$e) exit $SMS_NOCRED + if (! -e /usr/etc/credentials$e) exit $MR_NOCRED end diff --git a/gen/passwd.dc b/gen/passwd.dc index e1dedbf3..33dfd341 100644 --- a/gen/passwd.dc +++ b/gen/passwd.dc @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include @@ -44,18 +44,18 @@ char **argv; if (flag < 0) { fprintf(stderr, "File %s does not need to be rebuilt.\n", argv[1]); - exit(SMS_NO_CHANGE); + exit(MR_NO_CHANGE); } } outf = argv[1]; sprintf(outft, "%s~", outf); if ((out = fopen(outft, "w")) == NULL) { fprintf(stderr, "unable to open %s for output\n", outf); - exit(SMS_OCONFIG); + exit(MR_OCONFIG); } } else if (argc != 1) { fprintf(stderr, "usage: %s [outfile]\n", argv[0]); - exit(SMS_ARGS); + exit(MR_ARGS); } else { outf = NULL; } @@ -79,18 +79,18 @@ char **argv; ## inquire_equel(error = "errorno") if (error) { fprintf(out, "Ingres error %d\n", error); - exit(SMS_INGRES_ERR); + exit(MR_INGRES_ERR); } ## exit if (fclose(out)) { perror("close failed"); - exit(SMS_CCONFIG); + exit(MR_CCONFIG); } if (outf) fix_file(outf); - exit(SMS_SUCCESS); + exit(MR_SUCCESS); } @@ -109,12 +109,12 @@ static int ingerr(num) switch (*num) { case INGRES_DEADLOCK: - ingres_errno = SMS_DEADLOCK; + ingres_errno = MR_DEADLOCK; break; default: - ingres_errno = SMS_INGRES_ERR; + ingres_errno = MR_INGRES_ERR; } - com_err(whoami, SMS_INGRES_ERR, " code %d\n", *num); + com_err(whoami, MR_INGRES_ERR, " code %d\n", *num); critical_alert("DCM", "Passwd build encountered INGRES ERROR %d", *num); exit(ingres_errno); } diff --git a/gen/passwd.sh b/gen/passwd.sh index 8e03ba1f..9a3c71c9 100644 --- a/gen/passwd.sh +++ b/gen/passwd.sh @@ -1,8 +1,8 @@ #!/bin/sh -SMS_MKCRED=47836474 +MR_MKCRED=47836474 /site/lookup/db_update if [ $? != 0 ]; then - exit $SMS_MKCRED + exit $MR_MKCRED fi /bin/rm -f $0 exit 0 diff --git a/gen/util.c b/gen/util.c index 5e5c7287..f51f0557 100644 --- a/gen/util.c +++ b/gen/util.c @@ -1,6 +1,6 @@ /* $Header$ * - * Utility routines used by the SMS extraction programs. + * Utility routines used by the MOIRA extraction programs. * * (c) Copyright 1988 by the Massachusetts Institute of Technology. * For copying and distribution information, please see the file @@ -11,8 +11,8 @@ #include #include #include -#include -#include +#include +#include /* ingres_date_and_time: passed a unix time_t, returns a string that ingres @@ -95,13 +95,13 @@ char *targetfile; rename(oldfile, targetfile); perror("Unable to install new file (rename failed)\n"); fprintf(stderr, "Filename = %s\n", targetfile); - exit(SMS_CCONFIG); + exit(MR_CCONFIG); } } else { if (rename(filename, targetfile) < 0) { perror("Unable to rename old file\n"); fprintf(stderr, "Filename = %s\n", targetfile); - exit(SMS_CCONFIG); + exit(MR_CCONFIG); } } unlink(oldfile); diff --git a/gen/zero_quotas b/gen/zero_quotas index 655340f4..02567907 100644 --- a/gen/zero_quotas +++ b/gen/zero_quotas @@ -6,7 +6,7 @@ # Note that the input must be sorted in increasing order by uid. set dev=$1 -set SMS_SETQUOTA = 47836471 +set MR_SETQUOTA = 47836471 # Checking for /etc/zero_old_quotas allows us to release this program # one server at a time. @@ -26,7 +26,7 @@ if ( -f /etc/zero_old_quotas ) then if (checksorted == 0) then echo "Input not sorted" - exit $SMS_SETQUOTA + exit $MR_SETQUOTA endif # zero all quotas between current_uid and uid (not including uid) diff --git a/include/dcm.h b/include/dcm.h index 5a51294a..9459a055 100644 --- a/include/dcm.h +++ b/include/dcm.h @@ -6,8 +6,8 @@ #define UPCALL_CONT 0 #define UPCALL_STOP 1 -#define HARD_FAIL(x) (((x) != 0 ) && ((x) != SMS_NO_CHANGE)) -#define SOFT_FAIL(x) (((x) == SMS_NO_MEM) || ((x) == SMS_CANT_CONNECT) || ((x) == SMS_CCONFIG) || ((x) == SMS_DEADLOCK)) +#define HARD_FAIL(x) (((x) != 0 ) && ((x) != MR_NO_CHANGE)) +#define SOFT_FAIL(x) (((x) == MR_NO_MEM) || ((x) == MR_CANT_CONNECT) || ((x) == MR_CCONFIG) || ((x) == MR_DEADLOCK)) #define DEADLOCK_WAIT (3 * 60) /* number of seconds to wait after @@ -79,7 +79,7 @@ struct svrhost { /*--> utils.c <--*/ -extern void init_sms(); +extern void init_mr(); extern void dcm_com_err_hook(); extern void leave(); extern void scream(); diff --git a/incremental/Makefile b/incremental/Makefile index d3e5bc64..431aa618 100644 --- a/incremental/Makefile +++ b/incremental/Makefile @@ -2,7 +2,7 @@ SRCS = afs.c ksrvtgt.c CFLAGS = -I../include -O -LIBS = -L../lib -lsms -lcom_err -lzephyr -lkrb -ldes +LIBS = -L../lib -lmoira -lcom_err -lzephyr -lkrb -ldes all: afs.incr ksrvtgt @@ -24,13 +24,10 @@ depend: mkdep ${CFLAGS} ${SRCS} # DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. -afs.o: afs.c ../include/sms.h /usr/include/sms_et.h ../include/sms_app.h +afs.o: afs.c ../include/moira.h ../include/mr_et.h ../include/moira_site.h afs.o: ../include/mit-copyright.h /usr/include/sys/file.h ksrvtgt.o: ksrvtgt.c /usr/include/stdio.h /usr/include/sys/param.h -ksrvtgt.o: /usr/include/machine/machparam.h /usr/include/signal.h -ksrvtgt.o: /usr/include/sys/types.h ../include/krb.h ../include/mit-copyright.h -ksrvtgt.o: ../include/des.h ../include/mit-copyright.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY +ksrvtgt.o: /usr/include/machine/machparam.h /usr/include/sys/signal.h +ksrvtgt.o: /usr/include/sys/types.h ../include/krb.h +ksrvtgt.o: ../include/mit-copyright.h ../include/des.h diff --git a/incremental/afs.c b/incremental/afs.c index 85da8d26..62c96b1b 100644 --- a/incremental/afs.c +++ b/incremental/afs.c @@ -7,8 +7,8 @@ * . */ -#include -#include +#include +#include #include #define file_exists(file) (access((file), F_OK) == 0) diff --git a/reg_svr/Makefile b/reg_svr/Makefile index f44fe409..1e0da83d 100644 --- a/reg_svr/Makefile +++ b/reg_svr/Makefile @@ -17,8 +17,8 @@ all: reg_svr startreg reg_svr: $(OBJS) cc ${CFLAGS} -o reg_svr $(OBJS) -L../lib \ - ../server/libsmsglue.a \ - -lsms -lkadm -lkrb -ldes -lzephyr -lcom_err \ + ../server/libmoiraglue.a \ + -lmoira -lkadm -lkrb -ldes -lzephyr -lcom_err \ /usr/rtingres/lib/libqlib /usr/rtingres/lib/compatlib reg_svr.o requests.o: reg_svr.h @@ -44,20 +44,20 @@ requests.o: requests.c ../include/mit-copyright.h /usr/include/stdio.h requests.o: /usr/include/strings.h /usr/include/ctype.h requests.o: /usr/include/sys/types.h /usr/include/sys/file.h ../include/krb.h requests.o: ../include/des.h /usr/include/errno.h /usr/include/sys/socket.h -requests.o: /usr/include/netinet/in.h /usr/include/netdb.h ../include/sms.h -requests.o: ../include/sms_et.h ../include/sms_app.h reg_svr.h +requests.o: /usr/include/netinet/in.h /usr/include/netdb.h ../include/moira.h +requests.o: ../include/mr_et.h ../include/moira_site.h reg_svr.h requests.o: ../include/ureg_err.h ../include/ureg_proto.h reg_svr.o: reg_svr.c ../include/mit-copyright.h /usr/include/stdio.h reg_svr.o: /usr/include/strings.h /usr/include/ctype.h reg_svr.o: /usr/include/sys/types.h /usr/include/sys/file.h ../include/krb.h reg_svr.o: ../include/des.h ../include/kadm.h /usr/include/netinet/in.h reg_svr.o: /usr/include/kadm_err.h /usr/include/krb_err.h -reg_svr.o: /usr/include/errno.h ../include/sms.h ../include/sms_et.h -reg_svr.o: ../include/sms_app.h reg_svr.h ../include/ureg_err.h +reg_svr.o: /usr/include/errno.h ../include/moira.h ../include/mr_et.h +reg_svr.o: ../include/moira_site.h reg_svr.h ../include/ureg_err.h reg_svr.o: ../include/ureg_proto.h startreg.o: startreg.c ../include/mit-copyright.h /usr/include/stdio.h startreg.o: /usr/include/strings.h /usr/include/sys/types.h startreg.o: /usr/include/sys/file.h /usr/include/sys/wait.h startreg.o: /usr/include/sys/signal.h /usr/include/sys/ioctl.h startreg.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h -startreg.o: ../include/sms_app.h +startreg.o: /usr/include/sms_app.h diff --git a/reg_svr/reg_svr.c b/reg_svr/reg_svr.c index 919eeef2..7e401526 100644 --- a/reg_svr/reg_svr.c +++ b/reg_svr/reg_svr.c @@ -11,7 +11,7 @@ * * This program is a client of the Kerberos admin_server and a * server for the userreg program. It is not a client of the - * Moira server as it is linked with libsmsglue which bypasses + * Moira server as it is linked with libmoiraglue which bypasses * the network protocol. */ @@ -31,8 +31,8 @@ static char *rcsid_reg_svr_c = "$Header$"; #include #include #include -#include "sms.h" -#include "sms_app.h" +#include "moira.h" +#include "moira_site.h" #include "reg_svr.h" extern char admin_errmsg[]; @@ -73,16 +73,16 @@ main(argc,argv) krb_set_tkt_string("/tmp/tkt_ureg"); /* Connect to the Moira server */ - if ((status = sms_connect(SMS_SERVER)) != SMS_SUCCESS) + if ((status = mr_connect(MOIRA_SERVER)) != MR_SUCCESS) { - com_err(whoami, status, " on sms_connect"); + com_err(whoami, status, " on mr_connect"); exit(1); } /* Authorize, telling the server who you are */ - if ((status = sms_auth(whoami)) != SMS_SUCCESS) + if ((status = mr_auth(whoami)) != MR_SUCCESS) { - com_err(whoami, status, " on sms_auth"); + com_err(whoami, status, " on mr_auth"); exit(1); } @@ -238,7 +238,7 @@ int db_callproc(argc,argv,queue) int argc; /* Number of arguments returned by Moira */ char *argv[]; /* Arguments returned by Moira */ struct save_queue *queue; /* Queue to save information in */ -/* This function is called by sms_query after each tuple found. It is +/* This function is called by mr_query after each tuple found. It is used by find_user to cache information about each user found. */ { struct db_data *data; /* Structure to store the information in */ @@ -253,7 +253,7 @@ int db_callproc(argc,argv,queue) critical_alert (FAIL_INST, "Wrong number of arguments returned from get_user_by_name."); - status = SMS_ABORT; + status = MR_ABORT; } else { @@ -308,13 +308,13 @@ int find_user(message) queue = sq_create(); /* Do it */ - status = sms_query(q_name,q_argc,q_argv,db_callproc,(char *)queue); + status = mr_query(q_name,q_argc,q_argv,db_callproc,(char *)queue); #ifdef DEBUG fprintf(stderr," %d returned by get_user_by_name\n",status); #endif - if (status == SMS_SUCCESS) + if (status == MR_SUCCESS) { /* Traverse the list, freeing data as we go. If sq_get_data() returns zero if there is no more data on the queue. */ @@ -363,9 +363,9 @@ int verify_user(message,retval) status = find_user(message); /* If Moira coudn't find the user */ - if (status == SMS_NO_MATCH) + if (status == MR_NO_MATCH) status = UREG_USER_NOT_FOUND; - else if (status == SMS_SUCCESS) + else if (status == MR_SUCCESS) { /* If the information sent over in the packet did not point to a valid user, the mit_id field in the formatted packet structure @@ -615,22 +615,22 @@ int reserve_user(message,retval) /* Now that we have a valid user with a valid login... */ /* First, try to reserve the user in Moira. */ - (void) sprintf(fstype_buf,"%d",SMS_FS_STUDENT); + (void) sprintf(fstype_buf,"%d",MR_FS_STUDENT); q_name = "register_user"; q_argv[0] = message->db.uid; q_argv[1] = login; q_argv[2] = fstype_buf; q_argc = 3; - status = sms_query(q_name,q_argc,q_argv,null_callproc,(char *)0); + status = mr_query(q_name,q_argc,q_argv,null_callproc,(char *)0); switch (status) { - case SMS_SUCCESS: + case MR_SUCCESS: status = SUCCESS; break; - case SMS_IN_USE: + case MR_IN_USE: status = UREG_LOGIN_USED; break; - case SMS_DEADLOCK: + case MR_DEADLOCK: status = UREG_MISC_ERROR; break; default: @@ -689,9 +689,9 @@ struct msg *message; q_argc = 2; q_argv[0] = login; q_argv[1] = state; - if ((status = sms_query(q_name, q_argc, q_argv, null_callproc, - (char *)0)) != SMS_SUCCESS) { - if (status == SMS_DEADLOCK) + if ((status = mr_query(q_name, q_argc, q_argv, null_callproc, + (char *)0)) != MR_SUCCESS) { + if (status == MR_DEADLOCK) status = UREG_MISC_ERROR; else critical_alert(FAIL_INST,"%s returned from update_user_status.", @@ -760,7 +760,7 @@ char **qargv; if (argc != U_END) { critical_alert(FAIL_INST, "Wrong number of args returned from get_user_by_uid"); - status = SMS_ABORT; + status = MR_ABORT; } else { qargv[U_NAME] = strsave(argv[U_NAME]); qargv[U_UID+1] = strsave(argv[U_UID]); @@ -826,24 +826,24 @@ char *retval; /* Now that we have a valid user with a valid login... */ q_argv[0] = message->db.uid; - status = sms_query("get_user_by_uid", 1, q_argv, getuserinfo, q_argv); + status = mr_query("get_user_by_uid", 1, q_argv, getuserinfo, q_argv); if (status != SUCCESS) { com_err(whoami, status, " while getting user info"); return(status); } q_argv[U_NAME+1] = login; q_argv[U_STATE+1] = "7"; - status = sms_query("update_user", U_MODTIME+1, q_argv, + status = mr_query("update_user", U_MODTIME+1, q_argv, null_callproc, NULL); switch (status) { - case SMS_SUCCESS: + case MR_SUCCESS: status = SUCCESS; break; - case SMS_IN_USE: + case MR_IN_USE: status = UREG_LOGIN_USED; break; - case SMS_DEADLOCK: + case MR_DEADLOCK: status = UREG_MISC_ERROR; break; default: diff --git a/reg_svr/reg_svr.h b/reg_svr/reg_svr.h index 691ff818..23af2c54 100644 --- a/reg_svr/reg_svr.h +++ b/reg_svr/reg_svr.h @@ -5,7 +5,7 @@ * * Copyright (C) 1987 by the Massachusetts Institute of Technology * - * Server for user registration with SMS and Kerberos. + * Server for user registration with MOIRA and Kerberos. * * This file contains all the information needed by all source * files for the user registration server. @@ -42,7 +42,7 @@ extern char *malloc(); extern char *whoami; /* Name of program - used by libraries */ extern int errno; /* Unix error number */ -/* This structure holds information from the SMS database that will be +/* This structure holds information from the MOIRA database that will be worth holding on to. An instance of it appears in the formatted packet structure. */ struct db_data @@ -67,7 +67,7 @@ struct msg int encrypted_len; /* Length of encrypted information in packet */ char *leftover; /* Leftover information sent in the packet */ int leftover_len; /* Length of leftover information */ - struct db_data db; /* Information from the SMS database */ + struct db_data db; /* Information from the MOIRA database */ }; void failure_alert(); /* Log an unexplainable failure */ diff --git a/reg_svr/requests.c b/reg_svr/requests.c index ddf8afc0..c5245805 100644 --- a/reg_svr/requests.c +++ b/reg_svr/requests.c @@ -7,7 +7,7 @@ * For copying and distribution information, please see the file * . * - * Server for user registration with SMS and Kerberos. + * Server for user registration with Moira and Kerberos. * * This file handles the processing of requests for the register * server. @@ -34,8 +34,8 @@ static char *rcsid_requests_c = "$Header$"; #include #include #include -#include "sms.h" -#include "sms_app.h" +#include "moira.h" +#include "moira_site.h" #include "reg_svr.h" #define NUM_REQUESTS_SAVED 100 /* Number of transactions to save */ @@ -400,14 +400,3 @@ parse_pkt(packet, pktlen, message) return status; } - -/* - * Local Variables: - * mode: c - * c-argdecl-indent: 2 - * c-brace-offset: -4 - * c-continued-statement-offset: 4 - * c-indent-level: 4 - * c-label-offset: -2 - * End: - */ diff --git a/reg_svr/startreg.c b/reg_svr/startreg.c index 721d6594..33fabbab 100644 --- a/reg_svr/startreg.c +++ b/reg_svr/startreg.c @@ -12,7 +12,7 @@ */ #ifndef lint -static char *rcsid_sms_starter_c = "$Header$"; +static char *rcsid_mr_starter_c = "$Header$"; #endif lint #include @@ -23,7 +23,7 @@ static char *rcsid_sms_starter_c = "$Header$"; #include #include #include -#include +#include #define PROG "reg_svr" diff --git a/server/startmoira.c b/server/startmoira.c index 9f252e0f..e73eb13b 100644 --- a/server/startmoira.c +++ b/server/startmoira.c @@ -7,7 +7,7 @@ * For copying and distribution information, please see the file * . * - * This program starts the sms server in a "clean" environment. + * This program starts the moira server in a "clean" environment. * and then waits for it to exit. * */ @@ -24,9 +24,9 @@ static char *rcsid_sms_starter_c = "$Header$"; #include #include #include -#include +#include -#define PROG "smsd" +#define PROG "moirad" int rdpipe[2]; char *sigdescr[] = { @@ -106,7 +106,7 @@ main(argc, argv) setreuid(0); signal(SIGCHLD, cleanup); - sprintf(buf, "%s/sms.log", SMS_DIR); + sprintf(buf, "%s/moira.log", SMS_DIR); logf = open(buf, O_CREAT|O_WRONLY|O_APPEND, 0640); if (logf<0) { perror(buf); @@ -141,11 +141,11 @@ main(argc, argv) dup2(1,2); for (i = 3; i