rpms/rsh/devel netkit-rsh-0.17-pam_env.patch, 1.1, 1.2 rsh.spec, 1.49, 1.50

Adam Tkac atkac at fedoraproject.org
Mon Mar 30 12:40:35 UTC 2009


Author: atkac

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

Modified Files:
	netkit-rsh-0.17-pam_env.patch rsh.spec 
Log Message:
- improved pam_env patch


netkit-rsh-0.17-pam_env.patch:

Index: netkit-rsh-0.17-pam_env.patch
===================================================================
RCS file: /cvs/pkgs/rpms/rsh/devel/netkit-rsh-0.17-pam_env.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- netkit-rsh-0.17-pam_env.patch	13 Dec 2006 09:58:31 -0000	1.1
+++ netkit-rsh-0.17-pam_env.patch	30 Mar 2009 12:40:04 -0000	1.2
@@ -1,29 +1,35 @@
---- netkit-rsh-0.17/rshd/rshd.c.pam_env	2006-12-12 12:32:31.000000000 +0100
-+++ netkit-rsh-0.17/rshd/rshd.c	2006-12-12 12:48:21.000000000 +0100
-@@ -375,6 +375,10 @@
+diff -up netkit-rsh-0.17/rshd/rshd.c.pam_env netkit-rsh-0.17/rshd/rshd.c
+--- netkit-rsh-0.17/rshd/rshd.c.pam_env	2009-03-30 13:20:36.730136943 +0200
++++ netkit-rsh-0.17/rshd/rshd.c	2009-03-30 13:26:17.202136832 +0200
+@@ -107,6 +107,9 @@ char	remotehost[50] = "REMOTEHOST=";
+ char	*envinit[] =
+ 	    {homedir, shell, path, username, remoteuser, remotehost, 0};
+ extern	char	**environ;
++#ifdef USE_PAM
++static char** env;
++#endif
+ 
+ static void error(const char *fmt, ...);
+ static void doit(struct sockaddr_storage *fromp, socklen_t fromlen);
+@@ -371,6 +374,9 @@ doit(struct sockaddr_storage *fromp, soc
  	const char *hostname;
  	u_short port;
  	int pv[2], pid, ifd;
 +#ifdef USE_PAM
-+        char** env;
 +        int i;
 +#endif
  
  	signal(SIGINT, SIG_DFL);
  	signal(SIGQUIT, SIG_DFL);
-@@ -522,6 +526,16 @@
+@@ -518,6 +524,12 @@ doit(struct sockaddr_storage *fromp, soc
  	shellname = strrchr(theshell, '/');
  	if (shellname) shellname++;
  	else shellname = theshell;
 +#ifdef USE_PAM
-+        env = pam_getenvlist(pamh);
-+        if (NULL != env) {
-+            for(i = 0; env[i]; i++) {
-+                putenv(env[i]);
-+                free(env[i]);
-+            }
-+            free(env);
-+          }
++	env = pam_getenvlist(pamh);
++	if (NULL != env)
++		for(i = 0; env[i]; i++)
++			putenv(env[i]);
 +#endif
  
  	endpwent();


Index: rsh.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rsh/devel/rsh.spec,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- rsh.spec	26 Mar 2009 13:12:41 -0000	1.49
+++ rsh.spec	30 Mar 2009 12:40:05 -0000	1.50
@@ -1,7 +1,7 @@
 Summary: Clients for remote access commands (rsh, rlogin, rcp).
 Name: rsh
 Version: 0.17
-Release: 53%{?dist}
+Release: 54%{?dist}
 License: BSD
 Group: Applications/Internet
 
@@ -194,6 +194,9 @@
 %{_mandir}/man8/*.8*
 
 %changelog
+* Mon Mar 30 2009 Adam Tkac <atkac redhat com> 0.17-54
+- improve pam_env patch
+
 * Thu Mar 26 2009 Adam Tkac <atkac redhat com> 0.17-53
 - check return value from close to catch errors on NFS filesystems (#461903)
 




More information about the fedora-extras-commits mailing list