From 06cb3366e3da4996c05189d16884e850dd97a9fd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pawe=C5=82=20Go=C5=82aszewski?= Date: Tue, 14 Aug 2001 19:45:04 +0000 Subject: [PATCH] - revert last change Changed files: arpd-uid.patch -> 1.3 --- arpd-uid.patch | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/arpd-uid.patch b/arpd-uid.patch index 6572310..306e399 100644 --- a/arpd-uid.patch +++ b/arpd-uid.patch @@ -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); - } -- 2.43.0