+--- ./arpd.c.orig Tue Aug 21 13:26:27 2001
++++ ./arpd.c Fri Aug 24 12:28:12 2001
+@@ -21,6 +21,7 @@
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
++#include <pwd.h>
+
+ #ifdef DEBUG
+ static void arpd_print(char*, struct arpd_request*);
+@@ -28,10 +29,25 @@
+ #define arpd_print(x,y)
+ #endif
+
+-/* these shouldn't change for ipv4 */
++/* these shouldn't change for ipv4 */
+ #define ARPD_TRIEWIDTH 256
+ #define ARPD_TRIEDEPTH 8
+
++/* usage string */
++static char* usage=
++"ARP daemon - version 1.0.2 - PLD modified
++Usage: arpd -u user
++-u user, which you want to run this deamon
++
++The user you will take must have RW access to /dev/arpd.
++If you don't know what to choice take root.
++
++";
++
++void show_usage() {
++ fprintf(stdout,usage);
++}
++
+ union arpd_triedef
+ {
+ union arpd_triedef * hash;
+@@ -54,7 +70,34 @@
+ struct arpd_request req;
+ struct arpd_request *rep;
+
++ char* cmd = NULL;
++ unsigned int uid_num = 0;
++ struct passwd *pw;
++ char *account;
++
++if ((argc != 3)) {
++ fprintf(stdout,"Invalid option.\n");
++ show_usage();
++ exit(1);
++ }
++else {
+ #ifndef DEBUG
++ cmd = argv[1];
++
++ if (strcasecmp(cmd, "-u") == 0) {
++ account=argv[2];
++ pw=getpwnam(account);
++ if (!pw) {
++ fprintf(stderr,"Unknown account.\n");
++ exit(1);
++ }
++ uid_num=pw->pw_uid;
++ }
++ else {
++ fprintf(stderr,"Invalid option.\n");
++ show_usage();
++ exit(1);
++ }
+ if (fork())
+ exit(0);
+
+@@ -72,14 +115,19 @@
+ if (fd > 2)
+ close(fd);
+ }
+- setsid();
++ /* setsid(); */
++
+ #endif