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
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}
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
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
*/
#include <mit-copyright.h>
-#include <sms.h>
+#include <moira.h>
main()
#include <stdio.h>
-#include <sms.h>
+#include <moira.h>
struct mem {
int parent;
.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}
phase4.o: phase4.c
phase4.c: phase4.qc
+members: members.o
+ cc -o members members.o ${EQLIBS}
clean:
rm -f *.o
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
/* $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
* <mit-copyright.h>.
*/
-#include <sms_app.h>
+#include <moira_site.h>
#include <mit-copyright.h>
#define NULL 0
/* $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
/* $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
*/
#include <mit-copyright.h>
-#include <sms.h>
+#include <moira.h>
#include <stdio.h>
#include "dbck.h"
## 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)
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);
##}
*/
#include <mit-copyright.h>
-#include <sms.h>
+#include <moira.h>
#include "dbck.h"
static char phase1_qc_rcsid[] = "$Header$";
#include <mit-copyright.h>
#include <stdio.h>
-#include <sms.h>
+#include <moira.h>
#include "dbck.h"
static char phase2_qc_rcsid[] = "$Header$";
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;
}
*/
#include <mit-copyright.h>
-#include <sms.h>
+#include <moira.h>
#include "dbck.h"
static char phase4_qc_rcsid[] = "$Header$";
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
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
/*
- * 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
#include <sys/wait.h>
#include <signal.h>
#include <ctype.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
#include "dcm.h"
#include "mit-copyright.h"
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");
}
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");
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;
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;
}
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);
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");
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);
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);
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]);
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");
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");
}
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");
*/
#ifndef lint
-static char *rcsid_sms_starter_c = "$Header$";
+static char *rcsid_mr_starter_c = "$Header$";
#endif lint
#include <mit-copyright.h>
#include <sys/wait.h>
#include <sys/signal.h>
#include <sys/ioctl.h>
-#include <sms_app.h>
+#include <moira_site.h>
#define PROG "dcm"
#include <sys/types.h>
#include <sys/time.h>
#include <sys/file.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
#include "dcm.h"
}
-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;
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);
}
# $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
# 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
#include <mit-copyright.h>
#include <stdio.h>
#include <string.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
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));
if (fclose(out)) {
perror("close failed");
- exit(SMS_CCONFIG);
+ exit(MR_CCONFIG);
}
if (argc == 2)
fix_file(targetfile);
- exit(SMS_SUCCESS);
+ exit(MR_SUCCESS);
}
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);
}
#!/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
/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}'`
#include <mit-copyright.h>
#include <stdio.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
if (argc > 2) {
fprintf(stderr, "usage: %s [outfile]\n", argv[0]);
- exit(SMS_ARGS);
+ exit(MR_ARGS);
}
IIseterr(ingerr);
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);
}
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);
}
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");
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);
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");
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);
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");
if (fclose(out)) {
fprintf(stderr, "Unsuccessful close of filsys.db\n");
- exit(SMS_CCONFIG);
+ exit(MR_CCONFIG);
}
fix_file(outf);
return(1);
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");
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);
## }
}
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++) {
machbuf, name);
else
fprintf(out,
- "%s.cluster\tHS CNAME smsinternal-%d.cluster\n",
+ "%s.cluster\tHS CNAME mrinternal-%d.cluster\n",
machbuf, mid);
}
}
if (fclose(out)) {
fprintf(stderr, "Unsuccessful close of cluster.db\n");
- exit(SMS_CCONFIG);
+ exit(MR_CCONFIG);
}
fix_file(outf);
return(1);
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");
if (fclose(out)) {
fprintf(stderr, "Unsuccessful close of pcap.db\n");
- exit(SMS_CCONFIG);
+ exit(MR_CCONFIG);
}
fix_file(outf);
return(1);
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");
if (fclose(out)) {
fprintf(stderr, "Unsuccessful close of palladium.db\n");
- exit(SMS_CCONFIG);
+ exit(MR_CCONFIG);
}
fix_file(outf);
return(1);
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");
if (fclose(out)) {
fprintf(stderr, "Unsuccessful close of sloc.db\n");
- exit(SMS_CCONFIG);
+ exit(MR_CCONFIG);
}
fix_file(outf);
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");
if (fclose(out)) {
fprintf(stderr, "Unsuccessful close of service.db\n");
- exit(SMS_CCONFIG);
+ exit(MR_CCONFIG);
}
fix_file(outf);
return(1);
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
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.
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
end
# Did it time out?
-if ($i == $TIMEOUT) exit $SMS_NAMED
+if ($i == $TIMEOUT) exit $MR_NAMED
# Clean up!
/bin/rm -f $TARFILE
# 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)
#include <stdio.h>
#include <string.h>
#include <ctype.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
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));
if (fclose(out)) {
perror("close failed");
- exit(SMS_CCONFIG);
+ exit(MR_CCONFIG);
}
if (argc == 2)
fix_file(targetfile);
- exit(SMS_SUCCESS);
+ exit(MR_SUCCESS);
}
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);
}
if (hash_store(machines, id, strsave(name)) < 0) {
#endif
fprintf(stderr, "Out of memory!\n");
- exit(SMS_NO_MEM);
+ exit(MR_NO_MEM);
}
cnt++;
## }
## 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++;
## }
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++;
## }
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++;
## }
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);
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;
}
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)
#include <mit-copyright.h>
#include <stdio.h>
#include <string.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
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
if (fclose(out)) {
perror("close failed");
- exit(SMS_CCONFIG);
+ exit(MR_CCONFIG);
}
if (argc == 2)
fix_file(targetfile);
- exit(SMS_SUCCESS);
+ exit(MR_SUCCESS);
}
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);
}
#include <mit-copyright.h>
#include <stdio.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
if (argc > 2) {
fprintf(stderr, "usage: %s [outfile]\n", argv[0]);
- exit(SMS_ARGS);
+ exit(MR_ARGS);
}
IIseterr(ingerr);
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);
}
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);
}
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
## }
if (fclose(fd)) {
fprintf(stderr, "error closing %s\n", file);
- exit(SMS_CCONFIG);
+ exit(MR_CCONFIG);
}
}
/* don't free here either
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 */
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);
}
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;
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;
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);
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
# Alert if the tarfile does not exist
if (! -r $TARFILE) then
- exit $SMS_TARERR
+ exit $MR_TARERR
endif
# Create a fresh source directory
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
# 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}:"
# 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)
# 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
#include <mit-copyright.h>
#include <stdio.h>
-#include <sms.h>
+#include <moira.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
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;
}
## 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);
}
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);
}
#!/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
/* $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
#include <mit-copyright.h>
#include <stdio.h>
#include <sys/time.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
/* ingres_date_and_time: passed a unix time_t, returns a string that ingres
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);
# 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.
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)
#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
/*--> utils.c <--*/
-extern void init_sms();
+extern void init_mr();
extern void dcm_com_err_hook();
extern void leave();
extern void scream();
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
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
* <mit-copyright.h>.
*/
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
#include <sys/file.h>
#define file_exists(file) (access((file), F_OK) == 0)
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
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
*
* 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.
*/
#include <kadm_err.h>
#include <krb_err.h>
#include <errno.h>
-#include "sms.h"
-#include "sms_app.h"
+#include "moira.h"
+#include "moira_site.h"
#include "reg_svr.h"
extern char admin_errmsg[];
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);
}
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 */
critical_alert
(FAIL_INST,
"Wrong number of arguments returned from get_user_by_name.");
- status = SMS_ABORT;
+ status = MR_ABORT;
}
else
{
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. */
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
/* 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:
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.",
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]);
/* 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:
*
* 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.
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
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 */
* For copying and distribution information, please see the file
* <mit-copyright.h>.
*
- * 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.
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
-#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 */
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:
- */
*/
#ifndef lint
-static char *rcsid_sms_starter_c = "$Header$";
+static char *rcsid_mr_starter_c = "$Header$";
#endif lint
#include <mit-copyright.h>
#include <sys/wait.h>
#include <sys/signal.h>
#include <sys/ioctl.h>
-#include <sms_app.h>
+#include <moira_site.h>
#define PROG "reg_svr"
* For copying and distribution information, please see the file
* <mit-copyright.h>.
*
- * 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.
*
*/
#include <sys/wait.h>
#include <sys/signal.h>
#include <sys/ioctl.h>
-#include <sms_app.h>
+#include <moira_site.h>
-#define PROG "smsd"
+#define PROG "moirad"
int rdpipe[2];
char *sigdescr[] = {
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);
dup2(1,2);
for (i = 3; i <nfds; i++) close(i);
execl(buf, PROG, 0);
- perror("cannot run smsd");
+ perror("cannot run moirad");
exit(1);
}
if (pid<0) {
- perror("sms_starter");
+ perror("moira_starter");
exit(1);
}