rpms/rsh/devel netkit-rsh-0.17-rh448904.patch, NONE, 1.1 netkit-rsh-0.17-ipv6.patch, 1.2, 1.3 rsh.spec, 1.46, 1.47

Adam Tkac atkac at fedoraproject.org
Fri Oct 3 12:10:59 UTC 2008


Author: atkac

Update of /cvs/pkgs/rpms/rsh/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28426

Modified Files:
	netkit-rsh-0.17-ipv6.patch rsh.spec 
Added Files:
	netkit-rsh-0.17-rh448904.patch 
Log Message:
- updated ipv6 patch due rpm 4.6 (#465053)
- make in.rshd working on kernels without audit support (#448904)


netkit-rsh-0.17-rh448904.patch:

--- NEW FILE netkit-rsh-0.17-rh448904.patch ---
diff -up netkit-rsh-0.17/rshd/rshd.c.rh448904 netkit-rsh-0.17/rshd/rshd.c
--- netkit-rsh-0.17/rshd/rshd.c.rh448904	2008-10-03 13:52:58.000000000 +0200
+++ netkit-rsh-0.17/rshd/rshd.c	2008-10-03 13:55:54.000000000 +0200
@@ -382,6 +382,7 @@ static int log_audit(const char *usernam
 			int success)
 {
 #ifdef USE_AUDIT
+	int err;
 	int audit_fd = audit_open();
 	if (audit_fd < 0) {
 		if (errno != EINVAL && errno != EPROTONOSUPPORT &&
@@ -391,8 +392,13 @@ static int log_audit(const char *usernam
 		int rc = audit_log_acct_message(audit_fd, AUDIT_USER_LOGIN,
 				NULL, "login", username, uid, hostname, NULL,
 				"rsh", success);
+		err = errno;
 		close(audit_fd);
-		if (rc <= 0) 
+		/*
+		 * ECONNREFUSED is returned when kernel is compiled without
+		 * audit support
+		 */
+		if (rc <= 0 && err != ECONNREFUSED) 
 			return 1;
 	}
 #endif

netkit-rsh-0.17-ipv6.patch:

Index: netkit-rsh-0.17-ipv6.patch
===================================================================
RCS file: /cvs/pkgs/rpms/rsh/devel/netkit-rsh-0.17-ipv6.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- netkit-rsh-0.17-ipv6.patch	15 Oct 2007 16:41:00 -0000	1.2
+++ netkit-rsh-0.17-ipv6.patch	3 Oct 2008 12:10:58 -0000	1.3
@@ -1,6 +1,7 @@
---- netkit-rsh-0.17/rcp/rcp.c.ipv6	2006-07-17 12:13:44.000000000 +0200
-+++ netkit-rsh-0.17/rcp/rcp.c	2006-07-17 12:16:59.000000000 +0200
-@@ -262,9 +262,9 @@
+diff -up netkit-rsh-0.17/rcp/rcp.c.ipv6 netkit-rsh-0.17/rcp/rcp.c
+--- netkit-rsh-0.17/rcp/rcp.c.ipv6	2008-10-03 12:44:22.000000000 +0200
++++ netkit-rsh-0.17/rcp/rcp.c	2008-10-03 12:44:22.000000000 +0200
+@@ -262,9 +262,9 @@ toremote(const char *targ, int argc, cha
  					nospace();
  				(void)snprintf(bp, len, "%s -t %s", cmd, targ);
  				host = thost;
@@ -12,7 +13,7 @@
  				if (rem < 0)
  					exit(1);
  #ifdef IP_TOS
-@@ -325,7 +325,8 @@
+@@ -325,7 +325,8 @@ tolocal(int argc, char *argv[])
  		if (!(bp = malloc(len)))
  			nospace();
  		(void)snprintf(bp, len, "%s -f %s", cmd, src);
@@ -22,9 +23,10 @@
  		(void)free(bp);
  		if (rem < 0) {
  			++errs;
---- netkit-rsh-0.17/rlogind/network.c.ipv6	2006-07-17 12:13:44.000000000 +0200
-+++ netkit-rsh-0.17/rlogind/network.c	2006-07-17 12:16:59.000000000 +0200
-@@ -88,47 +88,78 @@
+diff -up netkit-rsh-0.17/rlogind/network.c.ipv6 netkit-rsh-0.17/rlogind/network.c
+--- netkit-rsh-0.17/rlogind/network.c.ipv6	1999-12-12 16:15:40.000000000 +0100
++++ netkit-rsh-0.17/rlogind/network.c	2008-10-03 12:44:22.000000000 +0200
+@@ -88,47 +88,78 @@ local_domain(const char *h)
  	return(0);
  }
  
@@ -124,7 +126,7 @@
  	/* 
  	 * Actually it might be null if we're out of memory, but
  	 * where do we go then? We'd have to bail anyhow.
-@@ -145,14 +176,14 @@
+@@ -145,14 +176,14 @@ find_hostname(const struct sockaddr_in *
  char * 
  network_init(int f, int *hostokp)
  {
@@ -141,7 +143,7 @@
  	fromlen = sizeof (from);
  	if (getpeername(f, (struct sockaddr *)&from, &fromlen) < 0) {
  		syslog(LOG_ERR,"Can't get peer name of remote host: %m");
-@@ -177,13 +208,19 @@
+@@ -177,13 +208,19 @@ network_init(int f, int *hostokp)
  
  	alarm(0);
  
@@ -165,9 +167,22 @@
  	    fatal(f, "Permission denied", 0);
  	}
  
---- netkit-rsh-0.17/rshd/rshd.c.ipv6	2006-07-17 12:13:44.000000000 +0200
-+++ netkit-rsh-0.17/rshd/rshd.c	2006-07-17 12:16:59.000000000 +0200
-@@ -110,7 +110,7 @@
+diff -up netkit-rsh-0.17/rlogin/rlogin.c.ipv6 netkit-rsh-0.17/rlogin/rlogin.c
+--- netkit-rsh-0.17/rlogin/rlogin.c.ipv6	2008-10-03 12:44:22.000000000 +0200
++++ netkit-rsh-0.17/rlogin/rlogin.c	2008-10-03 12:44:22.000000000 +0200
+@@ -280,7 +280,7 @@ main(int argc, char **argv)
+ 	/* will use SIGUSR1 for window size hack, so hold it off */
+ 	omask = sigblock(sigmask(SIGURG) | sigmask(SIGUSR1));
+ 
+-	rem = rcmd(&host, sp->s_port, pw->pw_name, user, term, 0);
++	rem = rcmd_af(&host, sp->s_port, pw->pw_name, user, term, 0, AF_UNSPEC);
+ 
+ 	if (rem < 0) exit(1);
+ 
+diff -up netkit-rsh-0.17/rshd/rshd.c.ipv6 netkit-rsh-0.17/rshd/rshd.c
+--- netkit-rsh-0.17/rshd/rshd.c.ipv6	2008-10-03 12:44:22.000000000 +0200
++++ netkit-rsh-0.17/rshd/rshd.c	2008-10-03 12:53:08.000000000 +0200
+@@ -109,7 +109,7 @@ char	*envinit[] =
  extern	char	**environ;
  
  static void error(const char *fmt, ...);
@@ -176,7 +191,7 @@
  static void getstr(char *buf, int cnt, const char *err);
  
  extern int _check_rhosts_file;
-@@ -285,19 +285,37 @@
+@@ -284,19 +284,37 @@ static struct passwd *doauth(const char 
  #endif
  }
  
@@ -220,7 +235,8 @@
  
  	if (hostname==NULL) {
  	    /* out of memory? */
-@@ -309,30 +327,42 @@
+@@ -307,31 +325,43 @@ static const char *findhostname(struct s
+ 	/*
  	 * Attempt to confirm the DNS. 
  	 */
 -#ifdef	RES_DNSRCH
@@ -233,7 +249,7 @@
 +	hints.ai_family = PF_UNSPEC;
 +	if (getaddrinfo(hostname, NULL, &hints, &res)) {
 +	    syslog(LOG_INFO, "Couldn't look up address for %s/%s",
-+	    	hostname, remote_address);
++		   hostname, remote_address);
  	    fail("Couldn't get address for your host (%s)\n", 
 -		 remuser, inet_ntoa(fromp->sin_addr), locuser, cmdbuf);
 -	} 
@@ -255,9 +271,9 @@
 +		? ( &((struct sockaddr_in6 *)sa)->sin6_addr )
 +		: ( &((struct sockaddr_in *)sa)->sin_addr )),
 +		res_address, sizeof(res_address))
-+	        && strcmp(remote_address, res_address) == 0) {
-+		freeaddrinfo(res0);
-+	        return hostname;
++		&& strcmp(remote_address, res_address) == 0) {
++		    freeaddrinfo(res0);
++		    return hostname;
  	    }
 -	    hp->h_addr_list++;
 +	    res = res->ai_next;
@@ -266,7 +282,7 @@
 +
  	syslog(LOG_NOTICE, "Host addr %s not listed for host %s",
 -	       inet_ntoa(fromp->sin_addr), hp->h_name);
-+		remote_address, hostname);
++	       remote_address, hostname);
  	fail("Host address mismatch for %s\n", 
 -	     remuser, inet_ntoa(fromp->sin_addr), locuser, cmdbuf);
 +	     remuser, hostname, locuser, cmdbuf);
@@ -279,7 +295,7 @@
  {
  	char cmdbuf[ARG_MAX+1];
  	const char *theshell, *shellname;
-@@ -355,8 +385,12 @@
+@@ -351,8 +381,12 @@ doit(struct sockaddr_in *fromp)
  	alarm(0);
  
  	if (port != 0) {
@@ -293,7 +309,7 @@
  		if (sock < 0) {
  		    syslog(LOG_ERR, "can't get stderr port: %m");
  		    exit(1);
-@@ -365,10 +399,15 @@
+@@ -361,10 +395,15 @@ doit(struct sockaddr_in *fromp)
  		    syslog(LOG_ERR, "2nd port not reserved\n");
  		    exit(1);
  		}
@@ -313,7 +329,7 @@
  		    exit(1);
  		}
  	}
-@@ -385,7 +424,8 @@
+@@ -381,7 +420,8 @@ doit(struct sockaddr_in *fromp)
  	getstr(cmdbuf, sizeof(cmdbuf), "command");
  	if (!strcmp(locuser, "root")) paranoid = 1;
  
@@ -323,7 +339,7 @@
  
  	setpwent();
  	pwd = doauth(remuser, hostname, locuser);
-@@ -500,15 +540,19 @@
+@@ -496,15 +536,19 @@ doit(struct sockaddr_in *fromp)
  	exit(1);
  }
  
@@ -347,7 +363,7 @@
  		syslog(LOG_ERR, "getpeername: %m");
  		_exit(1);
  	}
-@@ -522,9 +566,20 @@
+@@ -518,9 +562,20 @@ static void network_init(int fd, struct 
  	    sizeof (linger)) < 0)
  		syslog(LOG_WARNING, "setsockopt (SO_LINGER): %m");
  
@@ -370,7 +386,7 @@
  	    exit(1);
  	}
  #ifdef IP_OPTIONS
-@@ -554,7 +609,7 @@
+@@ -550,7 +605,7 @@ static void network_init(int fd, struct 
  		syslog(LOG_NOTICE,
  		       "Connection received from %s using IP options"
  		       " (ignored): %s",
@@ -379,7 +395,7 @@
  
  		if (setsockopt(0, ipproto, IP_OPTIONS, NULL, optsize) != 0) {
  			syslog(LOG_ERR, "setsockopt IP_OPTIONS NULL: %m");
-@@ -567,10 +622,15 @@
+@@ -563,10 +618,15 @@ static void network_init(int fd, struct 
  	/*
  	 * Check originating port for validity.
  	 */
@@ -398,7 +414,7 @@
  	    exit(1);
  	}
  }
-@@ -579,7 +639,8 @@
+@@ -575,7 +635,8 @@ int
  main(int argc, char *argv[])
  {
  	int ch;
@@ -408,7 +424,7 @@
  	_check_rhosts_file=1;
  
  	openlog("rshd", LOG_PID | LOG_ODELAY, LOG_DAEMON);
-@@ -626,8 +687,9 @@
+@@ -618,8 +679,9 @@ main(int argc, char *argv[])
                                 "pam_rhosts_auth in /etc/pam.conf");
  #endif /* USE_PAM */
  
@@ -420,9 +436,10 @@
  	return 0;
  }
  
+diff -up netkit-rsh-0.17/rsh/rsh.c.ipv6 netkit-rsh-0.17/rsh/rsh.c
 --- netkit-rsh-0.17/rsh/rsh.c.ipv6	2000-07-23 06:16:24.000000000 +0200
-+++ netkit-rsh-0.17/rsh/rsh.c	2006-07-17 12:16:59.000000000 +0200
-@@ -163,7 +163,8 @@
++++ netkit-rsh-0.17/rsh/rsh.c	2008-10-03 12:44:22.000000000 +0200
+@@ -163,7 +163,8 @@ main(int argc, char *argv[])
  		exit(1);
  	}
  
@@ -432,14 +449,3 @@
  
  	if (rem < 0)
  		exit(1);
---- netkit-rsh-0.17/rlogin/rlogin.c.ipv6	2006-07-17 12:13:44.000000000 +0200
-+++ netkit-rsh-0.17/rlogin/rlogin.c	2006-07-17 12:16:59.000000000 +0200
-@@ -280,7 +280,7 @@
- 	/* will use SIGUSR1 for window size hack, so hold it off */
- 	omask = sigblock(sigmask(SIGURG) | sigmask(SIGUSR1));
- 
--	rem = rcmd(&host, sp->s_port, pw->pw_name, user, term, 0);
-+	rem = rcmd_af(&host, sp->s_port, pw->pw_name, user, term, 0, AF_UNSPEC);
- 
- 	if (rem < 0) exit(1);
- 


Index: rsh.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rsh/devel/rsh.spec,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- rsh.spec	9 May 2008 10:59:21 -0000	1.46
+++ rsh.spec	3 Oct 2008 12:10:59 -0000	1.47
@@ -1,7 +1,7 @@
 Summary: Clients for remote access commands (rsh, rlogin, rcp).
 Name: rsh
 Version: 0.17
-Release: 50%{?dist}
+Release: 51%{?dist}
 License: BSD
 Group: Applications/Internet
 
@@ -56,6 +56,7 @@
 Patch35: netkit-rsh-0.17-audit.patch
 Patch36: netkit-rsh-0.17-longname.patch
 Patch37: netkit-rsh-0.17-arg_max.patch
+Patch38: netkit-rsh-0.17-rh448904.patch
 
 %description
 The rsh package contains a set of programs which allow users to run
@@ -122,6 +123,7 @@
 %patch35 -p1 -b .audit
 %patch36 -p1 -b .longname
 %patch37 -p1 -b .arg_max
+%patch38 -p1 -b .rh448904
 
 # No, I don't know what this is doing in the tarball.
 rm -f rexec/rexec
@@ -190,6 +192,10 @@
 %{_mandir}/man8/*.8*
 
 %changelog
+* Fri Oct 03 2008 Adam Tkac <atkac redhat com> 0.17-51
+- updated ipv6 patch due rpm 4.6 (#465053)
+- make in.rshd working on kernels without audit support (#448904)
+
 * Fri May 09 2008 Adam Tkac <atkac redhat com> 0.17-50
 - fixed typos in arg_max and audit patches (#445606)
 - use pam_rhosts, not pam_rhosts_auth (#445606)




More information about the scm-commits mailing list