- revert last change
authorPaweł Gołaszewski <blues@pld-linux.org>
Tue, 14 Aug 2001 19:45:04 +0000 (19:45 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    arpd-uid.patch -> 1.3

arpd-uid.patch

index 6572310464c1ee1d997f89b842cb6c7b0c3a60d2..306e3994dc853ce4744a65a866f09bc76eac0107 100644 (file)
@@ -7,45 +7,12 @@
 -      syslog(LOG_NOTICE, "Initializing, version %s\n", ARPD_VERSION);
 +      syslog(LOG_NOTICE, "Initializing, PLD-modified version %s\n", ARPD_VERSION);
  
--      fd = open("/dev/arpd", O_RDWR);
-+      fd = open("/var/lib/arpd/arpd", O_RDWR);
+       fd = open("/dev/arpd", O_RDWR);
 +/* You need to have user UID=40 in your system. There is needed to make checking
 + * that "little" thing. */
 +      setuid(40);
 +      
        if (fd < 0) {
--              syslog(LOG_CRIT, "cannot open /dev/arpd: %m");
-+              syslog(LOG_CRIT, "cannot open /var/lib/arpd/arpd: %m");
+               syslog(LOG_CRIT, "cannot open /dev/arpd: %m");
                exit(-1);
        }
-@@ -89,12 +93,12 @@
-               if (status < 0) {
-                       if (errno == EINTR)
-                               continue;
--                      syslog(LOG_CRIT, "cannot read from /dev/arpd: %m");
-+                      syslog(LOG_CRIT, "cannot read from /var/lib/arpd/arpd: %m");
-                       exit(-1);
-               }
-               if (status != sizeof(req))
-               {
--                      syslog(LOG_CRIT, "read from /dev/arpd returns %d",
-+                      syslog(LOG_CRIT, "read from /var/lib/arpd/arpd returns %d",
-                                status);
-                       exit(-1);
-               }
-@@ -115,12 +119,12 @@
-                       status = write(fd, rep, sizeof(*rep));
-                       if (status < 0) {
-                                syslog(LOG_CRIT,
--                                      "cannot write to /dev/arpd: %m");
-+                                      "cannot write to /var/lib/arpd/arpd: %m");
-                               exit(-1);
-                       }
-                       if (status != sizeof(*rep)) {
-                               syslog(LOG_CRIT, 
--                                      "write to /dev/arpd returns %d",
-+                                      "write to /var/lib/arpd/arpd returns %d",
-                                        status);
-                               exit(-1);
-                       }
This page took 0.029117 seconds and 4 git commands to generate.