]> andersk Git - moira.git/commitdiff
sms -> moira
authormar <mar>
Sat, 17 Mar 1990 16:30:34 +0000 (16:30 +0000)
committermar <mar>
Sat, 17 Mar 1990 16:30:34 +0000 (16:30 +0000)
46 files changed:
clients/blanche/Makefile
clients/blanche/blanche.c
clients/mailmaint/Makefile
clients/mailmaint/mailmaint.c
clients/moira/Makefile
clients/moira/attach.c
clients/moira/cluster.c
clients/moira/dcmmaint.c
clients/moira/delete.c
clients/moira/globals.c
clients/moira/lists.c
clients/moira/main.c
clients/moira/menus.c
clients/moira/misc.c
clients/moira/nfs.c
clients/moira/pobox.c
clients/moira/printer.c
clients/moira/quota.c
clients/moira/user.c
clients/moira/utils.c
clients/mrtest/Makefile
clients/mrtest/mrtest.c
clients/passwd/Makefile
clients/passwd/chfn.c
clients/passwd/chpobox.c
clients/passwd/chsh.c
clients/userreg/Makefile
clients/userreg/reg_stubs.c
include/Makefile
include/moira.h
include/moira_site.h
lib/Makefile
lib/critical.c
lib/hash.c
lib/mr_access.c
lib/mr_auth.c
lib/mr_call.c
lib/mr_connect.c
lib/mr_data.c
lib/mr_init.c
lib/mr_ops.c
lib/mr_param.c
lib/mr_private.h
lib/mr_query.c
lib/nfsparttype.c
lib/sq.c

index 044564d50977a67891f084676fb3f7fe7e246098..5cacf3ee4f6f24f6aa7d736bb8348c8cf18500e5 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile for SMS clients blanche
+# Makefile for Moira clients blanche
 #
 #      MIT Project Athena
 #
@@ -16,7 +16,7 @@ DEFINES = -O
 CFLAGS = -I../../include ${DEFINES}
 BINDIR = ${DESTDIR}/bin
 
-SMSLIB = -L../../lib -lsms -lgdb -lcom_err -lkrb -ldes -lhesiod
+MOIRALIB = -L../../lib -lmoira -lgdb -lcom_err -lkrb -ldes -lhesiod
 
 PROGS= blanche
 
@@ -24,7 +24,7 @@ all:  ${PROGS}
 
 blanche: blanche.o
        rm -f blanche
-       cc -o blanche blanche.o ${SMSLIB}
+       cc -o blanche blanche.o ${MOIRALIB}
 
 lint:
        lint *.c
@@ -42,5 +42,5 @@ depend:
 # DO NOT DELETE THIS LINE -- mkdep uses it.
 
 blanche.o: blanche.c ../../include/mit-copyright.h /usr/include/stdio.h
-blanche.o: /usr/include/ctype.h ../../include/sms.h /usr/include/sms_et.h
-blanche.o: ../../include/sms_app.h
+blanche.o: /usr/include/ctype.h ../../include/moira.h ../../include/mr_et.h
+blanche.o: ../../include/moira_site.h
index b13c9e95fa5e7d7ed4de4ee19d97c7969e9cc485..08d44903815cc2ec9749b278d686976fe6979345 100644 (file)
@@ -17,8 +17,8 @@
 #include <mit-copyright.h>
 #include <stdio.h>
 #include <ctype.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
 
 #ifndef LINT
 static char blanche_rcsid[] = "$Header$";
@@ -167,21 +167,21 @@ char **argv;
       showusers = showstrings = showlists = showkerberos = 1;
 
     /* fire up Moira */
-    if (status = sms_connect(server)) {
+    if (status = mr_connect(server)) {
        com_err(whoami, status, "unable to connect to the Moira server");
        exit(2);
     }
-    if ( status = sms_motd(&motd) ) {
+    if ( status = mr_motd(&motd) ) {
         com_err(whoami, status, "unable to check server status");
        exit(2);
     }
     if (motd) {
        fprintf(stderr, "The Moira server is currently unavailable:\n%s\n", motd);
-       sms_disconnect();
+       mr_disconnect();
        exit(2);
     }
 
-    if (!noauth && (status = sms_auth("blanche"))) {
+    if (!noauth && (status = mr_auth("blanche"))) {
        com_err(whoami, status, "unable to authenticate to Moira");
        com_err(whoami, 0,
                " Try the -noauth flag if you don't need authentication");
@@ -190,11 +190,11 @@ char **argv;
 
     /* display list info if requested to */
     if (infoflg) {
-       status = sms_query("get_list_info", 1, &listname, show_list_info,NULL);
+       status = mr_query("get_list_info", 1, &listname, show_list_info,NULL);
        if (status)
          com_err(whoami, status, "while getting list information");
        if (verbose && !memberflg) {
-           status = sms_query("count_members_of_list", 1, &listname,
+           status = mr_query("count_members_of_list", 1, &listname,
                               show_list_count, NULL);
            if (status)
              com_err(whoami, status, "while getting list count");
@@ -210,7 +210,7 @@ char **argv;
      * lastly, reset memberlist so we can use it again later
      */
     if (syncflg) {
-       status = sms_query("get_members_of_list", 1, &listname,
+       status = mr_query("get_members_of_list", 1, &listname,
                           get_list_members, (char *)memberlist);
        if (status)
          com_err(whoami, status, "getting members of list %s", listname);
@@ -247,38 +247,38 @@ char **argv;
        case M_ANY:
        case M_USER:
            membervec[1] = "USER";
-           status = sms_query("add_member_to_list", 3, membervec, scream, NULL);
-           if (status == SMS_SUCCESS)
+           status = mr_query("add_member_to_list", 3, membervec, scream, NULL);
+           if (status == MR_SUCCESS)
              break;
-           else if (status != SMS_USER || memberstruct->type != M_ANY) {
+           else if (status != MR_USER || memberstruct->type != M_ANY) {
                com_err(whoami, status, "while adding member %s to %s",
                        memberstruct->name, listname);
                break;
            }
        case M_LIST:
            membervec[1] = "LIST";
-           status = sms_query("add_member_to_list", 3, membervec,
+           status = mr_query("add_member_to_list", 3, membervec,
                               scream, NULL);
-           if (status == SMS_SUCCESS)
+           if (status == MR_SUCCESS)
              break;
-           else if (status != SMS_LIST || memberstruct->type != M_ANY) {
+           else if (status != MR_LIST || memberstruct->type != M_ANY) {
                com_err(whoami, status, "while adding member %s to %s",
                        memberstruct->name, listname);
                break;
            }
        case M_STRING:
            membervec[1] = "STRING";
-           status = sms_query("add_member_to_list", 3, membervec,
+           status = mr_query("add_member_to_list", 3, membervec,
                               scream, NULL);
-           if (status != SMS_SUCCESS)
+           if (status != MR_SUCCESS)
              com_err(whoami, status, "while adding member %s to %s",
                      memberstruct->name, listname);
            break;
        case M_KERBEROS:
            membervec[1] = "KERBEROS";
-           status = sms_query("add_member_to_list", 3, membervec,
+           status = mr_query("add_member_to_list", 3, membervec,
                               scream, NULL);
-           if (status != SMS_SUCCESS)
+           if (status != MR_SUCCESS)
              com_err(whoami, status, "while adding member %s to %s",
                      memberstruct->name, listname);
        }
@@ -296,11 +296,11 @@ char **argv;
        case M_ANY:
        case M_USER:
            membervec[1] = "USER";
-           status = sms_query("delete_member_from_list", 3, membervec,
+           status = mr_query("delete_member_from_list", 3, membervec,
                               scream, NULL);
-           if (status == SMS_SUCCESS)
+           if (status == MR_SUCCESS)
              break;
-           else if ((status != SMS_USER && status != SMS_NO_MATCH) ||
+           else if ((status != MR_USER && status != MR_NO_MATCH) ||
                     memberstruct->type != M_ANY) {
                com_err(whoami, status, "while deleting member %s from %s",
                        memberstruct->name, listname);
@@ -308,11 +308,11 @@ char **argv;
            }
        case M_LIST:
            membervec[1] = "LIST";
-           status = sms_query("delete_member_from_list", 3, membervec,
+           status = mr_query("delete_member_from_list", 3, membervec,
                               scream, NULL);
-           if (status == SMS_SUCCESS)
+           if (status == MR_SUCCESS)
              break;
-           else if ((status != SMS_LIST && status != SMS_NO_MATCH) ||
+           else if ((status != MR_LIST && status != MR_NO_MATCH) ||
                     memberstruct->type != M_ANY) {
                com_err(whoami, status, "while deleting member %s from %s",
                        memberstruct->name, listname);
@@ -320,20 +320,20 @@ char **argv;
            }
        case M_STRING:
            membervec[1] = "STRING";
-           status = sms_query("delete_member_from_list", 3, membervec,
+           status = mr_query("delete_member_from_list", 3, membervec,
                               scream, NULL);
-           if (status == SMS_STRING && memberstruct->type == M_ANY)
+           if (status == MR_STRING && memberstruct->type == M_ANY)
              com_err(whoami, 0, " Unable to find member %s to delete from %s",
                      memberstruct->name, listname);
-           else if (status != SMS_SUCCESS)
+           else if (status != MR_SUCCESS)
              com_err(whoami, status, "while deleting member %s from %s",
                      memberstruct->name, listname);
            break;
        case M_KERBEROS:
            membervec[1] = "KERBEROS";
-           status = sms_query("delete_member_from_list", 3, membervec,
+           status = mr_query("delete_member_from_list", 3, membervec,
                               scream, NULL);
-           if (status != SMS_SUCCESS)
+           if (status != MR_SUCCESS)
              com_err(whoami, status, "while deleting member %s from %s",
                      memberstruct->name, listname);
        }
@@ -344,7 +344,7 @@ char **argv;
        if (recursflg)
          recursive_display_list_members();
        else {
-           status = sms_query("get_members_of_list", 1, &listname,
+           status = mr_query("get_members_of_list", 1, &listname,
                               get_list_members, (char *)memberlist);
            if (status)
              com_err(whoami, status, "while getting members of list %s",
@@ -355,7 +355,7 @@ char **argv;
     }
 
     /* We're done! */
-    sms_disconnect();
+    mr_disconnect();
     exit(0);
 }
 
@@ -453,7 +453,7 @@ int hint;
       printf("\n");
     printf("Owner: %s %s\n", argv[7], argv[8]);
     printf("Last modified by %s with %s on %s\n", argv[11], argv[12], argv[10]);
-    return(SMS_CONT);
+    return(MR_CONT);
 }
 
 
@@ -488,7 +488,7 @@ recursive_display_list_members()
        memberlist = sq_create();
        if (debugflg)
          fprintf(stderr, "Fetching members of %s\n", m->name);
-       status = sms_query("get_members_of_list", 1, &(m->name),
+       status = mr_query("get_members_of_list", 1, &(m->name),
                           get_list_members, (char *)memberlist);
        if (status)
          com_err(whoami, status, "while getting members of list %s", m->name);
@@ -553,7 +553,7 @@ struct save_queue *q;
     }
     m->name = strsave(argv[1]);
     sq_save_data(q, m);
-    return(SMS_CONT);
+    return(MR_CONT);
 }
 
 
index 36f448bbb7595be9ed56a70347999f44295eee1a..d17bafd815e20f1242efef3d7a724c2e0b29a832 100644 (file)
@@ -6,7 +6,7 @@
 # For copying and distribution information, please see the file
 # <mit-copyright.h>.
 
-# Makefile for SMS client mailmaint
+# Makefile for Moira client mailmaint
 #
 #
 DESTDIR=
@@ -14,7 +14,7 @@ CFLAGS = -I../../include -O
 CONFDIR = ${DESTDIR}/usr/athena
 BINDIR = ${DESTDIR}/bin
 
-SMSLIB = -L../../lib -lsms -lgdb -lcom_err
+MOIRALIB = -L../../lib -lmoira -lgdb -lcom_err
 
 SRCS = mailmaint.c
 
@@ -23,7 +23,7 @@ OBJECTS = mailmaint.o
 all:   mailmaint
 
 mailmaint:     ${OBJECTS}
-       cc ${CFLAGS} -o mailmaint ${OBJECTS} ${SMSLIB} \
+       cc ${CFLAGS} -o mailmaint ${OBJECTS} ${MOIRALIB} \
        -lcurses -ltermcap -lkrb -ldes -lhesiod
 
 mailmaint.o:           mailmaint.c
@@ -50,5 +50,5 @@ mailmaint.o: /usr/include/curses.h /usr/include/sgtty.h
 mailmaint.o: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h
 mailmaint.o: /usr/include/sys/ttydev.h /usr/include/sys/types.h
 mailmaint.o: /usr/include/varargs.h ../../include/com_err.h
-mailmaint.o: /usr/include/ctype.h ../../include/sms.h /usr/include/sms_et.h
-mailmaint.o: ../../include/sms_app.h ../../include/mit-copyright.h
+mailmaint.o: /usr/include/ctype.h ../../include/moira.h ../../include/mr_et.h
+mailmaint.o: ../../include/moira_site.h ../../include/mit-copyright.h
index 3df3407230e19b50c301fb3e01ff31d092583821..acf6dbafba6df236afb27ccd7d7c375b99087ab1 100644 (file)
@@ -25,8 +25,8 @@ static char rcsid_mailmaint_c[] = "$Header$";
 #include <varargs.h>
 #include <com_err.h>
 #include <ctype.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
 #include <mit-copyright.h>
 
 
@@ -135,24 +135,24 @@ main(argc, argv)
 
     printf("Connecting to database for %s...please hold on.\n", uname);
 
-    status = sms_connect(NULL);
+    status = mr_connect(NULL);
     if (status) {
        (void) sprintf(buf, "\nConnection to Moira server failed");
        goto punt;
     }
 
-    status = sms_motd(&motd);
+    status = mr_motd(&motd);
     if (status) {
         com_err(whoami, status, " unable to check server status");
-       sms_disconnect();
+       mr_disconnect();
        exit(2);
     }
     if (motd) {
        fprintf(stderr, "The Moira server is currently unavailable:\n%s\n", motd);
-       sms_disconnect();
+       mr_disconnect();
        exit(2);
     }
-    status = sms_auth("mailmaint");
+    status = mr_auth("mailmaint");
     if (status) {
        (void) sprintf(buf, "\nAuthorization failed.\n");
        goto punt;
@@ -393,7 +393,7 @@ add_member()
        argv[0] = strsave(buf);
        argv[1] = strsave("user");
        argv[2] = strsave(uname);
-       if (status = sms_query("add_member_to_list", 3, argv,
+       if (status = mr_query("add_member_to_list", 3, argv,
                               scream, (char *) NULL)) {
            display_buff("\r\n");
            com_err(whoami, status, " found.\n");
@@ -422,7 +422,7 @@ delete_member()
        argv[0] = strsave(buf);
        argv[1] = strsave("user");
        argv[2] = strsave(uname);
-       if (status = sms_query("delete_member_from_list", 3, argv,
+       if (status = mr_query("delete_member_from_list", 3, argv,
                               scream, (char *) NULL)) {
            display_buff("\r\n");
            com_err(whoami, status, " found.\n");
@@ -451,7 +451,7 @@ list_by_member()
     show_text(DISPROW, STARTCOL, buf);
     mvcur(0, 0, currow, STARTCOL);
     refresh();
-    if (status = sms_query("get_lists_of_member", 2, nargv + 1,
+    if (status = mr_query("get_lists_of_member", 2, nargv + 1,
                           print_1, (char *) NULL)) {
        display_buff("\r\n");
        com_err(whoami, status, " in get_lists_of_member");
@@ -529,7 +529,7 @@ list_all_groups()
     argv[1] = argv[4] = "dontcare";
     argv[2] = "false";
     first_time = 1;
-    if (status = sms_query("qualified_get_lists", 5, argv,
+    if (status = mr_query("qualified_get_lists", 5, argv,
                           print_all, (char *) NULL)) {
        display_buff("\r\n");
        com_err(whoami, status, " in list_all_groups\n");
@@ -555,7 +555,7 @@ list_members()
        (void) sprintf(buffer, "The members of list '%s' are:", buf);
        show_text(DISPROW + 1, STARTCOL, buffer);
        argv[0] = buf;
-       if (status = sms_query("get_members_of_list", 1, argv,
+       if (status = mr_query("get_members_of_list", 1, argv,
                               print_2, (char *) NULL)) {
            display_buff("\r\n");
            com_err(whoami, status, " found.\n");
@@ -824,7 +824,7 @@ scream()
 {
     com_err(whoami, status, "\nA Moira update returned a value -- programmer \
 botch\n");
-    sms_disconnect();
+    mr_disconnect();
     exit(1);
     return(0); /* to keep compiler happy */
 }
@@ -839,7 +839,7 @@ fetch_list_info(list, li)
     char *argv[1];
 
     argv[0] = list;
-    return sms_query("get_list_info", 1, argv, get_list_info, (char *) NULL);
+    return mr_query("get_list_info", 1, argv, get_list_info, (char *) NULL);
 }
 
 /* ARGSUSED */
index a5a7fc618edca7efd090c7a36a8643a3f2385243..e4c55043899fa7435d42b50144bfe534a08bfaf8 100644 (file)
@@ -1,5 +1,5 @@
-#      This is the Makefile for allmaint, the SMS client that allows
-#       a user to maintaint most important parts of the SMS database.
+#      This is the Makefile for allmaint, the Moira client that allows
+#       a user to maintaint most important parts of the Moira database.
 #      It Contains: The Makefile
 #      
 #      Created:        5/9/88
@@ -21,8 +21,8 @@ LDFLAGS =  -L../../lib
 CONFDIR = ${DESTDIR}/usr/athena
 BINDIR = ${DESTDIR}/bin
 
-SMSLIB = -lsms -lgdb -lcom_err
-LIBS = ${SMSLIB} -lcurses -ltermcap -lkrb -ldes -lhesiod
+MOIRALIB = -lmoira -lgdb -lcom_err
+LIBS = ${MOIRALIB} -lcurses -ltermcap -lkrb -ldes -lhesiod
 
 
 SRCS = utils.c attach.c cluster.c delete.c globals.c lists.c main.c \
@@ -59,7 +59,7 @@ clean:
 # correct libraries when using saber C.
 
 saber: ;
-       /mit/kaufer/saber -I/mit/smsdev/include -DDEBUG ${LDFLAGS} \
+       /mit/kaufer/saber -I/mit/moiradev/include -DDEBUG ${LDFLAGS} \
        ${SRCS} ${LIBS}
 
 depend:
@@ -68,25 +68,29 @@ depend:
 # DO NOT DELETE THIS LINE -- mkdep uses it.
 
 utils.o: utils.c /usr/include/stdio.h /usr/include/strings.h
-utils.o: ../../include/sms.h /usr/include/sms_et.h ../../include/sms_app.h
-utils.o: ../../include/mit-copyright.h menu.h /usr/include/ctype.h defs.h
-utils.o: f_defs.h globals.h /usr/include/netdb.h
+utils.o: ../../include/moira.h ../../include/mr_et.h
+utils.o: ../../include/moira_site.h ../../include/mit-copyright.h menu.h
+utils.o: /usr/include/ctype.h defs.h f_defs.h globals.h /usr/include/netdb.h
 attach.o: attach.c /usr/include/stdio.h /usr/include/strings.h
-attach.o: ../../include/sms.h /usr/include/sms_et.h ../../include/sms_app.h
-attach.o: ../../include/mit-copyright.h menu.h defs.h f_defs.h globals.h
+attach.o: ../../include/moira.h ../../include/mr_et.h
+attach.o: ../../include/moira_site.h ../../include/mit-copyright.h menu.h
+attach.o: defs.h f_defs.h globals.h
 cluster.o: cluster.c /usr/include/stdio.h /usr/include/strings.h
-cluster.o: ../../include/sms.h /usr/include/sms_et.h ../../include/sms_app.h
-cluster.o: ../../include/mit-copyright.h menu.h defs.h f_defs.h globals.h
+cluster.o: ../../include/moira.h ../../include/mr_et.h
+cluster.o: ../../include/moira_site.h ../../include/mit-copyright.h menu.h
+cluster.o: defs.h f_defs.h globals.h
 delete.o: delete.c /usr/include/stdio.h /usr/include/strings.h
-delete.o: ../../include/sms.h /usr/include/sms_et.h ../../include/sms_app.h
-delete.o: ../../include/mit-copyright.h menu.h defs.h f_defs.h globals.h
+delete.o: ../../include/moira.h ../../include/mr_et.h
+delete.o: ../../include/moira_site.h ../../include/mit-copyright.h menu.h
+delete.o: defs.h f_defs.h globals.h
 globals.o: globals.c ../../include/mit-copyright.h defs.h
 lists.o: lists.c /usr/include/stdio.h /usr/include/strings.h
-lists.o: ../../include/sms.h /usr/include/sms_et.h ../../include/sms_app.h
-lists.o: ../../include/mit-copyright.h menu.h defs.h f_defs.h globals.h
+lists.o: ../../include/moira.h ../../include/mr_et.h
+lists.o: ../../include/moira_site.h ../../include/mit-copyright.h menu.h
+lists.o: defs.h f_defs.h globals.h
 main.o: main.c /usr/include/pwd.h /usr/include/signal.h /usr/include/stdio.h
-main.o: /usr/include/strings.h /usr/include/sys/types.h ../../include/sms.h
-main.o: /usr/include/sms_et.h menu.h ../../include/mit-copyright.h defs.h
+main.o: /usr/include/strings.h /usr/include/sys/types.h ../../include/moira.h
+main.o: ../../include/mr_et.h menu.h ../../include/mit-copyright.h defs.h
 main.o: f_defs.h globals.h
 menu.o: menu.c ../../include/mit-copyright.h /usr/include/sys/types.h
 menu.o: /usr/include/stdio.h /usr/include/signal.h /usr/include/curses.h
@@ -96,30 +100,32 @@ menu.o: /usr/include/ctype.h /usr/include/strings.h /usr/include/varargs.h
 menu.o: ../../include/com_err.h menu.h
 menus.o: menus.c /usr/include/stdio.h menu.h ../../include/mit-copyright.h
 menus.o: defs.h f_defs.h globals.h
-nfs.o: nfs.c /usr/include/stdio.h /usr/include/strings.h ../../include/sms.h
-nfs.o: /usr/include/sms_et.h ../../include/sms_app.h
+nfs.o: nfs.c /usr/include/stdio.h /usr/include/strings.h
+nfs.o: ../../include/moira.h ../../include/mr_et.h ../../include/moira_site.h
 nfs.o: ../../include/mit-copyright.h menu.h defs.h f_defs.h globals.h
 pobox.o: pobox.c /usr/include/stdio.h /usr/include/strings.h
-pobox.o: /usr/include/ctype.h ../../include/sms.h /usr/include/sms_et.h
-pobox.o: ../../include/sms_app.h ../../include/mit-copyright.h menu.h defs.h
-pobox.o: f_defs.h globals.h
+pobox.o: /usr/include/ctype.h ../../include/moira.h ../../include/mr_et.h
+pobox.o: ../../include/moira_site.h ../../include/mit-copyright.h menu.h
+pobox.o: defs.h f_defs.h globals.h
 quota.o: quota.c /usr/include/stdio.h /usr/include/strings.h
-quota.o: ../../include/sms.h /usr/include/sms_et.h ../../include/sms_app.h
-quota.o: ../../include/mit-copyright.h menu.h defs.h f_defs.h globals.h
+quota.o: ../../include/moira.h ../../include/mr_et.h
+quota.o: ../../include/moira_site.h ../../include/mit-copyright.h menu.h
+quota.o: defs.h f_defs.h globals.h
 user.o: user.c /usr/include/stdio.h /usr/include/strings.h
-user.o: ../../include/sms.h /usr/include/sms_et.h ../../include/sms_app.h
-user.o: ../../include/mit-copyright.h menu.h /usr/include/ctype.h defs.h
-user.o: f_defs.h globals.h
+user.o: ../../include/moira.h ../../include/mr_et.h
+user.o: ../../include/moira_site.h ../../include/mit-copyright.h menu.h
+user.o: /usr/include/ctype.h defs.h f_defs.h globals.h
 dcmmaint.o: dcmmaint.c /usr/include/stdio.h /usr/include/strings.h
-dcmmaint.o: /usr/include/ctype.h ../../include/sms.h /usr/include/sms_et.h
-dcmmaint.o: ../../include/sms_app.h ../../include/mit-copyright.h menu.h
+dcmmaint.o: /usr/include/ctype.h ../../include/moira.h ../../include/mr_et.h
+dcmmaint.o: ../../include/moira_site.h ../../include/mit-copyright.h menu.h
 dcmmaint.o: defs.h f_defs.h globals.h
 printer.o: printer.c /usr/include/stdio.h /usr/include/strings.h
-printer.o: /usr/include/ctype.h ../../include/sms.h /usr/include/sms_et.h
-printer.o: ../../include/sms_app.h ../../include/mit-copyright.h menu.h
+printer.o: /usr/include/ctype.h ../../include/moira.h ../../include/mr_et.h
+printer.o: ../../include/moira_site.h ../../include/mit-copyright.h menu.h
 printer.o: defs.h f_defs.h globals.h
 misc.o: misc.c /usr/include/stdio.h /usr/include/strings.h
-misc.o: ../../include/sms.h /usr/include/sms_et.h ../../include/sms_app.h
-misc.o: ../../include/mit-copyright.h menu.h /usr/include/sys/types.h
-misc.o: /usr/include/netdb.h /usr/include/sys/socket.h
-misc.o: /usr/include/netinet/in.h defs.h f_defs.h globals.h
+misc.o: ../../include/moira.h ../../include/mr_et.h
+misc.o: ../../include/moira_site.h ../../include/mit-copyright.h menu.h
+misc.o: /usr/include/sys/types.h /usr/include/netdb.h
+misc.o: /usr/include/sys/socket.h /usr/include/netinet/in.h defs.h f_defs.h
+misc.o: globals.h
index a345be302685b2aace400bee2bc564c8477156c0..38f4cecc27461cb083fe0b76781773a5a8756a69 100644 (file)
@@ -2,8 +2,8 @@
   static char rcsid_module_c[] = "$Header$";
 #endif
 
-/*     This is the file attach.c for the SMS Client, which allows a nieve
- *      user to quickly and easily maintain most parts of the SMS database.
+/*     This is the file attach.c for the MOIRA Client, which allows a nieve
+ *      user to quickly and easily maintain most parts of the MOIRA database.
  *     It Contains: Functions for maintaining data used by Hesiod 
  *                   to map courses/projects/users to their file systems, 
  *                   and maintain filesys info. 
@@ -23,8 +23,8 @@
 
 #include <stdio.h>
 #include <strings.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
 #include <menu.h>
 
 #include "mit-copyright.h"
@@ -101,21 +101,21 @@ char *name;
 
     switch (type) {
     case LABEL:
-       if ( (stat = do_sms_query("get_filesys_by_label", 1, &name,
+       if ( (stat = do_mr_query("get_filesys_by_label", 1, &name,
                                  StoreInfo, (char *)&elem)) != 0) {
            com_err(program_name, stat, NULL);
            return(NULL);
        }
        break;
     case MACHINE:
-       if ( (stat = do_sms_query("get_filesys_by_machine", 1, &name,
+       if ( (stat = do_mr_query("get_filesys_by_machine", 1, &name,
                                  StoreInfo, (char *)&elem)) != 0) {
            com_err(program_name, stat, NULL);
            return(NULL);
        }
        break;
     case GROUP:
-       if ( (stat = do_sms_query("get_filesys_by_group", 1, &name,
+       if ( (stat = do_mr_query("get_filesys_by_group", 1, &name,
                                  StoreInfo, (char *)&elem)) != 0) {
            com_err(program_name, stat, NULL);
            return(NULL);
@@ -125,7 +125,7 @@ char *name;
        args[ALIAS_NAME] = name;
        args[ALIAS_TYPE] = FS_ALIAS_TYPE;
        args[ALIAS_TRANS] = "*";
-       if ( (stat = do_sms_query("get_alias", 3, args, StoreInfo, 
+       if ( (stat = do_mr_query("get_alias", 3, args, StoreInfo, 
                                  (char *) &elem)) != 0) {
            com_err(program_name, stat, " in get_alias.");
            return(NULL);
@@ -194,9 +194,9 @@ char ** info;
                info[FS_MODWITH]);
        Put_message(print_buf);
        Put_message("Containing the filesystems (in order):");
-       if ((stat = do_sms_query("get_fsgroup_members", 1, &info[FS_NAME],
+       if ((stat = do_mr_query("get_fsgroup_members", 1, &info[FS_NAME],
                                 StoreInfo, (char *)&elem)) != 0) {
-           if (stat == SMS_NO_MATCH)
+           if (stat == MR_NO_MATCH)
              Put_message("    [no members]");
            else
              com_err(program_name, stat, NULL);
@@ -341,7 +341,7 @@ Bool one_item;
     sprintf(temp_buf, "Are you sure that you want to delete filesystem %s",
            info[FS_NAME]);
     if(!one_item || Confirm(temp_buf)) {
-       if ( (stat = do_sms_query("delete_filesys", 1,
+       if ( (stat = do_mr_query("delete_filesys", 1,
                                  &info[FS_NAME], Scream, NULL)) != 0)
            com_err(program_name, stat, " filesystem not deleted.");
        else
@@ -388,15 +388,15 @@ Bool junk;
     char ** args = AskFSInfo(info, TRUE);
     extern Menu nfsphys_menu;
 
-    stat = do_sms_query("update_filesys", CountArgs(args), args,
+    stat = do_mr_query("update_filesys", CountArgs(args), args,
                        NullFunc, NULL);
     switch (stat) {
-    case SMS_NFS:
+    case MR_NFS:
        Put_message("That NFS filesystem is not exported.");
        if (YesNoQuestion("Fix this now (Y/N)")) {
            Do_menu(&nfsphys_menu, 0, NULL);
            if (YesNoQuestion("Retry filesystem update now (Y/N)")) {
-               if (stat = do_sms_query("update_filesys", CountArgs(args), args,
+               if (stat = do_mr_query("update_filesys", CountArgs(args), args,
                                        NullFunc, NULL))
                    com_err(program_name, stat, " filesystem not updated");
                else
@@ -404,7 +404,7 @@ Bool junk;
            }
        }
        break;
-    case SMS_SUCCESS:
+    case MR_SUCCESS:
        break;
     default:
        com_err(program_name, stat, " in UpdateFS");
@@ -449,25 +449,25 @@ int argc;
     if ( !ValidName(argv[1]) )
        return(DM_NORMAL);
 
-    if ( (stat = do_sms_query("get_filesys_by_label", 1, argv + 1,
+    if ( (stat = do_mr_query("get_filesys_by_label", 1, argv + 1,
                              NullFunc, NULL)) == 0) {
        Put_message ("A Filesystem by that name already exists.");
        return(DM_NORMAL);
-    } else if (stat != SMS_NO_MATCH) {
+    } else if (stat != MR_NO_MATCH) {
        com_err(program_name, stat, " in AddFS");
        return(DM_NORMAL);
     } 
 
     args = AskFSInfo(SetDefaults(info, argv[1]), FALSE );
 
-    stat = do_sms_query("add_filesys", CountArgs(args), args, NullFunc, NULL);
+    stat = do_mr_query("add_filesys", CountArgs(args), args, NullFunc, NULL);
     switch (stat) {
-    case SMS_NFS:
+    case MR_NFS:
        Put_message("That NFS filesystem is not exported.");
        if (YesNoQuestion("Fix this now (Y/N)")) {
            Do_menu(&nfsphys_menu, 0, NULL);
            if (YesNoQuestion("Retry filesystem creation now (Y/N)")) {
-               if (stat = do_sms_query("add_filesys", CountArgs(args), args,
+               if (stat = do_mr_query("add_filesys", CountArgs(args), args,
                                        NullFunc, NULL))
                    com_err(program_name, stat, " in AddFS");
                else
@@ -475,22 +475,22 @@ int argc;
            }
        }
        break;
-    case SMS_SUCCESS:
+    case MR_SUCCESS:
        break;
     default:
        com_err(program_name, stat, " in AddFS");
     }
 
-    if (stat == SMS_SUCCESS && !strcasecmp(info[FS_L_TYPE], "HOMEDIR")) {
+    if (stat == MR_SUCCESS && !strcasecmp(info[FS_L_TYPE], "HOMEDIR")) {
        static char *val[] = {"def_quota", NULL};
        static char *def_quota = NULL;
        char *argv[3];
        struct qelem *top = NULL;
 
        if (def_quota == NULL) {
-           stat = do_sms_query("get_value", CountArgs(val), val,
+           stat = do_mr_query("get_value", CountArgs(val), val,
                                StoreInfo, (char *) &top);
-           if (stat != SMS_SUCCESS) {
+           if (stat != MR_SUCCESS) {
                com_err(program_name, stat, " getting default quota");
            } else {
                top = QueueTop(top);
@@ -504,8 +504,8 @@ int argc;
            if (YesNoQuestion(buf, 1)) {
                argv[Q_LOGIN] = argv[Q_FILESYS] = info[FS_NAME];
                argv[Q_QUOTA] = def_quota;
-               if ((stat = do_sms_query("add_nfs_quota", 3, argv, Scream,
-                                        (char *) NULL)) != SMS_SUCCESS) {
+               if ((stat = do_mr_query("add_nfs_quota", 3, argv, Scream,
+                                        (char *) NULL)) != MR_SUCCESS) {
                    com_err(program_name, stat, " while adding quota");
                }
            }
@@ -585,16 +585,16 @@ int argc;
     struct qelem *elem = NULL;
     char buf[BUFSIZ], *args[5], *bufp;
 
-    if ((stat = do_sms_query("get_fsgroup_members", 1, argv+1, StoreInfo,
+    if ((stat = do_mr_query("get_fsgroup_members", 1, argv+1, StoreInfo,
                             (char *)&elem)) != 0) {
-       if (stat != SMS_NO_MATCH)
+       if (stat != MR_NO_MATCH)
          com_err(program_name, stat, " in AddFSToGroup");
     }
     if (elem == NULL) {
        args[0] = argv[1];
        args[1] = argv[2];
        args[2] = "M";
-       stat = do_sms_query("add_filesys_to_fsgroup", 3, args, Scream, NULL);
+       stat = do_mr_query("add_filesys_to_fsgroup", 3, args, Scream, NULL);
        if (stat)
          com_err(program_name, stat, " in AddFSToGroup");
        return(DM_NORMAL);
@@ -612,8 +612,8 @@ int argc;
     FreeQueue(QueueTop(elem));
     args[0] = argv[1];
     args[1] = argv[2];
-    stat = do_sms_query("add_filesys_to_fsgroup", 3, args, Scream, NULL);
-    if (stat == SMS_EXISTS) {
+    stat = do_mr_query("add_filesys_to_fsgroup", 3, args, Scream, NULL);
+    if (stat == MR_EXISTS) {
        Put_message("That filesystem is already a member of the group.");
        Put_message("Use the order command if you want to change the sorting order.");
     } else if (stat)
@@ -640,7 +640,7 @@ int argc;
     sprintf(buf, "Delete filesystem %s from FS group %s", argv[2], argv[1]);
     if (!Confirm(buf))
       return(DM_NORMAL);
-    if ((stat = do_sms_query("remove_filesys_from_fsgroup", 2, argv+1,
+    if ((stat = do_mr_query("remove_filesys_from_fsgroup", 2, argv+1,
                             Scream, NULL)) != 0) {
        com_err(program_name, stat, ", not removed.");
     }
@@ -663,9 +663,9 @@ int argc;
     struct qelem *elem = NULL, *top;
     char buf[BUFSIZ], *bufp, *args[3];
 
-    if ((stat = do_sms_query("get_fsgroup_members", 1, argv+1, StoreInfo,
+    if ((stat = do_mr_query("get_fsgroup_members", 1, argv+1, StoreInfo,
                             (char *)&elem)) != 0) {
-       if (stat == SMS_NO_MATCH) {
+       if (stat == MR_NO_MATCH) {
            sprintf(buf, "Ether %s is not a filesystem group or it has no members", argv[1]);
            Put_message(buf);
        } else
@@ -706,12 +706,12 @@ int argc;
     args[2] = SortAfter(top, dst);
     args[0] = argv[1];
     args[1] = ((char **)elem->q_data)[0];
-    if ((stat = do_sms_query("remove_filesys_from_fsgroup", 2, args,
+    if ((stat = do_mr_query("remove_filesys_from_fsgroup", 2, args,
                             Scream, NULL)) != 0) {
        com_err(program_name, stat, " in ChangeFSGroupOrder");
        return(DM_NORMAL);
     }
-    if ((stat = do_sms_query("add_filesys_to_fsgroup", 3, args,
+    if ((stat = do_mr_query("add_filesys_to_fsgroup", 3, args,
                             Scream, NULL)) != 0) {
        com_err(program_name, stat, " in ChangeFSGroupOrder");
     }
@@ -776,7 +776,7 @@ char **argv;
  * print out values, free memory used and then exit.
  */
 
-    if ( (stat = do_sms_query("get_alias", 3, args, StoreInfo, 
+    if ( (stat = do_mr_query("get_alias", 3, args, StoreInfo, 
                              (char *)&elem)) == 0) {
        top = elem = QueueTop(elem);
        while (elem != NULL) {
@@ -789,7 +789,7 @@ char **argv;
        FreeQueue(top);
        return(DM_NORMAL);
     }
-    else if ( stat != SMS_NO_MATCH) {
+    else if ( stat != MR_NO_MATCH) {
        com_err(program_name, stat, " in CreateFSAlias.");
         return(DM_NORMAL);
     }
@@ -798,7 +798,7 @@ char **argv;
     GetValueFromUser("Which filesystem will this alias point to?",
                     &args[ALIAS_TRANS]);
 
-    if ( (stat = do_sms_query("add_alias", 3, args, NullFunc, NULL)) != 0)
+    if ( (stat = do_mr_query("add_alias", 3, args, NullFunc, NULL)) != 0)
        com_err(program_name, stat, " in CreateFSAlias.");
 
     FreeInfo(args);
@@ -829,7 +829,7 @@ Bool one_item;
            "Are you sure that you want to delete the filesystem alias %s",
            info[ALIAS_NAME]);
     if(!one_item || Confirm(temp_buf)) {
-       if ( (stat = do_sms_query("delete_alias", CountArgs(info),
+       if ( (stat = do_mr_query("delete_alias", CountArgs(info),
                                  info, Scream, NULL)) != 0 )
            com_err(program_name, stat, " filesystem alias not deleted.");
        else
index e1b9b380ff93c07506f2f977af6c678c4454a720..4f8b77cf259946c6ebf08246187bcab5deb30778 100644 (file)
@@ -2,8 +2,8 @@
   static char rcsid_module_c[] = "$Header$";
 #endif lint
 
-/*     This is the file cluster.c for the SMS Client, which allows a nieve
- *      user to quickly and easily maintain most parts of the SMS database.
+/*     This is the file cluster.c for the MOIRA Client, which allows a nieve
+ *      user to quickly and easily maintain most parts of the MOIRA database.
  *     It Contains: 
  *     
  *     Created:        4/22/88
@@ -23,8 +23,8 @@
 
 #include <stdio.h>
 #include <strings.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
 #include <menu.h>
 
 #include "mit-copyright.h"
@@ -186,14 +186,14 @@ char * name1, *name2;
 
     switch (type) {
     case MACHINE:
-       if ( (stat = do_sms_query("get_machine", 1, &name1,
+       if ( (stat = do_mr_query("get_machine", 1, &name1,
                                  StoreInfo, (char *)&elem)) != 0) {
            com_err(program_name, stat, " in get_machine.");
            return(NULL);
        }
        break;
     case CLUSTER:
-       if ( (stat = do_sms_query("get_cluster",  1, &name1,
+       if ( (stat = do_mr_query("get_cluster",  1, &name1,
                                  StoreInfo, (char *)&elem)) != 0) {
            com_err(program_name, stat, " in get_cluster.");
            return(NULL);
@@ -202,7 +202,7 @@ char * name1, *name2;
     case MAP:
        args[MAP_MACHINE] = name1;
        args[MAP_CLUSTER] = name2;
-       if ( (stat = do_sms_query("get_machine_to_cluster_map", 2, args,
+       if ( (stat = do_mr_query("get_machine_to_cluster_map", 2, args,
                                  StoreInfo, (char *)&elem)) != 0) {
            com_err(program_name, stat, " in get_machine_to_cluster_map.");
            return(NULL);
@@ -211,7 +211,7 @@ char * name1, *name2;
     case DATA:
        args[CD_NAME] = name1;
        args[CD_LABEL] = name2;
-       if ( (stat = do_sms_query("get_cluster_data", 2, args,
+       if ( (stat = do_mr_query("get_cluster_data", 2, args,
                                  StoreInfo, (char *)&elem)) != 0) {
            com_err(program_name, stat, " in get_cluster_data.");
            return(NULL);
@@ -349,12 +349,12 @@ char **argv;
  */
     name =  canonicalize_hostname(strsave(argv[1]));
 
-    if ( (stat = do_sms_query("get_machine", 1, &name, NullFunc, NULL)) == 0) {
+    if ( (stat = do_mr_query("get_machine", 1, &name, NullFunc, NULL)) == 0) {
        Put_message("This machine already exists.");
        free(name);
        return(DM_NORMAL);
     }
-    else if (stat != SMS_NO_MATCH) {
+    else if (stat != MR_NO_MATCH) {
        com_err(program_name, stat, " in AddMachine.");
        free(name);
        return(DM_NORMAL);
@@ -366,7 +366,7 @@ char **argv;
  * Actually create the new Machine.
  */
     
-    if ( (stat = do_sms_query("add_machine", CountArgs(args), 
+    if ( (stat = do_mr_query("add_machine", CountArgs(args), 
                              args, Scream, NULL)) != 0)
        com_err(program_name, stat, " in AddMachine.");
 
@@ -390,7 +390,7 @@ Bool junk;
 {
     register int stat;
     char ** args = AskMCDInfo(info, MACHINE, TRUE);
-    if ( (stat = do_sms_query("update_machine", CountArgs(args), 
+    if ( (stat = do_mr_query("update_machine", CountArgs(args), 
                              args, Scream, NULL)) != 0)
        com_err(program_name, stat, " in UpdateMachine.");
     else
@@ -426,7 +426,7 @@ char **argv;
  *                   and if so then removes it
  *     Arguments: name - name of the machine (already Canonocalized).
  *                 ask_user- query the user before removing if from clusters?
- *     Returns: SMS_ERROR if machine left in a cluster, or sms_error.
+ *     Returns: MR_ERROR if machine left in a cluster, or mr_error.
  */
 
 int 
@@ -442,13 +442,13 @@ Bool ask_user;
     ret_value = SUB_NORMAL;    /* initialize ret_value. */
     args[0] = name;
     args[1] = "*";
-    stat = do_sms_query("get_machine_to_cluster_map", 2, args, 
+    stat = do_mr_query("get_machine_to_cluster_map", 2, args, 
                        StoreInfo, (char *)&elem);
-    if (stat && stat != SMS_NO_MATCH) {
+    if (stat && stat != MR_NO_MATCH) {
        com_err(program_name, stat, " in get_machine_to_cluster_map.");
        return(DM_NORMAL);
     }
-    if (stat == SMS_SUCCESS) {
+    if (stat == MR_SUCCESS) {
        elem = top = QueueTop(elem);
        if (ask_user) {
            sprintf(temp_buf, "%s is assigned to the following clusters.",
@@ -470,7 +470,7 @@ Bool ask_user;
        if (delete_it) {
            while (elem != NULL) {
                char **info = (char **) elem->q_data;
-               if ( (stat = do_sms_query( "delete_machine_from_cluster",
+               if ( (stat = do_mr_query( "delete_machine_from_cluster",
                                          2, info, Scream, NULL)) != 0) {
                    ret_value = SUB_ERROR;
                    com_err(program_name, stat, 
@@ -507,7 +507,7 @@ Bool one_machine;
            info[M_NAME]);
     if(!one_machine || Confirm(temp_buf)) {
        if (CheckAndRemoveFromCluster(info[M_NAME], TRUE) != SUB_ERROR) {
-           if ( (stat = do_sms_query("delete_machine", 1,
+           if ( (stat = do_mr_query("delete_machine", 1,
                                      &info[M_NAME], Scream, NULL)) != 0) {
                com_err(program_name, stat, " in DeleteMachine.");
                sprintf(temp_buf, "%s ** NOT ** deleted.", 
@@ -603,12 +603,12 @@ char ** argv;
            if (add_it) {
                args[0] = minfo[M_NAME];
                args[1] = cinfo[C_NAME];
-               stat = do_sms_query("add_machine_to_cluster", 2, args,
+               stat = do_mr_query("add_machine_to_cluster", 2, args,
                                    Scream, NULL);
                switch (stat) {
-               case SMS_SUCCESS:
+               case MR_SUCCESS:
                    break;
-               case SMS_EXISTS:
+               case MR_EXISTS:
                    sprintf(temp_buf, "%s is already in cluster %s",
                            minfo[M_NAME], cinfo[C_NAME]);
                    Put_message(temp_buf);
@@ -648,7 +648,7 @@ Bool one_map;
     sprintf(temp_buf, "Remove %s from the cluster %s", 
            info[MAP_MACHINE], info[MAP_CLUSTER]);
     if (!one_map || Confirm(temp_buf)) {
-       if ( (stat = do_sms_query("delete_machine_from_cluster", 2, 
+       if ( (stat = do_mr_query("delete_machine_from_cluster", 2, 
                                  info, Scream, NULL)) != 0 )
            com_err(program_name, stat, " in delete_machine_from_cluster");
        else {
@@ -682,16 +682,16 @@ char ** argv;
     args[MAP_CLUSTER] = argv[2];
     args[MAP_END] = NULL;
 
-    stat = do_sms_query("get_machine_to_cluster_map", CountArgs(args), args,
+    stat = do_mr_query("get_machine_to_cluster_map", CountArgs(args), args,
                        StoreInfo, (char *)&elem);
-    if (stat == SMS_NO_MATCH) {
+    if (stat == MR_NO_MATCH) {
        sprintf(buf, "The machine %s is not is the cluster %s.",
                args[MAP_MACHINE], args[MAP_CLUSTER]);
        Put_message(buf);
        free(args[MAP_MACHINE]);
        return(DM_NORMAL);
     }
-    if (stat != SMS_SUCCESS)
+    if (stat != MR_SUCCESS)
        com_err(program_name, stat, " in delete_machine_from_cluster");
 
     elem = QueueTop(elem);
@@ -745,12 +745,12 @@ char ** argv;
     if (!ValidName(name))
        return(DM_NORMAL);
 
-    if ( (stat = do_sms_query("get_cluster", 1, &name, 
-                             NullFunc, NULL)) == SMS_SUCCESS) {
+    if ( (stat = do_mr_query("get_cluster", 1, &name, 
+                             NullFunc, NULL)) == MR_SUCCESS) {
        Put_message("This cluster already exists.");
        return(DM_NORMAL);
     }
-    else if (stat != SMS_NO_MATCH) {
+    else if (stat != MR_NO_MATCH) {
        com_err(program_name, stat, " in AddCluster.");
        return(DM_NORMAL);
     }
@@ -758,7 +758,7 @@ char ** argv;
 /*
  * Actually create the new Cluster.
  */
-    if ( (stat = do_sms_query("add_cluster", CountArgs(args), 
+    if ( (stat = do_mr_query("add_cluster", CountArgs(args), 
                              args, Scream, NULL)) != 0)
        com_err(program_name, stat, " in AddCluster.");
 
@@ -781,7 +781,7 @@ Bool junk;
 {
     register int stat;
     char ** args = AskMCDInfo(info, CLUSTER, TRUE);
-    if ( (stat = do_sms_query("update_cluster", CountArgs(args), 
+    if ( (stat = do_mr_query("update_cluster", CountArgs(args), 
                              args, Scream, NULL)) != 0)
        com_err(program_name, stat, " in UpdateCluster.");
     else
@@ -830,9 +830,9 @@ Bool ask_first;
     ret_value = SUB_NORMAL;
     args[MAP_MACHINE] = "*";
     args[MAP_CLUSTER] = name;
-    stat = do_sms_query("get_machine_to_cluster_map", 2, args, 
+    stat = do_mr_query("get_machine_to_cluster_map", 2, args, 
                        StoreInfo, (char *)&elem);
-    if (stat && stat != SMS_NO_MATCH) {
+    if (stat && stat != MR_NO_MATCH) {
        com_err(program_name, stat, " in get_machine_to_cluster_map.");
        return(DM_NORMAL);
     }
@@ -865,7 +865,7 @@ Bool ask_first;
            elem = top;
            while (elem != 0) {
                char **info = (char **) elem->q_data;
-               if ( (stat = do_sms_query("delete_machine_from_cluster",
+               if ( (stat = do_mr_query("delete_machine_from_cluster",
                                          2, info, Scream, NULL)) != 0) {
                    ret_value = SUB_ERROR;
                    com_err(program_name, stat, 
@@ -903,7 +903,7 @@ Bool one_cluster;
            info[C_NAME]);
     if (!one_cluster || Confirm(temp_buf)) {
        if (CheckAndRemoveMachines(info[C_NAME], TRUE) != SUB_ERROR) {
-           if ( (stat = do_sms_query("delete_cluster", 1,
+           if ( (stat = do_mr_query("delete_cluster", 1,
                                      &info[C_NAME], Scream, NULL)) != 0) {
                com_err(program_name, stat, " in delete_cluster.");
                sprintf(temp_buf, "Cluster %s ** NOT ** deleted.", 
@@ -984,7 +984,7 @@ char ** argv;
 { 
     int stat;
 
-    if( (stat = do_sms_query("add_cluster_data", 3, argv + 1,
+    if( (stat = do_mr_query("add_cluster_data", 3, argv + 1,
                             Scream, (char *) NULL)) != 0)
        com_err(program_name, stat, " in AddClusterData.");
 
@@ -1011,7 +1011,7 @@ Bool one_item;
     temp_ptr = "Are you sure that you want to remove this cluster data (y/n) ?";
     PrintClusterData(info);
     if (!one_item || Confirm(temp_ptr)) {
-       if( (stat = do_sms_query("delete_cluster_data", 3, info,
+       if( (stat = do_mr_query("delete_cluster_data", 3, info,
                                 Scream, (char *) NULL)) != 0) {
            com_err(program_name, stat, " in DeleteClusterData.");
            Put_message("Data not removed.");
index fbdb7b789ae76390c5ef1205d7893f09fb25c350..02fa80682f99c983436590a079c190cd79fab666 100644 (file)
@@ -8,8 +8,8 @@
 #include <stdio.h>
 #include <strings.h>
 #include <ctype.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
 #include <menu.h>
 
 #include "mit-copyright.h"
@@ -30,7 +30,7 @@ char **argv;
 char **info;
 {
     info[1] = strsave(argv[0]);
-    return(SMS_CONT);
+    return(MR_CONT);
 }
 
 EnableDcm(argc, argv)
@@ -41,10 +41,10 @@ char **argv;
     char *info[3];
 
     info[0] = "dcm_enable";
-    if (status = do_sms_query("get_value", 1, info, genable, info))
+    if (status = do_mr_query("get_value", 1, info, genable, info))
       com_err(whoami, status, " while getting value of dcm_enable");
     GetValueFromUser("Enable value", &info[1]);
-    if (status = do_sms_query("update_value", 2, info, Scream, NULL))
+    if (status = do_mr_query("update_value", 2, info, Scream, NULL))
       com_err(whoami, status, " while updating value of dcm_enable");
     FreeAndClear(&info[0], FALSE);
     FreeAndClear(&info[1], TRUE);
@@ -81,7 +81,7 @@ char **argv;
            atoi(argv[SVC_INPROGRESS]) ? "InProgress" : "Idle", tmp);
     Put_message(buf);
     Put_message("");
-    return(SMS_CONT);
+    return(MR_CONT);
 }
 
 
@@ -93,7 +93,7 @@ char **argv;
     int status;        
  
     qargv[0] = argv[1];
-    if (status = do_sms_query("get_server_info", 1, qargv, shserv, NULL))
+    if (status = do_mr_query("get_server_info", 1, qargv, shserv, NULL))
       com_err(whoami, status, " while getting server info");
     return(DM_NORMAL);
 }
@@ -117,7 +117,7 @@ char **argv;
 
     initserv(argv[1], info);
     askserv(info);
-    if (status = do_sms_query("add_server_info", 8, info, Scream, NULL))
+    if (status = do_mr_query("add_server_info", 8, info, Scream, NULL))
       com_err(whoami, status, " while updating server info");
     FreeInfo(info);
     return(DM_NORMAL);
@@ -151,7 +151,7 @@ char **cargv;
     cargv[SC_ACE_TYPE] = strsave(argv[SVC_ACE_TYPE]);
     cargv[SC_ACE_NAME] = strsave(argv[SVC_ACE_NAME]);
     cargv[SC_END] = NULL;
-    return(SMS_CONT);
+    return(MR_CONT);
 }
 
 initserv(name, argv)
@@ -164,7 +164,7 @@ char **argv;
     argv[SC_INTERVAL] = strsave("1440");
     sprintf(tmp, "/tmp/%s.out", name);
     argv[SC_TARGET] = strsave(tmp);
-    sprintf(tmp, "/u1/sms/bin/%s.sh", name);
+    sprintf(tmp, "/u1/mr/bin/%s.sh", name);
     argv[SC_SCRIPT] = strsave(tmp);
     argv[SC_TYPE] = strsave("UNIQUE");
     argv[SC_ENABLE] = strsave("1");
@@ -182,13 +182,13 @@ char **argv;
     int status;
 
     qargv[0] = (char *)argv[1];
-    if (status = do_sms_query("get_server_info", 1,
+    if (status = do_mr_query("get_server_info", 1,
                              qargv, gserv, (char *)qargv)) {
        com_err(whoami, status, " while getting server info");
        return(DM_NORMAL);
     }
     askserv(qargv);
-    if (status = do_sms_query("update_server_info", 8, qargv, Scream, NULL))
+    if (status = do_mr_query("update_server_info", 8, qargv, Scream, NULL))
       com_err(whoami, status, " while updating server info");
     return(DM_NORMAL);
 }
@@ -221,7 +221,7 @@ char **argv;
     free(ltt);
     Put_message(buf);
     Put_message("");
-    return(SMS_CONT);
+    return(MR_CONT);
 }
 
 
@@ -234,7 +234,7 @@ char **argv;
 
     qargv[SHI_SERVICE] = argv[1];
     qargv[SHI_MACHINE] = canonicalize_hostname(argv[2]);
-    if (status = do_sms_query("get_server_host_info", 2, qargv, shhost, NULL))
+    if (status = do_mr_query("get_server_host_info", 2, qargv, shhost, NULL))
       com_err(whoami, status, " getting server/host info");
     return(DM_NORMAL);
 }
@@ -245,7 +245,7 @@ int argc;
 char  **argv;
 {
     int status;
-    if (status = do_sms_query("reset_server_error", 1, &argv[1], Scream, NULL))
+    if (status = do_mr_query("reset_server_error", 1, &argv[1], Scream, NULL))
       com_err(whoami, status, " while resetting server error");
     return(DM_NORMAL);
 }
@@ -267,7 +267,7 @@ char **argv;
     qargv[3] = "0";
     qargv[4] = "0";
     qargv[5] = "";
-    if (status = do_sms_query("set_server_internal_flags", 6, qargv,
+    if (status = do_mr_query("set_server_internal_flags", 6, qargv,
                              Scream, NULL))
       com_err(whoami, status, " while resetting server error");
     return(DM_NORMAL);
@@ -281,7 +281,7 @@ char  **argv;
     int status;
 
     argv[2] = canonicalize_hostname(argv[2]);
-    if (status = do_sms_query("reset_server_host_error", 2, &argv[1],
+    if (status = do_mr_query("reset_server_host_error", 2, &argv[1],
                              Scream, NULL))
       com_err(whoami, status, " while resetting server/host error");
     return(DM_NORMAL);
@@ -308,7 +308,7 @@ char **argv;
     qargv[6] = "";
     qargv[7] = "0";
     qargv[8] = "0";
-    if (status = do_sms_query("set_server_host_internal", 9, qargv,
+    if (status = do_mr_query("set_server_host_internal", 9, qargv,
                              Scream, NULL))
       com_err(whoami, status, " while resetting server/host error");
     return(DM_NORMAL);
@@ -322,7 +322,7 @@ char  **argv;
     int status;
 
     argv[2] = canonicalize_hostname(argv[2]);
-    if (status = do_sms_query("set_server_host_override", 2, &argv[1],
+    if (status = do_mr_query("set_server_host_override", 2, &argv[1],
                              Scream, NULL))
       com_err(whoami, status, " while setting server/host override");
     return(DM_NORMAL);
@@ -341,7 +341,7 @@ char **cargv;
     cargv[SHI_VALUE2] = strsave(argv[SH_VALUE2]);
     cargv[SHI_VALUE3] = strsave(argv[SH_VALUE3]);
     cargv[SHI_END] = NULL;
-    return(SMS_CONT);
+    return(MR_CONT);
 }
 
 
@@ -376,13 +376,13 @@ char **argv;
 
     info[SHI_SERVICE] = strsave(argv[1]);
     info[SHI_MACHINE] = strsave(canonicalize_hostname(argv[2]));
-    if (status = do_sms_query("get_server_host_info", 2, info, ghost, 
+    if (status = do_mr_query("get_server_host_info", 2, info, ghost, 
                              (char *)info)) {
        com_err(whoami, status, " while getting server/host info");
        return(DM_NORMAL);
     }
     askhost(info);
-    if (status = do_sms_query("update_server_host_info", SHI_END, info,
+    if (status = do_mr_query("update_server_host_info", SHI_END, info,
                              Scream, NULL))
       com_err(whoami, status, " while updating server/host info");
     FreeInfo(info);
@@ -401,7 +401,7 @@ char **argv;
     info[SHI_MACHINE] = strsave(canonicalize_hostname(argv[2]));
     inithost(info);
     askhost(info);
-    if (status = do_sms_query("add_server_host_info", 6, info, Scream, NULL))
+    if (status = do_mr_query("add_server_host_info", 6, info, Scream, NULL))
       com_err(whoami, status, " while adding server/host info");
     FreeInfo(info);
     return(DM_NORMAL);
@@ -414,7 +414,7 @@ char **argv;
 {
     int status;
 
-    if (status = do_sms_query("delete_server_info", 1, &argv[1], Scream, NULL))
+    if (status = do_mr_query("delete_server_info", 1, &argv[1], Scream, NULL))
       com_err(whoami, status, " while deleting server info");
     return(DM_NORMAL);
 }
@@ -427,7 +427,7 @@ char **argv;
     int status;
 
     argv[2] = canonicalize_hostname(argv[2]);
-    if (status = do_sms_query("delete_server_host_info", 2, &argv[1],
+    if (status = do_mr_query("delete_server_host_info", 2, &argv[1],
                              Scream, NULL))
       com_err(whoami, status, " while deleting server/host info");
     return(DM_NORMAL);
@@ -442,7 +442,7 @@ int *count;
     sprintf(buf, "Service %s", argv[0]);
     Put_message(buf);
     (*count)++;
-    return(SMS_CONT);
+    return(MR_CONT);
 }
 
 phost(argc, argv, count)
@@ -453,7 +453,7 @@ int *count;
     sprintf(buf, "Host %s:%s", argv[0], argv[1]);
     Put_message(buf);
     (*count)++;
-    return(SMS_CONT);
+    return(MR_CONT);
 }
 
 
@@ -464,16 +464,16 @@ InProgress()
 
     argv[0] = argv[2] = "DONTCARE";
     argv[1] = "TRUE";
-    if ((status = do_sms_query("qualified_get_server", 3, argv, pserv, 
+    if ((status = do_mr_query("qualified_get_server", 3, argv, pserv, 
                               (char *)&count)) &&
-       status != SMS_NO_MATCH)
+       status != MR_NO_MATCH)
       com_err(whoami, status, " while getting servers");
     argv[0] = "*";
     argv[1] = argv[2] = argv[3] = argv[5] = "DONTCARE";
     argv[4] = "TRUE";
-    if ((status = do_sms_query("qualified_get_server_host",6,argv,phost,
+    if ((status = do_mr_query("qualified_get_server_host",6,argv,phost,
                               (char *)&count)) &&
-       status != SMS_NO_MATCH)
+       status != MR_NO_MATCH)
       com_err(whoami, status, " while getting server/hosts");
     if (!count)
       strcpy(buf, "Nothing is in progress at this time");
@@ -491,16 +491,16 @@ DcmFailed()
 
     argv[0] = argv[1] = "DONTCARE";
     argv[2] = "TRUE";
-    if ((status = do_sms_query("qualified_get_server", 3, argv, pserv, 
+    if ((status = do_mr_query("qualified_get_server", 3, argv, pserv, 
                               (char *)&count)) &&
-       status != SMS_NO_MATCH)
+       status != MR_NO_MATCH)
       com_err(whoami, status, " while getting servers");
     argv[0] = "*";
     argv[1] = argv[2] = argv[3] = argv[4] = "DONTCARE";
     argv[5] = "TRUE";
-    if ((status = do_sms_query("qualified_get_server_host",6,argv,phost,
+    if ((status = do_mr_query("qualified_get_server_host",6,argv,phost,
                               (char *)&count)) &&
-       status != SMS_NO_MATCH)
+       status != MR_NO_MATCH)
       com_err(whoami, status, " while getting server/hosts");
     if (!count)
       strcpy(buf, "Nothing has failed at this time");
@@ -515,7 +515,7 @@ DcmFailed()
 Dcm()
 {
     int status;
-    if (status = sms_do_update())
+    if (status = mr_do_update())
       com_err(whoami, status, " while triggering update");
     return(DM_NORMAL);
 }
index d95817cdfa6b4df6107ec4e5aefff90fc464cab4..3ae3a53d08ff48b7d20c89a6da161f658362fc76 100644 (file)
@@ -2,8 +2,8 @@
   static char rcsid_module_c[] = "$Header$";
 #endif lint
 
-/*     This is the file delete.c for the SMS Client, which allows a nieve
- *      user to quickly and easily maintain most parts of the SMS database.
+/*     This is the file delete.c for the MOIRA Client, which allows a nieve
+ *      user to quickly and easily maintain most parts of the MOIRA database.
  *     It Contains: functions for deleting users and lists.
  *     
  *     Created:        5/18/88
@@ -21,8 +21,8 @@
 
 #include <stdio.h>
 #include <strings.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
 #include <menu.h>
 
 #include "mit-copyright.h"
@@ -47,7 +47,7 @@ Bool verbose;
     int status;
     char *args[2], buf[BUFSIZ], **info;
 
-    if ( (status = do_sms_query("count_members_of_list", 1, &name, StoreInfo,
+    if ( (status = do_mr_query("count_members_of_list", 1, &name, StoreInfo,
                                (char *) &elem)) != 0) {
        com_err(program_name, status, 
                " in DeleteList (count_members_of_list).");
@@ -91,8 +91,8 @@ Bool verbose;
  
     args[0] = type;
     args[1] = name;
-    status = do_sms_query("get_ace_use", 2, args, NullFunc, (char *) NULL);
-    if (status != SMS_NO_MATCH)
+    status = do_mr_query("get_ace_use", 2, args, NullFunc, (char *) NULL);
+    if (status != MR_NO_MATCH)
        return;                 /* If this query fails the ace will
                                   not be deleted even if it is empty. */
     if (verbose) {
@@ -133,11 +133,11 @@ Bool verbose;
 
     args[0] = type;
     args[1] = name;
-    switch (status = do_sms_query("get_ace_use", 2, args,
+    switch (status = do_mr_query("get_ace_use", 2, args,
                                  StoreInfo, (char *) &elem)) {
-    case SMS_NO_MATCH:
+    case MR_NO_MATCH:
        return(DM_NORMAL);
-    case SMS_SUCCESS:
+    case MR_SUCCESS:
        local = elem = QueueTop(elem);
        info = (char **) local->q_data;
        if (QueueCount(elem) == 1 &&
@@ -202,13 +202,13 @@ int verbose;
  * Get all list of which this item is a member, and store them in a queue.
  */
 
-    status = do_sms_query("get_lists_of_member", 2, args, StoreInfo,
+    status = do_mr_query("get_lists_of_member", 2, args, StoreInfo,
                          (char *) elem);
 
-    if (status == SMS_NO_MATCH)
+    if (status == MR_NO_MATCH)
        return(SUB_NORMAL);
 
-    if (status != SMS_SUCCESS) {       
+    if (status != MR_SUCCESS) {        
        com_err(program_name, status, " in DeleteList (get_lists_of_member).");
        return(SUB_ERROR);
     }
@@ -251,7 +251,7 @@ int verbose;
     while (local != NULL) {
        char ** info = (char **) local->q_data;
        args[DM_LIST] = info[GLOM_NAME];
-       if ( (status = do_sms_query("delete_member_from_list",
+       if ( (status = do_mr_query("delete_member_from_list",
                                    3, args, Scream, NULL)) != 0) {
            com_err(program_name, status, " in delete_member\nAborting\n");
            FreeQueue(*elem);
@@ -280,9 +280,9 @@ Bool verbose;
 /* 
  * Get the members of this list.
  */
-    status = do_sms_query("get_members_of_list", 1, &name, StoreInfo,
+    status = do_mr_query("get_members_of_list", 1, &name, StoreInfo,
                          (char *) &elem);
-    if (status == SMS_NO_MATCH) 
+    if (status == MR_NO_MATCH) 
        return(SUB_NORMAL);
 
     if (status != 0) { 
@@ -324,7 +324,7 @@ Bool verbose;
        char ** info = (char **) local->q_data;
        args[1] = info[0];
        args[2] = info[1];
-       if ( (status = do_sms_query("delete_member_from_list",
+       if ( (status = do_mr_query("delete_member_from_list",
                                    3, args, Scream, NULL)) != 0) {
            com_err(program_name, status, " in delete_member\nAborting\n");
            FreeQueue(elem);
@@ -341,7 +341,7 @@ Bool verbose;
  *     Arguments: name - the name of the list to delete.
  *                 verbose - flag that if TRUE queries the user to
  *                           ask if list should be deleted.
- *     Returns: SMS_ERROR if there is an error.
+ *     Returns: MR_ERROR if there is an error.
  */
 
 int
@@ -352,7 +352,7 @@ Bool verbose;
     int status, ans;
     char buf[BUFSIZ], *args[10];
 
-    status = do_sms_query("get_list_info", 1, &name, NullFunc, (char *) NULL);
+    status = do_mr_query("get_list_info", 1, &name, NullFunc, (char *) NULL);
     if (status == 0) {
        if (verbose) {
            sprintf(buf, "There is also a list named %s, delete it?", name);
@@ -371,7 +371,7 @@ Bool verbose;
            args[1] = name;
            DeleteList(2, args);
     }
-    else if (status != SMS_NO_MATCH) {
+    else if (status != MR_NO_MATCH) {
        com_err(program_name, status, " Aborting Delete User.");        
        return(SUB_ERROR);
     }
@@ -393,11 +393,11 @@ Bool verbose;
     int status;
     char buf[BUFSIZ];
     
-    switch (status = do_sms_query("get_filesys_by_label", 1, &name, NullFunc, 
+    switch (status = do_mr_query("get_filesys_by_label", 1, &name, NullFunc, 
                                  (char *) NULL)) {
-    case SMS_NO_MATCH:
+    case MR_NO_MATCH:
        break;
-    case SMS_SUCCESS:
+    case MR_SUCCESS:
        if (verbose) {
            sprintf(buf, "Delete the filesystem named %s (y/n)?", name);
            switch (YesNoQuestion(buf, FALSE)) {
@@ -411,8 +411,8 @@ Bool verbose;
                return(SUB_ERROR);
            }
        }
-       if ( (status = do_sms_query("delete_filesys", 1, &name, Scream,
-                                   (char *) NULL) ) != SMS_SUCCESS) {
+       if ( (status = do_mr_query("delete_filesys", 1, &name, Scream,
+                                   (char *) NULL) ) != MR_SUCCESS) {
            com_err(program_name, status, " in delete_filesys.");
            return(SUB_ERROR);
        }
@@ -439,8 +439,8 @@ char * name;
     char buf[BUFSIZ];
     int status;
 
-    if ( (status = do_sms_query("delete_user", 1, &name, Scream, 
-                               (char *) NULL)) != SMS_SUCCESS) {
+    if ( (status = do_mr_query("delete_user", 1, &name, Scream, 
+                               (char *) NULL)) != MR_SUCCESS) {
        com_err(program_name, status, ": user not deleted");
        return(SUB_ERROR);
     }
@@ -462,8 +462,8 @@ char * name;
     char buf[BUFSIZ];
     int status;
 
-    if ( (status = do_sms_query("delete_list", 1, &name, Scream, 
-                               (char *) NULL)) != SMS_SUCCESS) {
+    if ( (status = do_mr_query("delete_list", 1, &name, Scream, 
+                               (char *) NULL)) != MR_SUCCESS) {
        com_err(program_name, status, ": list not deleted");
        return(SUB_ERROR);
     }
@@ -502,13 +502,13 @@ Bool ask_first;
      * 3) This list is not an ace of another object.
      */
     
-    switch (status = do_sms_query("delete_list", 1, &name,
+    switch (status = do_mr_query("delete_list", 1, &name,
                                  Scream, (char *) NULL)) {
-    case SMS_SUCCESS:
+    case MR_SUCCESS:
        Put_message("List Sucessfully Deleted.");
        CheckAce(list_info[L_ACE_TYPE], list_info[L_ACE_NAME], ask_first);
        break;
-    case SMS_IN_USE:
+    case MR_IN_USE:
        /* 
         * This list is in use.  Try to find out why, 
         * and for the cases where we have a good idea of 
@@ -530,9 +530,9 @@ Bool ask_first;
              list_info[L_ACE_TYPE] = Strsave("USER");
              list_info[L_ACE_NAME] = Strsave(user);
              SlipInNewName(list_info, Strsave(list_info[L_NAME]));
-             if ((status = do_sms_query("update_list", CountArgs(list_info)-3,
+             if ((status = do_mr_query("update_list", CountArgs(list_info)-3,
                                       list_info, Scream, (char *) NULL))
-                   != SMS_SUCCESS) {
+                   != MR_SUCCESS) {
                  com_err(program_name, status, " while updating list owner");
                  Put_message("List may be only partly deleted.");
              }
@@ -559,7 +559,7 @@ Bool ask_first;
 
 /*     Function Name: DeleteList
  *     Description: deletes a list
- *     Arguments: argc, argv - standard SMS argc and argv.
+ *     Arguments: argc, argv - standard MR argc and argv.
  *     Returns: DM Status Code.
  */
 
@@ -576,15 +576,15 @@ char *argv[];
 
     list = NULL;
     
-    switch(status = do_sms_query("get_list_info", 1, argv + 1,
+    switch(status = do_mr_query("get_list_info", 1, argv + 1,
                                 StoreInfo, (char *) &list)){
-    case SMS_SUCCESS:
+    case MR_SUCCESS:
        break;
-/*    case SMS_NO_WILDCARD:
+/*    case MR_NO_WILDCARD:
        Put_message("Wildcards are not accepted here.");
        return(DM_NORMAL);
-*/  case SMS_NO_MATCH:
-    case SMS_LIST:
+*/  case MR_NO_MATCH:
+    case MR_LIST:
        Put_message("There is no list that matches that name.");
        return(DM_NORMAL);
     default:
@@ -644,8 +644,8 @@ char ** argv;
     if (!Confirm("Are you sure that you want to delete this user?"))
        return(DM_NORMAL);
 
-    status = do_sms_query("delete_user", 1, &name, Scream, (char *) NULL);
-    if (status != SMS_IN_USE && status != 0) {
+    status = do_mr_query("delete_user", 1, &name, Scream, (char *) NULL);
+    if (status != MR_IN_USE && status != 0) {
        com_err(program_name, status, ": user not deleted");    
        return(DM_NORMAL);
     }
@@ -660,7 +660,7 @@ char ** argv;
     Put_message("Sorry, registered users cannot be deleted from the database.");
     Put_message("Deactivate the user now, and the system manager will expunge later.");
 #ifdef notdef
-    else if (status == SMS_IN_USE) {
+    else if (status == MR_IN_USE) {
 
 /*
  * Check:
index f11471e3bb1a668199eb0979667fecdcafd0ad42..25a0d1348ccb3f059e92ab85b63c2e1865a83d8a 100644 (file)
@@ -2,8 +2,8 @@
   static char rcsid_module_c[] = "$Header$";
 #endif lint
 
-/*     This is the file globals.c for the SMS Client, which allows a nieve
- *      user to quickly and easily maintain most parts of the SMS database.
+/*     This is the file globals.c for the Moira Client, which allows a nieve
+ *      user to quickly and easily maintain most parts of the Moira database.
  *     It Contains:  globals variable definitions.
  *     
  *     Created:        4/12/88
index b663333bcd6fa72a5134f4b7e3711110289994b4..3c54ca75ad9ba5481f168d2252cdea572f465b4f 100644 (file)
@@ -2,8 +2,8 @@
   static char rcsid_module_c[] = "$Header$";
 #endif lint
 
-/*     This is the file lists.c for the SMS Client, which allows a nieve
- *      user to quickly and easily maintain most parts of the SMS database.
+/*     This is the file lists.c for the MOIRA Client, which allows a nieve
+ *      user to quickly and easily maintain most parts of the MOIRA database.
  *     It Contains: All list manipulation functions, except delete.
  *     
  *     Created:        4/12/88
@@ -21,8 +21,8 @@
 
 #include <stdio.h>
 #include <strings.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
 #include <menu.h>
 
 #include "mit-copyright.h"
@@ -132,7 +132,7 @@ char * name1, *name2;
     switch(type) {
     case LIST:
        args[0] = name1;
-       if ( (status = do_sms_query("get_list_info", 1, args,
+       if ( (status = do_mr_query("get_list_info", 1, args,
                               StoreInfo, (char *) &elem)) != 0) {
            com_err(program_name, status, " in get_list_info");
            return (NULL);
@@ -140,7 +140,7 @@ char * name1, *name2;
        break;
     case MEMBERS:
        args[0] = name1;
-       if ( (status = do_sms_query("get_members_of_list", 1, args,
+       if ( (status = do_mr_query("get_members_of_list", 1, args,
                               StoreInfo, (char *) &elem)) != 0) {
            com_err(program_name, status, " in get_members_of_list");
            return (NULL);
@@ -149,7 +149,7 @@ char * name1, *name2;
     case GLOM:
        args[0] = name1;        
        args[1] = name2;        
-       if ( (status =  do_sms_query("get_lists_of_member", 2, args,
+       if ( (status =  do_mr_query("get_lists_of_member", 2, args,
                               StoreInfo, (char *) &elem)) != 0) {
            com_err(program_name, status, " in get_list_of_members");
            return (NULL);
@@ -158,7 +158,7 @@ char * name1, *name2;
     case ACE_USE:
        args[0] = name1;        
        args[1] = name2;        
-       if ( (status =  do_sms_query("get_ace_use", 2, args,
+       if ( (status =  do_mr_query("get_ace_use", 2, args,
                               StoreInfo, (char *) &elem)) != 0) {
            com_err(program_name, status, " in get_ace_use");
            return (NULL);
@@ -270,8 +270,8 @@ Bool junk;
     char ** args;
     
     args = AskListInfo(info, TRUE);
-    if ( (stat = do_sms_query("update_list", CountArgs(args), args, 
-                          Scream, (char *) NULL)) != SMS_SUCCESS) {
+    if ( (stat = do_mr_query("update_list", CountArgs(args), args, 
+                          Scream, (char *) NULL)) != MR_SUCCESS) {
        com_err(program_name, stat, " in UpdateList."); 
        Put_message("List ** NOT ** Updated.");
     }
@@ -343,10 +343,10 @@ char **argv;
 
     if (!ValidName(argv[1]))
       return(DM_NORMAL);
-    status = do_sms_query("get_list_info", 1, argv + 1, NullFunc, 
+    status = do_mr_query("get_list_info", 1, argv + 1, NullFunc, 
                       (char *) NULL);
-    if (status != SMS_NO_MATCH) {
-       if (status == SMS_SUCCESS)
+    if (status != MR_NO_MATCH) {
+       if (status == MR_SUCCESS)
            Put_message("This list already exists.");
        else
            com_err(program_name, status, " in AddList.");      
@@ -355,8 +355,8 @@ char **argv;
 
     add_args = AskListInfo(SetDefaults(info,argv[1]), FALSE);
 
-    if ( (status = do_sms_query("add_list", CountArgs(add_args), add_args,
-                            Scream, (char *) NULL)) != SMS_SUCCESS) {
+    if ( (status = do_mr_query("add_list", CountArgs(add_args), add_args,
+                            Scream, (char *) NULL)) != MR_SUCCESS) {
        com_err(program_name, status, " in AddList.");  
        Put_message("List Not Created.");
        ret_code = SUB_ERROR;
@@ -426,14 +426,14 @@ char **argv;
     }
     else 
        /* All we want to know is if it exists. */
-       switch( (stat = do_sms_query("count_members_of_list", 1, argv + 1,
+       switch( (stat = do_mr_query("count_members_of_list", 1, argv + 1,
                                   NullFunc, (char *) NULL))) {
-       case SMS_SUCCESS:
+       case MR_SUCCESS:
            break;
-       case SMS_LIST:
+       case MR_LIST:
            Put_message("This list does not exist.");
            return(DM_QUIT);
-       case SMS_PERM:
+       case MR_PERM:
            Put_message("You are not allowed to view this list.");
            break;
        default:
@@ -483,7 +483,7 @@ char * type;
     args[1] = NULL;
 
     found_some = FALSE;
-    if ( (status = do_sms_query("get_members_of_list", CountArgs(args), args, 
+    if ( (status = do_mr_query("get_members_of_list", CountArgs(args), args, 
                             PrintByType, type)) != 0) {
        com_err(program_name, status, " in ListMembersByType");
        return(DM_NORMAL);
@@ -596,9 +596,9 @@ AddMember()
     if ( GetMemberInfo("add", args) == SUB_ERROR )
        return(DM_NORMAL);
 
-    if ( (status = do_sms_query("add_member_to_list", CountArgs(args), args,
-                          Scream, NULL)) != SMS_SUCCESS) {
-       if (status == SMS_EXISTS) {
+    if ( (status = do_mr_query("add_member_to_list", CountArgs(args), args,
+                          Scream, NULL)) != MR_SUCCESS) {
+       if (status == MR_EXISTS) {
            sprintf(temp_buf, "The %s %s is already a member of LIST %s.",
                    args[LM_TYPE], args[LM_MEMBER], args[LM_LIST]);
            Put_message(temp_buf);
@@ -627,7 +627,7 @@ DeleteMember()
        return(DM_NORMAL);
 
     if (Confirm("Are you sure you want to delete this member?") ) {
-       if (status = do_sms_query("delete_member_from_list", CountArgs(args),
+       if (status = do_mr_query("delete_member_from_list", CountArgs(args),
                               args, Scream, NULL))
            com_err(program_name, status, " in DeleteMember");
        else
@@ -681,7 +681,7 @@ InterRemoveItemFromLists()
            args[DM_LIST] = info[GLOM_NAME];
            args[DM_TYPE] = type;
            args[DM_MEMBER] = name;
-           if ( (status = do_sms_query("delete_member_from_list", 3, args,
+           if ( (status = do_mr_query("delete_member_from_list", 3, args,
                               Scream, (char *) NULL)) != 0)
                /* should probabally check to delete list. */
                com_err(program_name, status, " in delete_member");
@@ -803,7 +803,7 @@ ListAllGroups()
 
     if (YesNoQuestion("This query will take a while, Do you wish to continue?",
                       TRUE) == TRUE )
-       if (status = do_sms_query("qualified_get_lists", 5, args,
+       if (status = do_mr_query("qualified_get_lists", 5, args,
                               Print, (char *) NULL) != 0)
            com_err(program_name, status, " in ListAllGroups");
     return (DM_NORMAL);
@@ -828,7 +828,7 @@ ListAllMailLists()
 
     if (YesNoQuestion("This query will take a while. Do you wish to continue?",
                       TRUE) == TRUE )
-       if (status = do_sms_query("qualified_get_lists", 5, args,
+       if (status = do_mr_query("qualified_get_lists", 5, args,
                               Print, (char *) NULL) != 0)
            com_err(program_name, status, " in ListAllGroups");
 
@@ -854,7 +854,7 @@ ListAllPublicMailLists()
 
     if (YesNoQuestion("This query will take a while. Do you wish to continue?",
                       TRUE) == TRUE )
-       if (status = do_sms_query("qualified_get_lists", 5, args,
+       if (status = do_mr_query("qualified_get_lists", 5, args,
                               Print, (char *) NULL) != 0)
            com_err(program_name, status, " in ListAllGroups");
 
index 6dfc617684489367c2de531b3385096d9da55fe3..539c15c963b3b71d03acfa46f3e4391faf2d0119 100644 (file)
@@ -24,7 +24,7 @@
 #include <stdio.h>
 #include <strings.h>
 #include <sys/types.h>
-#include <sms.h>
+#include <moira.h>
 #include <menu.h>
 
 #include "mit-copyright.h"
@@ -35,7 +35,7 @@
 char * whoami;                 /* used by menu.c ugh!!! */
 char * moira_server;
 
-extern Menu sms_top_menu, list_menu, user_menu, dcm_menu;
+extern Menu moira_top_menu, list_menu, user_menu, dcm_menu;
 
 #ifndef DEBUG
 static void SignalHandler();
@@ -93,19 +93,19 @@ main(argc, argv)
        }
     }
 
-    if ( status = sms_connect(moira_server) ) 
+    if ( status = mr_connect(moira_server) ) 
        ErrorExit("\nConnection to Moira server failed", status);
 
-    if ( status = sms_motd(&motd) )
+    if ( status = mr_motd(&motd) )
         ErrorExit("\nUnable to check server status", status);
     if (motd) {
        fprintf(stderr, "The Moira server is currently unavailable:\n%s\n", motd);
-       sms_disconnect();
+       mr_disconnect();
        exit(1);
     }
 
-    if ( status = sms_auth(program_name) ) {
-       if (status == SMS_USER_AUTH) {
+    if ( status = mr_auth(program_name) ) {
+       if (status == MR_USER_AUTH) {
            char buf[BUFSIZ];
            com_err(program_name, status, "\nPress [RETURN] to continue");
            gets(buf);
@@ -131,7 +131,7 @@ main(argc, argv)
     else if (!strcmp(program_name, "dcmmaint"))
       menu = &dcm_menu;
     else
-      menu = &sms_top_menu;
+      menu = &moira_top_menu;
 
     if (use_menu) {            /* Start menus that execute program */
         Start_paging();
@@ -141,7 +141,7 @@ main(argc, argv)
     else                       /* Start program without menus. */
        Start_no_menu(menu);
 
-    sms_disconnect();
+    mr_disconnect();
     exit(0);
 }
 
@@ -158,7 +158,7 @@ int status;
 char * buf;    
 {
     com_err(program_name, status, buf);
-    sms_disconnect();
+    mr_disconnect();
     exit(1);
 }
 
@@ -188,7 +188,7 @@ SignalHandler()
     Put_message("Signal caught - exiting");
     if (use_menu)
       Cleanup_menu();
-    sms_disconnect();
+    mr_disconnect();
     exit(1);
 }
 #endif DEBUG
index 80dacd4064b4e4735783a5d30c867faafc95deb4..13d88b90835ae6aa64b77a6c29f583ec1a40a40b 100644 (file)
@@ -2,8 +2,8 @@
   static char rcsid_module_c[] = "$Header$";
 #endif lint
 
-/*     This is the file menus.c for the SMS Client, which allows a nieve
- *      user to quickly and easily maintain most parts of the SMS database.
+/*     This is the file menus.c for the MOIRA Client, which allows a nieve
+ *      user to quickly and easily maintain most parts of the MOIRA database.
  *     It Contains: All menu definitions.
  *     
  *     Created:        4/11/88
@@ -667,10 +667,10 @@ Menu misc_menu = {
 /* ------------------------- Root Menu ------------------------- */
 
 /* 
- * Sms top menu
+ * Moira top menu
  */
 
-Menu sms_top_menu = {
+Menu moira_top_menu = {
   NULLFUNC,
   NULLFUNC,
   "Moira Database Manipulation",
index 3c9c4d1f837c577cac8f96eb4cca552b43d7f02a..6494cc182ebe1b900c315be7a874e8501282cbbf 100644 (file)
@@ -1,5 +1,5 @@
-/*     This is the file misc.c for the SMS Client, which allows a naieve
- *      user to quickly and easily maintain most parts of the SMS database.
+/*     This is the file misc.c for the MOIRA Client, which allows a naieve
+ *      user to quickly and easily maintain most parts of the MOIRA database.
  *     It Contains: 
  *             TableStats
  *             ShowClients
@@ -20,8 +20,8 @@
 
 #include <stdio.h>
 #include <strings.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
 #include <menu.h>
 #include <sys/types.h>
 #include <netdb.h>
@@ -54,7 +54,7 @@ char **info;
 
 
 /*     Function Name: TableStats
- *     Description: display the SMS table statistics
+ *     Description: display the MOIRA table statistics
  *     Arguments: NONE
  *     Returns: DM_NORMAL
  */
@@ -64,7 +64,7 @@ int TableStats()
     int status;
     struct qelem *elem = NULL;
 
-    if (status = do_sms_query("get_all_table_stats", 0, NULL,
+    if (status = do_mr_query("get_all_table_stats", 0, NULL,
                              StoreInfo, (char *)&elem)) {
        com_err(program_name, status, " in TableStats");
        return(DM_NORMAL);
@@ -103,7 +103,7 @@ char **info;
 
 
 /*     Function Name: ShowClients
- *     Description: show clients actively using SMS
+ *     Description: show clients actively using MR
  *     Arguments: NONE
  *     Returns: DM_NORMAL
  */
@@ -113,7 +113,7 @@ int ShowClients()
     int status;
     struct qelem *elem = NULL;
 
-    if (status = do_sms_query("_list_users", 0, NULL,
+    if (status = do_mr_query("_list_users", 0, NULL,
                              StoreInfo, (char *) &elem)) {
        com_err(program_name, status, " in ShowClients");
        return(DM_NORMAL);
@@ -140,7 +140,7 @@ char **info;
 
 
 /*     Function Name: ShowValue
- *     Description: get a variable value from SMS
+ *     Description: get a variable value from MR
  *     Arguments: variable name
  *     Returns: DM_NORMAL
  */
@@ -152,7 +152,7 @@ char **argv;
     int status;
     struct qelem *elem = NULL;
 
-    if (status = do_sms_query("get_value", 1, &argv[1],
+    if (status = do_mr_query("get_value", 1, &argv[1],
                              StoreInfo, (char *) &elem)) {
        com_err(program_name, status, " in ShowValue");
        return(DM_NORMAL);
@@ -196,7 +196,7 @@ char **argv;
     info[0] = argv[1];
     info[1] = argv[2];
     info[2] = "*";
-    if (status = do_sms_query("get_alias", 3, info,
+    if (status = do_mr_query("get_alias", 3, info,
                              StoreInfo, (char *) &elem)) {
        com_err(program_name, status, " in ShowAlias");
        return(DM_NORMAL);
index be915437ef949599d254955f29034066e28dd14a..6a814174be9268d6c25a50f18ff36d6d8956c927 100644 (file)
@@ -2,8 +2,8 @@
   static char rcsid_module_c[] = "$Header$";
 #endif lint
 
-/*     This is the file nfs.c for the SMS Client, which allows a nieve
- *      user to quickly and easily maintain most parts of the SMS database.
+/*     This is the file nfs.c for the MOIRA Client, which allows a nieve
+ *      user to quickly and easily maintain most parts of the MOIRA database.
  *     It Contains: All functions for manipulating NFS Physical directories.
  *     
  *     Created:        5/6/88
@@ -21,8 +21,8 @@
 
 #include <stdio.h>
 #include <strings.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
 #include <menu.h>
 
 #include "mit-copyright.h"
@@ -73,23 +73,23 @@ char ** info;
     
     status_buf[0] = '\0';      /* clear string. */
 
-    if (status & SMS_FS_STUDENT) {
+    if (status & MR_FS_STUDENT) {
        strcat(status_buf, "Student");
        is_one = TRUE;
     }
-    if (status & SMS_FS_FACULTY) {
+    if (status & MR_FS_FACULTY) {
        if (is_one)
            strcat(status_buf, " and ");
        strcat(status_buf, "Faculty");
        is_one = TRUE;
     }
-    if (status & SMS_FS_STAFF) {
+    if (status & MR_FS_STAFF) {
        if (is_one)
            strcat(status_buf, " and ");
        strcat(status_buf, "Staff");
        is_one = TRUE;
     }
-    if (status & SMS_FS_MISC) {
+    if (status & MR_FS_MISC) {
        if (is_one)
            strcat(status_buf, " and ");
        strcat(status_buf, "Miscellaneous");
@@ -178,8 +178,8 @@ char **argv;
     if ( (args[1] = GetDirName()) == NULL)
        return(DM_NORMAL);
     
-    if ( (stat = do_sms_query("get_nfsphys", 2, args,
-                             StoreInfo, (char *)  &elem)) != SMS_SUCCESS)
+    if ( (stat = do_mr_query("get_nfsphys", 2, args,
+                             StoreInfo, (char *)  &elem)) != MR_SUCCESS)
        com_err(program_name, stat, " in ShowNFSServices.");
     free(args[0]);
     free(args[1]);             /* prevents memory leaks. */
@@ -214,10 +214,10 @@ int argc;
     if (!ValidName(args[0]) || !ValidName(args[1]))
        return(DM_NORMAL);
     
-    if ( (stat = do_sms_query("get_nfsphys", 2, args,
-                             NullFunc, (char *) NULL)) == SMS_SUCCESS)
+    if ( (stat = do_mr_query("get_nfsphys", 2, args,
+                             NullFunc, (char *) NULL)) == MR_SUCCESS)
        Put_message("This service already exists.");
-    if (stat != SMS_NO_MATCH) 
+    if (stat != MR_NO_MATCH) 
        com_err(program_name, stat, " in get_nfsphys.");
     
     info[NFS_NAME]   = Strsave(args[0]);
@@ -231,7 +231,7 @@ int argc;
 
     add_args = AskNFSInfo(info);
     
-    if ((stat = do_sms_query("add_nfsphys", CountArgs(add_args), add_args,
+    if ((stat = do_mr_query("add_nfsphys", CountArgs(add_args), add_args,
                             Scream, (char *) NULL)) != 0) 
        com_err(program_name, stat, " in AdsNFSService");
     
@@ -257,8 +257,8 @@ Bool junk;
     register int stat;
     
     args = AskNFSInfo(info);
-    if ((stat = do_sms_query("update_nfsphys", CountArgs(args), args,
-                            Scream, (char *)NULL)) != SMS_SUCCESS) 
+    if ((stat = do_mr_query("update_nfsphys", CountArgs(args), args,
+                            Scream, (char *)NULL)) != MR_SUCCESS) 
        com_err(program_name, stat, (char *) NULL);
 }
 
@@ -285,8 +285,8 @@ int argc;
     if ( (args[1] = GetDirName()) == NULL)
        return(DM_NORMAL);
 
-    if ( (stat = do_sms_query("get_nfsphys", 2, args,
-                             StoreInfo, (char *) &elem)) != SMS_SUCCESS) {
+    if ( (stat = do_mr_query("get_nfsphys", 2, args,
+                             StoreInfo, (char *) &elem)) != MR_SUCCESS) {
        com_err(program_name, stat, " in UpdateNFSService.");
        return (DM_NORMAL);
     }
@@ -345,16 +345,16 @@ Bool one_item;
        args[0] = info[NFS_NAME];
        args[1] = info[NFS_DIR];
        args[2] = NULL;
-       switch(stat = do_sms_query("get_filesys_by_nfsphys", CountArgs(args), 
+       switch(stat = do_mr_query("get_filesys_by_nfsphys", CountArgs(args), 
                                   args, StoreInfo, (char *)&elem)) {
-       case SMS_NO_MATCH:      /* it is unused, delete it. */
-           if ( (stat = do_sms_query("delete_nfsphys", 2, info, Scream, 
-                                     (char *) NULL )) != SMS_SUCCESS)
+       case MR_NO_MATCH:       /* it is unused, delete it. */
+           if ( (stat = do_mr_query("delete_nfsphys", 2, info, Scream, 
+                                     (char *) NULL )) != MR_SUCCESS)
                com_err(program_name, stat, " in DeleteNFSService");
            else
                Put_message("Physical Filesystem Deleted.");
            break;
-       case SMS_SUCCESS:       /* it is used, print filesys's that use it. */
+       case MR_SUCCESS:        /* it is used, print filesys's that use it. */
            elem = QueueTop(elem);
            Put_message("The following fileystems are using this partition,");
            Put_message("and must be removed before it can be deleted.");
@@ -395,12 +395,12 @@ char **argv;
     if ( (args[1] = GetDirName()) == NULL)
        return(DM_NORMAL);
 
-    switch(stat = do_sms_query("get_nfsphys", 2, args, 
+    switch(stat = do_mr_query("get_nfsphys", 2, args, 
                               StoreInfo, (char *) &elem)) {
-    case SMS_NO_MATCH:
+    case MR_NO_MATCH:
        Put_message("This filsystem does not exist!");
        return(DM_NORMAL);
-    case SMS_SUCCESS:
+    case MR_SUCCESS:
        break;
     default:
        com_err(program_name, stat, " in DeleteNFSService");
index 3620ccf17221af0b5033870ee358c27850d5e147..b8c84bcd9f6c44abfe128052f07dfa730951c3c6 100644 (file)
@@ -2,8 +2,8 @@
   static char rcsid_module_c[] = "$Header$";
 #endif lint
 
-/*     This is the file pobox.c for the SMS Client, which allows a nieve
- *      user to quickly and easily maintain most parts of the SMS database.
+/*     This is the file pobox.c for the MOIRA Client, which allows a nieve
+ *      user to quickly and easily maintain most parts of the MOIRA database.
  *     It Contains: Functions for handling the poboxes.
  *     
  *     Created:        7/10/88
@@ -22,8 +22,8 @@
 #include <stdio.h>
 #include <strings.h>
 #include <ctype.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
 #include <menu.h>
 
 #include "mit-copyright.h"
@@ -37,7 +37,7 @@
 /*     Function Name: PrintPOBox
  *     Description: Yet another specialized print function.
  *     Arguments: info - all info about this PO_box.
- *     Returns: SMS_CONT
+ *     Returns: MR_CONT
  */
 
 static void
@@ -77,8 +77,8 @@ PrintPOMachines()
     static char * args[] = {"pop", NULL};
     struct qelem * top = NULL;
     
-    if ( (status = do_sms_query("get_server_locations", CountArgs(args), args,
-                               StoreInfo, (char *)&top)) != SMS_SUCCESS) {
+    if ( (status = do_mr_query("get_server_locations", CountArgs(args), args,
+                               StoreInfo, (char *)&top)) != MR_SUCCESS) {
        com_err(program_name, status, " in get_server_locations.");
        return(SUB_ERROR);
     }
@@ -108,12 +108,12 @@ char ** argv;
     if (!ValidName(argv[1]))
        return(DM_NORMAL);
     
-    switch (status = do_sms_query("get_pobox", 1, argv + 1, StoreInfo, 
+    switch (status = do_mr_query("get_pobox", 1, argv + 1, StoreInfo, 
                                  (char *)&top)) {
-    case SMS_NO_MATCH:
+    case MR_NO_MATCH:
        Put_message("This user has no P.O. Box.");
        break;
-    case SMS_SUCCESS:
+    case MR_SUCCESS:
        sprintf(buf,"Current pobox for user %s: \n", argv[1]);
        Put_message("");
        top = QueueTop(top);
@@ -180,11 +180,11 @@ char **argv;
        type = LOCAL_BOX;
        switch (YesNoQuestion("Use Previous Local Box (y/n)", TRUE)) {
        case TRUE:
-           switch (status = do_sms_query("set_pobox_pop", 1, 
+           switch (status = do_mr_query("set_pobox_pop", 1, 
                                          &local_user, Scream, NULL)) {
-           case SMS_SUCCESS:
+           case MR_SUCCESS:
                return(DM_NORMAL);
-           case SMS_MACHINE:
+           case MR_MACHINE:
                if ( (temp_box = GetNewLocalPOBox(local_user)) !=
                        (char *) SUB_ERROR) {
                    strcpy(box, temp_box);
@@ -232,8 +232,8 @@ char **argv;
     args[PO_TYPE] = type;
     args[PO_BOX] = box;
     args[PO_END] = NULL;
-    if ( (status = do_sms_query("set_pobox", CountArgs(args), args, 
-                               Scream, NULL)) != SMS_SUCCESS )
+    if ( (status = do_mr_query("set_pobox", CountArgs(args), args, 
+                               Scream, NULL)) != MR_SUCCESS )
        com_err(program_name, status, " in ChangeUserPOBox");
     else
        Put_message("PO Box assigned.");
@@ -263,8 +263,8 @@ char ** argv;
            "Are you sure that you want to remove %s's PO Box (y/n)", argv[1]);
     
     if (Confirm(temp_buf)) {
-       if ( (status = do_sms_query("delete_pobox", 1, argv + 1,
-                                   Scream, NULL)) != SMS_SUCCESS)
+       if ( (status = do_mr_query("delete_pobox", 1, argv + 1,
+                                   Scream, NULL)) != MR_SUCCESS)
            com_err(program_name, status, "in delete_pobox.");
        else
            Put_message("PO Box removed.");
index 0454790ba4b0e4ba07beac9c9a941a94e352ed59..2d06ce430d38f515c675d765bdeee72b940bf72f 100644 (file)
@@ -2,8 +2,8 @@
   static char rcsid_module_c[] = "$Header$";
 #endif lint
 
-/*     This is the file printer.c for the SMS Client, which allows a nieve
- *      user to quickly and easily maintain most parts of the SMS database.
+/*     This is the file printer.c for the MOIRA Client, which allows a nieve
+ *      user to quickly and easily maintain most parts of the MOIRA database.
  *     It Contains: Functions for handling the printers.
  *     
  *     Created:        8/16/88
@@ -22,8 +22,8 @@
 #include <stdio.h>
 #include <strings.h>
 #include <ctype.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
 #include <menu.h>
 
 #include "mit-copyright.h"
@@ -75,7 +75,7 @@ char *name;
     int stat;
     struct qelem *elem = NULL;
 
-    if ( (stat = do_sms_query("get_printcap", 1, &name,
+    if ( (stat = do_mr_query("get_printcap", 1, &name,
                              StoreInfo, (char *)&elem)) != 0) {
            com_err(program_name, stat, NULL);
            return(NULL);
@@ -183,7 +183,7 @@ Bool one_item;
     int stat;
     char temp_buf[BUFSIZ];
 
-    if ( (stat = do_sms_query("delete_printcap", 1,
+    if ( (stat = do_mr_query("delete_printcap", 1,
                              &info[PCAP_NAME], Scream, NULL)) != 0)
            com_err(program_name, stat, " printcap entry not deleted.");
     else
@@ -228,18 +228,18 @@ int argc;
     if ( !ValidName(argv[1]) )
        return(DM_NORMAL);
 
-    if ( (stat = do_sms_query("get_printcap", 1, argv + 1,
+    if ( (stat = do_mr_query("get_printcap", 1, argv + 1,
                              NullFunc, NULL)) == 0) {
        Put_message ("A Printer by that name already exists.");
        return(DM_NORMAL);
-    } else if (stat != SMS_NO_MATCH) {
+    } else if (stat != MR_NO_MATCH) {
        com_err(program_name, stat, " in AddPcap");
        return(DM_NORMAL);
     } 
 
     args = AskPcapInfo(SetDefaults(info, argv[1]));
 
-    if ( (stat = do_sms_query("add_printcap", CountArgs(args), args, 
+    if ( (stat = do_mr_query("add_printcap", CountArgs(args), args, 
                              NullFunc, NULL)) != 0)
        com_err(program_name, stat, " in AddPcap");
 
@@ -261,13 +261,13 @@ Bool one_item;
 {
     int stat;
 
-    if ((stat = do_sms_query("delete_printcap", 1, &info[PCAP_NAME],
+    if ((stat = do_mr_query("delete_printcap", 1, &info[PCAP_NAME],
                             Scream, NULL)) != 0) {
        com_err(program_name, stat, " printcap entry not deleted.");
        return(DM_NORMAL);
     }
     AskPcapInfo(info);
-    if ((stat = do_sms_query("add_printcap", CountArgs(info), info,
+    if ((stat = do_mr_query("add_printcap", CountArgs(info), info,
                             NullFunc, NULL)) != 0)
        com_err(program_name, stat, " in ChngPcap");
     return(DM_NORMAL);
@@ -377,7 +377,7 @@ char *name;
     int status;
     struct qelem *elem = NULL;
 
-    if ((status = do_sms_query("get_palladium", 1, &name, StoreInfo, &elem))
+    if ((status = do_mr_query("get_palladium", 1, &name, StoreInfo, &elem))
        != 0) {
        com_err(program_name, status, NULL);
        return(NULL);
@@ -392,13 +392,13 @@ Bool one_item;
 {
     int status;
 
-    if ((status = do_sms_query("delete_palladium", 1, &info[PD_NAME],
+    if ((status = do_mr_query("delete_palladium", 1, &info[PD_NAME],
                               Scream, NULL)) != 0) {
        com_err(program_name, status, " palladium entry not deleted.");
        return(DM_NORMAL);
     }
     AskPalladiumInfo(info);
-    if ((status = do_sms_query("add_palladium", CountArgs(info), info,
+    if ((status = do_mr_query("add_palladium", CountArgs(info), info,
                               NullFunc, NULL)) != 0)
       com_err(program_name, status, " in ChngPalladium");
     return(DM_NORMAL);
@@ -421,7 +421,7 @@ Bool one_item;
     int stat;
     char temp_buf[BUFSIZ];
 
-    if ( (stat = do_sms_query("delete_palladium", 1,
+    if ( (stat = do_mr_query("delete_palladium", 1,
                              &info[PD_NAME], Scream, NULL)) != 0)
            com_err(program_name, stat, " palladium entry not deleted.");
     else
@@ -453,18 +453,18 @@ char **argv;
     if (!ValidName(argv[1]))
       return(DM_NORMAL);
 
-    if ((status = do_sms_query("get_palladium", 1, &argv[1], NullFunc, NULL))
+    if ((status = do_mr_query("get_palladium", 1, &argv[1], NullFunc, NULL))
        == 0) {
        Put_message("A server or supervisor by that name already exists.");
        return(DM_NORMAL);
-    } else if (status != SMS_NO_MATCH) {
+    } else if (status != MR_NO_MATCH) {
        com_err(program_name, status, " in AddPalladium");
        return(DM_NORMAL);
     }
 
     args = AskPalladiumInfo(SetPdDefaults(info, argv[1]));
 
-    if ((status = do_sms_query("add_palladium", CountArgs(args), args,
+    if ((status = do_mr_query("add_palladium", CountArgs(args), args,
                               Scream, NULL)) != 0)
       com_err(program_name, status, " in AddPalladium");
 
@@ -505,7 +505,7 @@ char **argv;
     qargv[0] = argv[1];
     qargv[1] = "PALLADIUM";
     qargv[2] = argv[2];
-    if ((status = do_sms_query("get_alias", 3, qargv, StoreInfo, &elem)) != 0) {
+    if ((status = do_mr_query("get_alias", 3, qargv, StoreInfo, &elem)) != 0) {
        com_err(program_name, status, " in ShowPalladiumAlias");
        return(DM_NORMAL);
     }
@@ -532,7 +532,7 @@ char **argv;
     qargv[0] = argv[1];
     qargv[1] = "PALLADIUM";
     qargv[2] = argv[2];
-    if ((status = do_sms_query("add_alias", 3, qargv, Scream, NULL)) != 0)
+    if ((status = do_mr_query("add_alias", 3, qargv, Scream, NULL)) != 0)
       com_err(program_name, status, " in AddPalladiumAlias");
     return(DM_NORMAL);
 }
@@ -547,7 +547,7 @@ char **argv;
     qargv[0] = argv[1];
     qargv[1] = "PALLADIUM";
     qargv[2] = argv[2];
-    if ((status = do_sms_query("delete_alias", 3, qargv, Scream, NULL)) != 0)
+    if ((status = do_mr_query("delete_alias", 3, qargv, Scream, NULL)) != 0)
       com_err(program_name, status, " in DeletePalladiumAlias");
     return(DM_NORMAL);
 }
index 9cd4fde8422b8e957e33ca4841aa1c22b33f816c..a9623205011b3cebdf49c84da2e5d4a2b024d097 100644 (file)
@@ -2,8 +2,8 @@
   static char rcsid_module_c[] = "$Header$";
 #endif lint
 
-/*     This is the file quota.c for the SMS Client, which allows a nieve
- *      user to quickly and easily maintain most parts of the SMS database.
+/*     This is the file quota.c for the MOIRA Client, which allows a nieve
+ *      user to quickly and easily maintain most parts of the MOIRA database.
  *     It Contains: Functions for manipulating the quota information.
  *     
  *     Created:        7/10/88
@@ -21,8 +21,8 @@
 
 #include <stdio.h>
 #include <strings.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
 #include <menu.h>
 
 #include "mit-copyright.h"
 static char * def_quota = NULL;        
   
 #define DEFAULT_FILESYS DEFAULT_NONE
-#define DEFAULT_USER user      /* this is the user who started sms. */
+#define DEFAULT_USER user      /* this is the user who started moira. */
 #define NOBODY "\\[nobody\\]"
 #define OLDNOBODY      "[nobody]"
 
 
 /*     Function Name: GetDefaultUserQuota
- *     Description: gets the user quota from sms, and caches the value.
- *     Arguments: override - if true, go to sms and override the cache.
+ *     Description: gets the user quota from moira, and caches the value.
+ *     Arguments: override - if true, go to moira and override the cache.
  *     Returns: none.
  *      NOTE: Using a queue here is pretty useless, but StoreInfo expects
  *            one, and it works, so why fuck with it.
@@ -56,8 +56,8 @@ Bool override;
   static char *val[] = {"def_quota", NULL};
 
   if (override || (def_quota == NULL)) {
-    if ( (status = do_sms_query("get_value", CountArgs(val), val,
-                               StoreInfo, (char *) &top)) != SMS_SUCCESS) {
+    if ( (status = do_mr_query("get_value", CountArgs(val), val,
+                               StoreInfo, (char *) &top)) != MR_SUCCESS) {
        com_err(program_name, status, " in ShowDefaultQuota");
        if (def_quota == NULL) {
          Put_message("No default Quota Found, setting default to 0.");
@@ -141,9 +141,9 @@ char *name;
     if (index(name, '*') || index(name, '?') || index(name, '\\'))
       return(0);
     argv[0] = name;
-    status = do_sms_query("get_filesys_by_label", 1, argv,
+    status = do_mr_query("get_filesys_by_label", 1, argv,
                          afsfilsyshelper, &ret);
-    if (status == SMS_SUCCESS)
+    if (status == MR_SUCCESS)
       return(ret);
     return(0);
     
@@ -236,8 +236,8 @@ char *argv[];
            "change the default quota for all new users");
     if(Confirm(temp_buf)) {
        newval[1] = argv[1];
-       if ( (status = do_sms_query("update_value", CountArgs(newval), 
-                                   newval, Scream, NULL)) == SMS_SUCCESS ) {
+       if ( (status = do_mr_query("update_value", CountArgs(newval), 
+                                   newval, Scream, NULL)) == MR_SUCCESS ) {
          FreeAndClear(&def_quota, TRUE);
          def_quota = Strsave(argv[1]);
        }
@@ -268,8 +268,8 @@ ShowUserQuota()
   if ( (args = GetQuotaArgs(FALSE) ) == NULL)
     return(DM_NORMAL);
 
-  if ( (status = do_sms_query("get_nfs_quota", CountArgs(args), args,
-                             StoreInfo, (char *) &top)) != SMS_SUCCESS)
+  if ( (status = do_mr_query("get_nfs_quota", CountArgs(args), args,
+                             StoreInfo, (char *) &top)) != MR_SUCCESS)
     com_err(program_name, status, " in get_nfs_quota");
   
   FreeInfo(args);              /* done with args free them. */
@@ -297,8 +297,8 @@ AddUserQuota()
   if ( (args = GetQuotaArgs(TRUE) ) == NULL)
     return(DM_NORMAL);
 
-  if ( (status = do_sms_query("add_nfs_quota", CountArgs(args), args,
-                             Scream, (char *) NULL)) != SMS_SUCCESS)
+  if ( (status = do_mr_query("add_nfs_quota", CountArgs(args), args,
+                             Scream, (char *) NULL)) != MR_SUCCESS)
     com_err(program_name, status, " in get_nfs_quota");
   
   FreeInfo(args);
@@ -326,8 +326,8 @@ char ** info;
       info[Q_LOGIN] = strsave(NOBODY);
   }
   
-  if (status = do_sms_query("update_nfs_quota", 3, info,
-                           Scream, (char *) NULL) != SMS_SUCCESS) {
+  if (status = do_mr_query("update_nfs_quota", 3, info,
+                           Scream, (char *) NULL) != MR_SUCCESS) {
     com_err(program_name, status, " in update_nfs_quota");
     sprintf(temp_buf,"Could not perform quota change on %s",
            info[Q_FILESYS]); 
@@ -351,8 +351,8 @@ ChangeUserQuota()
   if ( (args = GetQuotaArgs(FALSE) ) == NULL)
     return(DM_NORMAL);
 
-  if ( (status = do_sms_query("get_nfs_quota", 2, args,
-                             StoreInfo, (char *) &top)) != SMS_SUCCESS)
+  if ( (status = do_mr_query("get_nfs_quota", 2, args,
+                             StoreInfo, (char *) &top)) != MR_SUCCESS)
     com_err(program_name, status, " in get_nfs_quota");
   
   FreeInfo(args);              /* done with args, free them. */
@@ -385,8 +385,8 @@ Bool one_item;
          info[Q_LOGIN], info[Q_FILESYS]);
 
   if (!one_item || Confirm(temp_buf)) {
-    if ( (status = do_sms_query("delete_nfs_quota", 2, info,
-                               Scream, (char *) NULL)) != SMS_SUCCESS)
+    if ( (status = do_mr_query("delete_nfs_quota", 2, info,
+                               Scream, (char *) NULL)) != MR_SUCCESS)
       com_err(program_name, status, " in delete_nfs_quota");
     else
       Put_message("Quota sucessfully removed.");
@@ -411,8 +411,8 @@ RemoveUserQuota()
   if ( (args = GetQuotaArgs(FALSE) ) == NULL)
     return(DM_NORMAL);
 
-  if ( (status = do_sms_query("get_nfs_quota", 2, args,
-                             StoreInfo, (char *) &top)) != SMS_SUCCESS)
+  if ( (status = do_mr_query("get_nfs_quota", 2, args,
+                             StoreInfo, (char *) &top)) != MR_SUCCESS)
     com_err(program_name, status, " in get_nfs_quota");
 
   FreeInfo(args);
index df64db9b13fb867e2707975becaf28731b8f4dc0..3c21191ed3305db65e845e9cdc469c0e75cb4706 100644 (file)
@@ -2,8 +2,8 @@
   static char rcsid_module_c[] = "$Header$";
 #endif lint
 
-/*     This is the file user.c for the SMS Client, which allows a nieve
- *      user to quickly and easily maintain most parts of the SMS database.
+/*     This is the file user.c for the MOIRA Client, which allows a nieve
+ *      user to quickly and easily maintain most parts of the MOIRA database.
  *     It Contains: Functions for manipulating user information.
  *     
  *     Created:        5/9/88
@@ -21,8 +21,8 @@
 
 #include <stdio.h>
 #include <strings.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
 #include <menu.h>
 #include <ctype.h>
 
@@ -162,7 +162,7 @@ Bool name;
        GetValueFromUser("User's middle name", &info[U_MIDDLE]);
        argv[0] = info[U_FIRST];
        argv[1] = info[U_LAST];
-       if (do_sms_query("get_user_by_name", 2, argv,
+       if (do_mr_query("get_user_by_name", 2, argv,
                         StoreInfo, (char *) &elem) == 0) {
            Put_message("A user by that name already exists in the database.");
            Loop(QueueTop(elem), PrintUserInfo);
@@ -245,7 +245,7 @@ char *name1, *name2;
     switch(type) {
     case LOGIN:
        args[0] = name1;
-       if ( (status = do_sms_query("get_user_by_login", 1, args,
+       if ( (status = do_mr_query("get_user_by_login", 1, args,
                                    StoreInfo, (char *) &elem)) != 0) {
            com_err(program_name, status, 
                    " when attempting to get_user_by_login.");
@@ -254,7 +254,7 @@ char *name1, *name2;
        break;
     case UID:
        args[0] = name1;
-       if ( (status = do_sms_query("get_user_by_uid", 1, args,
+       if ( (status = do_mr_query("get_user_by_uid", 1, args,
                                    StoreInfo, (char *) &elem)) != 0) {
            com_err(program_name, status, 
                    " when attempting to get_user_by_uid.");
@@ -264,7 +264,7 @@ char *name1, *name2;
     case BY_NAME:
        args[0] = name1;
        args[1] = name2;    
-       if ( (status = do_sms_query("get_user_by_name", 2, args,
+       if ( (status = do_mr_query("get_user_by_name", 2, args,
                                    StoreInfo, (char *) &elem)) != 0) {
            com_err(program_name, status, 
                    " when attempting to get_user_by_name.");
@@ -273,7 +273,7 @@ char *name1, *name2;
        break;
     case CLASS:
        args[0] = name1;
-       if ( (status = do_sms_query("get_user_by_class", 1, args,
+       if ( (status = do_mr_query("get_user_by_class", 1, args,
                                    StoreInfo, (char *) &elem)) != 0) {
            com_err(program_name, status, 
                    " when attempting to get_user_by_class.");
@@ -300,8 +300,8 @@ AddNewUser()
     args = AskUserInfo(SetUserDefaults(info), FALSE);
     if (args == NULL)
       return(DM_NORMAL);
-    if ( (status = do_sms_query("add_user", CountArgs(args), 
-                               args, Scream, (char *) NULL)) != SMS_SUCCESS)
+    if ( (status = do_mr_query("add_user", CountArgs(args), 
+                               args, Scream, (char *) NULL)) != MR_SUCCESS)
        com_err(program_name, status, " in add_user");
     else
        Put_message("New user added to database.");
@@ -376,11 +376,11 @@ GetUidNumberFromName()
     args[0] = first;
     args[1] = last;
     
-    switch (status = do_sms_query("get_user_by_name", 2, args,
+    switch (status = do_mr_query("get_user_by_name", 2, args,
                                  StoreInfo, (char *) &top)) {
-    case SMS_SUCCESS:
+    case MR_SUCCESS:
        break;
-    case SMS_NO_MATCH:
+    case MR_NO_MATCH:
        Put_message("There is no user in the database with that name.");
        return(NULL);
     default:
@@ -473,14 +473,14 @@ RegisterUser()
     args[2] = fstype;
     args[3] = NULL;
     
-    switch (status = do_sms_query("register_user", CountArgs(args),
+    switch (status = do_mr_query("register_user", CountArgs(args),
                                  args, Scream, (char *) NULL)) {
-    case SMS_SUCCESS:
+    case MR_SUCCESS:
        sprintf(temp_buf, "User %s successfully registered.", login);
        Put_message(temp_buf);
        SetUserPassword(login);
        break;
-    case SMS_IN_USE:
+    case MR_IN_USE:
        GiveBackLogin(login);
        sprintf(temp_buf, "The username %s is already in use.", login);
        Put_message(temp_buf);
@@ -510,8 +510,8 @@ Bool junk;
     char error_buf[BUFSIZ];
     char ** args = AskUserInfo(info, TRUE);
     
-    if ( (status = do_sms_query("update_user", CountArgs(args), 
-                               args, Scream, (char *) NULL)) != SMS_SUCCESS) {
+    if ( (status = do_mr_query("update_user", CountArgs(args), 
+                               args, Scream, (char *) NULL)) != MR_SUCCESS) {
        com_err(program_name, status, " in ModifyFields");
        sprintf(error_buf, "User %s not updated due to errors.", info[NAME]);
        Put_message(error_buf);
@@ -563,8 +563,8 @@ Bool one_item;
 
     qargs[0] = info[NAME];
     qargs[1] = "3";
-    if ((status = do_sms_query("update_user_status", 2, qargs, Scream,
-                              (char *) NULL)) != SMS_SUCCESS) {
+    if ((status = do_mr_query("update_user_status", 2, qargs, Scream,
+                              (char *) NULL)) != MR_SUCCESS) {
        com_err(program_name, status, " in update_user_status");
        sprintf(txt_buf, "User %s not deactivated due to errors.", info[NAME]);
        Put_message(txt_buf);
@@ -602,7 +602,7 @@ char **argv;
  *     Description: Deletes the user given a uid number.
  *     Arguments: argc, argv - uid if user in argv[1].
  *     Returns: DM_NORMAL.
- *      NOTES: This just gets the username from the sms server 
+ *      NOTES: This just gets the username from the mr server 
  *             and performs a DeleteUser().
  */
 
@@ -618,8 +618,8 @@ char **argv;
     if(!ValidName(argv[1]))
        return(DM_NORMAL);
     
-    if ( (status = do_sms_query("get_user_by_uid", 1, argv+1, StoreInfo,
-                               (char * ) &elem)) != SMS_SUCCESS)
+    if ( (status = do_mr_query("get_user_by_uid", 1, argv+1, StoreInfo,
+                               (char * ) &elem)) != MR_SUCCESS)
        com_err(program_name, status, " in get_user_by_uid");
     
     info = (char **) elem->q_data;
@@ -731,7 +731,7 @@ char **argv;
     struct qelem *elem = NULL, *top;
     char buf[BUFSIZ];
 
-    if ((stat = do_sms_query("get_kerberos_user_map", 2, &argv[1],
+    if ((stat = do_mr_query("get_kerberos_user_map", 2, &argv[1],
                             StoreInfo, (char *)&elem)) != 0) {
        com_err(program_name, stat, " in GetKrbMap.");
        return(DM_NORMAL);
@@ -771,10 +771,10 @@ char **argv;
        Put_message("Please specify a realm for the kerberos principal.");
        return(DM_NORMAL);
     }
-    if ((stat = do_sms_query("add_kerberos_user_map", 2, &argv[1],
+    if ((stat = do_mr_query("add_kerberos_user_map", 2, &argv[1],
                             Scream, NULL)) != 0) {
        com_err(program_name, stat, " in AddKrbMap.");
-       if (stat == SMS_EXISTS)
+       if (stat == MR_EXISTS)
          Put_message("No user or principal may have more than one mapping.");
     }
     return(DM_NORMAL);
@@ -796,7 +796,7 @@ char **argv;
 {
     int stat;
 
-    if ((stat = do_sms_query("delete_kerberos_user_map", 2, &argv[1],
+    if ((stat = do_mr_query("delete_kerberos_user_map", 2, &argv[1],
                             Scream, NULL)) != 0) {
        com_err(program_name, stat, " in DeleteKrbMap.");
     }
index 46a0804c5b69f90ced7bbbed88d2992accfd8084..0840f8215ef9b313e8730d9012e9dc2759e617d8 100644 (file)
@@ -2,8 +2,8 @@
   static char rcsid_module_c[] = "$Header$";
 #endif lint
 
-/*     This is the file utils.c for the SMS Client, which allows a nieve
- *      user to quickly and easily maintain most parts of the SMS database.
+/*     This is the file utils.c for the MOIRA Client, which allows a nieve
+ *      user to quickly and easily maintain most parts of the MOIRA database.
  *     It Contains:  Many useful utility functions.
  *     
  *     Created:        4/25/88
@@ -21,8 +21,8 @@
 
 #include <stdio.h>
 #include <strings.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
 #include <menu.h>
 #include <ctype.h>
 
@@ -179,7 +179,7 @@ struct qelem * elem;
 }
 
 /*     Function Name: StoreInfo
- *     Description: Stores information from an sms query into a queue.
+ *     Description: Stores information from an moira query into a queue.
  *     Arguments: argc, argv, - information returned from the query returned
  *                               in argv.
  *                 data - the previous element on the queue, this data will be
@@ -187,7 +187,7 @@ struct qelem * elem;
  *                        If NULL then a new queue will be created.  This value
  *                        is updated to the current element at the end off the
  *                        call.
- *     Returns: SMS_CONT, or SMS_ABORT if it has problems.
+ *     Returns: MR_CONT, or MR_ABORT if it has problems.
  */
 
 int
@@ -205,7 +205,7 @@ char * data;
        Put_message("Could Not allocate more memory.");
        FreeQueue(*old_elem);
        *old_elem = (struct qelem *) NULL;
-       return(SMS_ABORT);
+       return(MR_ABORT);
     }
 
     for (count = 0; count < argc; count++)
@@ -216,7 +216,7 @@ char * data;
     AddQueue(new_elem, *old_elem);
 
     *old_elem = new_elem;
-    return(SMS_CONT);
+    return(MR_CONT);
 }
 
 /*     Function Name: CountArgs
@@ -252,7 +252,7 @@ Scream()
 {
     com_err(program_name, 0,
            "\nA Moira update returned a value -- programmer botch\n");
-    sms_disconnect();
+    mr_disconnect();
     exit(1);
 }
 
@@ -417,13 +417,13 @@ ToggleVerboseMode()
 /*     Function Name: NullFunc
  *     Description:  dummy callback routine 
  *     Arguments: none
- *     Returns: SMS_CONT
+ *     Returns: MR_CONT
  */
 
 int
 NullFunc()
 {
-    return(SMS_CONT);
+    return(MR_CONT);
 }
 
 /*     Function Name: SlipInNewName
@@ -569,13 +569,13 @@ char **  current;
     else 
        c_value = atoi(*current);
 
-    if (GetFSVal("student", SMS_FS_STUDENT, c_value, &new_val) == FALSE)
+    if (GetFSVal("student", MR_FS_STUDENT, c_value, &new_val) == FALSE)
        return(SUB_ERROR);
-    if (GetFSVal("faculty", SMS_FS_FACULTY, c_value, &new_val) == FALSE)
+    if (GetFSVal("faculty", MR_FS_FACULTY, c_value, &new_val) == FALSE)
        return(SUB_ERROR);
-    if (GetFSVal("staff", SMS_FS_STAFF, c_value, &new_val) == FALSE)
+    if (GetFSVal("staff", MR_FS_STAFF, c_value, &new_val) == FALSE)
        return(SUB_ERROR);
-    if (GetFSVal("miscellaneous", SMS_FS_MISC, c_value, &new_val) == FALSE)
+    if (GetFSVal("miscellaneous", MR_FS_MISC, c_value, &new_val) == FALSE)
        return(SUB_ERROR);
 
     FreeAndClear(current, TRUE);
@@ -604,9 +604,9 @@ char *str;
 
 /*     Function Name: Print
  *     Description: prints out all the arguments on a single line.
- *     Arguments: argc, argv - the standard SMS arguments.
+ *     Arguments: argc, argv - the standard MR arguments.
  *                 callback - the callback function - NOT USED.
- *     Returns: SMS_CONT
+ *     Returns: MR_CONT
  */
 
 /* ARGSUSED */
@@ -624,16 +624,16 @@ char **argv, *callback;
        (void) sprintf(buf,"%s %s",buf,argv[i]);
     (void) Put_message(buf);
 
-    return (SMS_CONT);
+    return (MR_CONT);
 }
 
 /*     Function Name: PrintByType
  *     Description: This function prints all members of the type specified
  *                   by the callback arg, unless the callback is NULL, in which
  *                   case it prints all members.
- *     Arguments: argc, argc - normal arguments for sms_callback function. 
+ *     Arguments: argc, argc - normal arguments for mr_callback function. 
  *                 callback - either a type of member or NULL.
- *     Returns: SMS_CONT or SMS_QUIT.
+ *     Returns: MR_CONT or MR_QUIT.
  */
 
 /*ARGSUSED*/
@@ -646,7 +646,7 @@ char **argv, *callback;
        return( Print(argc, argv, callback) );
     if (strcmp(argv[0], callback) == 0) 
        return( Print(argc, argv, callback) );
-    return(SMS_CONT);
+    return(MR_CONT);
 }
 
 /*     Function Name: PrintHelp
@@ -790,7 +790,7 @@ char *tname;
     argv[1] = "TYPE";
     argv[2] = "*";
     elem = NULL;
-    if (stat = do_sms_query("get_alias", 3, argv, StoreInfo, (char *)&elem)) {
+    if (stat = do_mr_query("get_alias", 3, argv, StoreInfo, (char *)&elem)) {
        com_err(program_name, stat, " in GetTypeValues");
        return(NULL);
     }
@@ -868,7 +868,7 @@ char  **pointer;
        for (p = argv[2]; *p; p++)
            if (islower(*p))
                *p = toupper(*p);
-       if (stat = do_sms_query("add_alias", 3, argv, Scream, NULL)) {
+       if (stat = do_mr_query("add_alias", 3, argv, Scream, NULL)) {
            com_err(program_name, stat, " in add_alias");
        } else {
            elem = (struct qelem *) malloc(sizeof(struct qelem));
@@ -882,7 +882,7 @@ char  **pointer;
 }
 
 
-do_sms_query(name, argc, argv, proc, hint)
+do_mr_query(name, argc, argv, proc, hint)
 char *name;
 int argc;
 char **argv;
@@ -892,23 +892,23 @@ char *hint;
     int status;
     extern char *whoami, *moira_server;
 
-    status = sms_query(name, argc, argv, proc, hint);
-    if (status != SMS_ABORTED && status != SMS_NOT_CONNECTED)
+    status = mr_query(name, argc, argv, proc, hint);
+    if (status != MR_ABORTED && status != MR_NOT_CONNECTED)
       return(status);
-    status = sms_connect(moira_server);
+    status = mr_connect(moira_server);
     if (status) {
        com_err(whoami, status, " while re-connecting to server %s",
                moira_server);
-       return(SMS_ABORTED);
+       return(MR_ABORTED);
     }
-    status = sms_auth(whoami);
+    status = mr_auth(whoami);
     if (status) {
        com_err(whoami, status, " while re-authenticating to server %s",
                moira_server);
-       sms_disconnect();
-       return(SMS_ABORTED);
+       mr_disconnect();
+       return(MR_ABORTED);
     }
-    status = sms_query(name, argc, argv, proc, hint);
+    status = mr_query(name, argc, argv, proc, hint);
     return(status);
 }
 
index 58f07bfd46ba693f88d0c2d8f0c11f417a522234..d98e9ebb5b0f92a590451b88c7a7e2ca9d58f60f 100644 (file)
@@ -7,7 +7,7 @@
 # <mit-copyright.h>.
 
 
-LIBS = ../rpc/libsms.a ../gdb/libgdb.a 
+LIBS = ../rpc/libmoira.a ../gdb/libgdb.a 
 LLIBS= -L../lib -lhesiod -lkrb -ldes -lhesiod -lss -lcom_err -lm -lc 
 
 SRCS= test.c
@@ -41,5 +41,5 @@ depend:
 # DO NOT DELETE THIS LINE -- mkdep uses it.
 
 test.o: test.c ../include/mit-copyright.h /usr/include/stdio.h
-test.o: /usr/include/sys/file.h /usr/include/ctype.h ../include/sms.h
-test.o: ../include/sms_et.h ../include/ss.h
+test.o: /usr/include/sys/file.h /usr/include/ctype.h ../include/moira.h
+test.o: ../include/mr_et.h ../include/ss.h
index 6ab236c4a2bc2e404b83c646815e3010c4037cd4..31e879dd18447960891c242d91ab32172338875e 100644 (file)
@@ -17,7 +17,7 @@ static char *rcsid_test_c = "$Header$";
 #include <stdio.h>
 #include <sys/file.h>
 #include <ctype.h>
-#include <sms.h>
+#include <moira.h>
 #include <ss.h>
 
 int ss;
@@ -60,18 +60,18 @@ moira()
 
 test_noop()
 {
-       int status = sms_noop();
+       int status = mr_noop();
        if (status) ss_perror(ss, status, "");
 }
 
 test_new()
 {
-       sending_version_no = SMS_VERSION_2;
+       sending_version_no = MR_VERSION_2;
 }
 
 test_old()
 {
-       sending_version_no = SMS_VERSION_1;
+       sending_version_no = MR_VERSION_1;
 }
 
 test_connect(argc, argv)
@@ -84,13 +84,13 @@ char *argv[];
        if (argc > 1) {
            server = argv[1];
        }
-       status = sms_connect(server);
+       status = mr_connect(server);
        if (status) ss_perror(ss, status, "");
 }
 
 test_disconnect()
 {
-       int status = sms_disconnect();
+       int status = mr_disconnect();
        if (status) ss_perror(ss, status, "");
 }
 
@@ -101,7 +101,7 @@ test_host()
 
         bzero(host, sizeof(host));
 
-       if (status = sms_host(host, sizeof(host) - 1))
+       if (status = mr_host(host, sizeof(host) - 1))
            ss_perror(ss, status, "");
        else
            printf("You are connected to host %s\n", host);
@@ -111,7 +111,7 @@ test_auth()
 {
        int status;
 
-       status = sms_auth("mrtest");
+       status = mr_auth("mrtest");
        if (status) ss_perror(ss, status, "");
 }
 
@@ -230,7 +230,7 @@ print_reply(argc, argv)
        }
        printf("\n");
        count++;
-       return(SMS_CONT);
+       return(MR_CONT);
 }
 
 test_query(argc, argv)
@@ -244,7 +244,7 @@ test_query(argc, argv)
        }
 
        count = 0;
-       status = sms_query(argv[1], argc-2, argv+2, print_reply, (char *)NULL);
+       status = mr_query(argv[1], argc-2, argv+2, print_reply, (char *)NULL);
        printf("%d tuple%s\n", count, ((count == 1) ? "" : "s"));
        if (status) ss_perror(ss, status, "");
 }
@@ -258,7 +258,7 @@ test_access(argc, argv)
                ss_perror(ss, 0, "Usage: access handle [ args ... ]");
                return;
        }
-       status = sms_access(argv[1], argc-2, argv+2);
+       status = mr_access(argv[1], argc-2, argv+2);
        if (status) ss_perror(ss, status, "");
 }
 
@@ -269,7 +269,7 @@ test_dcm(argc, argv)
 {
        int status;
 
-       if (status = sms_do_update())
+       if (status = mr_do_update())
          ss_perror(ss, status, " while triggering dcm");
 }
 
@@ -281,7 +281,7 @@ test_motd(argc, argv)
        int status;
        char *motd;
 
-       if (status = sms_motd(&motd))
+       if (status = mr_motd(&motd))
          ss_perror(ss, status, " while getting motd");
        if (motd)
          printf("%s\n", motd);
index 66b6b870fb1c78e11f072ad7e3dc1d552635bb8b..a24937f523d4f929ce021f20ab10b2369a727c4c 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile for SMS clients passwd/chfn/chpobox/chsh
+# Makefile for MOIRA clients passwd/chfn/chpobox/chsh
 #
 #      MIT Project Athena
 #
@@ -17,20 +17,20 @@ CFLAGS = -I../../include ${DEFINES}
 CONFDIR = ${DESTDIR}/usr/athena
 BINDIR = ${DESTDIR}/bin
 
-SMSLIB = -L../../lib -lsms -lgdb -lcom_err -lkrb -ldes -lhesiod
+MOIRALIB = -L../../lib -lmoira -lgdb -lcom_err -lkrb -ldes -lhesiod
 
 PROGS= chfn chsh chpobox
 
 all:   ${PROGS}
 
 chfn:  chfn.o
-       cc -o chfn chfn.o ${SMSLIB}
+       cc -o chfn chfn.o ${MOIRALIB}
 
 chpobox:       chpobox.o
-       cc -o chpobox chpobox.o ${SMSLIB}
+       cc -o chpobox chpobox.o ${MOIRALIB}
 
 chsh:  chsh.o
-       cc -o chsh chsh.o ${SMSLIB}
+       cc -o chsh chsh.o ${MOIRALIB}
 
 lint:
        lint *.c
@@ -52,14 +52,14 @@ depend:
 chfn.o: chfn.c /usr/include/sys/types.h /usr/include/stdio.h
 chfn.o: /usr/include/strings.h /usr/include/sys/file.h ../../include/krb.h
 chfn.o: ../../include/mit-copyright.h ../../include/des.h
-chfn.o: /usr/include/ctype.h /usr/include/errno.h ../../include/sms.h
-chfn.o: /usr/include/sms_et.h ../../include/sms_app.h
+chfn.o: /usr/include/ctype.h /usr/include/errno.h ../../include/moira.h
+chfn.o: ../../include/mr_et.h ../../include/moira_site.h
 chpobox.o: chpobox.c /usr/include/sys/types.h /usr/include/stdio.h
 chpobox.o: /usr/include/pwd.h /usr/include/strings.h /usr/include/ctype.h
-chpobox.o: /usr/include/errno.h ../../include/sms.h /usr/include/sms_et.h
-chpobox.o: ../../include/sms_app.h ../../include/mit-copyright.h
+chpobox.o: /usr/include/errno.h ../../include/moira.h ../../include/mr_et.h
+chpobox.o: ../../include/moira_site.h ../../include/mit-copyright.h
 chsh.o: chsh.c /usr/include/sys/types.h /usr/include/stdio.h
 chsh.o: /usr/include/strings.h /usr/include/sys/file.h ../../include/krb.h
 chsh.o: ../../include/mit-copyright.h ../../include/des.h
-chsh.o: /usr/include/ctype.h /usr/include/errno.h ../../include/sms.h
-chsh.o: /usr/include/sms_et.h ../../include/sms_app.h
+chsh.o: /usr/include/ctype.h /usr/include/errno.h ../../include/moira.h
+chsh.o: ../../include/mr_et.h ../../include/moira_site.h
index dcb35c4540d2371f472004a4186a5a880f13682e..7942930fb28783a214d8729eddf542500c2cf4c4 100644 (file)
@@ -13,7 +13,7 @@ static char *rcsid_chfn_c = "$Header$";
 #endif not lint
 
 /*
- * Talk to the SMS database to change a person's GECOS information.
+ * Talk to the MOIRA database to change a person's GECOS information.
  * 
  * chfn with no modifiers changes the information of the user who is 
  * running the program.
@@ -34,9 +34,9 @@ static char *rcsid_chfn_c = "$Header$";
 #include <ctype.h>
 #include <errno.h>
 
-/* SMS includes */
-#include <sms.h>
-#include <sms_app.h>
+/* MOIRA includes */
+#include <moira.h>
+#include <moira_site.h>
 #include "mit-copyright.h"
 
 char *whoami;
@@ -97,10 +97,10 @@ main(argc, argv)
 
 leave(status)
   int status;
-  /* This should be called rather than exit once connection to sms server
+  /* This should be called rather than exit once connection to moira server
      has been established. */
 {
-    sms_disconnect();
+    mr_disconnect();
     exit(status);
 }
 
@@ -114,9 +114,9 @@ chfn(uname)
   char *uname;
 {
     int status;                        /* general purpose exit status */
-    int q_argc;                        /* argc for sms_query */
-    char *q_argv[F_END];       /* argv for sms_query */
-    char *motd;                        /* for SMS server status */
+    int q_argc;                        /* argc for mr_query */
+    char *q_argv[F_END];       /* argv for mr_query */
+    char *motd;                        /* for MR server status */
     int i;
 
     int get_user_info();
@@ -127,13 +127,13 @@ chfn(uname)
 
     /* Try each query.  If we ever fail, print error message and exit. */
 
-    status = sms_connect(NULL);
+    status = mr_connect(NULL);
     if (status) {
        com_err(whoami, status, " while connecting to Moira");
        exit(1);
     }
 
-    status = sms_motd(&motd);
+    status = mr_motd(&motd);
     if (status) {
         com_err(whoami, status, " unable to check server status");
        leave(1);
@@ -143,7 +143,7 @@ chfn(uname)
        leave(1);
     }
 
-    status = sms_auth("chfn"); /* Don't use argv[0] - too easy to fake */
+    status = mr_auth("chfn");  /* Don't use argv[0] - too easy to fake */
     if (status) {
        com_err(whoami, status, 
                " while authenticating -- run \"kinit\" and try again.");
@@ -157,7 +157,7 @@ chfn(uname)
        q_argv[i] = "junk";
     q_argc = F_MODTIME;                /* one more than the last updatable field */
     
-    if (status = sms_access("update_finger_by_login", q_argc, q_argv)) {
+    if (status = mr_access("update_finger_by_login", q_argc, q_argv)) {
        com_err(whoami, status, "; finger\ninformation not changed.");
        leave(2);
     }
@@ -168,7 +168,7 @@ chfn(uname)
 
     q_argv[NAME] = uname;
     q_argc = NAME + 1;
-    if (status = sms_query("get_finger_by_login", q_argc, q_argv, 
+    if (status = mr_query("get_finger_by_login", q_argc, q_argv, 
                       get_user_info, (char *) &old_info))
     {
        com_err(whoami, status, " while getting user information.");
@@ -194,7 +194,7 @@ chfn(uname)
     q_argv[F_MIT_AFFIL] = new_info.mit_year;
     q_argc = F_MODTIME;                /* First non-update query argument */
 
-    if (status = sms_query("update_finger_by_login", q_argc, q_argv,
+    if (status = mr_query("update_finger_by_login", q_argc, q_argv,
                           scream, (char *)NULL))
     {
        com_err(whoami, status, " while updating finger information.");
@@ -232,7 +232,7 @@ get_user_info(argc, argv, message)
     
     /* Only pay attention to the first match since login names are
        unique in the database. */
-    return(SMS_ABORT);
+    return(MR_ABORT);
 }
 
 char *ask(question, def_val, phone_num)
index 393be4970d43c6f75c22736bc98b05f8cf2d1d4b..ec253b1b617393e5c4483086b5477bd9ce929f17 100644 (file)
@@ -13,7 +13,7 @@ static char *rcsid_chpobox_c = "$Header$";
 #endif not lint
 
 /*
- * Talk to the SMS database to change a person's home mail machine. This may
+ * Talk to the MOIRA database to change a person's home mail machine. This may
  * be an Athena machine, or a completely arbitrary address.
  * 
  * chpobox with no modifiers reports the current mailbox.
@@ -35,9 +35,9 @@ static char *rcsid_chpobox_c = "$Header$";
 #include <ctype.h>
 #include <errno.h>
 
-/* SMS includes */
-#include <sms.h>
-#include <sms_app.h>
+/* MOIRA includes */
+#include <moira.h>
+#include <moira_site.h>
 #include "mit-copyright.h"
 
 char *getlogin();
@@ -55,7 +55,7 @@ main(argc, argv)
     char *argv[];
 {
     struct passwd *pwd;
-    char *smsarg[3], buf[BUFSIZ];
+    char *mrarg[3], buf[BUFSIZ];
     char *potype(), *index();
     char *address, *uname, *machine, *motd;
     uid_t u;
@@ -120,30 +120,30 @@ main(argc, argv)
            (void) strcpy(uname, pwd->pw_name);
        }
     }
-    smsarg[0] = uname;
+    mrarg[0] = uname;
 
-    status = sms_connect(NULL);
+    status = mr_connect(NULL);
     if (status) {
        com_err(whoami, status, " while connecting to Moira");
        exit(1);
     }
 
-    status = sms_motd(&motd);
+    status = mr_motd(&motd);
     if (status) {
-       sms_disconnect();
+       mr_disconnect();
         com_err(whoami, status, " unable to check server status");
        exit(1);
     }
     if (motd) {
        fprintf(stderr, "The Moira server is currently unavailable:\n%s\n", motd);
-       sms_disconnect();
+       mr_disconnect();
        exit(1);
     }
 
-    status = sms_auth("chpobox");
+    status = mr_auth("chpobox");
     if (status) {
        com_err(whoami, status, " while authenticating -- run \"kinit\" and try again.");
-       sms_disconnect();
+       mr_disconnect();
        exit(1);
     }
 
@@ -162,41 +162,41 @@ main(argc, argv)
                    whoami, address);
            goto show;
        }
-       smsarg[2] = canonicalize_hostname(strsave(machine));
-       smsarg[1] = potype(smsarg[2]);
-       if (!strcmp(smsarg[1], "POP")) {
+       mrarg[2] = canonicalize_hostname(strsave(machine));
+       mrarg[1] = potype(mrarg[2]);
+       if (!strcmp(mrarg[1], "POP")) {
            if (strcmp(address, uname)) {
                fprintf(stderr,
                        "%s: the name on the POP box must match the username\n",
                        whoami);
                goto show;
            }
-       } else if (!strcmp(smsarg[1], "LOCAL")) {
+       } else if (!strcmp(mrarg[1], "LOCAL")) {
            strcat(address, "@");
-           strcat(address, smsarg[2]);
-           smsarg[2] = address;
+           strcat(address, mrarg[2]);
+           mrarg[2] = address;
            if ((address = index(address, '@')) &&
                (address = index(address, '.')))
              *address = 0;
-           strcat(smsarg[2], ".LOCAL");
-           smsarg[1] = "SMTP";
-       } else if (smsarg[1]) {
-           if (*machine != '"' && strcasecmp(smsarg[2], machine))
+           strcat(mrarg[2], ".LOCAL");
+           mrarg[1] = "SMTP";
+       } else if (mrarg[1]) {
+           if (*machine != '"' && strcasecmp(mrarg[2], machine))
              printf("Warning: hostname %s canonicalized to %s\n",
-                    machine, smsarg[2]);
+                    machine, mrarg[2]);
            strcat(address, "@");
-           strcat(address, smsarg[2]);
-           smsarg[2] = address;
+           strcat(address, mrarg[2]);
+           mrarg[2] = address;
        } else
          goto show;
-       status = sms_query("set_pobox", 3, smsarg, scream, NULL);
+       status = mr_query("set_pobox", 3, mrarg, scream, NULL);
        if (status)
          com_err(whoami, status,
                  " while setting pobox for %s to type %s, box %s",
-                 smsarg[0], smsarg[1], smsarg[2]);
+                 mrarg[0], mrarg[1], mrarg[2]);
     } else if (prevpop) {
-       status = sms_query("set_pobox_pop", 1, smsarg, scream, NULL);
-       if (status == SMS_MACHINE) {
+       status = mr_query("set_pobox_pop", 1, mrarg, scream, NULL);
+       if (status == MR_MACHINE) {
            fprintf(stderr,
                    "Moira has no record of a previous POP box for %s\n", uname);
        } else if (status != 0)
@@ -207,12 +207,12 @@ main(argc, argv)
      * get current box
      */
 show:
-    status = sms_query("get_pobox", 1, smsarg, get_pobox, NULL);
-    if (status == SMS_NO_MATCH)
+    status = mr_query("get_pobox", 1, mrarg, get_pobox, NULL);
+    if (status == MR_NO_MATCH)
       printf("User %s has no pobox.\n", uname);
     else if (status != 0)
       com_err(whoami, status, " while retrieving current mailbox");
-    sms_disconnect();
+    mr_disconnect();
     exit(0);
 }
 
@@ -220,7 +220,7 @@ show:
 scream()
 {
     com_err(whoami, 0, "Unexpected return value from Moira -- programmer botch");
-    sms_disconnect();
+    mr_disconnect();
     exit(1);
 }
 
@@ -245,7 +245,7 @@ get_pobox(argc, argv, callarg)
 }
 
 /*
- * given a canonicalized machine name, ask the SMS server if it is of type
+ * given a canonicalized machine name, ask the MR server if it is of type
  * pop, or of type local -- if neither, we assume that it's of type foreign. 
  */
 char *
@@ -257,9 +257,9 @@ potype(machine)
 
     match = 0;
     service[0] = "POP";
-    status = sms_query("get_server_locations", 1, service,
+    status = mr_query("get_server_locations", 1, service,
                       check_match, machine);
-    if (status && (status != SMS_NO_MATCH)) {
+    if (status && (status != MR_NO_MATCH)) {
        com_err(whoami, status, " while reading list of POP servers");
        return(NULL);
     }
@@ -267,9 +267,9 @@ potype(machine)
        return ("POP");
 
     service[0] = "LOCAL";
-    status = sms_query("get_server_locations", 1, service,
+    status = mr_query("get_server_locations", 1, service,
                       check_match, machine);
-    if (status && (status != SMS_NO_MATCH)) {
+    if (status && (status != MR_NO_MATCH)) {
        com_err(whoami, status, " while reading list of LOCAL servers");
        return(NULL);
     }
index e4d4593990d6673cae670d6e8769fdc5679c0afe..20c3fe2ca1750179bf2258f2404000066d18feeb 100644 (file)
@@ -13,7 +13,7 @@ static char *rcsid_chsh_c = "$Header$";
 #endif not lint
 
 /*
- * Talk to the SMS database to change a person's login shell.  The chosen
+ * Talk to the MOIRA database to change a person's login shell.  The chosen
  * shell must exist.  A warning will be issued if the shell is not in 
  * /etc/shells.
  * 
@@ -33,9 +33,9 @@ static char *rcsid_chsh_c = "$Header$";
 #include <ctype.h>
 #include <errno.h>
 
-/* SMS includes */
-#include <sms.h>
-#include <sms_app.h>
+/* MOIRA includes */
+#include <moira.h>
+#include <moira_site.h>
 #include "mit-copyright.h"
 
 char *whoami;
@@ -86,10 +86,10 @@ main(argc, argv)
 
 leave(status)
   int status;
-  /* This should be called rather than exit once connection to sms server
+  /* This should be called rather than exit once connection to moira server
      has been established. */
 {
-    sms_disconnect();
+    mr_disconnect();
     exit(status);
 }
 
@@ -103,9 +103,9 @@ chsh(uname)
   char *uname;
 {
     int status;                        /* general purpose exit status */
-    int q_argc;                        /* argc for sms_query */
-    char *q_argv[U_END];       /* argv for sms_query */
-    char *motd;                        /* determine SMS server status */
+    int q_argc;                        /* argc for mr_query */
+    char *q_argv[U_END];       /* argv for mr_query */
+    char *motd;                        /* determine MR server status */
 
     int got_one = 0;           /* have we got a new shell yet? */
     char shell[BUFSIZ];                /* the new shell */
@@ -114,13 +114,13 @@ chsh(uname)
 
     /* Try each query.  If we ever fail, print error message and exit. */
 
-    status = sms_connect(NULL);
+    status = mr_connect(NULL);
     if (status) {
        com_err(whoami, status, " while connecting to Moira");
        exit(1);
     }
 
-    status = sms_motd(&motd);
+    status = mr_motd(&motd);
     if (status) {
         com_err(whoami, status, " unable to check server status");
        leave(1);
@@ -130,7 +130,7 @@ chsh(uname)
        leave(1);
     }
 
-    status = sms_auth("chsh"); /* Don't use argv[0] - too easy to fake */
+    status = mr_auth("chsh");  /* Don't use argv[0] - too easy to fake */
     if (status) {
        com_err(whoami, status, 
                " while authenticating -- run \"kinit\" and try again.");
@@ -143,7 +143,7 @@ chsh(uname)
     q_argv[USH_SHELL] = "junk";
     q_argc = USH_END;
 
-    if (status = sms_access("update_user_shell", q_argc, q_argv))
+    if (status = mr_access("update_user_shell", q_argc, q_argv))
     {
        com_err(whoami, status, "; shell not\nchanged.");
        leave(2);
@@ -156,7 +156,7 @@ chsh(uname)
     q_argv[NAME] = uname;
     q_argc = NAME + 1;
 
-    if ((status = sms_query("get_user_by_login", q_argc, q_argv, 
+    if ((status = mr_query("get_user_by_login", q_argc, q_argv, 
                            get_shell, (char *) uname)))
     {
        com_err(whoami, status, " while getting user information.");
@@ -184,7 +184,7 @@ chsh(uname)
     q_argv[USH_NAME] = uname;
     q_argv[USH_SHELL] = shell; 
     q_argc = USH_END;
-    if (status = sms_query("update_user_shell", q_argc, q_argv, 
+    if (status = mr_query("update_user_shell", q_argc, q_argv, 
                           scream, (char *) NULL))
     {
        com_err(whoami, status, " while changing shell.");
@@ -192,7 +192,7 @@ chsh(uname)
     }
 
     printf("Shell successfully changed.\n");
-    sms_disconnect();
+    mr_disconnect();
 
     return(0);
 }
@@ -215,7 +215,7 @@ get_shell(argc, argv, uname)
     printf("by user %s with %s.\n", argv[U_MODBY], argv[U_MODWITH]);
     printf("Current shell for %s is %s.\n", uname, argv[U_SHELL]); 
     
-    return(SMS_ABORT);         /* Don't pay attention to other matches. */
+    return(MR_ABORT);          /* Don't pay attention to other matches. */
 }
     
 void check_shell(shell)
index 8a88e96eebf4ed4f5c72128ac3e9580cd38a5dff..58b30353a9ff6216a6a3a36228a05e8c1bdf10b4 100644 (file)
@@ -17,7 +17,7 @@ all: userreg
 
 userreg: userreg.o display.o reg_stubs.o disable.o
        cc ${CFLAGS} -o $@ userreg.o display.o reg_stubs.o disable.o \
-               -L../../lib -lcom_err -lkrb -ldes -lsms -lcurses \
+               -L../../lib -lcom_err -lkrb -ldes -lmoira -lcurses \
                -ltermcap -lhesiod
 
 userreg.o display.o: userreg.h files.h
@@ -56,8 +56,8 @@ reg_stubs.o: reg_stubs.c ../../include/mit-copyright.h /usr/include/stdio.h
 reg_stubs.o: /usr/include/sys/types.h /usr/include/sys/time.h
 reg_stubs.o: /usr/include/sys/time.h /usr/include/sys/socket.h
 reg_stubs.o: /usr/include/netinet/in.h /usr/include/netdb.h
-reg_stubs.o: ../../include/des.h /usr/include/errno.h ../../include/sms.h
-reg_stubs.o: ../../include/sms_et.h ../../include/sms_app.h
+reg_stubs.o: ../../include/des.h /usr/include/errno.h ../../include/moira.h
+reg_stubs.o: ../../include/mr_et.h ../../include/moira_site.h
 reg_stubs.o: ../../include/ureg_err.h ../../include/ureg_proto.h
 reg_stubs.o: /usr/include/strings.h
 disable.o: disable.c ../../include/mit-copyright.h /usr/include/stdio.h
index 8c0ea1741cd7f5f14c9f824e7e686dca97838346..d20f487f3cc1e26545f0679e4cbd849ca21a29f3 100644 (file)
@@ -21,8 +21,8 @@ static char *rcsid_reg_stubs_c = "$Header$";
 #include <netdb.h>
 #include <des.h>
 #include <errno.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
 #include "ureg_err.h"
 #include "ureg_proto.h"
 #include <strings.h>
@@ -54,7 +54,7 @@ ureg_init()
     }
 #endif HESIOD
     if (!host || (strlen(host) == 0)) {
-       host = strsave(SMS_SERVER);
+       host = strsave(MOIRA_SERVER);
        s = index(host, ':');
        if (s) *s = 0;
     }
index 386a6c2a59b5035f9d15a5b504c51c0e5ccdde2a..926e4e36f3455294724b8f256b3ad6715b5ac786 100644 (file)
@@ -4,19 +4,19 @@
 #      $Header$
 #      $Author$
 #
-# (c) Copyright 1988 by the Massachusetts Institute of Technology.
+# (c) Copyright 1988, 1990 by the Massachusetts Institute of Technology.
 # For copying and distribution information, please see the file
 # <mit-copyright.h>.
 
 DESTDIR=
-FILES= sms.h sms_app.h sms_et.h
+FILES= moira.h moira_site.h mr_et.h
 
 all:
 
 install: ${FILES}
-       install -c -m 644 sms.h ${DESTDIR}/usr/include/sms.h
-       install -c -m 644 sms_app.h ${DESTDIR}/usr/include/sms_app.h
-       install -c -m 644 sms_et.h ${DESTDIR}/usr/include/sms_et.h
+       install -c -m 644 moira.h ${DESTDIR}/usr/include/moira.h
+       install -c -m 644 moira_site.h ${DESTDIR}/usr/include/moira_site.h
+       install -c -m 644 mr_et.h ${DESTDIR}/usr/include/mr_et.h
 
 depend:
 
index ad6990e2faa9b2c67403440a87fe098ca684dddf..ba012ef9acd3357c5af370e2d0c7ed08c0ae9161 100644 (file)
 
 /* return values from queries (and error codes) */
 
-#include "sms_et.h"
+#include "mr_et.h"
 #define MR_SUCCESS 0           /* Query was successful */
 
 #define MR_VERSION_1 1         /* Version in use from 7/87 to 4/88 */
 #define MR_VERSION_2 2         /* After 4/88, new query lib */
 
-/* return values for sms server calls, used by clients */
+/* return values for Moira server calls, used by clients */
 
 #define MR_CONT 0              /* Everything okay, continue sending values. */
 #define MR_ABORT -1            /* Something went wrong don't send anymore
index f1b7f03557888c85bb1e8d22832700f671f4874f..a1d649a33e1011c6e458c011234323fda9db5a11 100644 (file)
  *     see the file mit-copyright.h
  */
 
-#ifndef _sms_app_
-#define _sms_app_
+#ifndef _moira_site_
+#define _moira_site_
 
 #include "mit-copyright.h"
 
 /* Default Moira server to connect to */
-#define SMS_SERVER     "SMS.MIT.EDU:sms_db"
+#define MOIRA_SERVER   "MOIRA.MIT.EDU:sms_db"
 
 /* Compile-time options: */
 /*   used hesiod looking up Moira server name */
 #define JOURNAL                "/u1/sms/journal"
 #define REGJOURNAL     "/u1/sms/journal.reg"
 #define NODCMFILE      "/etc/nodcm"    /* flag to inhibit DCM running */
-#define SMS_MOTD_FILE  "/etc/smsdown"  /* make the server go to sleep */
+#define MOIRA_MOTD_FILE        "/etc/smsdown"  /* make the server go to sleep */
 
 
-#endif _sms_app_               /* Do not add anything after this line. */
+#endif _moira_site_            /* Do not add anything after this line. */
index bc3e7a21fa360bfe46fb126d4e6138fce811256f..e28c6c5e407a3b88a0138131251c34e614f6e117 100644 (file)
@@ -2,19 +2,19 @@
 #      $Author$
 #      $Header$
 #
-#      Makefile for SMS library.
+#      Makefile for Moira library.
 #
-LIBSRC=sms_auth.c sms_call.c sms_connect.c sms_data.c sms_init.c \
-       sms_query.c sms_param.c sms_access.c sms_ops.c \
+LIBSRC=mr_auth.c mr_call.c mr_connect.c mr_data.c mr_init.c \
+       mr_query.c mr_param.c mr_access.c mr_ops.c \
        fixname.c strs.c fixhost.c nfsparttype.c sq.c hash.c \
        idno.c critical.c
 
 CFILES=${LIBSRC}
 
-LIBOBJ=sms_auth.o sms_call.o sms_connect.o sms_data.o sms_init.o \
-       sms_query.o sms_param.o sms_access.o sms_ops.o \
+LIBOBJ=mr_auth.o mr_call.o mr_connect.o mr_data.o mr_init.o \
+       mr_query.o mr_param.o mr_access.o mr_ops.o \
        fixname.o strs.o fixhost.o nfsparttype.o sq.o hash.o \
-       idno.o critical.o sms_et.o ureg_err.o krb_et.o
+       idno.o critical.o mr_et.o ureg_err.o krb_et.o
 
 COPTS= -O
 
@@ -23,7 +23,7 @@ INCDIRS=-I../include
 CFLAGS= ${INCDIRS} ${COPTS}
 LINTFLAGS= -uhv
 
-ALL=libsms.a llib-lsms.ln # libsms_p.a
+ALL=libmoira.a llib-lmoira.ln # libmoira_p.a
 
 .c.o:
        ${CC} -c -pg ${CFLAGS} $*.c
@@ -35,19 +35,19 @@ ALL=libsms.a llib-lsms.ln # libsms_p.a
 
 all: ${ALL}
 
-libsms.a: ${LIBOBJ}
+libmoira.a: ${LIBOBJ}
        ar cruv $@ `lorder ${LIBOBJ} | tsort`
        ranlib $@
-       (cd profiled; ar cruv ../libsms_p.a ${LIBOBJ}; ranlib ../libsms_p.a)
+       (cd profiled; ar cruv ../libmoira_p.a ${LIBOBJ}; ranlib ../libmoira_p.a)
 
-smslib.dvi: smslib.tex
-       latex smslib.tex
+mrlib.dvi: mrlib.tex
+       latex mrlib.tex
 
 krb_et.c krb_et.h: krb_et.et ../et/compile_et
        ../et/compile_et krb_et.et
 
-sms_et.c sms_et.h: sms_et.et ../et/compile_et
-       ../et/compile_et sms_et.et
+mr_et.c mr_et.h: mr_et.et ../et/compile_et
+       ../et/compile_et mr_et.et
 
 ureg_err.c ureg_err.h: ureg_err.et ../et/compile_et
        ../et/compile_et ureg_err.et
@@ -55,75 +55,75 @@ ureg_err.c ureg_err.h: ureg_err.et ../et/compile_et
 ../et/compile_et:
        cd ../et; make compile_et
 
-../include/sms_et.h: sms_et.h
+../include/mr_et.h: mr_et.h
 
 clean:
        rm -f ${ALL}
-       rm -f *.o *~ sms_et.h krb_et.h ureg_err.h profiled/*.o \#*
-       rm -f krb_et.c sms_et.c ureg_err.c
+       rm -f *.o *~ mr_et.h krb_et.h ureg_err.h profiled/*.o \#*
+       rm -f krb_et.c mr_et.c ureg_err.c
        rm -f *.PS *.aux *.dvi *.log
        rm -f *.bak
 
 
 install:
-       install -c -m 644 libsms.a ${DESTDIR}/usr/athena/lib/libsms.a
-       ranlib ${DESTDIR}/usr/athena/lib/libsms.a
-       install -c -m 644 libsms_p.a ${DESTDIR}/usr/athena/lib/libsms_p.a
-       ranlib ${DESTDIR}/usr/athena/lib/libsms_p.a
-       install -c -m 644 llib-lsms.ln ${DESTDIR}/usr/lib/lint/llib-lsms.ln
+       install -c -m 644 libmoira.a ${DESTDIR}/usr/athena/lib/libmoira.a
+       ranlib ${DESTDIR}/usr/athena/lib/libmoira.a
+       install -c -m 644 libmoira_p.a ${DESTDIR}/usr/athena/lib/libmoira_p.a
+       ranlib ${DESTDIR}/usr/athena/lib/libmoira_p.a
+       install -c -m 644 llib-lmoira.ln ${DESTDIR}/usr/lib/lint/llib-lmoira.ln
 
 TAGS:  $(CFILES)
        -etags $(CFILES)
 
-lint:  ${CFILES} llib-lsms.ln
-       lint ${LINTFLAGS} ${INCDIRS} sms_main.c llib-lsms.ln
+lint:  ${CFILES} llib-lmoira.ln
+       lint ${LINTFLAGS} ${INCDIRS} mr_main.c llib-lmoira.ln
 
-llib-lsms.ln:  ${LIBSRC}
-       lint -Csms $(LINTFLAGS) $(INCDIRS) ${LIBSRC}
+llib-lmoira.ln:        ${LIBSRC}
+       lint -Cmr $(LINTFLAGS) $(INCDIRS) ${LIBSRC}
 
-depend: $(CFILES) sms_et.h ureg_err.h krb_et.h
+depend: $(CFILES) mr_et.h ureg_err.h krb_et.h
        mkdep ${CFLAGS} ${CFILES}
 
 # DO NOT DELETE THIS LINE -- mkdep uses it.
 
-sms_auth.o: sms_auth.c ../include/mit-copyright.h sms_private.h
-sms_auth.o: ../include/sms_proto.h /usr/include/stdio.h ../include/gdb.h
-sms_auth.o: /usr/include/sys/types.h /usr/include/sys/time.h
-sms_auth.o: /usr/include/sys/time.h ../include/sms.h sms_et.h
-sms_auth.o: ../include/krb.h ../include/des.h krb_et.h
-sms_call.o: sms_call.c ../include/mit-copyright.h sms_private.h
-sms_call.o: ../include/sms_proto.h /usr/include/stdio.h ../include/gdb.h
-sms_call.o: /usr/include/sys/types.h /usr/include/sys/time.h
-sms_call.o: /usr/include/sys/time.h ../include/sms.h sms_et.h
-sms_connect.o: sms_connect.c ../include/mit-copyright.h sms_private.h
-sms_connect.o: ../include/sms_proto.h /usr/include/stdio.h ../include/gdb.h
-sms_connect.o: /usr/include/sys/types.h /usr/include/sys/time.h
-sms_connect.o: /usr/include/sys/time.h ../include/sms.h sms_et.h
-sms_connect.o: ../include/sms_app.h /usr/include/strings.h
-sms_data.o: sms_data.c ../include/mit-copyright.h sms_private.h
-sms_data.o: ../include/sms_proto.h /usr/include/stdio.h ../include/gdb.h
-sms_data.o: /usr/include/sys/types.h /usr/include/sys/time.h
-sms_data.o: /usr/include/sys/time.h ../include/sms.h sms_et.h
-sms_init.o: sms_init.c ../include/mit-copyright.h sms_private.h
-sms_init.o: ../include/sms_proto.h /usr/include/stdio.h ../include/gdb.h
-sms_init.o: /usr/include/sys/types.h /usr/include/sys/time.h
-sms_init.o: /usr/include/sys/time.h ../include/sms.h sms_et.h
-sms_query.o: sms_query.c ../include/mit-copyright.h sms_private.h
-sms_query.o: ../include/sms_proto.h /usr/include/stdio.h ../include/gdb.h
-sms_query.o: /usr/include/sys/types.h /usr/include/sys/time.h
-sms_query.o: /usr/include/sys/time.h ../include/sms.h sms_et.h
-sms_param.o: sms_param.c ../include/mit-copyright.h /usr/include/sys/types.h
-sms_param.o: /usr/include/netinet/in.h sms_private.h ../include/sms_proto.h
-sms_param.o: /usr/include/stdio.h ../include/gdb.h /usr/include/sys/time.h
-sms_param.o: /usr/include/sys/time.h ../include/sms.h sms_et.h
-sms_access.o: sms_access.c ../include/mit-copyright.h sms_private.h
-sms_access.o: ../include/sms_proto.h /usr/include/stdio.h ../include/gdb.h
-sms_access.o: /usr/include/sys/types.h /usr/include/sys/time.h
-sms_access.o: /usr/include/sys/time.h ../include/sms.h sms_et.h
-sms_ops.o: sms_ops.c ../include/mit-copyright.h sms_private.h
-sms_ops.o: ../include/sms_proto.h /usr/include/stdio.h ../include/gdb.h
-sms_ops.o: /usr/include/sys/types.h /usr/include/sys/time.h
-sms_ops.o: /usr/include/sys/time.h ../include/sms.h sms_et.h
+mr_auth.o: mr_auth.c ../include/mit-copyright.h mr_private.h
+mr_auth.o: ../include/mr_proto.h /usr/include/stdio.h ../include/gdb.h
+mr_auth.o: /usr/include/sys/types.h /usr/include/sys/time.h
+mr_auth.o: /usr/include/sys/time.h ../include/moira.h mr_et.h
+mr_auth.o: /usr/include/ctype.h ../include/krb.h ../include/des.h krb_et.h
+mr_call.o: mr_call.c ../include/mit-copyright.h mr_private.h
+mr_call.o: ../include/mr_proto.h /usr/include/stdio.h ../include/gdb.h
+mr_call.o: /usr/include/sys/types.h /usr/include/sys/time.h
+mr_call.o: /usr/include/sys/time.h ../include/moira.h mr_et.h
+mr_connect.o: mr_connect.c ../include/mit-copyright.h mr_private.h
+mr_connect.o: ../include/mr_proto.h /usr/include/stdio.h ../include/gdb.h
+mr_connect.o: /usr/include/sys/types.h /usr/include/sys/time.h
+mr_connect.o: /usr/include/sys/time.h ../include/moira.h mr_et.h
+mr_connect.o: ../include/moira_site.h /usr/include/strings.h
+mr_data.o: mr_data.c ../include/mit-copyright.h mr_private.h
+mr_data.o: ../include/mr_proto.h /usr/include/stdio.h ../include/gdb.h
+mr_data.o: /usr/include/sys/types.h /usr/include/sys/time.h
+mr_data.o: /usr/include/sys/time.h ../include/moira.h mr_et.h
+mr_init.o: mr_init.c ../include/mit-copyright.h mr_private.h
+mr_init.o: ../include/mr_proto.h /usr/include/stdio.h ../include/gdb.h
+mr_init.o: /usr/include/sys/types.h /usr/include/sys/time.h
+mr_init.o: /usr/include/sys/time.h ../include/moira.h mr_et.h
+mr_query.o: mr_query.c ../include/mit-copyright.h mr_private.h
+mr_query.o: ../include/mr_proto.h /usr/include/stdio.h ../include/gdb.h
+mr_query.o: /usr/include/sys/types.h /usr/include/sys/time.h
+mr_query.o: /usr/include/sys/time.h ../include/moira.h mr_et.h
+mr_param.o: mr_param.c ../include/mit-copyright.h /usr/include/sys/types.h
+mr_param.o: /usr/include/netinet/in.h mr_private.h ../include/mr_proto.h
+mr_param.o: /usr/include/stdio.h ../include/gdb.h /usr/include/sys/time.h
+mr_param.o: /usr/include/sys/time.h ../include/moira.h mr_et.h
+mr_access.o: mr_access.c ../include/mit-copyright.h mr_private.h
+mr_access.o: ../include/mr_proto.h /usr/include/stdio.h ../include/gdb.h
+mr_access.o: /usr/include/sys/types.h /usr/include/sys/time.h
+mr_access.o: /usr/include/sys/time.h ../include/moira.h mr_et.h
+mr_ops.o: mr_ops.c ../include/mit-copyright.h mr_private.h
+mr_ops.o: ../include/mr_proto.h /usr/include/stdio.h ../include/gdb.h
+mr_ops.o: /usr/include/sys/types.h /usr/include/sys/time.h
+mr_ops.o: /usr/include/sys/time.h ../include/moira.h mr_et.h
 fixname.o: fixname.c ../include/mit-copyright.h /usr/include/strings.h
 fixname.o: /usr/include/ctype.h
 strs.o: strs.c ../include/mit-copyright.h /usr/include/sys/types.h
@@ -133,19 +133,19 @@ fixhost.o: /usr/include/sys/socket.h /usr/include/netinet/in.h
 fixhost.o: /usr/include/arpa/nameser.h /usr/include/arpa/resolv.h
 fixhost.o: /usr/include/netdb.h /usr/include/stdio.h /usr/include/strings.h
 fixhost.o: /usr/include/ctype.h
-nfsparttype.o: nfsparttype.c ../include/mit-copyright.h ../include/sms.h
-nfsparttype.o: sms_et.h /usr/include/stdio.h /usr/include/strings.h
+nfsparttype.o: nfsparttype.c ../include/mit-copyright.h ../include/moira.h
+nfsparttype.o: mr_et.h /usr/include/stdio.h /usr/include/strings.h
 nfsparttype.o: /usr/include/ctype.h
-sq.o: sq.c ../include/mit-copyright.h ../include/sms.h sms_et.h
+sq.o: sq.c ../include/mit-copyright.h ../include/moira.h mr_et.h
 hash.o: hash.c ../include/mit-copyright.h /usr/include/ctype.h
-hash.o: ../include/sms.h sms_et.h
+hash.o: ../include/moira.h mr_et.h
 idno.o: idno.c ../include/mit-copyright.h /usr/include/strings.h
 idno.o: /usr/include/ctype.h
 critical.o: critical.c ../include/mit-copyright.h /usr/include/stdio.h
-critical.o: /usr/include/sys/file.h /usr/include/zephyr/zephyr.h
-critical.o: /usr/include/zephyr/mit-copyright.h
+critical.o: /usr/include/sys/file.h ../include/moira_site.h
+critical.o: /usr/include/zephyr/zephyr.h /usr/include/zephyr/mit-copyright.h
 critical.o: /usr/include/zephyr/zephyr_err.h
 critical.o: /usr/include/zephyr/zephyr_conf.h /usr/include/errno.h
 critical.o: /usr/include/sys/types.h /usr/include/netinet/in.h
 critical.o: /usr/include/sys/time.h /usr/include/sys/time.h ../include/krb.h
-critical.o: ../include/des.h ../include/sms_app.h
+critical.o: ../include/des.h
index f026d64a4b6c3a89dd265f67735526be98ab64ab..9bdfd1e54bb64743682129b1622cb9314b77861d 100644 (file)
@@ -10,7 +10,7 @@
 #include <mit-copyright.h>
 #include <stdio.h>
 #include <sys/file.h>
-#include <sms_app.h>
+#include <moira_site.h>
 #ifdef ZEPHYR
 #include <zephyr/zephyr.h>
 #endif
@@ -25,7 +25,7 @@
 extern char *whoami;
 
 
-/* This routine sends a class SMS zephyrgram of specified instance
+/* This routine sends a class MOIRA zephyrgram of specified instance
  * and logs to a special logfile the message passed to it via msg
  * and args in printf format.  *** It expects the global variable
  * whoami to be defined and contain the name of the calling program.
@@ -67,7 +67,7 @@ void critical_alert(instance, msg, arg1, arg2, arg3, arg4,
 
 
 
-/* Sends a zephyrgram of class "SMS", instance as a parameter.  Ignores
+/* Sends a zephyrgram of class "MOIRA", instance as a parameter.  Ignores
  * errors while sending message.
  */
 
@@ -80,9 +80,9 @@ char *msg;
 
     bzero (&znotice, sizeof (znotice));
     znotice.z_kind = UNSAFE;
-    znotice.z_class = "SMS";
+    znotice.z_class = "MOIRA";
     znotice.z_class_inst = inst;
-    znotice.z_default_format = "SMS $instance:\n $message\n";
+    znotice.z_default_format = "MOIRA $instance:\n $message\n";
     (void) ZInitialize ();
     znotice.z_message = msg;
     znotice.z_message_len = strlen(msg) + 1;
@@ -93,7 +93,7 @@ char *msg;
 #ifdef SYSLOG
     {
        char buf[512];
-       sprintf(buf, "SMS: %s %s", inst, msg);
+       sprintf(buf, "MOIRA: %s %s", inst, msg);
        syslog(LOG_ERR, buf);
     }
 #endif
index c6cef7eefbf2a047d24e0e83dbf26c07b80055e7..2a41cd2e826fe1f964967767a92bda0820b8ad43 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <mit-copyright.h>
 #include <ctype.h>
-#include <sms.h>
+#include <moira.h>
 
 #define NULL 0
 #define hash_func(h, key) (key >= 0 ? (key % h->size) : (-key % h->size))
index 7fe0d3b7836494ea60ba0bd0afefae9ab80f96ed..a6a24f9b2321530f4f94be4edfa24cdd1fbabc7e 100644 (file)
@@ -3,7 +3,7 @@
  *     $Author$
  *     $Header$
  *
- *     Copyright (C) 1987 by the Massachusetts Institute of Technology
+ *     Copyright (C) 1987, 1990 by the Massachusetts Institute of Technology
  *     For copying and distribution information, please see the file
  *     <mit-copyright.h>.
  */
@@ -13,12 +13,12 @@ static char *rcsid_sms_access_c = "$Header$";
 #endif lint
 
 #include <mit-copyright.h>
-#include "sms_private.h"
+#include "mr_private.h"
 
 /*
  * Check access to a named query.
  */
-int sms_access(name, argc, argv)
+int mr_access(name, argc, argv)
     char *name;                        /* Query name */
     int argc;                  /* Arg count */
     char **argv;               /* Args */
@@ -27,7 +27,7 @@ int sms_access(name, argc, argv)
     register int status = 0;
     nargv[0] = name;
     bcopy((char *)argv, (char *)(nargv+1), sizeof(char *) * argc);
-    status = sms_access_internal(argc+1, nargv);
+    status = mr_access_internal(argc+1, nargv);
     free(nargv);
     return status;
 }
@@ -35,39 +35,28 @@ int sms_access(name, argc, argv)
  * Check access to a named query, where the query name is argv[0]
  * and the arguments are the rest of argv[].
  */
-int sms_access_internal(argc, argv)
+int mr_access_internal(argc, argv)
     int argc;                  /* Arg count */
     char **argv;               /* Args */
 {
     int status;
-    sms_params params_st;
-    register sms_params *params = NULL;
-    sms_params *reply = NULL;
+    mr_params params_st;
+    register mr_params *params = NULL;
+    mr_params *reply = NULL;
     
     CHECK_CONNECTED;
 
     params = &params_st;
-    params->sms_version_no = sending_version_no;
-    params->sms_procno = SMS_ACCESS;
-    params->sms_argc = argc;
-    params->sms_argl = NULL;
-    params->sms_argv = argv;
+    params->mr_version_no = sending_version_no;
+    params->mr_procno = MR_ACCESS;
+    params->mr_argc = argc;
+    params->mr_argl = NULL;
+    params->mr_argv = argv;
        
-    if ((status = sms_do_call(params, &reply)) == 0)
-       status = reply->sms_status;
+    if ((status = mr_do_call(params, &reply)) == 0)
+       status = reply->mr_status;
 
-    sms_destroy_reply(reply);
+    mr_destroy_reply(reply);
 
     return status;
 }
-
-/*
- * Local Variables:
- * mode: c
- * c-indent-level: 4
- * c-continued-statement-offset: 4
- * c-brace-offset: -4
- * c-argdecl-indent: 4
- * c-label-offset: -4
- * End:
- */
index df046e18ec7e7262f0532641ddc5699ec2c40996..53b6349ec327b2e1011bf211b34908a14eebfcb1 100644 (file)
@@ -3,12 +3,12 @@
  *     $Author$
  *     $Header$
  *
- *     Copyright (C) 1987 by the Massachusetts Institute of Technology
+ *     Copyright (C) 1987, 1990 by the Massachusetts Institute of Technology
  *     For copying and distribution information, please see the file
  *     <mit-copyright.h>.
  *
  *     Handles the client side of the sending of authenticators to
- * the sms server.     
+ * the mr server.      
  */
 
 #ifndef lint
@@ -16,26 +16,26 @@ static char *rcsid_sms_auth_c = "$Header$";
 #endif lint
 
 #include <mit-copyright.h>
-#include "sms_private.h"
+#include "mr_private.h"
 #include <ctype.h>
 #include <krb.h>
 #include <krb_et.h>
 
-/* Authenticate this client with the SMS server.  prog is the name of the
+/* Authenticate this client with the MR server.  prog is the name of the
  * client program, and will be recorded in the database.
  */
 
-int sms_auth(prog)
+int mr_auth(prog)
 char *prog;
 {
     register int status;
-    sms_params params_st;
+    mr_params params_st;
     char *args[2];
     int argl[2];
     char realm[REALM_SZ], host[BUFSIZ], *p;
 
-    register sms_params *params = &params_st;
-    sms_params *reply = NULL;
+    register mr_params *params = &params_st;
+    mr_params *reply = NULL;
     KTEXT_ST auth;
 
     CHECK_CONNECTED;
@@ -43,7 +43,7 @@ char *prog;
     /* Build a Kerberos authenticator. */
        
     bzero(host, sizeof(host));
-    if (status = sms_host(host, sizeof(host) - 1))
+    if (status = mr_host(host, sizeof(host) - 1))
        return status;
 
     strcpy(realm, krb_realmofhost(host));
@@ -57,23 +57,23 @@ char *prog;
        status += ERROR_TABLE_BASE_krb;
        return status;
     } 
-    params->sms_version_no = sending_version_no;
-    params->sms_procno = SMS_AUTH;
-    params->sms_argc = 2;
-    params->sms_argv = args;
-    params->sms_argl = argl;
-    params->sms_argv[0] = (char *)auth.dat;
-    params->sms_argl[0] = auth.length;
-    params->sms_argv[1] = prog;
-    params->sms_argl[1] = strlen(prog) + 1;
+    params->mr_version_no = sending_version_no;
+    params->mr_procno = MR_AUTH;
+    params->mr_argc = 2;
+    params->mr_argv = args;
+    params->mr_argl = argl;
+    params->mr_argv[0] = (char *)auth.dat;
+    params->mr_argl[0] = auth.length;
+    params->mr_argv[1] = prog;
+    params->mr_argl[1] = strlen(prog) + 1;
        
-    if (sending_version_no == SMS_VERSION_1)
-       params->sms_argc = 1;
+    if (sending_version_no == MR_VERSION_1)
+       params->mr_argc = 1;
 
-    if ((status = sms_do_call(params, &reply)) == 0)
-       status = reply->sms_status;
+    if ((status = mr_do_call(params, &reply)) == 0)
+       status = reply->mr_status;
 
-    sms_destroy_reply(reply);
+    mr_destroy_reply(reply);
 
     return status;
 }
index dde886c08bca104eba964f19aba5b1499155b171..86ca32c980207809b064c8458c6abede49ce8cc3 100644 (file)
@@ -13,36 +13,36 @@ static char *rcsid_sms_call_c = "$Header$";
 #endif lint
 
 #include <mit-copyright.h>
-#include "sms_private.h"
+#include "mr_private.h"
 
-sms_do_call(params, reply)
-    struct sms_params *params;
-    struct sms_params **reply;
+mr_do_call(params, reply)
+    struct mr_params *params;
+    struct mr_params **reply;
 {
     CHECK_CONNECTED;
     
-    if (!_sms_send_op)
-       _sms_send_op = create_operation();
+    if (!_mr_send_op)
+       _mr_send_op = create_operation();
 
-    if (!_sms_recv_op)
-       _sms_recv_op = create_operation();
+    if (!_mr_recv_op)
+       _mr_recv_op = create_operation();
 
-    initialize_operation(_sms_send_op, sms_start_send, (char *)params,
+    initialize_operation(_mr_send_op, mr_start_send, (char *)params,
                         (int (*)())NULL);
-    queue_operation(_sms_conn, CON_OUTPUT, _sms_send_op);
+    queue_operation(_mr_conn, CON_OUTPUT, _mr_send_op);
 
-    initialize_operation(_sms_recv_op, sms_start_recv, (char *)reply,
+    initialize_operation(_mr_recv_op, mr_start_recv, (char *)reply,
                         (int (*)())NULL);
-    queue_operation(_sms_conn, CON_INPUT, _sms_recv_op);
+    queue_operation(_mr_conn, CON_INPUT, _mr_recv_op);
 
     /* Block until operation done. */
-    sms_complete_operation(_sms_send_op);
-    sms_complete_operation(_sms_recv_op);
+    mr_complete_operation(_mr_send_op);
+    mr_complete_operation(_mr_recv_op);
     /* Look at results */
-    if ((OP_STATUS(_sms_send_op) != OP_COMPLETE) ||
-       (OP_STATUS(_sms_recv_op) != OP_COMPLETE)) {
-       sms_disconnect();
-       return SMS_ABORTED;
+    if ((OP_STATUS(_mr_send_op) != OP_COMPLETE) ||
+       (OP_STATUS(_mr_recv_op) != OP_COMPLETE)) {
+       mr_disconnect();
+       return MR_ABORTED;
     }
     return 0;
 }
index 366166ad9c06ae31c0cad5f52da0b1b7125226ae..e1d197e715d88b33b14b4b8ac6af8fa923d286cb 100644 (file)
@@ -3,12 +3,12 @@
  *     $Author$
  *     $Header$
  *
- *     Copyright (C) 1987 by the Massachusetts Institute of Technology
+ *     Copyright (C) 1987, 1990 by the Massachusetts Institute of Technology
  *     For copying and distribution information, please see the file
  *     <mit-copyright.h>.
  *     
  *     This routine is part of the client library.  It handles
- *     creating a connection to the sms server.
+ *     creating a connection to the mr server.
  */
 
 #ifndef lint
@@ -16,27 +16,27 @@ static char *rcsid_sms_connect_c = "$Header$";
 #endif lint
 
 #include <mit-copyright.h>
-#include "sms_private.h"
-#include <sms_app.h>
+#include "mr_private.h"
+#include <moira_site.h>
 #include <strings.h>
 
-static char *sms_server_host = 0;
+static char *mr_server_host = 0;
 
 /*
- * Open a connection to the sms server.  Looks for the server name
+ * Open a connection to the mr server.  Looks for the server name
  * 1) passed as an argument, 2) in environment variable, 3) by hesiod
  * 4) compiled in default (from sms_app.h).
  */
 
-int sms_connect(server)
+int mr_connect(server)
 char *server;
 {
     extern int errno;
     char *p, **pp, sbuf[256];
     extern char *getenv(), **hes_resolve();
        
-    if (!sms_inited) sms_init();
-    if (_sms_conn) return SMS_ALREADY_CONNECTED;
+    if (!mr_inited) mr_init();
+    if (_mr_conn) return MR_ALREADY_CONNECTED;
                
     if (!server || (strlen(server) == 0)) {
        server = getenv("MOIRASERVER");
@@ -50,24 +50,24 @@ char *server;
 #endif HESIOD
 
     if (!server || (strlen(server) == 0)) {
-       server = SMS_SERVER;
+       server = MOIRA_SERVER;
     }
 
     if (!index(server, ':')) {
-       p = index(SMS_SERVER, ':');
+       p = index(MOIRA_SERVER, ':');
        p++;
        sprintf(sbuf, "%s:%s", server, p);
        server = sbuf;
     }
 
     errno = 0;
-    _sms_conn = start_server_connection(server, ""); 
-    if (_sms_conn == NULL)
+    _mr_conn = start_server_connection(server, ""); 
+    if (_mr_conn == NULL)
        return errno;
-    if (connection_status(_sms_conn) == CON_STOPPED) {
-       register status = connection_errno(_sms_conn);
-       if (!status) status = SMS_CANT_CONNECT;
-       sms_disconnect();
+    if (connection_status(_mr_conn) == CON_STOPPED) {
+       register status = connection_errno(_mr_conn);
+       if (!status) status = MR_CANT_CONNECT;
+       mr_disconnect();
        return status;
     }
 
@@ -75,52 +75,52 @@ char *server;
      * stash hostname for later use
      */
 
-    sms_server_host = strsave(server);
-    if (p = index(sms_server_host, ':'))
+    mr_server_host = strsave(server);
+    if (p = index(mr_server_host, ':'))
        *p = 0;
-    sms_server_host = canonicalize_hostname(sms_server_host);
+    mr_server_host = canonicalize_hostname(mr_server_host);
     return 0;
 }
        
-int sms_disconnect()
+int mr_disconnect()
 {
     CHECK_CONNECTED;
-    _sms_conn = sever_connection(_sms_conn);
-    free(sms_server_host);
-    sms_server_host = 0;
+    _mr_conn = sever_connection(_mr_conn);
+    free(mr_server_host);
+    mr_server_host = 0;
     return 0;
 }
 
-int sms_host(host, size)
+int mr_host(host, size)
   char *host;
   int size;
 {
     CHECK_CONNECTED;
 
-    /* If we are connected, sms_server_host points to a valid string. */
-    strncpy(host, sms_server_host, size);
+    /* If we are connected, mr_server_host points to a valid string. */
+    strncpy(host, mr_server_host, size);
     return(0);
 }
 
-int sms_noop()
+int mr_noop()
 {
     int status;
-    sms_params param_st;
-    struct sms_params *params = NULL;
-    struct sms_params *reply = NULL;
+    mr_params param_st;
+    struct mr_params *params = NULL;
+    struct mr_params *reply = NULL;
 
     CHECK_CONNECTED;
     params = &param_st;
-    params->sms_version_no = sending_version_no;
-    params->sms_procno = SMS_NOOP;
-    params->sms_argc = 0;
-    params->sms_argl = NULL;
-    params->sms_argv = NULL;
+    params->mr_version_no = sending_version_no;
+    params->mr_procno = MR_NOOP;
+    params->mr_argc = 0;
+    params->mr_argl = NULL;
+    params->mr_argv = NULL;
        
-    if ((status = sms_do_call(params, &reply)) == 0)
-       status = reply->sms_status;
+    if ((status = mr_do_call(params, &reply)) == 0)
+       status = reply->mr_status;
        
-    sms_destroy_reply(reply);
+    mr_destroy_reply(reply);
 
     return status;
 }
index 55ce0b5de644d5b0a65e1124d3663b03cc0d6f0b..8e7f4ffa1333f75064ee12dadc01452ebc4a1d12 100644 (file)
@@ -14,11 +14,11 @@ static char *rcsid_sms_data_c = "$Header$";
 #endif lint
 
 #include <mit-copyright.h>
-#include "sms_private.h"
+#include "mr_private.h"
 
-CONNECTION _sms_conn;
+CONNECTION _mr_conn;
 
-OPERATION _sms_send_op, _sms_recv_op;
+OPERATION _mr_send_op, _mr_recv_op;
 
-int sending_version_no = SMS_VERSION_2;
+int sending_version_no = MR_VERSION_2;
 
index b2310f32593b52ebe1c45280bd16bfc58b13c971..880e88c1a7359f1788a4c359e8b00008db92ecf6 100644 (file)
@@ -3,7 +3,7 @@
  *     $Author$
  *     $Header$
  *
- *     Copyright (C) 1987 by the Massachusetts Institute of Technology
+ *     Copyright (C) 1987, 1990 by the Massachusetts Institute of Technology
  *     For copying and distribution information, please see the file
  *     <mit-copyright.h>.
  */
@@ -13,21 +13,21 @@ static char *rcsid_sms_init_c = "$Header$";
 #endif lint
 
 #include <mit-copyright.h>
-#include "sms_private.h"
+#include "mr_private.h"
 
-int sms_inited = 0;
+int mr_inited = 0;
 
 /* the reference to link_against_the_moira_version_of_gdb is to make
  * sure that this is built with the proper libraries.
  */
-sms_init()
+mr_init()
 {
        extern int link_against_the_moira_version_of_gdb;
-       if (sms_inited) return;
+       if (mr_inited) return;
        
        gdb_init();
        initialize_sms_error_table();
        initialize_krb_error_table();
        link_against_the_moira_version_of_gdb = 0;
-       sms_inited=1;
+       mr_inited=1;
 }
index f5ef57957bba92591dfe86971c1e810625170633..3ee171bbc036f75b056002ba349848ed198aaf33 100644 (file)
@@ -3,13 +3,14 @@
  *     $Author$
  *     $Header$
  *
- *     Copyright (C) 1987, 1989 by the Massachusetts Institute of Technology
+ *     Copyright (C) 1987, 1989, 1990 by the Massachusetts Institute of
+ *     Technology
  *     For copying and distribution information, please see the file
  *     <mit-copyright.h>.
  *     
  *     This routine is part of the client library.  It handles
  *     the protocol operations: invoking an update and getting the
- *     SMS message of the day.
+ *     MR message of the day.
  */
 
 #ifndef lint
@@ -17,83 +18,83 @@ static char *rcsid_sms_do_update_c = "$Header$";
 #endif lint
 
 #include <mit-copyright.h>
-#include "sms_private.h"
+#include "mr_private.h"
 
 
 /* Invoke a DCM update. */
 
-int sms_do_update()
+int mr_do_update()
 {
     int status;
-    sms_params param_st;
-    struct sms_params *params = NULL;
-    struct sms_params *reply = NULL;
+    mr_params param_st;
+    struct mr_params *params = NULL;
+    struct mr_params *reply = NULL;
 
     CHECK_CONNECTED;
     params = &param_st;
-    params->sms_version_no = sending_version_no;
-    params->sms_procno = SMS_DO_UPDATE;
-    params->sms_argc = 0;
-    params->sms_argl = NULL;
-    params->sms_argv = NULL;
+    params->mr_version_no = sending_version_no;
+    params->mr_procno = MR_DO_UPDATE;
+    params->mr_argc = 0;
+    params->mr_argl = NULL;
+    params->mr_argv = NULL;
        
-    if ((status = sms_do_call(params, &reply)) == 0)
-       status = reply->sms_status;
+    if ((status = mr_do_call(params, &reply)) == 0)
+       status = reply->mr_status;
        
-    sms_destroy_reply(reply);
+    mr_destroy_reply(reply);
 
     return status;
 }
 
 
-/* Get the SMS motd.  This returns an SMS status, and motd will either
+/* Get the MR motd.  This returns an MR status, and motd will either
  * point to NULL or the motd in a static buffer.
  */
 
-int sms_motd(motd)
+int mr_motd(motd)
 char **motd;
 {
     int status;
-    sms_params param_st;
-    struct sms_params *params = NULL;
-    struct sms_params *reply = NULL;
+    mr_params param_st;
+    struct mr_params *params = NULL;
+    struct mr_params *reply = NULL;
     static char buffer[1024];
 
     *motd = NULL;
     CHECK_CONNECTED;
     params = &param_st;
-    params->sms_version_no = sending_version_no;
-    params->sms_procno = SMS_MOTD;
-    params->sms_argc = 0;
-    params->sms_argl = NULL;
-    params->sms_argv = NULL;
+    params->mr_version_no = sending_version_no;
+    params->mr_procno = MR_MOTD;
+    params->mr_argc = 0;
+    params->mr_argl = NULL;
+    params->mr_argv = NULL;
        
-    if ((status = sms_do_call(params, &reply)))
+    if ((status = mr_do_call(params, &reply)))
       goto punt;
 
-    while ((status = reply->sms_status) == SMS_MORE_DATA) {
-       if (reply->sms_argc > 0) {
-           strncpy(buffer, reply->sms_argv[0], sizeof(buffer));
+    while ((status = reply->mr_status) == MR_MORE_DATA) {
+       if (reply->mr_argc > 0) {
+           strncpy(buffer, reply->mr_argv[0], sizeof(buffer));
            *motd = buffer;
        }
-       sms_destroy_reply(reply);
+       mr_destroy_reply(reply);
        reply = NULL;
 
-       initialize_operation(_sms_recv_op, sms_start_recv, &reply,
+       initialize_operation(_mr_recv_op, mr_start_recv, &reply,
                             (int (*)())NULL);
-       queue_operation(_sms_conn, CON_INPUT, _sms_recv_op);
+       queue_operation(_mr_conn, CON_INPUT, _mr_recv_op);
 
-       sms_complete_operation(_sms_recv_op);
-       if (OP_STATUS(_sms_recv_op) != OP_COMPLETE) {
-           sms_disconnect();
-           status = SMS_ABORTED;
+       mr_complete_operation(_mr_recv_op);
+       if (OP_STATUS(_mr_recv_op) != OP_COMPLETE) {
+           mr_disconnect();
+           status = MR_ABORTED;
            return(status);
        }
     }  
  punt:
-    sms_destroy_reply(reply);
+    mr_destroy_reply(reply);
     /* for backwards compatability */
-    if (status == SMS_UNKNOWN_PROC)
+    if (status == MR_UNKNOWN_PROC)
       return(0);
     else
       return(status);
@@ -103,7 +104,7 @@ char **motd;
 /* Tell the library to take care of another input source while it is
  * processing a query.  For instance, an X toolkit application would
  * do something like
- *    sms_set_alternate_input(ConnectionNumber(XtDisplay(widget)), doxinput);
+ *    mr_set_alternate_input(ConnectionNumber(XtDisplay(widget)), doxinput);
  * where doxinput is defined as:
  *    doxinput() {
  *     extern Widget toplevel;
@@ -116,18 +117,18 @@ char **motd;
  *    }
  */
 
-static int sms_alternate_input = 0;
-static int (*sms_alternate_handler)();
+static int mr_alternate_input = 0;
+static int (*mr_alternate_handler)();
 
-int sms_set_alternate_input(fd, proc)
+int mr_set_alternate_input(fd, proc)
 int fd;
 int (*proc)();
 {
-    if (sms_alternate_input != 0)
-      return(SMS_ALREADY_CONNECTED);
-    sms_alternate_input = fd;
-    sms_alternate_handler = proc;
-    return(SMS_SUCCESS);
+    if (mr_alternate_input != 0)
+      return(MR_ALREADY_CONNECTED);
+    mr_alternate_input = fd;
+    mr_alternate_handler = proc;
+    return(MR_SUCCESS);
 }
 
 
@@ -135,7 +136,7 @@ int (*proc)();
  * handles alternate input streams (such as X) as well.
  */
 
-sms_complete_operation(op)
+mr_complete_operation(op)
 OPERATION op;
 {
     long infd, outfd, exfd;
@@ -143,17 +144,17 @@ OPERATION op;
  
     gdb_progress();            /* try for an immediate completion */
 
-    if (sms_alternate_input == 0)
+    if (mr_alternate_input == 0)
       return(complete_operation(op));
 
-    infd = (1<<sms_alternate_input);
+    infd = (1<<mr_alternate_input);
     outfd = exfd = 0;
 
     while(op->status != OP_COMPLETE && op->status != OP_CANCELLED) {
-       rc = con_select(sms_alternate_input, (fd_set *)&infd, (fd_set *)&outfd,
+       rc = con_select(mr_alternate_input, (fd_set *)&infd, (fd_set *)&outfd,
                          (fd_set *)&exfd, (struct timeval *)NULL);
-       if (rc > 0 && sms_alternate_handler) {
-           (*sms_alternate_handler)();
+       if (rc > 0 && mr_alternate_handler) {
+           (*mr_alternate_handler)();
        }
     }
     return(op->status);
index b267382f60d2b161932e57969d69ec525a4611d7..8f5923b3a8c23b9d6916d746c2e7b6787233c53c 100644 (file)
@@ -3,7 +3,7 @@
  *     $Author$
  *     $Header$
  *
- *     Copyright (C) 1987 by the Massachusetts Institute of Technology
+ *     Copyright (C) 1987, 1990 by the Massachusetts Institute of Technology
  *     For copying and distribution information, please see the file
  *     <mit-copyright.h>.
  *
@@ -16,7 +16,7 @@ static char *rcsid_sms_param_c = "$Header$";
 #include <mit-copyright.h>
 #include <sys/types.h>
 #include <netinet/in.h>
-#include "sms_private.h"
+#include "mr_private.h"
 
 /*
  * GDB operations to send and recieve RPC requests and replies.
@@ -28,25 +28,25 @@ static char *rcsid_sms_param_c = "$Header$";
  * write of the next bunch of data.
  */
 
-sms_cont_send(op, hcon, arg)
+mr_cont_send(op, hcon, arg)
     OPERATION op;
     HALF_CONNECTION hcon;
-    struct sms_params *arg;
+    struct mr_params *arg;
 {
     op->result = OP_SUCCESS;
-    free(arg->sms_flattened);
-    arg->sms_flattened = NULL;
+    free(arg->mr_flattened);
+    arg->mr_flattened = NULL;
     
     return OP_COMPLETE;
 }
 
-sms_start_send(op, hcon, arg)
+mr_start_send(op, hcon, arg)
     OPERATION op;
     HALF_CONNECTION hcon;
-    register struct sms_params *arg;
+    register struct mr_params *arg;
 {
     int i, len;
-    unsigned int sms_size;
+    unsigned int mr_size;
     int *argl;
     char *buf, *bp;
        
@@ -54,7 +54,7 @@ sms_start_send(op, hcon, arg)
      * This should probably be split into several routines.
      * It could also probably be made more efficient (punting most
      * of the argument marshalling stuff) by doing I/O directly
-     * from the strings.  Anyone for a scatter/gather sms_send_data?
+     * from the strings.  Anyone for a scatter/gather mr_send_data?
      *
      * that would look a lot like the uio stuff in the kernel..  hmm.
      */
@@ -70,29 +70,29 @@ sms_start_send(op, hcon, arg)
      * to a longword boundary.
      */
 
-    sms_size = 4 * sizeof(long);
+    mr_size = 4 * sizeof(long);
 
-    argl = (int *)malloc((unsigned)(sizeof(int) * arg->sms_argc));
+    argl = (int *)malloc((unsigned)(sizeof(int) * arg->mr_argc));
 
     /*
      * For each argument, figure out how much space is needed.
      */
        
-    for (i = 0; i < arg->sms_argc; ++i) {
-       if (arg->sms_argl)
-           argl[i] = len = arg->sms_argl[i];
+    for (i = 0; i < arg->mr_argc; ++i) {
+       if (arg->mr_argl)
+           argl[i] = len = arg->mr_argl[i];
        else
-           argl[i] = len = strlen(arg->sms_argv[i]) + 1;
-       sms_size += sizeof(long) + len;
+           argl[i] = len = strlen(arg->mr_argv[i]) + 1;
+       mr_size += sizeof(long) + len;
        /* Round up to next longword boundary.. */
-       sms_size = sizeof(long) * howmany(sms_size, sizeof(long));
+       mr_size = sizeof(long) * howmany(mr_size, sizeof(long));
     }
        
-    arg->sms_flattened = buf = malloc(sms_size);
+    arg->mr_flattened = buf = malloc(mr_size);
 
-    bzero(arg->sms_flattened, sms_size);
+    bzero(arg->mr_flattened, mr_size);
        
-    arg->sms_size = sms_size;
+    arg->mr_size = mr_size;
        
     /*
      * This is gross.  Any better suggestions, anyone?
@@ -100,10 +100,10 @@ sms_start_send(op, hcon, arg)
      * return a pointer which is aligned correctly for any data.
      */
 
-    ((long *)buf)[0] = htonl(sms_size);
-    ((long *)buf)[1] = htonl(arg->sms_version_no);
-    ((long *)buf)[2] = htonl(arg->sms_procno);
-    ((long *)buf)[3] = htonl(arg->sms_argc);
+    ((long *)buf)[0] = htonl(mr_size);
+    ((long *)buf)[1] = htonl(arg->mr_version_no);
+    ((long *)buf)[2] = htonl(arg->mr_procno);
+    ((long *)buf)[3] = htonl(arg->mr_argc);
 
     /*
      * bp is a pointer into the point in the buffer to put
@@ -112,39 +112,39 @@ sms_start_send(op, hcon, arg)
        
     bp = (char *)(((long *)buf) + 4);
        
-    for (i = 0; i<arg->sms_argc; ++i) {
+    for (i = 0; i<arg->mr_argc; ++i) {
        len = argl[i];
        *((long *)bp) = htonl(len);
        bp += sizeof(long);
-       bcopy(arg->sms_argv[i], bp, len);
+       bcopy(arg->mr_argv[i], bp, len);
        bp += sizeof(long) * howmany(len, sizeof(long));
     }
-    op->fcn.cont = sms_cont_send;
-    arg->sms_size = sms_size;
+    op->fcn.cont = mr_cont_send;
+    arg->mr_size = mr_size;
 
     free(argl);
     
-    if (gdb_send_data(hcon, arg->sms_flattened, sms_size) == OP_COMPLETE)
-       return sms_cont_send(op, hcon, arg);
+    if (gdb_send_data(hcon, arg->mr_flattened, mr_size) == OP_COMPLETE)
+       return mr_cont_send(op, hcon, arg);
     else return OP_RUNNING;
 }      
        
-sms_cont_recv(op, hcon, argp)
+mr_cont_recv(op, hcon, argp)
     OPERATION op;
     HALF_CONNECTION hcon;
-    sms_params **argp;
+    mr_params **argp;
 {
     int done = FALSE;
     char *cp;
     int *ip;
     int i;
-    register sms_params *arg = *argp;
+    register mr_params *arg = *argp;
                                                       
     while (!done) {
-       switch (arg->sms_state) {
+       switch (arg->mr_state) {
        case S_RECV_START:
-           arg->sms_state = S_RECV_DATA;
-           if (gdb_receive_data(hcon, (caddr_t)&arg->sms_size,
+           arg->mr_state = S_RECV_DATA;
+           if (gdb_receive_data(hcon, (caddr_t)&arg->mr_size,
                                 sizeof(long)) == OP_COMPLETE)
                continue;
            done = TRUE;
@@ -152,51 +152,51 @@ sms_cont_recv(op, hcon, argp)
        case S_RECV_DATA:
            fflush(stdout);
            /* Should validate that length is reasonable */
-           arg->sms_size = ntohl(arg->sms_size);
-           if (arg->sms_size > 65536) {
+           arg->mr_size = ntohl(arg->mr_size);
+           if (arg->mr_size > 65536) {
                return OP_CANCELLED;
            }
-           arg->sms_flattened = malloc(arg->sms_size);
-           arg->sms_state = S_DECODE_DATA;
-           bcopy((caddr_t)&arg->sms_size, arg->sms_flattened, sizeof(long));
+           arg->mr_flattened = malloc(arg->mr_size);
+           arg->mr_state = S_DECODE_DATA;
+           bcopy((caddr_t)&arg->mr_size, arg->mr_flattened, sizeof(long));
                        
            if (gdb_receive_data(hcon,
-                                arg->sms_flattened + sizeof(long),
-                                arg->sms_size - sizeof(long))
+                                arg->mr_flattened + sizeof(long),
+                                arg->mr_size - sizeof(long))
                == OP_COMPLETE)
                continue;
            done = TRUE;
            break;
        case S_DECODE_DATA:
-           cp = arg->sms_flattened;
+           cp = arg->mr_flattened;
            ip = (int *) cp;
            /* we already got the overall length.. */
            for(i=1; i <4; i++) ip[i] = ntohl(ip[i]);
-           arg->sms_version_no = ip[1];
-           if (arg->sms_version_no != SMS_VERSION_1 &&
-               arg->sms_version_no != SMS_VERSION_2)
-               arg->sms_status = SMS_VERSION_MISMATCH;
-           else arg->sms_status = ip[2];
-           arg->sms_argc = ip[3];
+           arg->mr_version_no = ip[1];
+           if (arg->mr_version_no != MR_VERSION_1 &&
+               arg->mr_version_no != MR_VERSION_2)
+               arg->mr_status = MR_VERSION_MISMATCH;
+           else arg->mr_status = ip[2];
+           arg->mr_argc = ip[3];
            cp += 4 * sizeof(int);
-           arg->sms_argv=(char **)malloc(arg->sms_argc *sizeof(char **));
-           arg->sms_argl=(int *)malloc(arg->sms_argc *sizeof(int *));
+           arg->mr_argv=(char **)malloc(arg->mr_argc *sizeof(char **));
+           arg->mr_argl=(int *)malloc(arg->mr_argc *sizeof(int *));
                        
-           for (i = 0; i<arg->sms_argc; ++i) {
+           for (i = 0; i<arg->mr_argc; ++i) {
                u_short nlen = ntohl(* (int *) cp);
                cp += sizeof (long);
-               if (cp + nlen > arg->sms_flattened + arg->sms_size) {
-                   free(arg->sms_flattened);
-                   arg->sms_flattened = NULL;
+               if (cp + nlen > arg->mr_flattened + arg->mr_size) {
+                   free(arg->mr_flattened);
+                   arg->mr_flattened = NULL;
                    return OP_CANCELLED;
                }                   
-               arg->sms_argv[i] = (char *)malloc(nlen);
-               bcopy(cp, arg->sms_argv[i], nlen);
-               arg->sms_argl[i]=nlen;
+               arg->mr_argv[i] = (char *)malloc(nlen);
+               bcopy(cp, arg->mr_argv[i], nlen);
+               arg->mr_argl[i]=nlen;
                cp += sizeof(long) * howmany(nlen, sizeof(long));
            }
-           free(arg->sms_flattened);
-           arg->sms_flattened = NULL;
+           free(arg->mr_flattened);
+           arg->mr_flattened = NULL;
            return OP_COMPLETE;
        }
     }
@@ -204,54 +204,43 @@ sms_cont_recv(op, hcon, argp)
 }
                        
 
-sms_start_recv(op, hcon, argp)
+mr_start_recv(op, hcon, argp)
     OPERATION op;
     HALF_CONNECTION hcon;
-    struct sms_params **argp;
+    struct mr_params **argp;
 {
-    register sms_params *arg = *argp;
+    register mr_params *arg = *argp;
     if (!arg) {
-       *argp = arg = (sms_params *)malloc(sizeof(sms_params));
-       arg->sms_argl = NULL;
-       arg->sms_argv = NULL;
-       arg->sms_flattened = NULL;
+       *argp = arg = (mr_params *)malloc(sizeof(mr_params));
+       arg->mr_argl = NULL;
+       arg->mr_argv = NULL;
+       arg->mr_flattened = NULL;
     }
-    arg->sms_state = S_RECV_START;
-    op->fcn.cont = sms_cont_recv;
-    return sms_cont_recv(op, hcon, argp);
+    arg->mr_state = S_RECV_START;
+    op->fcn.cont = mr_cont_recv;
+    return mr_cont_recv(op, hcon, argp);
 }
 
-sms_destroy_reply(reply)
-    sms_params *reply;
+mr_destroy_reply(reply)
+    mr_params *reply;
 {
     int i;
     if (reply) {
-       if (reply->sms_argl)
-           free(reply->sms_argl);
-       reply->sms_argl = NULL;
-       if (reply->sms_flattened)
-           free(reply->sms_flattened);
-       reply->sms_flattened = NULL;
-       if (reply->sms_argv) {
-           for (i=0; i<reply->sms_argc; i++) {
-               if (reply->sms_argv[i])
-                   free (reply->sms_argv[i]);
-               reply->sms_argv[i] = NULL;
+       if (reply->mr_argl)
+           free(reply->mr_argl);
+       reply->mr_argl = NULL;
+       if (reply->mr_flattened)
+           free(reply->mr_flattened);
+       reply->mr_flattened = NULL;
+       if (reply->mr_argv) {
+           for (i=0; i<reply->mr_argc; i++) {
+               if (reply->mr_argv[i])
+                   free (reply->mr_argv[i]);
+               reply->mr_argv[i] = NULL;
            }
-           free(reply->sms_argv);
+           free(reply->mr_argv);
        }
-       reply->sms_argv = NULL;
+       reply->mr_argv = NULL;
        free(reply);
     }
 }
-
-/*
- * Local Variables:
- * mode: c
- * c-indent-level: 4
- * c-continued-statement-offset: 4
- * c-brace-offset: -4
- * c-argdecl-indent: 4
- * c-label-offset: -4
- * End:
- */
index 7bdf2125723be3c9da5ebe7bd85cebe31a1b52c0..19dfeaecdc114f3fad4c8955d12fb9101bab79ed 100644 (file)
@@ -5,29 +5,15 @@
  *
  *     Copyright (C) 1987 by the Massachusetts Institute of Technology
  *
- *     Private declarations of the SMS library.
- * 
- *     $Log$
- *     Revision 1.4  1988-04-19 12:42:49  mar
- *     declared version number variable
- *
- * Revision 1.3  87/06/16  17:48:39  wesommer
- * Clean up memory allocation, indenting.
- * 
- * Revision 1.2  87/05/31  22:07:06  wesommer
- * Private data to the sms server and library.
- * 
- * Revision 1.1  87/05/20  03:12:00  wesommer
- * Initial revision
- * 
+ *     Private declarations of the Moira library.
  */
 
-#include "sms_proto.h"
+#include "mr_proto.h"
 
-extern CONNECTION _sms_conn;
-extern OPERATION _sms_send_op, _sms_recv_op;
+extern CONNECTION _mr_conn;
+extern OPERATION _mr_send_op, _mr_recv_op;
 
-extern int sms_inited;
+extern int mr_inited;
 extern int sending_version_no;
 
 /*
@@ -40,7 +26,7 @@ extern int sending_version_no;
 
 #define EVER (;;)
        
-#define CHECK_CONNECTED {if (!_sms_conn) return SMS_NOT_CONNECTED;}
+#define CHECK_CONNECTED {if (!_mr_conn) return MR_NOT_CONNECTED;}
 
 /*
  * There should be an include file for these..
index 4e59282ef24d4a88a20600c1c523ec2f5bc8f7c9..d6162b2c090571f2039e591f62f0aad59b2c4271 100644 (file)
@@ -14,17 +14,17 @@ static char *rcsid_sms_query_c = "$Header$";
 #endif lint
 
 #include <mit-copyright.h>
-#include "sms_private.h"
+#include "mr_private.h"
 
 /*
- * This routine is the primary external interface to the sms library.
+ * This routine is the primary external interface to the mr library.
  *
  * It builds a new argument vector with the query handle prepended,
- * and calls sms_query_internal.
+ * and calls mr_query_internal.
  */
 int level = 0;
 
-int sms_query(name, argc, argv, callproc, callarg)
+int mr_query(name, argc, argv, callproc, callarg)
     char *name;                /* Query name */
     int argc;          /* Arg count */
     char **argv;               /* Args */
@@ -35,12 +35,12 @@ int sms_query(name, argc, argv, callproc, callarg)
     register int status = 0;
     nargv[0] = name;
     bcopy((char *)argv, (char *)(nargv+1), sizeof(char *) * argc);
-    status = sms_query_internal(argc+1, nargv, callproc, callarg);
+    status = mr_query_internal(argc+1, nargv, callproc, callarg);
     free(nargv);
     return status;
 }
 /*
- * This routine makes an SMS query.
+ * This routine makes an MR query.
  *
  * argv[0] is the query name.
  * argv[1..argc-1] are the query arguments.
@@ -52,53 +52,53 @@ int sms_query(name, argc, argv, callproc, callarg)
  * way to send it a quench..)
  */
 
-int sms_query_internal(argc, argv, callproc, callarg)
+int mr_query_internal(argc, argv, callproc, callarg)
     int argc;          /* Arg count */
     char **argv;               /* Args */
     int (*callproc)(); /* Callback procedure */
     char *callarg;             /* Callback argument */
 {
     int status;
-    sms_params params_st;
-    register sms_params *params = NULL;
-    sms_params *reply = NULL;
+    mr_params params_st;
+    register mr_params *params = NULL;
+    mr_params *reply = NULL;
     int stopcallbacks = 0;
 
-    if (level) return SMS_QUERY_NOT_REENTRANT;
+    if (level) return MR_QUERY_NOT_REENTRANT;
     
     CHECK_CONNECTED;
     level++;
 
     params = &params_st; 
-    params->sms_version_no = sending_version_no;
-    params->sms_procno = SMS_QUERY;
-    params->sms_argc = argc;
-    params->sms_argl = NULL;
-    params->sms_argv = argv;
+    params->mr_version_no = sending_version_no;
+    params->mr_procno = MR_QUERY;
+    params->mr_argc = argc;
+    params->mr_argl = NULL;
+    params->mr_argv = argv;
        
-    if ((status = sms_do_call(params, &reply)))
+    if ((status = mr_do_call(params, &reply)))
        goto punt;
 
-    while ((status = reply->sms_status) == SMS_MORE_DATA) {
+    while ((status = reply->mr_status) == MR_MORE_DATA) {
        if (!stopcallbacks) 
            stopcallbacks =
-               (*callproc)(reply->sms_argc, reply->sms_argv, callarg);
-       sms_destroy_reply(reply);
+               (*callproc)(reply->mr_argc, reply->mr_argv, callarg);
+       mr_destroy_reply(reply);
        reply = NULL;
 
-       initialize_operation(_sms_recv_op, sms_start_recv, &reply,
+       initialize_operation(_mr_recv_op, mr_start_recv, &reply,
                             (int (*)())NULL);
-       queue_operation(_sms_conn, CON_INPUT, _sms_recv_op);
+       queue_operation(_mr_conn, CON_INPUT, _mr_recv_op);
 
-       sms_complete_operation(_sms_recv_op);
-       if (OP_STATUS(_sms_recv_op) != OP_COMPLETE) {
-           sms_disconnect();
-           status = SMS_ABORTED;
+       mr_complete_operation(_mr_recv_op);
+       if (OP_STATUS(_mr_recv_op) != OP_COMPLETE) {
+           mr_disconnect();
+           status = MR_ABORTED;
            goto punt_1;
        }
     }  
 punt:
-    sms_destroy_reply(reply);
+    mr_destroy_reply(reply);
 punt_1:
     level--;
     return status;
index 0eb639766623c6cd6e94a214eb18a5f1dd862279..9f148f373358ad7693cbfadadd2715a21ee6bda8 100644 (file)
@@ -14,7 +14,7 @@ static char *rcsid_nfsparttype_c = "$Header$";
 #endif lint
 
 #include <mit-copyright.h>
-#include <sms.h>
+#include <moira.h>
 #include <stdio.h>
 #include <strings.h>
 #include <ctype.h>
@@ -32,12 +32,12 @@ struct pair {
  */
 
 static struct pair fs_names[] = {
-    { SMS_FS_STUDENT, "Student" },
-    { SMS_FS_FACULTY, "Faculty/Project" },
-    { SMS_FS_FACULTY, "Faculty" },
-    { SMS_FS_FACULTY, "Project" },
-    { SMS_FS_STAFF, "Staff" },
-    { SMS_FS_MISC, "Other" },
+    { MR_FS_STUDENT, "Student" },
+    { MR_FS_FACULTY, "Faculty/Project" },
+    { MR_FS_FACULTY, "Faculty" },
+    { MR_FS_FACULTY, "Project" },
+    { MR_FS_STAFF, "Staff" },
+    { MR_FS_MISC, "Other" },
     /* Insert new entries before the 0,0 pair */
     { 0, 0 },
 };
index 40feaf1b91ec641034b26143e51986b37cfa75ba..72fcfbacc718e41b397f8d3b49b83bc52a6356f4 100644 (file)
--- a/lib/sq.c
+++ b/lib/sq.c
@@ -8,7 +8,7 @@
  */
 
 #include <mit-copyright.h>
-#include <sms.h>
+#include <moira.h>
 
 struct save_queue *
 sq_create()
This page took 0.399781 seconds and 5 git commands to generate.