A new user interface for you! Read more...

File netkit-rsh-0.17-revers.diff of Package rsh

--- rexecd/rexecd.c
+++ rexecd/rexecd.c
@@ -122,6 +122,14 @@
 {
 	struct sockaddr_storage from;
 	socklen_t fromlen;
+	int i, skip_revers = 0, relaxed_revers = 0;
+
+	for(i = 1; i < argc; i++) {
+		if(!strcmp("-r", argv[i]))
+			relaxed_revers = 1;
+		else if(!strcmp("-R", argv[i]))
+			skip_revers = 1;
+	}
 
 	(void)argc;
 
@@ -149,9 +157,13 @@
 #else
 	{
 	char hbuf[NI_MAXHOST];
+	int flags;
+
+	flags = relaxed_revers ? 0 : NI_NAMEREQD;
+	flags = skip_revers ? NI_NUMERICHOST : flags;
 
 	if (getnameinfo((struct sockaddr *)&from, fromlen,
-			hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD)) {
+			hbuf, sizeof(hbuf), NULL, 0, flags)) {
 		write(0, "\1Where are you?\n", 16);
 		return 1;
 	}