]> andersk Git - moira.git/commitdiff
sms -> moira
authormar <mar>
Mon, 19 Mar 1990 12:35:23 +0000 (12:35 +0000)
committermar <mar>
Mon, 19 Mar 1990 12:35:23 +0000 (12:35 +0000)
man/moira.3
update/Makefile
update/client.c
update/exec_002.c
update/get_file.c
update/log.c
update/send_file.c
update/ticket.c
update/update_server.c
update/xfer_002.c

index b312710e84ab9390f49baaa56b9b14a75e8f32b3..b8e16c97c96b0ae8518cd43742dc812106748156 100644 (file)
@@ -1,8 +1,8 @@
-.TH SMS 3 "8 Jan 1989"
+.TH MOIRA 3 "8 Jan 1989"
 .FM mit
 .SH NAME
-sms_connect, sms_host, sms_auth, sms_disconnect, sms_noop, sms_access,
-sms_query, sms_do_update, sms_motd, sms_set_alternate_input,
+mr_connect, mr_host, mr_auth, mr_disconnect, mr_noop, mr_access,
+mr_query, mr_do_update, mr_motd, mr_set_alternate_input,
 format_filesys_type, parse_filesys_type,
 canonicalize_hostname, strsave, strtrim, sq_create, sq_destroy,
 sq_get_data, sq_remove_data, sq_empty, sq_save_args, sq_save_data,
@@ -12,39 +12,39 @@ sq_save_unique_data, sq_save_unique_string
 .nj
 .TP
 Protocol functions
-.B #include <sms.h>
+.B #include <moira.h>
 
-.B int sms_connect(server);
+.B int mr_connect(server);
 .B     char *server;
 
-.B int sms_host(host, size);
+.B int mr_host(host, size);
 .B     char *server;
 
-.B int sms_motd(motd);
+.B int mr_motd(motd);
 .B     char **motd;
 
-.B int sms_auth(prog);
+.B int mr_auth(prog);
 .B     char *prog;
 
-.B int sms_disconnect();
+.B int mr_disconnect();
 
-.B int sms_noop();
+.B int mr_noop();
 
-.B int sms_access(name, argc, argv);
+.B int mr_access(name, argc, argv);
 .B     char *name;
 .B     int argc;
 .B     char **argv;
 
-.B int sms_query(name, argc, argv, callproc, callarg);
+.B int mr_query(name, argc, argv, callproc, callarg);
 .B     char *name;
 .B     int argc;
 .B     char **argv;
 .B     int (*callproc)(int, char **, char *);
 .B     char *callarg;
 
-.B int sms_do_update();
+.B int mr_do_update();
 
-.B int sms_set_alternate_input(fd, proc)
+.B int mr_set_alternate_input(fd, proc)
 .B     int fd;
 .B     void (*proc)();
 .TP
@@ -92,16 +92,16 @@ those described in this man page, but they are not intended to be used
 directly. Instead, they are called by the routines that are described.
 
 Be sure to link your application against these libraries:
--lsms -lsmsgdb -lcom_err -lkrb -ldes
+-lmoira -lmrgdb -lcom_err -lkrb -ldes
 .TP
 Protocol functions
 All protocol routines return 0 on success, or a value from 
-.I <sms_et.h>
+.I <mr_et.h>
 on failure.  An application should connect, check the motd in case the
 server is closed, authenticate, perform queries, then disconnect.
 
-.B sms_connect
-establishes a connection with the SMS server.  The
+.B mr_connect
+establishes a connection with the Moira server.  The
 .I server
 specification is optional.  If present, it is of the form
 hostname:portname, where the portname can be looked up in 
@@ -112,40 +112,40 @@ then the server will be found from the MOIRASERVER environment
 variable, the "moira" sloc entry in hesiod, or the compiled in
 default, in that order.
 
-.B sms_host
+.B mr_host
 initializes
 .I host
 with the name of the host that the client is currently connected to.
 
-.B sms_motd
+.B mr_motd
 will check to see if the server is closed and if so, will retrieve an
 explanatory message (the so-called motd).  This routine will always
 return 0 if no error occurs.  *motd will be NULL if the server is
 functioning normally, or a pointer to a static string with the
 explanation if the server is down.
 
-.B sms_auth
+.B mr_auth
 authenticates an established connection using Kerberos.
 .I prog
 is the name of the program making the connection.  The program name
 and the kerberos principal name will be recorded with any changes made
 to the database through this connection.
 
-.B sms_disconnect
-severs the connection with the SMS server.
+.B mr_disconnect
+severs the connection with the Moira server.
 
-.B sms_noop
-pings the SMS server through a "no operation" request, verifying that
+.B mr_noop
+pings the Moira server through a "no operation" request, verifying that
 the connection is still working.
 
-.B sms_access
+.B mr_access
 Verifies that the authenticated user has the necessary access to
 perform the query specified by
 .I name, argc,
 and
 .I argv.
 
-.B sms_query
+.B mr_query
 performs a query.  This query may be a retrieval, append, delete, or
 update of the database.  Query
 .I name
@@ -158,19 +158,19 @@ For each return tuple,
 will be called with an
 .I argc, argv,
 and the value passed to
-.B sms_query
+.B mr_query
 as
 .I callarg.
 
-.B sms_do_update
-triggers a DCM update immediately on the SMS server.
+.B mr_do_update
+triggers a DCM update immediately on the Moira server.
 
-.B sms_set_alternate_input
+.B mr_set_alternate_input
 tells the Moira library that you want to allow some asynchronus
 actions while a query is being processed.  During query processing, if
 any data is available to be read on the specified file descriptor,
 then the specified function will be called to handle it.  For
-instance, calling sms_set_alternate_input with the connection to the X
+instance, calling mr_set_alternate_input with the connection to the X
 server and a routine which will dispatch X events will allow a toolkit
 application to handle mouse and expose events while a query is being
 processed.
@@ -260,15 +260,15 @@ is like
 except that it uses strcmp on the elements rather than comparing the
 addresses directly.
 .SH FILES
-/usr/include/sms.h
+/usr/include/moira.h
 .br
-/usr/include/sms_et.h
+/usr/include/mr_et.h
 .br
 /tmp/tkt###
 .SH "SEE ALSO"
 mrtest(8), The Moira section of the Athena Technical Plan
 .SH DIAGNOSTICS
-The error codes returned are those defined in <sms_et.h>, or
+The error codes returned are those defined in <mr_et.h>, or
 <krb_et.h>.  They may be easily decoded using the com_err library.
 .SH RESTRICTIONS
 COPYRIGHT 1987,1988,1989 Massachusetts Institute of Technology
index 25396c1a418e1ebb71330ae1ca1fff3fc1e45b5c..6ca7523677ed57c6d480382261881994f2397ca9 100644 (file)
@@ -29,15 +29,15 @@ SSRCS=      update_server.c auth_001.c inst_001.c xfer_002.c exec_002.c \
 
 CSRCS= client.c ticket.c send_file.c checksum.c hostname.c
 
-LIBS=  -L../lib -lsms -lgdb -lkrb -ldes -lcom_err
+LIBS=  -L../lib -lmoira -lgdb -lkrb -ldes -lcom_err
 
-all:   sms_update.o update_server sms_untar
+all:   moira_update.o update_server sms_untar
 
 update_server: ${SOBJS}
        cc ${CFLAGS} -o update_server ${SOBJS} ${LIBS}
 
-sms_update.o: ${COBJS}
-       ld -r -o sms_update.o ${COBJS}
+moira_update.o: ${COBJS}
+       ld -r -o moira_update.o ${COBJS}
 
 sms_untar: sms_untar.c
        cc -o sms_untar ${INCS} sms_untar.c
@@ -45,7 +45,7 @@ sms_untar: sms_untar.c
 
 clean: 
        -rm -f ${COBJS} ${SOBJS}
-       -rm -f update_server sms_update.o
+       -rm -f update_server moira_update.o
        -rm -f sms_untar
        -rm -f core a.out *~ \#*
 
@@ -57,7 +57,6 @@ lint:
        lint ${LINTFLAGS} ${SSRCS}
        lint ${LINTFLAGS} ${CSRCS}
 
-
 smskey:        smskey.c
        ${CC} ${CFLAGS} -o smskey smskey.c -ldes
 
@@ -70,7 +69,7 @@ update_server.o: update_server.c ../include/mit-copyright.h
 update_server.o: /usr/include/stdio.h ../include/gdb.h
 update_server.o: /usr/include/sys/types.h /usr/include/sys/time.h
 update_server.o: /usr/include/sys/time.h /usr/include/errno.h
-update_server.o: /usr/include/strings.h ../include/sms.h ../include/sms_et.h
+update_server.o: /usr/include/strings.h ../include/moira.h ../include/mr_et.h
 update_server.o: /usr/include/sys/file.h /usr/include/sys/ioctl.h
 update_server.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h
 update_server.o: ../include/update.h
@@ -87,11 +86,11 @@ xfer_002.o: ../include/gdb.h /usr/include/sys/types.h /usr/include/sys/time.h
 xfer_002.o: /usr/include/sys/time.h /usr/include/ctype.h
 xfer_002.o: /usr/include/sys/param.h /usr/include/machine/machparam.h
 xfer_002.o: /usr/include/sys/signal.h /usr/include/sys/file.h
-xfer_002.o: /usr/include/strings.h ../include/sms.h ../include/sms_et.h
+xfer_002.o: /usr/include/strings.h ../include/moira.h ../include/mr_et.h
 exec_002.o: exec_002.c ../include/mit-copyright.h /usr/include/stdio.h
 exec_002.o: /usr/include/sys/wait.h /usr/include/sys/signal.h
 exec_002.o: ../include/gdb.h /usr/include/sys/types.h /usr/include/sys/time.h
-exec_002.o: /usr/include/sys/time.h ../include/sms.h ../include/sms_et.h
+exec_002.o: /usr/include/sys/time.h ../include/moira.h ../include/mr_et.h
 exec_002.o: ../include/update.h
 hostname.o: hostname.c ../include/mit-copyright.h /usr/include/stdio.h
 hostname.o: /usr/include/sys/types.h /usr/include/netinet/in.h
@@ -104,7 +103,7 @@ get_file.o: ../include/gdb.h /usr/include/sys/types.h /usr/include/sys/time.h
 get_file.o: /usr/include/sys/time.h /usr/include/ctype.h
 get_file.o: /usr/include/sys/param.h /usr/include/machine/machparam.h
 get_file.o: /usr/include/sys/signal.h /usr/include/sys/file.h
-get_file.o: ../include/sms.h ../include/sms_et.h ../include/update.h
+get_file.o: ../include/moira.h ../include/mr_et.h ../include/update.h
 checksum.o: checksum.c ../include/mit-copyright.h /usr/include/stdio.h
 checksum.o: /usr/include/sys/file.h
 client.o: client.c ../include/mit-copyright.h /usr/include/stdio.h
@@ -113,8 +112,8 @@ client.o: /usr/include/sys/time.h /usr/include/sys/time.h
 client.o: /usr/include/sys/param.h /usr/include/machine/machparam.h
 client.o: /usr/include/sys/signal.h /usr/include/sys/wait.h
 client.o: /usr/include/sys/socket.h ../include/update.h /usr/include/errno.h
-client.o: ../include/dcm.h ../include/sms.h ../include/sms_et.h
-client.o: ../include/sms_app.h ../include/krb.h ../include/des.h
+client.o: ../include/dcm.h ../include/moira.h ../include/mr_et.h
+client.o: ../include/moira_site.h ../include/krb.h ../include/des.h
 ticket.o: ticket.c ../include/mit-copyright.h /usr/include/stdio.h
 ticket.o: ../include/krb.h ../include/des.h /usr/include/sys/types.h
 ticket.o: /usr/include/sys/stat.h /usr/include/strings.h ../include/update.h
@@ -122,7 +121,7 @@ ticket.o: ../include/com_err.h ../include/krb_et.h
 send_file.o: send_file.c ../include/mit-copyright.h /usr/include/stdio.h
 send_file.o: ../include/com_err.h ../include/gdb.h /usr/include/sys/types.h
 send_file.o: /usr/include/sys/time.h /usr/include/sys/time.h ../include/dcm.h
-send_file.o: ../include/sms.h ../include/sms_et.h /usr/include/sys/file.h
+send_file.o: ../include/moira.h ../include/mr_et.h /usr/include/sys/file.h
 send_file.o: /usr/include/sys/stat.h ../include/update.h
 checksum.o: checksum.c ../include/mit-copyright.h /usr/include/stdio.h
 checksum.o: /usr/include/sys/file.h
index 49544df3f06b10ff4f37f26700f0c511382deb39..b0ed64e4cad1491e88955fd54a88f31b9c3a0304 100644 (file)
@@ -15,13 +15,13 @@ static char *rcsid_client2_c = "$Header$";
  *     <mit-copyright.h>.
  * DESCRIPTION:
  *     This code handles the actual distribution of data files
- *     to servers in the SMS server-update program.
+ *     to servers in the MOIRA server-update program.
  * AUTHOR:
  *     Ken Raeburn (spook@athena.MIT.EDU),
  *             MIT Project Athena/MIT Information Systems.
  * DEFINED VALUES:
  *     conn
- *     sms_update_server
+ *     mr_update_server
  */
 
 #include <mit-copyright.h>
@@ -34,8 +34,8 @@ static char *rcsid_client2_c = "$Header$";
 #include <update.h>
 #include <errno.h>
 #include <dcm.h>
-#include <sms.h>
-#include <sms_app.h>
+#include <moira.h>
+#include <moira_site.h>
 #include <krb.h>
 
 extern char *malloc();
@@ -76,7 +76,7 @@ initialize()
 
 /*
  * FUNCTION:
- *     sms_update_server(service, machine, target_path)
+ *     mr_update_server(service, machine, target_path)
  * DESCRIPTION:
  *     Attempts to perform an update to the named machine
  *     of the named service.  The file DCM_DIR/service.out
@@ -85,7 +85,7 @@ initialize()
  * INPUT:
  *     service
  *             Name of service to be updated; used to find
- *             the source data file in the SMS data directory.
+ *             the source data file in the MR data directory.
  *     machine
  *     target_path
  *             Location to install the file.
@@ -100,7 +100,7 @@ initialize()
  */
 
 int
-sms_update_server(service, machine, target_path, instructions)
+mr_update_server(service, machine, target_path, instructions)
 char *service;
 char *machine;
 char *target_path;
@@ -117,28 +117,28 @@ char *instructions;
     int on;
     
     /* some sanity checking of arguments while we build data */
-    ASSERT(NONNULL(machine), SMS_INTERNAL, " null host name");
-    ASSERT(NONNULL(service), SMS_INTERNAL, " null service name");
-    ASSERT((strlen(machine) + strlen(service) + 2 < BUFSIZ), SMS_ARG_TOO_LONG,
+    ASSERT(NONNULL(machine), MR_INTERNAL, " null host name");
+    ASSERT(NONNULL(service), MR_INTERNAL, " null service name");
+    ASSERT((strlen(machine) + strlen(service) + 2 < BUFSIZ), MR_ARG_TOO_LONG,
           " machine and service names");
     sprintf(buf, "%s:%s", machine, service);
     service_updated = strsave(buf);
-    ASSERT(NONNULL(service_updated), SMS_NO_MEM, " for service name");
-    ASSERT((strlen(machine)+strlen(SERVICE_NAME)+2 < BUFSIZ), SMS_ARG_TOO_LONG,
+    ASSERT(NONNULL(service_updated), MR_NO_MEM, " for service name");
+    ASSERT((strlen(machine)+strlen(SERVICE_NAME)+2 < BUFSIZ), MR_ARG_TOO_LONG,
           " machine and update service name");
     sprintf(buf, "%s:%s", machine, SERVICE_NAME);
     service_address = strsave(buf);
-    ASSERT(NONNULL(service_address), SMS_NO_MEM, " for service address");
-    ASSERT(NONNULL(target_path), SMS_INTERNAL, " null target pathname");
-    ASSERT((strlen(target_path) < MAXPATHLEN), SMS_ARG_TOO_LONG,
+    ASSERT(NONNULL(service_address), MR_NO_MEM, " for service address");
+    ASSERT(NONNULL(target_path), MR_INTERNAL, " null target pathname");
+    ASSERT((strlen(target_path) < MAXPATHLEN), MR_ARG_TOO_LONG,
           " target pathname");
-    ASSERT2(target_path[0] == '/', SMS_NOT_UNIQUE,
+    ASSERT2(target_path[0] == '/', MR_NOT_UNIQUE,
           " non-absolute pathname supplied \"%s\"", target_path);
     sprintf(buf, "%s/%s.out", DCM_DIR, service);
     pathname = strsave(buf);
-    ASSERT(NONNULL(pathname), SMS_NO_MEM, " for pathname");
-    ASSERT(NONNULL(instructions), SMS_NO_MEM, " for instructions");
-    ASSERT((strlen(instructions) < MAXPATHLEN), SMS_ARG_TOO_LONG,
+    ASSERT(NONNULL(pathname), MR_NO_MEM, " for pathname");
+    ASSERT(NONNULL(instructions), MR_NO_MEM, " for instructions");
+    ASSERT((strlen(instructions) < MAXPATHLEN), MR_ARG_TOO_LONG,
           " instruction pathname");
     
     initialize();
@@ -149,7 +149,7 @@ char *instructions;
     if (!conn || (connection_status(conn) == CON_STOPPED)) {
        com_err(whoami, connection_errno(conn),
                " can't connect to update %s", service_address);
-       return(SMS_CANT_CONNECT);
+       return(MR_CANT_CONNECT);
     }
     on = 1;
     setsockopt(conn->in.fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on));
@@ -167,7 +167,7 @@ char *instructions;
       goto update_failed;
 
     /* send instructions for installation */
-    strcpy(buf, "/tmp/sms-update.XXXXXX");
+    strcpy(buf, "/tmp/moira-update.XXXXXX");
     mktemp(buf);
     code = send_file(instructions, buf);
     if (code)
@@ -182,7 +182,7 @@ char *instructions;
     }
     
     /* finished updates */
-    code = SMS_SUCCESS;
+    code = MR_SUCCESS;
 
  update_failed:
     send_quit();
@@ -204,7 +204,7 @@ char *host_name;
     register int code;
     int response;
     
-    code = get_sms_update_ticket(host_name, ticket);
+    code = get_mr_update_ticket(host_name, ticket);
     if (code) {
        return(code);
     }
@@ -234,7 +234,7 @@ char *host_name;
     if (response) {
        return(response);
     }
-    return(SMS_SUCCESS);
+    return(MR_SUCCESS);
 }
 
 static
@@ -257,7 +257,7 @@ execute(path)
       com_err(whoami, response, "execute returned %d", response);
     if (response)
       return(response);
-    return(SMS_SUCCESS);
+    return(MR_SUCCESS);
 }
 
 send_quit()
index ee2e32fe6d537b59b2479e19d3d0196bb6b092c6..86dc35c9a66c4a221e0185b11b933fc1357ed053 100644 (file)
@@ -15,7 +15,7 @@ static char *rcsid_exec_002_c = "$Header$";
 #include <sys/wait.h>
 #include <signal.h>
 #include <gdb.h>
-#include <sms.h>
+#include <moira.h>
 #include "update.h"
 
 extern CONNECTION conn;
index 79baacc7710e1e292993bdd530aa0859a9bfae7c..c0f37d004f50a65e5ed488d4e4b805d063881c80 100644 (file)
@@ -16,7 +16,7 @@ static char *rcsid_get_file_c = "$Header$";
 #include <ctype.h>
 #include <sys/param.h>
 #include <sys/file.h>
-#include <sms.h>
+#include <moira.h>
 #include "update.h"
 
 extern CONNECTION conn;
@@ -70,7 +70,7 @@ get_file(pathname, file_size, checksum)
     int found_checksum;
     
     if (!have_authorization) {
-       reject_call(SMS_PERM);
+       reject_call(MR_PERM);
        return(1);
     }
     if (done)                  /* re-initialize data */
@@ -83,7 +83,7 @@ get_file(pathname, file_size, checksum)
        code = errno;
        sprintf(buf, "%s: creating file %s (get_file)",
                error_message(code), pathname);
-       sms_log_error(buf);
+       mr_log_error(buf);
        report_error("reporting file creation error (get_file)");
        return(1);
     }
@@ -96,7 +96,7 @@ get_file(pathname, file_size, checksum)
            code = errno;
            sprintf(buf, "%s: verifying free disk space for %s (get_file)",
                    error_message(code), pathname);
-           sms_log_error(buf);
+           mr_log_error(buf);
            /* do all we can to free the space */
            (void) unlink(pathname);
            (void) ftruncate(fd, 0);
@@ -134,7 +134,7 @@ get_file(pathname, file_size, checksum)
     /* validate checksum */
     found_checksum = checksum_file(pathname);
     if (checksum != found_checksum) {
-       code = SMS_MISSINGFILE;
+       code = MR_MISSINGFILE;
        com_err(whoami, code, ": expected = %d, found = %d",
                checksum, found_checksum);
        report_error("checksum error");
@@ -173,7 +173,7 @@ get_block(fd, max_size)
        if (n_wrote == -1) {
            code = errno;
            sprintf(buf, "%s: writing file (get_file)", error_message(code));
-           sms_log_error(buf);
+           mr_log_error(buf);
            string_free(&data);
            report_error("reporting write error (get_file)");
            close(fd);
index 882d42d195cd4522cfa81bc6c9e2888baed7c597..a94fe32d88ce87e52b76b2d08ec15ab782eea921 100644 (file)
@@ -49,14 +49,16 @@ int syslog_prio[] = {
 int log_priority;
 extern char *whoami;
 
-void sms_update_com_err_hook(whoami, code, fmt, args)
+void mr_update_com_err_hook(whoami, code, fmt, args)
     const char *whoami;
     long code;
     const char *fmt;
     va_list args;
 {
     char buf[BUFSIZ], *cp;
+#ifndef __STDC__
     FILE _strbuf;
+#endif
 
 #ifndef use_syslog
     strcpy(buf, whoami);
@@ -73,11 +75,15 @@ void sms_update_com_err_hook(whoami, code, fmt, args)
        while (*cp)
            cp++;
     }
+#ifdef __STDC__
+    vsprintf(cp, fmt, args);
+#else
     _strbuf._flag = _IOWRT+_IOSTRG;
     _strbuf._ptr = cp;
     _strbuf._cnt = BUFSIZ-(cp-buf);
     _doprnt(fmt, args, &_strbuf);
     putc('\0', &_strbuf);
+#endif
 #ifdef use_syslog
     syslog(syslog_prio[log_priority], "%s", buf);
 #endif
@@ -86,7 +92,7 @@ void sms_update_com_err_hook(whoami, code, fmt, args)
 #endif
 }
 
-sms_update_initialize()
+mr_update_initialize()
 {
     static int initialized = 0;
     if (initialized)
@@ -94,7 +100,7 @@ sms_update_initialize()
 #ifdef use_syslog
     openlog(whoami, LOG_PID, LOG_DAEMON);
 #endif
-    (void) set_com_err_hook(sms_update_com_err_hook);
+    (void) set_com_err_hook(mr_update_com_err_hook);
     log_priority = log_INFO;
     initialized = 1;
 }
@@ -108,12 +114,12 @@ static char fmt[] = "[%s] %s";
 {\
      register int old_prio; \
      old_prio = log_priority; \
-     sms_update_initialize(); \
+     mr_update_initialize(); \
      com_err(whoami, 0, fmt, level, msg); \
      log_priority = old_prio; \
 }
 
-def(sms_log_error, "error", log_ERROR)
-def(sms_log_warning, "warning", log_WARNING)
-def(sms_log_info, "info", log_INFO)
-def(sms_debug, "debug", log_DEBUG)
+def(mr_log_error, "error", log_ERROR)
+def(mr_log_warning, "warning", log_WARNING)
+def(mr_log_info, "info", log_INFO)
+def(mr_debug, "debug", log_DEBUG)
index 2f7e16c5ef622cba23dee4cc37f5e20d509314b5..2c4932cfca8c76890744b7ca81a1ab5c4045dc8f 100644 (file)
@@ -15,7 +15,7 @@ static char *rcsid_send_file_c = "$Header$";
 #include <com_err.h>
 #include <gdb.h>
 #include <dcm.h>
-#include <sms.h>
+#include <moira.h>
 #include <sys/file.h>
 #include <sys/stat.h>
 #include <update.h>
@@ -57,12 +57,12 @@ char *target_path;
     fd = open(pathname, O_RDONLY, 0);
     if (fd < 0) {
        com_err(whoami, errno, "unable to open %s for read", pathname);
-       return(SMS_OCONFIG);
+       return(MR_OCONFIG);
     }
     if (fstat(fd, &statb)) {
        com_err(whoami, errno, "unable to stat %s", pathname);
        close(fd);
-       return(SMS_OCONFIG);
+       return(MR_OCONFIG);
     }
     n_to_send = statb.st_size;
     
@@ -107,7 +107,7 @@ char *target_path;
        if (n < 0) {
            com_err(whoami, errno, " reading %s for transmission", pathname);
            close(fd);
-           return(SMS_ABORTED);
+           return(MR_ABORTED);
        }
        MAX_STRING_SIZE(data) = n;
        code = send_object(conn, (char *)&data, STRING_T);
@@ -150,5 +150,5 @@ char *target_path;
        }
     }
     close(fd);
-    return(SMS_SUCCESS);
+    return(MR_SUCCESS);
 }
index 7f469e6de580d83e7bb1dffa98049c566d7dde11..3df7623eb17a141bd9a888885ef3662393082d20 100644 (file)
@@ -43,7 +43,7 @@ static init()
 
 
 int
-get_sms_update_ticket(host, ticket)
+get_mr_update_ticket(host, ticket)
      char *host;
      KTEXT ticket;
 {
@@ -60,7 +60,7 @@ get_sms_update_ticket(host, ticket)
        code += ERROR_TABLE_BASE_krb;
      if (pass == 1) {
         /* maybe we're taking too long? */
-        if ((code = get_sms_tgt()) != 0) {
+        if ((code = get_mr_tgt()) != 0) {
             /* don't need phost buffer any more */
             com_err(whoami, code, " can't get Kerberos TGT");
             return(code);
@@ -72,7 +72,7 @@ get_sms_update_ticket(host, ticket)
 }
 
 int
-get_sms_tgt()
+get_mr_tgt()
 {
     register int code;
     init();
index 92d4a10855b90796d08151f5ac6099cf68634a09..7be11608f46f9e96024abd59e24e17b11242c6f2 100644 (file)
@@ -15,7 +15,7 @@ static char *rcsid_dispatch_c = "$Header$";
 #include <gdb.h>
 #include <errno.h>
 #include <strings.h>
-#include <sms.h>
+#include <moira.h>
 #include <sys/file.h>
 #include <sys/ioctl.h>
 #include "update.h"
@@ -65,7 +65,7 @@ err(code, fmt)
      char *fmt;
 {
      sprintf(buf, fmt, error_message(code));
-     sms_log_error(buf);
+     mr_log_error(buf);
 }
 
 main(argc, argv)
@@ -106,7 +106,7 @@ main(argc, argv)
      umask(0022);
      initialize_sms_error_table();
      initialize_krb_error_table();
-     sms_update_initialize();
+     mr_update_initialize();
 
      /* wait for connection */
      gdb_init();
@@ -120,7 +120,7 @@ main(argc, argv)
         exit(1);
      }
 
-     sms_log_info("got connection");
+     mr_log_info("got connection");
      /* got a connection; loop forever */
      while (1) {
          register char *cp;
@@ -145,8 +145,8 @@ main(argc, argv)
              }
          }
          sprintf(buf, "unknown request received: %s\n", STRING_DATA(str));
-         sms_log_error(buf);
-         code = send_int(SMS_UNKNOWN_PROC);
+         mr_log_error(buf);
+         code = send_int(MR_UNKNOWN_PROC);
          if (code) {
              err(connection_errno(conn), "%s: sending UNKNOWN_PROC");
          }
@@ -183,7 +183,7 @@ initialize()
  * any arguments are ignored
  *
  * function:
- *     closes connection from SMS
+ *     closes connection from MR
  */
 int
 quit(str)
@@ -194,7 +194,7 @@ quit(str)
 #endif /* lint */
      (void) send_ok();
      sever_connection(conn);
-     sms_log_info("Closing connection.");
+     mr_log_info("Closing connection.");
      exit(0);
 }
 
@@ -209,7 +209,7 @@ lose(msg)
     char *msg;
 {
     sprintf(buf, "%s: %s", error_message(code), msg);
-    sms_log_error(buf);
+    mr_log_error(buf);
     if (conn)
        sever_connection(conn);
     exit(1);
index 5c325e485fe22a850dc9f17846453ac2f8411850..3b00c9243815a213485fa7e325542ed706c072ce 100644 (file)
@@ -17,7 +17,7 @@ static char *rcsid_xfer_002_c = "$Header$";
 #include <sys/param.h>
 #include <sys/file.h>
 #include <strings.h>
-#include <sms.h>
+#include <moira.h>
 
 extern CONNECTION conn;
 char buf[BUFSIZ];
@@ -41,7 +41,7 @@ extern int have_authorization, have_file, done;
  *
  * function:
  *     perform initial preparations and receive file as
- * a single string, storing it into <pathname>.sms_update.
+ * a single string, storing it into <pathname>.moira_update.
  *
  * still to be done: file locking; perform transfers in pieces instead
  * of all at once; use checksums
@@ -60,7 +60,7 @@ xfer_002(str)
        str++;
     if (!*str) {
     failure:
-       reject_call(SMS_ARGS);
+       reject_call(MR_ARGS);
        return;
     }
     file_size = atoi(str);
@@ -77,7 +77,7 @@ xfer_002(str)
        goto failure;
     pathname = str;
     if (!have_authorization) {
-       reject_call(SMS_PERM);
+       reject_call(MR_PERM);
        return;
     }
     if (done)                  /* re-initialize data */
@@ -91,7 +91,7 @@ xfer_002(str)
        have_file = 1;
        strcpy(buf, "transferred file ");
        strcat(buf, pathname);
-       sms_log_info(buf);
+       mr_log_info(buf);
     }
     return;
 }
This page took 0.128802 seconds and 5 git commands to generate.