port not byte swapped; no more asm.sed;
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Sat, 25 Dec 1982 13:05:46 +0000 (05:05 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Sat, 25 Dec 1982 13:05:46 +0000 (05:05 -0800)
move spool area to /usr/spool/rwho so /etc is always changing

SCCS-vsn: usr.bin/ruptime/ruptime.c 4.7
SCCS-vsn: usr.bin/rwho/rwho.c 4.3
SCCS-vsn: usr.sbin/rwhod/rwhod.c 4.7
SCCS-vsn: include/protocols/rwhod.h 4.3

usr/src/include/protocols/rwhod.h
usr/src/usr.bin/ruptime/ruptime.c
usr/src/usr.bin/rwho/rwho.c
usr/src/usr.sbin/rwhod/rwhod.c

index e178ef3..fef525b 100644 (file)
@@ -1,4 +1,4 @@
-/*     rwhod.h 4.2     82/11/14        */
+/*     rwhod.h 4.3     82/12/24        */
 
 struct whod {
        int     wd_sendtime;
 
 struct whod {
        int     wd_sendtime;
@@ -11,3 +11,5 @@ struct        whod {
                int     we_idle;
        } wd_we[1024 / sizeof (struct whoent)];
 };
                int     we_idle;
        } wd_we[1024 / sizeof (struct whoent)];
 };
+
+#define        RWHODIR "/usr/spool/rwho"       /* where data is stored */
index 20e11b6..873231c 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)ruptime.c  4.6 82/11/14";
+static char sccsid[] = "@(#)ruptime.c  4.7 82/12/24";
 #endif
 
 #include <sys/param.h>
 #endif
 
 #include <sys/param.h>
@@ -64,8 +64,8 @@ again:
                argc--, argv++;
                goto again;
        }
                argc--, argv++;
                goto again;
        }
-       if (chdir("/etc") < 0) {
-               perror("/etc");
+       if (chdir(RWHODIR) < 0) {
+               perror(RWHODIR);
                exit(1);
        }
        etc = opendir(".");
                exit(1);
        }
        etc = opendir(".");
index 50e51e6..e20ccfc 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)rwho.c     4.2 82/05/09";
+static char sccsid[] = "@(#)rwho.c     4.3 82/12/24";
 #endif
 
 #include <sys/param.h>
 #endif
 
 #include <sys/param.h>
@@ -45,8 +45,8 @@ again:
                goto again;
        }
        (void) time(&now);
                goto again;
        }
        (void) time(&now);
-       if (chdir("/etc") < 0) {
-               perror("/etc");
+       if (chdir(RWHODIR) < 0) {
+               perror(RWHODIR);
                exit(1);
        }
        etc = opendir(".");
                exit(1);
        }
        etc = opendir(".");
index cbdc363..bcdbe46 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)rwhod.c    4.6 82/11/15";
+static char sccsid[] = "@(#)rwhod.c    4.7 82/12/24";
 #endif
 
 #include <sys/types.h>
 #endif
 
 #include <sys/types.h>
@@ -54,7 +54,6 @@ main()
                fprintf(stderr, "rwhod: udp/who: unknown service\n");
                exit(1);
        }
                fprintf(stderr, "rwhod: udp/who: unknown service\n");
                exit(1);
        }
-       sp->s_port = htons(sp->s_port);
 #ifndef DEBUG
        if (fork())
                exit(0);
 #ifndef DEBUG
        if (fork())
                exit(0);
@@ -136,7 +135,7 @@ main()
                                from.sin_addr);
                        continue;
                }
                                from.sin_addr);
                        continue;
                }
-               (void) sprintf(path, "/etc/whod.%s", wd.wd_hostname);
+               (void) sprintf(path, "%s/whod.%s", RWHODIR, wd.wd_hostname);
                whod = creat(path, 0666);
                if (whod < 0) {
                        fprintf(stderr, "rwhod: ");
                whod = creat(path, 0666);
                if (whod < 0) {
                        fprintf(stderr, "rwhod: ");