rpms/krb5-appl/devel eklogin.xinetd, NONE, 1.1 ekrb5-telnet.xinetd, NONE, 1.1 ekshell.pamd, NONE, 1.1 gssftp.pamd, NONE, 1.1 gssftp.xinetd, NONE, 1.1 import.log, NONE, 1.1 klogin.xinetd, NONE, 1.1 krb5-1.2.1-passive.patch, NONE, 1.1 krb5-1.3-ftp-glob.patch, NONE, 1.1 krb5-1.3-netkit-rsh.patch, NONE, 1.1 krb5-1.4.1-telnet-environ.patch, NONE, 1.1 krb5-1.6.3-ftp_fdleak.patch, NONE, 1.1 krb5-1.6.3-ftp_glob_runique.patch, NONE, 1.1 krb5-1.7-rcp-markus.patch, NONE, 1.1 krb5-1.7-sizeof.patch, NONE, 1.1 krb5-appl-1.0-io.patch, NONE, 1.1 krb5-appl-1.0-largefile.patch, NONE, 1.1 krb5-appl-1.0-login_chdir.patch, NONE, 1.1 krb5-appl-1.0-manpaths.patch, NONE, 1.1 krb5-appl-1.0-manpaths.txt, NONE, 1.1 krb5-appl-1.0-pam.patch, NONE, 1.1 krb5-appl-1.0-rlogind-environ.patch, NONE, 1.1 krb5-appl-1.0.tar.gz.asc, NONE, 1.1 krb5-appl.spec, NONE, 1.1 krb5-telnet.xinetd, NONE, 1.1 krb5-trunk-ftp_mget_case.patch, NONE, 1.1 krb5.csh, NONE, 1.1 krb5.sh, NONE, 1.1 krlogin, NONE, 1.1 krsh, NONE, 1.1 kshell.pamd, NONE, 1.1 kshell.xinetd, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Nalin Dahyabhai nalin at fedoraproject.org
Fri Mar 19 20:20:41 UTC 2010


Author: nalin

Update of /cvs/pkgs/rpms/krb5-appl/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv19475/devel

Modified Files:
	.cvsignore sources 
Added Files:
	eklogin.xinetd ekrb5-telnet.xinetd ekshell.pamd gssftp.pamd 
	gssftp.xinetd import.log klogin.xinetd 
	krb5-1.2.1-passive.patch krb5-1.3-ftp-glob.patch 
	krb5-1.3-netkit-rsh.patch krb5-1.4.1-telnet-environ.patch 
	krb5-1.6.3-ftp_fdleak.patch krb5-1.6.3-ftp_glob_runique.patch 
	krb5-1.7-rcp-markus.patch krb5-1.7-sizeof.patch 
	krb5-appl-1.0-io.patch krb5-appl-1.0-largefile.patch 
	krb5-appl-1.0-login_chdir.patch krb5-appl-1.0-manpaths.patch 
	krb5-appl-1.0-manpaths.txt krb5-appl-1.0-pam.patch 
	krb5-appl-1.0-rlogind-environ.patch krb5-appl-1.0.tar.gz.asc 
	krb5-appl.spec krb5-telnet.xinetd 
	krb5-trunk-ftp_mget_case.patch krb5.csh krb5.sh krlogin krsh 
	kshell.pamd kshell.xinetd 
Log Message:
- initial post-review import



--- NEW FILE eklogin.xinetd ---
# default: off
# description: The encrypting kerberized rlogin server accepts rlogin sessions \
#              authenticated and encrypted with Kerberos 5.
service eklogin
{
	flags		= REUSE
	socket_type	= stream        
	wait		= no
	user		= root
	server		= /usr/kerberos/sbin/klogind
	server_args	= -e
	disable		= yes
}


--- NEW FILE ekrb5-telnet.xinetd ---
# default: off
# description: The kerberized telnet server accepts only telnet sessions, \
#              which use Kerberos 5 authentication and encryption.
service telnet
{
	flags		= REUSE
	socket_type	= stream        
	wait		= no
	user		= root
	server		= /usr/kerberos/sbin/telnetd
	server_args	= -e
	log_on_failure	+= USERID
	disable		= yes
}


--- NEW FILE ekshell.pamd ---
#%PAM-1.0
# For root login to succeed here with pam_securetty, "ekshell" must be
# listed in /etc/securetty.
auth       required     pam_nologin.so
auth       required     pam_securetty.so
auth       required     pam_env.so
auth       required     pam_rhosts.so
account    include      system-auth
# pam_selinux.so close should be the first session rule
session    required     pam_selinux.so close
session    optional     pam_keyinit.so force revoke
session    include      system-auth
# pam_selinux.so open should only be called for sessions to be executed in the user context
session    required     pam_loginuid.so
session    required     pam_selinux.so open


--- NEW FILE gssftp.pamd ---
#%PAM-1.0
auth    required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
auth    required pam_shells.so
auth    include  system-auth
account required pam_nologin.so
account include  system-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session optional pam_keyinit.so force revoke
session include  system-auth
# pam_selinux.so open should only be called for sessions to be executed in the user context
session required pam_loginuid.so
session required pam_selinux.so open


--- NEW FILE gssftp.xinetd ---
# default: off
# description: The kerberized FTP server accepts FTP connections \
#              that can be authenticated with Kerberos 5.
service ftp
{
	flags		= REUSE
	socket_type	= stream        
	wait		= no
	user		= root
	server		= /usr/kerberos/sbin/ftpd
	server_args	= -l -a
	log_on_failure	+= USERID
	disable		= yes
}


--- NEW FILE import.log ---
krb5-appl-1_0-1:HEAD:krb5-appl-1.0-1.src.rpm:1269030017


--- NEW FILE klogin.xinetd ---
# default: off
# description: The kerberized rlogin server accepts BSD-style rlogin sessions, \
#              but uses Kerberos 5 authentication.
service klogin
{
	flags		= REUSE
	socket_type	= stream        
	wait		= no
	user		= root
	server		= /usr/kerberos/sbin/klogind
	disable		= yes
}

krb5-1.2.1-passive.patch:
 ftp.M  |    9 +++++----
 main.c |    2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

--- NEW FILE krb5-1.2.1-passive.patch ---
We set all of the FTP clients to passive mode by default.  Or at least that's
the intention.

--- krb5-1.2.1/src/appl/gssftp/ftp/main.c.passive	Thu Jun 29 22:27:07 2000
+++ krb5-1.2.1/src/appl/gssftp/ftp/main.c	Wed Aug 16 13:15:08 2000
@@ -178,7 +178,7 @@
 	cpend = 0;	/* no pending replies */
 	proxy = 0;	/* proxy not active */
 #ifndef NO_PASSIVE_MODE
-	passivemode = 0; /* passive mode not active */
+	passivemode = 1; /* passive mode active by default */
 #endif
 	crflag = 1;	/* strip c.r. on ascii gets */
 	sendport = -1;	/* not using ports */
--- krb5-1.2.1/src/appl/gssftp/ftp/ftp.M.passive	Wed Aug 16 13:15:26 2000
+++ krb5-1.2.1/src/appl/gssftp/ftp/ftp.M	Wed Aug 16 13:17:19 2000
@@ -619,10 +619,11 @@
 will forward a copy of the user's Kerberos tickets to the remote host.
 .TP
 .B passive
-Toggle passive data transfer mode.  In passive mode, the client initiates
-the data connection by listening on the data port.  Passive mode may
-be necessary for operation from behind firewalls which do not permit
-incoming connections.
+Toggle passive data transfer mode off.  In passive mode, the client initiates
+the data connection by connecting to the data port.  Passive mode is
+often necessary for operation from behind firewalls which do not permit
+incoming connections, but may need to be disabled if you connect to an
+FTP server which does not support passive operation.
 .TP
 .B private
 Set the protection level on data transfers to ``private''.  Data

krb5-1.3-ftp-glob.patch:
 cmds.c |  217 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 207 insertions(+), 10 deletions(-)

--- NEW FILE krb5-1.3-ftp-glob.patch ---
--- krb5-1.3/src/appl/gssftp/ftp/cmds.c
+++ krb5-1.3/src/appl/gssftp/ftp/cmds.c
@@ -99,6 +99,62 @@
 static void quote1 (char *, int, char **);
 static char *dotrans (char *);
 static char *domap (char *);
+static int checkglob(const char *filename, const char *pattern);
+
+/*
+ * pipeprotect: protect against "special" local filenames by prepending
+ * "./". Special local filenames are "-" and any "filename" which begins
+ * with either "|" or "/".
+ */
+static char *pipeprotect(char *name) 
+{
+	static char nu[MAXPATHLEN];
+	if ((name == NULL) ||
+	    ((strcmp(name, "-") != 0) && (*name != '|') && (*name != '/'))) {
+		return name;
+	}
+	strcpy(nu, ".");
+	if (*name != '/') strcat(nu, "/");
+	if (strlen(nu) + strlen(name) >= sizeof(nu)) {
+		return NULL;
+	}
+	strcat(nu, name);
+	return nu;
+}
+
+/*
+ * Look for embedded ".." in a pathname and change it to "!!", printing
+ * a warning.
+ */
+static char *pathprotect(char *name)
+{
+	int gotdots=0, i, len;
+	
+	/* Convert null terminator to trailing / to catch a trailing ".." */
+	len = strlen(name)+1;
+	name[len-1] = '/';
+
+	/*
+	 * State machine loop. gotdots is < 0 if not looking at dots,
+	 * 0 if we just saw a / and thus might start getting dots,
+	 * and the count of dots seen so far if we have seen some.
+	 */
+	for (i=0; i<len; i++) {
+		if (name[i]=='.' && gotdots>=0) gotdots++;
+		else if (name[i]=='/' && gotdots<0) gotdots=0;
+		else if (name[i]=='/' && gotdots==2) {
+		    printf("Warning: embedded .. in %.*s (changing to !!)\n",
+			   len-1, name);
+		    name[i-1] = '!';
+		    name[i-2] = '!';
+		    gotdots = 0;
+		}
+		else if (name[i]=='/') gotdots = 0;
+		else gotdots = -1;
+	}
+	name[len-1] = '\0';
+	return name;
+}
 
 /*
  * `Another' gets another argument, and stores the new argc and argv.
@@ -844,7 +900,15 @@
 
 	if (argc == 2) {
 		argc++;
-		argv[2] = argv[1];
+		/* 
+		 * Protect the user from accidentally retrieving special
+		 * local names.
+		 */
+		argv[2] = pipeprotect(argv[1]);
+		if (!argv[2]) {
+			code = -1;
+			return 0;
+		}
 		loc++;
 	}
 	if (argc < 2 && !another(&argc, &argv, "remote-file"))
@@ -1016,8 +1080,19 @@
 			if (mapflag) {
 				tp = domap(tp);
 			}
-			recvrequest("RETR", tp, cp, "w",
-			    tp != cp || !interactive, 1);
+
+			/* Reject embedded ".." */
+			tp = pathprotect(tp);
+
+			/* Prepend ./ to "-" or "!*" or leading "/" */
+			tp = pipeprotect(tp);
+			if (tp == NULL) {
+				/* hmm... how best to handle this? */
+				mflag = 0;
+			} else {
+				recvrequest("RETR", tp, cp, "w",
+					    tp != cp || !interactive, 1);
+			}
 			if (!mflag && fromatty) {
 				ointer = interactive;
 				interactive = 1;
@@ -1045,8 +1120,8 @@
 	static char buf[MAXPATHLEN];
 	static FILE *ftemp = NULL;
 	static char **args;
-	int oldverbose, oldhash;
-	char *cp, *rmode;
+	int oldverbose, oldhash, badglob = 0;
+	char *cp;
 
 	if (!mflag) {
 		if (!doglob) {
@@ -1075,23 +1150,46 @@
 			return (NULL);
 		}
 #else
-		(void) strncpy(temp, _PATH_TMP, sizeof(temp) - 1);
-		temp[sizeof(temp) - 1] = '\0';
-		(void) mktemp(temp);
+		int fd;
+		mode_t oldumask;
+		(void) strcpy(temp, _PATH_TMP);
+
+		/* libc 5.2.18 creates with mode 0666, which is dumb */
+		oldumask = umask(077);
+		fd = mkstemp(temp);
+		umask(oldumask);
+
+		if (fd<0) {
+			printf("Error creating temporary file, oops\n");
+			return NULL;
+		}
+		close(fd);
 #endif /* !_WIN32 */
 		oldverbose = verbose, verbose = 0;
 		oldhash = hash, hash = 0;
 		if (doswitch) {
 			pswitch(!proxy);
 		}
-		for (rmode = "w"; *++argv != NULL; rmode = "a")
-			recvrequest ("NLST", temp, *argv, rmode, 0, 0);
+
+		while (*++argv != NULL) {
+			recvrequest ("NLST", temp, *argv, "a", 0, 0);
+			if (!checkglob(temp, *argv)) {
+				badglob = 1;
+				break;
+			}
+		}
+
 		if (doswitch) {
 			pswitch(!proxy);
 		}
 		verbose = oldverbose; hash = oldhash;
 		ftemp = fopen(temp, "r");
 		(void) unlink(temp);
+		if (badglob) {
+			printf("Refusing to handle insecure file list\n");
+			fclose(ftemp);
+			return NULL;
+		}
 #ifdef _WIN32
 		free(temp);
 		temp = NULL;
@@ -1110,6 +1208,105 @@
 	return (buf);
 }
 
+/*
+ * Check whether given pattern matches `..'
+ * We assume only a glob pattern starting with a dot will match
+ * dot entries on the server.
+ */
+static int
+isdotdotglob(const char *pattern)
+{
+	int     havedot = 0;
+	char    c;
+
+	if (*pattern++ != '.')
+		return 0;
+	while ((c = *pattern++) != '\0' && c != '/') {
+		if (c == '*' || c == '?')
+			continue;
+		if (c == '.' && havedot++)
+			return 0;
+	}
+	return 1;
+}
+
+/*
+ * This function makes sure the list of globbed files returned from
+ * the server doesn't contain anything dangerous such as
+ * /home/<yourname>/.forward, or ../.forward,
+ * or |mail foe at doe </etc/passwd, etc.
+ * Covered areas:
+ *  - returned name starts with / but glob pattern doesn't
+ *  - glob pattern starts with / but returned name doesn't
+ *  - returned name starts with |
+ *  - returned name contains .. in a position where glob
+ *    pattern doesn't match ..
+ *    I.e. foo/.* allows foo/../bar but not foo/.bar/../fly
+ *
+ * Note that globbed names starting with / should really be stored
+ * under the current working directory; this is handled in mget above.
+ *                                            --okir
+ */
+static int
+checkglob(const char *filename, const char *pattern)
+{
+	const char      *sp;
+	char            buffer[MAXPATHLEN], dotdot[MAXPATHLEN];
+	int             okay = 1, nrslash, initial, nr;
+	FILE            *fp;
+
+	/* Find slashes in glob pattern, and verify whether component
+	 * matches `..'
+	 */
+	initial = (pattern[0] == '/');
+	for (sp = pattern, nrslash = 0; sp != 0; sp = strchr(sp, '/')) {
+		while (*sp == '/')
+			sp++;
+		if (nrslash >= MAXPATHLEN) {
+			printf("Incredible pattern: %s\n", pattern);
+			return 0;
+		}
+		dotdot[nrslash++] = isdotdotglob(sp);
+	}
+
+	fp = fopen(filename, "r");
+	if (fp == NULL) {
+		perror("fopen");
+		return 0;
+	}
+
+	while (okay && fgets(buffer, sizeof(buffer), fp) != NULL) {
+		char    *sp;
+
+		if ((sp = strchr(buffer, '\n')) != 0) {
+			*sp = '\0';
+		} else {
+			printf("Extremely long filename from server: %s",
+			       buffer);
+			okay = 0;
+			break;
+		}
+		if (buffer[0] == '|'
+		    || (buffer[0] != '/' && initial)
+		    || (buffer[0] == '/' && !initial))
+			okay = 0;
+		for (sp = buffer, nr = 0; sp; sp = strchr(sp, '/'), nr++) {
+			while (*sp == '/')
+				sp++;
+			if (sp[0] == '.' && !strncmp(sp, "../", 3)
+			    && (nr >= nrslash || !dotdot[nr]))
+				okay = 0;
+		}
+	}
+
+	if (!okay)
+		printf("Filename provided by server "
+		       "doesn't match pattern `%s': %s\n", pattern, buffer);
+
+	fclose(fp);
+	return okay;
+}
+
 static char *
 onoff(bool)
 	int bool;

krb5-1.3-netkit-rsh.patch:
 krsh.c |    2 ++
 1 file changed, 2 insertions(+)

--- NEW FILE krb5-1.3-netkit-rsh.patch ---
We ship netkit rsh, which isn't smart enough to deal with the oddball case
where argv[0] is an option flag.

--- krb5-1.3/src/appl/bsd/krsh.c
+++ krb5-1.3/src/appl/bsd/krsh.c
@@ -616,8 +616,10 @@
     else
       host = argv[0];
     
+#ifdef BERKELEY_RSH
     if (!strcmp(host, "rsh"))
       argv++;
+#endif
     
     fprintf(stderr,"trying normal rsh (%s)\n",
 	    UCB_RSH);

krb5-1.4.1-telnet-environ.patch:
 telnet/authenc.c  |    7 -------
 telnet/commands.c |   11 +++++++----
 telnet/externs.h  |    2 +-
 telnet/telnet.1   |    6 +++---
 telnet/telnet.c   |   10 +++++-----
 telnetd/authenc.c |    8 --------
 6 files changed, 16 insertions(+), 28 deletions(-)

--- NEW FILE krb5-1.4.1-telnet-environ.patch ---
Port of fixes originally made to the NetKit telnet client.

Previous behavior:
  Well-defined or exported variables are sent to the server on initial connect.
  The "environ list" command prints "*" before these variable names.
  Other variables are sent to the server if it requests them.
  The "environ list" command prints " " before these variable names.
New behavior:
  Well-defined variables are sent to the server on initial connect.
  The "environ list" command prints "*" before these variable names.
  Exported variables are sent to the server on initial connect.
  The "environ list" command prints "+" before these variable names.
  Other variables are NOT sent to the server.
  The "environ list" command prints " " before these variable names.

diff -uNr krb5-1.4.1/src/appl/telnet/telnet/authenc.c krb5-1.4.1/src/appl/telnet/telnet/authenc.c
--- krb5-1.4.1/src/appl/telnet/telnet/authenc.c	2002-11-15 15:21:34.000000000 -0500
+++ krb5-1.4.1/src/appl/telnet/telnet/authenc.c	2005-06-29 21:06:39.000000000 -0400
@@ -83,13 +83,6 @@
 }
 
 	char *
-telnet_getenv(val)
-	char *val;
-{
-	return((char *)env_getvalue((unsigned char *)val));
-}
-
-	char *
 telnet_gets(tprompt, result, length, echo)
 	char *tprompt;
 	char *result;
diff -uNr krb5-1.4.1/src/appl/telnet/telnet/commands.c krb5-1.4.1/src/appl/telnet/telnet/commands.c
--- krb5-1.4.1/src/appl/telnet/telnet/commands.c	2005-04-07 17:17:26.000000000 -0400
+++ krb5-1.4.1/src/appl/telnet/telnet/commands.c	2005-06-29 21:11:34.000000000 -0400
@@ -1889,8 +1889,9 @@
 	register struct env_lst *ep;
 
 	for (ep = envlisthead.next; ep; ep = ep->next) {
-		printf("%c %-20s %s\r\n", ep->export ? '*' : ' ',
-					ep->var, ep->value);
+		printf("%c %-20s %s\r\n",
+		       " +*"[(ep->welldefined ? 2 : (ep->export > 0))],
+		       ep->var, ep->value);
 	}
 }
 
@@ -1914,13 +1915,15 @@
 }
 
 	unsigned char *
-env_getvalue(var)
+env_getvalue(var, export_only)
 	unsigned char *var;
+	int export_only;
 {
 	register struct env_lst *ep;
 
 	if ((ep = env_find(var)))
-		return(ep->value);
+		if (ep->export || !export_only)
+			return(ep->value);
 	return(NULL);
 }
 
diff -uNr krb5-1.4.1/src/appl/telnet/telnet/externs.h krb5-1.4.1/src/appl/telnet/telnet/externs.h
--- krb5-1.4.1/src/appl/telnet/telnet/externs.h	2003-04-23 23:27:56.000000000 -0400
+++ krb5-1.4.1/src/appl/telnet/telnet/externs.h	2005-06-29 21:05:16.000000000 -0400
@@ -347,7 +347,7 @@
 
 extern unsigned char
     *env_default (int, int),
-    *env_getvalue (unsigned char *);
+    *env_getvalue (unsigned char *, int);
 
 extern int
     env_is_exported (unsigned char *);
diff -uNr krb5-1.4.1/src/appl/telnet/telnet/telnet.c krb5-1.4.1/src/appl/telnet/telnet/telnet.c
--- krb5-1.4.1/src/appl/telnet/telnet/telnet.c	2005-06-29 21:13:29.000000000 -0400
+++ krb5-1.4.1/src/appl/telnet/telnet/telnet.c	2005-06-29 21:09:13.000000000 -0400
@@ -552,7 +552,7 @@
 #endif
 
 	    case TELOPT_XDISPLOC:	/* X Display location */
-		if (env_getvalue((unsigned char *)"DISPLAY") &&
+		if (env_getvalue((unsigned char *)"DISPLAY", 0) &&
 		    env_is_exported((unsigned char *)"DISPLAY"))
 		    new_state_ok = 1;
 		break;
@@ -813,7 +813,7 @@
 		resettermname = 0;
 		if (tnamep && tnamep != unknown)
 			free(tnamep);
-		if ((tname = (char *)env_getvalue((unsigned char *)"TERM")) &&
+		if ((tname = (char *)env_getvalue((unsigned char *)"TERM", 0)) &&
 				(setupterm(tname, 1, &err) == 0)) {
 			tnamep = mklist(termbuf, tname);
 		} else {
@@ -988,7 +988,7 @@
 	    unsigned char temp[50], *dp;
 	    int len;
 
-	    if (((dp = env_getvalue((unsigned char *)"DISPLAY")) == NULL) ||
+	    if (((dp = env_getvalue((unsigned char *)"DISPLAY", 0)) == NULL) ||
 		(! env_is_exported((unsigned char *)"DISPLAY"))) {
 		/*
 		 * Something happened, we no longer have a DISPLAY
@@ -1669,7 +1669,7 @@
 			env_opt_add(ep);
 		return;
 	}
-	vp = env_getvalue(ep);
+	vp = env_getvalue(ep, 1);
 	elen = 2 * (vp ? strlen((char *)vp) : 0) +
 		2 * strlen((char *)ep) + 6;
 	if ((opt_replyend - opt_replyp) < elen)
@@ -2327,7 +2327,7 @@
 	send_will(TELOPT_LINEMODE, 1);
 	send_will(TELOPT_NEW_ENVIRON, 1);
 	send_do(TELOPT_STATUS, 1);
-	if (env_getvalue((unsigned char *)"DISPLAY") &&
+	if (env_getvalue((unsigned char *)"DISPLAY", 0) &&
 	    env_is_exported((unsigned char *)"DISPLAY"))
 	    send_will(TELOPT_XDISPLOC, 1);
 	if (eight)
--- krb5-1.4.1/src/appl/telnet/telnetd/authenc.c	2005-06-29 21:25:09.000000000 -0400
+++ krb5-1.4.1/src/appl/telnet/telnetd/authenc.c	2005-06-29 21:25:13.000000000 -0400
@@ -67,14 +67,6 @@
 }
 
 	char *
-telnet_getenv(val)
-	char *val;
-{
-	extern char *getenv();
-	return(getenv(val));
-}
-
-	char *
 telnet_gets(prompt, result, length, echo)
 	char *prompt;
 	char *result;
--- krb5-1.4.1/src/appl/telnet/telnet/telnet.1	2005-06-29 21:26:55.000000000 -0400
+++ krb5-1.4.1/src/appl/telnet/telnet/telnet.1	2005-06-29 21:29:05.000000000 -0400
@@ -401,7 +401,7 @@
 .I variable
 to have a value of
 .IR value .
-Any variables defined by this command are automatically exported.  The
+Variables defined by this command are not automatically exported.  The
 .I value
 may be enclosed in single or double quotes so that tabs and spaces may
 be included.
@@ -423,8 +423,8 @@
 .TP
 .B list
 List the current set of environment variables.  Those marked with a \&*
-will be sent automatically; other variables will only be sent if
-explicitly requested.
+will be sent automatically; those marked with a \&+ will be sent if the
+other end requests their values, and other variables will not be sent.
 .TP
 .B \&?
 Prints out help information for the

krb5-1.6.3-ftp_fdleak.patch:
 krb5-1.3.4/src/appl/gssftp/ftp/ftp_var.h |    3 ++-
 krb5/src/appl/gssftp/ftp/ftp.c           |   23 +++++++++++++++++++++--
 2 files changed, 23 insertions(+), 3 deletions(-)

--- NEW FILE krb5-1.6.3-ftp_fdleak.patch ---
Don't open a new socket without closing a possibly already-open one. RT#5597.
diff -uNr krb5/src/appl/gssftp/ftp/ftp.c krb5/src/appl/gssftp/ftp/ftp.c
--- krb5/src/appl/gssftp/ftp/ftp.c
+++ krb5/src/appl/gssftp/ftp/ftp.c
@@ -196,7 +196,7 @@ char *
 hookup(char* host, int port)
 {
 	register struct hostent *hp = 0;
-	int s;
+	int s, t;
 	socklen_t len;
 #ifdef IP_TOS
 #ifdef IPTOS_LOWDELAY
@@ -274,8 +274,13 @@ hookup(char* host, int port)
 	}
 #endif
 #endif
+#ifndef _WIN32
+	t = dup(s);
+#else
+	t = s;
+#endif
 	cin = FDOPEN_SOCKET(s, "r");
-	cout = FDOPEN_SOCKET(s, "w");
+	cout = FDOPEN_SOCKET(t, "w");
 	if (cin == NULL || cout == NULL) {
 		fprintf(stderr, "ftp: fdopen failed.\n");
 		if (cin) {
@@ -1448,6 +1453,8 @@
 	int a1,a2,a3,a4,p1,p2;
 
 	if (passivemode) {
+		if (data != INVALID_SOCKET)
+			(void) closesocket(data);
 		data = socket(AF_INET, SOCK_STREAM, 0);
 		if (data == INVALID_SOCKET) {
 			PERROR_SOCKET("ftp: socket");
@@ -2366,4 +2371,16 @@ FILE* fdopen_socket(SOCKET s, char* mode
 
 	return f;
 }
+#else
+/* Non-Win32 case takes the address of the variable so that we can "take
+ * ownership" of the descriptor number. */
+FILE* fdopen_socket(int *s, char* mode)
+{
+	FILE *fp;
+	fp = fdopen(*s, mode);
+	if (fp) {
+		*s = INVALID_SOCKET;
+	}
+	return fp;
+}
 #endif /* _WIN32 */
diff -up krb5-1.3.4/src/appl/gssftp/ftp/ftp_var.h krb5-1.3.4/src/appl/gssftp/ftp/ftp_var.h
--- krb5-1.3.4/src/appl/gssftp/ftp/ftp_var.h	2007-08-03 00:53:35.000000000 -0400
+++ krb5-1.3.4/src/appl/gssftp/ftp/ftp_var.h	2007-08-03 00:53:39.000000000 -0400
@@ -48,7 +48,8 @@ FILE* fdopen_socket(SOCKET s, char* mode
 #define PERROR_SOCKET(str) do { errno = SOCKET_ERRNO; perror(str); } while(0)
 #else
 #define FCLOSE_SOCKET(f) fclose(f)
-#define FDOPEN_SOCKET(s, mode) fdopen(s, mode)
+FILE* fdopen_socket(int *s, char* mode);
+#define FDOPEN_SOCKET(s, mode) fdopen_socket(&s, mode)
 #define SOCKETNO(fd) (fd)
 #define PERROR_SOCKET(str) perror(str)
 #endif

krb5-1.6.3-ftp_glob_runique.patch:
 ftp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- NEW FILE krb5-1.6.3-ftp_glob_runique.patch ---
Fix mget when runique is enabled and the globbing patch has been applied.
diff -up krb5/src/appl/gssftp/ftp/ftp.c krb5/src/appl/gssftp/ftp/ftp.c
--- krb5/src/appl/gssftp/ftp/ftp.c
+++ krb5/src/appl/gssftp/ftp/ftp.c
@@ -1188,7 +1188,8 @@ void recvrequest(char *cmd, char *volati
 				return;
 			}
 		}
-		else if (runique && (local = gunique(local)) == NULL) {
+		else if (runique && strcmp(cmd, "NLST") &&
+			 (local = gunique(local)) == NULL) {
 			(void) signal(SIGINT, oldintr);
 			code = -1;
 			return;

krb5-1.7-rcp-markus.patch:
 krcp.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- NEW FILE krb5-1.7-rcp-markus.patch ---
Fix for CAN-2004-0175, based on Markus Friedl's fix for OpenSSH scp.

diff -up krb5-1.7/src/appl/bsd/krcp.c krb5-1.7/src/appl/bsd/krcp.c
--- krb5-1.7/src/appl/bsd/krcp.c	2009-06-04 14:27:20.000000000 -0400
+++ krb5-1.7/src/appl/bsd/krcp.c	2009-06-04 14:27:20.000000000 -0400
@@ -1038,6 +1038,10 @@ void sink(argc, argv)
 	  size = size * 10 + (*cp++ - '0');
 	if (*cp++ != ' ')
 	  SCREWUP("size not delimited");
+	if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) {
+	  error("error: unexpected filename: %s", cp);
+	  exit(1);
+	}
 	if (targisdir) {
           if(strlen(targ) + strlen(cp) + 2 >= sizeof(nambuf))
 	    SCREWUP("target name too long");
@@ -1051,6 +1055,8 @@ void sink(argc, argv)
 	nambuf[sizeof(nambuf) - 1] = '\0';
 	exists = stat(nambuf, &stb) == 0;
 	if (cmdbuf[0] == 'D') {
+	    if (!iamrecursive)
+		SCREWUP("received directory without -r");
 	    if (exists) {
 		if ((stb.st_mode&S_IFMT) != S_IFDIR) {
 		    errno = ENOTDIR;

krb5-1.7-sizeof.patch:
 ftp.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- NEW FILE krb5-1.7-sizeof.patch ---
Surely "buf[strlen(buf)] = '\0'" doesn't do what we intend.  RT#6521

diff -up krb5-1.7/src/appl/gssftp/ftp/ftp.c krb5-1.7/src/appl/gssftp/ftp/ftp.c
--- krb5-1.7/src/appl/gssftp/ftp/ftp.c	2009-06-22 16:03:48.000000000 -0400
+++ krb5-1.7/src/appl/gssftp/ftp/ftp.c	2009-06-22 16:06:28.000000000 -0400
@@ -1663,21 +1663,21 @@ void pswitch(int flag)
 	ip->ntflg = ntflag;
 	ntflag = op->ntflg;
 	(void) strncpy(ip->nti, ntin, sizeof(ip->nti) - 1);
-	(ip->nti)[strlen(ip->nti)] = '\0';
+	(ip->nti)[sizeof(ip->nti) - 1] = '\0';
 	(void) strncpy(ntin, op->nti, sizeof(ntin) - 1);
 	ntin[sizeof(ntin) - 1] = '\0';
 	(void) strncpy(ip->nto, ntout, sizeof(ip->nto) - 1);
-	(ip->nto)[strlen(ip->nto)] = '\0';
+	(ip->nto)[sizeof(ip->nto) - 1] = '\0';
 	(void) strncpy(ntout, op->nto, sizeof(ntout) - 1);
 	ntout[sizeof(ntout) - 1] = '\0';
 	ip->mapflg = mapflag;
 	mapflag = op->mapflg;
-	(void) strncpy(ip->mi, mapin, MAXPATHLEN - 1);
-	(ip->mi)[strlen(ip->mi)] = '\0';
+	(void) strncpy(ip->mi, mapin, sizeof(ip->mi) - 1);
+	(ip->mi)[sizeof(ip->mi) - 1] = '\0';
 	(void) strncpy(mapin, op->mi, sizeof(mapin) - 1);
 	mapin[sizeof(mapin) - 1] = '\0';
-	(void) strncpy(ip->mo, mapout, MAXPATHLEN - 1);
-	(ip->mo)[strlen(ip->mo)] = '\0';
+	(void) strncpy(ip->mo, mapout, sizeof(ip->mo) - 1);
+	(ip->mo)[sizeof(ip->mo) - 1] = '\0';
 	(void) strncpy(mapout, op->mo, sizeof(mapout) - 1);
 	mapout[sizeof(mapout) - 1] = '\0';
 	ip->authtype = auth_type;

krb5-appl-1.0-io.patch:
 defines.h |    1 +
 kcmd.c    |    8 +++++++-
 krsh.c    |   54 ++++++++++++++++++++++++++++++++++++++----------------
 krshd.c   |   54 +++++++++++++++++++++++++++++++++++++++---------------
 4 files changed, 85 insertions(+), 32 deletions(-)

--- NEW FILE krb5-appl-1.0-io.patch ---
We can get stuck if a write is going to block because both ends are writing and
neither end is reading.  This is a port of a patch which aims to solve that
problem, but for now it's incomplete because we don't handle partial writes.  A
proper non-blocking implementation would require a bit more work.

diff -up krb5-appl-1.0/bsd/defines.h.io krb5-appl-1.0/bsd/defines.h
--- krb5-appl-1.0/bsd/defines.h.io	2009-11-16 05:27:04.000000000 -0500
+++ krb5-appl-1.0/bsd/defines.h	2010-03-05 11:00:06.000000000 -0500
@@ -36,6 +36,7 @@ extern int kcmd (int *sock, char **ahost
 		 enum kcmd_proto *protonum /* input and output */
 		 );
 
+extern int rcmd_stream_has_unsent_data (void);
 extern int rcmd_stream_read (int fd, char *buf, size_t len, int secondary);
 extern int rcmd_stream_write (int fd, char *buf, size_t len, int secondary);
 extern int getport (int * /* portnum */, int * /* addrfamily */);
diff -up krb5-appl-1.0/bsd/kcmd.c.io krb5-appl-1.0/bsd/kcmd.c
--- krb5-appl-1.0/bsd/kcmd.c.io	2009-11-16 05:27:04.000000000 -0500
+++ krb5-appl-1.0/bsd/kcmd.c	2010-03-05 11:00:06.000000000 -0500
@@ -767,6 +767,11 @@ void rcmd_stream_init_normal()
     output = twrite;
 }
 
+int rcmd_stream_has_unsent_data (void)
+{
+    return (nstored > 0);
+}
+
 void rcmd_stream_init_krb5(in_keyblock, encrypt_flag, lencheck, am_client,
 			   protonum)
      krb5_keyblock *in_keyblock;
@@ -927,7 +932,8 @@ static int v5_des_read(fd, buf, len, sec
 	cc = full_read(fd, &c, 1);
 	/* we should check for non-blocking here, but we'd have
 	   to make it save partial reads as well. */
-	if (cc <= 0) return cc; /* read error */
+	if (cc == 0) return nreturned; /* EOF */
+	if (cc < 0) return cc; /* read error */
 	if (cc == 1) {
 	    if (c == 0 || !do_lencheck) break;
 	}
diff -up krb5-appl-1.0/bsd/krsh.c.io krb5-appl-1.0/bsd/krsh.c
--- krb5-appl-1.0/bsd/krsh.c.io	2010-03-05 11:00:05.000000000 -0500
+++ krb5-appl-1.0/bsd/krsh.c	2010-03-05 11:00:06.000000000 -0500
@@ -117,10 +117,11 @@ main(argc, argv0)
      char **argv0;
 {
     int rem, pid = 0;
-    char *host=0, **ap, buf[RCMD_BUFSIZ], *args, **argv = argv0, *user = 0;
+    char *host=0, **ap, buf[PIPE_BUF], *args, **argv = argv0, *user = 0;
     register int cc;
     struct passwd *pwd;
     fd_set readfrom, ready;
+    fd_set writeto, ready_wr;
     int one = 1;
     struct servent *sp;
     struct servent defaultservent;
@@ -510,9 +511,14 @@ main(argc, argv0)
     FD_ZERO(&readfrom);
     FD_SET(rfd2, &readfrom);
     FD_SET(rem, &readfrom);
+    FD_ZERO(&writeto);
     do {
+	int max_fd;
+	max_fd = (rfd2 > rem) ? rfd2 : rem;
+	max_fd = (max_fd > 2) ? max_fd : 2;
 	ready = readfrom;
-	if (select(((rfd2 > rem) ? rfd2 : rem) + 1, &ready, 0, 0, 0) < 0) {
+	ready_wr = writeto;
+	if (select(max_fd + 1, &ready, &ready_wr, 0, 0) < 0) {
 	    if (errno != EINTR) {
 		perror("select");
 		exit(1);
@@ -520,22 +526,38 @@ main(argc, argv0)
 	    continue;
 	}
 	if (FD_ISSET(rfd2, &ready)) {
-	    errno = 0;
-	    cc = rcmd_stream_read(rfd2, buf, sizeof buf, 1);
-	    if (cc <= 0) {
-		if ((errno != EWOULDBLOCK) && (errno != EAGAIN))
-		    FD_CLR(rfd2, &readfrom);
-	    } else
-	      (void) write(2, buf, (unsigned) cc);
+            FD_SET(2, &writeto);
+	}
+	if (FD_ISSET(2, &ready_wr)) {
+	    do {
+		errno = 0;
+		cc = rcmd_stream_read(rfd2, buf, sizeof buf, 1);
+		if (cc <= 0) {
+		    if ((errno != EWOULDBLOCK) && (errno != EAGAIN)) {
+			FD_CLR(rfd2, &readfrom);
+			break;
+		    }
+		} else
+		  (void) write(2, buf, (unsigned) cc);
+	    } while (rcmd_stream_has_unsent_data());
+	    FD_CLR(2, &writeto);
 	}
 	if (FD_ISSET(rem, &ready)) {
-	    errno = 0;
-	    cc = rcmd_stream_read(rem, buf, sizeof buf, 0);
-	    if (cc <= 0) {
-		if ((errno != EWOULDBLOCK) && (errno != EAGAIN))
-		    FD_CLR(rem, &readfrom);
-	    } else
-	      (void) write(1, buf, (unsigned) cc);
+	    FD_SET(1, &writeto);
+	}
+	if (FD_ISSET(1, &ready_wr)) {
+	    do {
+		errno = 0;
+		cc = rcmd_stream_read(rem, buf, sizeof buf, 0);
+		if (cc <= 0) {
+		    if ((errno != EWOULDBLOCK) && (errno != EAGAIN)) {
+			FD_CLR(rem, &readfrom);
+			break;
+		    }
+		} else
+		  (void) write(1, buf, (unsigned) cc);
+	    } while (rcmd_stream_has_unsent_data());
+	    FD_CLR(1, &writeto);
 	}
     } while (FD_ISSET(rem, &readfrom) || FD_ISSET(rfd2, &readfrom));
     if (nflag == 0)
diff -up krb5-appl-1.0/bsd/krshd.c.io krb5-appl-1.0/bsd/krshd.c
--- krb5-appl-1.0/bsd/krshd.c.io	2010-03-05 11:00:05.000000000 -0500
+++ krb5-appl-1.0/bsd/krshd.c	2010-03-05 11:00:06.000000000 -0500
@@ -585,7 +585,8 @@ void doit(f, fromp)
     short port;
     int pv[2], pw[2], px[2], cc;
     fd_set ready, readfrom;
-    char buf[RCMD_BUFSIZ], sig;
+    fd_set ready_wr, writeto;
+    char buf[PIPE_BUF], sig;
     struct sockaddr_storage localaddr;
 #ifdef POSIX_SIGNALS
     struct sigaction sa;
@@ -1216,6 +1217,10 @@ void doit(f, fromp)
 	    if (pw[0] > maxfd)
 		maxfd = pw[0];
 	    
+	    if (px[1] > maxfd)
+		maxfd = px[1];
+	    FD_ZERO(&writeto);
+
 	    /* read from f, write to px[1] -- child stdin */
 	    /* read from s, signal child */
 	    /* read from pv[0], write to s -- child stderr */
@@ -1223,36 +1228,47 @@ void doit(f, fromp)
 
 	    do {
 		ready = readfrom;
-		if (select(maxfd + 1, &ready, (fd_set *)0,
+		ready_wr = writeto;
+		if (select(maxfd + 1, &ready, &ready_wr,
 			   (fd_set *)0, (struct timeval *)0) < 0) {
 		    if (errno == EINTR) {
 			continue;
 		    } else {
 			break;
-		}
+		    }
 		}
 
 		if (port&&FD_ISSET(pv[0], &ready)) {
+		    FD_SET(s, &writeto);
+		    FD_CLR(pv[0], &readfrom);
+		}
+		if (port&&FD_ISSET(s, &ready_wr)) {
 		    /* read from the child stderr, write to the net */
 		    errno = 0;
 		    cc = read(pv[0], buf, sizeof (buf));
-		    if (cc <= 0) {
+		    if ((cc <= 0) ||
+			(rcmd_stream_write(s, buf, (unsigned) cc, 1) != cc)) {
 			shutdown(s, 1+1);
-			FD_CLR(pv[0], &readfrom);
 		    } else {
-			(void) rcmd_stream_write(s, buf, (unsigned) cc, 1);
+			FD_SET(pv[0], &readfrom);
 		    }
+		    FD_CLR(s, &writeto);
 		}
 		if (FD_ISSET(pw[0], &ready)) {
+		    FD_SET(f, &writeto);
+		    FD_CLR(pw[0], &readfrom);
+		}
+		if (FD_ISSET(f, &ready_wr)) {
 		    /* read from the child stdout, write to the net */
 		    errno = 0;
 		    cc = read(pw[0], buf, sizeof (buf));
-		    if (cc <= 0) {
+		    if ((cc <= 0) ||
+			(rcmd_stream_write(f, buf, (unsigned) cc, 0) != cc)) {
 			shutdown(f, 1+1);
-			FD_CLR(pw[0], &readfrom);
 		    } else {
-			(void) rcmd_stream_write(f, buf, (unsigned) cc, 0);
+			FD_SET(pw[0], &readfrom);
 		    }
+		    FD_CLR(f, &writeto);
 		}
 		if (port&&FD_ISSET(s, &ready)) {
 		    /* read from the alternate channel, signal the child */
@@ -1270,12 +1286,15 @@ void doit(f, fromp)
 		    }
 		}
 		if (FD_ISSET(f, &ready)) {
+		    FD_SET(px[1], &writeto);
+		    FD_CLR(f, &readfrom);
+		}
+		if (FD_ISSET(px[1], &ready_wr)) {
 		    /* read from the net, write to child stdin */
 		    errno = 0;
 		    cc = rcmd_stream_read(f, buf, sizeof(buf), 0);
 		    if (cc <= 0) {
 			(void) close(px[1]);
-			FD_CLR(f, &readfrom);
 		    } else {
 		        int wcc;
 		        wcc = write(px[1], buf, (unsigned) cc);
@@ -1283,17 +1302,22 @@ void doit(f, fromp)
 			  /* pipe closed, don't read any more */
 			  /* might check for EPIPE */
 			  (void) close(px[1]);
-			  FD_CLR(f, &readfrom);
-			} else if (wcc != cc) {
-			  syslog(LOG_INFO, "only wrote %d/%d to child", 
-				 wcc, cc);
+			} else {
+			    if (wcc != cc)
+				syslog(LOG_INFO, "only wrote %d/%d to child", 
+				       wcc, cc);
+			    FD_SET(f, &readfrom);
 			}
 		    }
+		    FD_CLR(px[1], &writeto);
 		}
 	    } while ((port&&FD_ISSET(s, &readfrom)) ||
 		     FD_ISSET(f, &readfrom) ||
 		     (port&&FD_ISSET(pv[0], &readfrom) )||
-		     FD_ISSET(pw[0], &readfrom));
+		     FD_ISSET(pw[0], &readfrom) ||
+		     (port&&FD_ISSET(s, &writeto)) ||
+		     FD_ISSET(f, &writeto) ||
+		     FD_ISSET(px[1], &writeto));
 	    ignore_signals();
 #ifdef KERBEROS
 	    syslog(LOG_INFO ,

krb5-appl-1.0-largefile.patch:
 bsd/krcp.c             |    5 +++++
 configure.ac           |    4 ++++
 gssftp/ftp/ftp.c       |   24 +++++++++++++++++++++---
 gssftp/ftp/ftp_var.h   |    6 ++++++
 gssftp/ftpd/ftpcmd.y   |   12 ++++++++++++
 gssftp/ftpd/ftpd.c     |   27 ++++++++++++++++++++++++++-
 gssftp/ftpd/ftpd_var.h |    6 ++++++
 7 files changed, 80 insertions(+), 4 deletions(-)

--- NEW FILE krb5-appl-1.0-largefile.patch ---
* Turn on large file support in gssftp and rcp (and the rest of the bsd
  applications) using AC_SYS_LARGEFILE.
* The size of off_t might now be greater than that of an int or a long, so
  if we have a "long long" type, assume that format specifiers for it work
  correctly and that we can cast off_t values to long long for displaying
  and logging.
* Check for fseeko(), which takes an off_t, and if we find it, use it
  instead of fseek(), which takes a long and might not handle the full
  range of values.
RT#6524

diff -up krb5-appl-1.0/bsd/krcp.c.largefile krb5-appl-1.0/bsd/krcp.c
--- krb5-appl-1.0/bsd/krcp.c.largefile	2010-03-05 11:06:23.000000000 -0500
+++ krb5-appl-1.0/bsd/krcp.c	2010-03-05 11:06:24.000000000 -0500
@@ -748,8 +748,13 @@ void source(argc, argv)
 		continue;
 	    }
 	}
+#ifdef HAVE_LONG_LONG_INT
+	(void) snprintf(buf, sizeof(buf), "C%04o %lld %s\n",
+			(int) stb.st_mode&07777, (long long) stb.st_size, last);
+#else
 	(void) snprintf(buf, sizeof(buf), "C%04o %ld %s\n",
 			(int) stb.st_mode&07777, (long ) stb.st_size, last);
+#endif
 	(void) rcmd_stream_write(rem, buf, strlen(buf), 0);
 	if (response() < 0) {
 	    (void) close(f);
diff -up krb5-appl-1.0/configure.ac.largefile krb5-appl-1.0/configure.ac
--- krb5-appl-1.0/configure.ac.largefile	2010-03-05 11:06:23.000000000 -0500
+++ krb5-appl-1.0/configure.ac	2010-03-05 11:06:24.000000000 -0500
@@ -103,6 +103,10 @@ case $host in
     ;;
 esac
 
+AC_SYS_LARGEFILE
+AC_FUNC_FSEEKO
+AC_TYPE_LONG_LONG_INT
+AC_TYPE_UNSIGNED_LONG_LONG_INT
 AC_CHECK_FUNCS(_getpty cgetent getcwd getenv gettosbyname getusershell getutmp)
 AC_CHECK_FUNCS(getutmpx grantpt inet_aton initgroups isatty killpg killpg)
 AC_CHECK_FUNCS(line_push logwtmp openpty ptsname revoke rmufile rresvport_af)
diff -up krb5-appl-1.0/gssftp/ftpd/ftpcmd.y.largefile krb5-appl-1.0/gssftp/ftpd/ftpcmd.y
--- krb5-appl-1.0/gssftp/ftpd/ftpcmd.y.largefile	2009-11-05 15:15:06.000000000 -0500
+++ krb5-appl-1.0/gssftp/ftpd/ftpcmd.y	2010-03-05 11:06:24.000000000 -0500
@@ -1499,12 +1499,20 @@ char *filename;
 		    (stbuf.st_mode&S_IFMT) != S_IFREG)
 			reply(550, "%s: not a plain file.", filename);
 		else
+#ifdef HAVE_LONG_LONG_INT
+			reply(213, "%llu", (long long) stbuf.st_size);
+#else
 			reply(213, "%lu", (long) stbuf.st_size);
+#endif
 		break;}
 	case TYPE_A: {
 		FILE *fin;
 		register int c;
+#ifdef HAVE_LONG_LONG_INT
+		register long long count;
+#else
 		register long count;
+#endif
 		struct stat stbuf;
 		fin = fopen(filename, "r");
 		if (fin == NULL) {
@@ -1526,7 +1534,11 @@ char *filename;
 		}
 		(void) fclose(fin);
 
+#ifdef HAVE_LONG_LONG_INT
+		reply(213, "%lld", count);
+#else
 		reply(213, "%ld", count);
+#endif
 		break;}
 	default:
 		reply(504, "SIZE not implemented for Type %c.", "?AEIL"[type]);
diff -up krb5-appl-1.0/gssftp/ftpd/ftpd.c.largefile krb5-appl-1.0/gssftp/ftpd/ftpd.c
--- krb5-appl-1.0/gssftp/ftpd/ftpd.c.largefile	2010-03-05 11:06:23.000000000 -0500
+++ krb5-appl-1.0/gssftp/ftpd/ftpd.c	2010-03-05 11:06:24.000000000 -0500
@@ -1205,8 +1205,13 @@ retrieve(cmd, name)
 done:
 	(*closefunc)(fin);
 	if (logging > 2 && !cmd) {
+#ifdef HAVE_UNSIGNED_LONG_LONG_INT
+		syslog(LOG_NOTICE, "get: %llu bytes transferred",
+		       (unsigned long long) byte_count);
+#else
 	        syslog(LOG_NOTICE, "get: %lu bytes transferred",
 		       (unsigned long) byte_count);
+#endif
 	}
 }
 
@@ -1252,7 +1257,7 @@ store_file(name, fmode, unique)
 			 * because we are changing from reading to
 			 * writing.
 			 */
-			if (fseek(fout, 0L, L_INCR) < 0) {
+			if (FSEEK(fout, 0L, L_INCR) < 0) {
 				perror_reply(550, name);
 				goto done;
 			}
@@ -1277,8 +1282,13 @@ store_file(name, fmode, unique)
 done:
 	(*closefunc)(fout);
 	if (logging > 2) {
+#ifdef HAVE_UNSIGNED_LONG_LONG_INT
+		syslog(LOG_NOTICE, "put: %llu bytes transferred",
+		       (unsigned long long) byte_count);
+#else
 	        syslog(LOG_NOTICE, "put: %lu bytes transferred",
 		       (unsigned long) byte_count);
+#endif
 	}
 }
 
@@ -1341,8 +1351,13 @@ dataconn(name, size, fmode)
 	byte_count = 0;
 	if (size != (off_t) -1)
 		/* cast size to long in case sizeof(off_t) > sizeof(long) */
+#ifdef HAVE_LONG_LONG_INT
+		(void) snprintf (sizebuf, sizeof(sizebuf), " (%lld bytes)",
+				 (long long)size);
+#else
 		(void) snprintf (sizebuf, sizeof(sizebuf), " (%ld bytes)",
 				 (long)size);
+#endif
 	else
 		sizebuf[0] = '\0';
 	if (pdata >= 0) {
@@ -2063,6 +2078,15 @@ myoob(sig)
 		siglongjmp(urgcatch, 1);
 	}
 	if (strcmp(cp, "STAT") == 0) {
+#ifdef HAVE_LONG_LONG_INT
+		if (file_size != (off_t) -1)
+			reply(213, "Status: %llu of %llu bytes transferred",
+			      (unsigned long long) byte_count, 
+			      (unsigned long long) file_size);
+		else
+			reply(213, "Status: %llu bytes transferred", 
+			      (unsigned long long) byte_count);
+#else
 		if (file_size != (off_t) -1)
 			reply(213, "Status: %lu of %lu bytes transferred",
 			      (unsigned long) byte_count, 
@@ -2070,6 +2094,7 @@ myoob(sig)
 		else
 			reply(213, "Status: %lu bytes transferred", 
 			      (unsigned long) byte_count);
+#endif
 	}
 }
 
diff -up krb5-appl-1.0/gssftp/ftpd/ftpd_var.h.largefile krb5-appl-1.0/gssftp/ftpd/ftpd_var.h
--- krb5-appl-1.0/gssftp/ftpd/ftpd_var.h.largefile	2009-11-05 15:15:06.000000000 -0500
+++ krb5-appl-1.0/gssftp/ftpd/ftpd_var.h	2010-03-05 11:06:24.000000000 -0500
@@ -41,6 +41,12 @@
 char *radix_error (int);
 int radix_encode (unsigned char *, unsigned char *, size_t *, int);
 
+#ifdef HAVE_FSEEKO
+#define FSEEK(fd, offset, whence) fseeko(fd, (off_t) offset, whence)
+#else
+#define FSEEK(fd, offset, whence) fseek(fd, (long) offset, whence)
+#endif
+
 /* ftpd.c */
 void ack(char *);
 int auth_data(unsigned char *);
diff -up krb5-appl-1.0/gssftp/ftp/ftp.c.largefile krb5-appl-1.0/gssftp/ftp/ftp.c
--- krb5-appl-1.0/gssftp/ftp/ftp.c.largefile	2010-03-05 11:06:24.000000000 -0500
+++ krb5-appl-1.0/gssftp/ftp/ftp.c	2010-03-05 11:06:24.000000000 -0500
@@ -156,7 +156,11 @@ void user_gss_error (OM_uint32, OM_uint3
 
 static void proxtrans (char *, char *, char *);
 static int initconn (void);
+#ifdef HAVE_LONG_LONG_INT
+static void ptransfer (char *, long long, struct timeval *, struct timeval *);
+#else
 static void ptransfer (char *, long, struct timeval *, struct timeval *);
+#endif
 static void abort_remote (FILE *);
 static void tvsub (struct timeval *, struct timeval *, struct timeval *);
 static char *gunique (char *);
@@ -787,7 +791,11 @@ void sendrequest(char *cmd, char *local,
 	FILE *volatile fin, *volatile dout = 0;
 	int (*volatile closefunc)();
 	volatile sig_t oldintr, oldintp;
+#ifdef HAVE_LONG_LONG_INT
+	volatile long long bytes = 0, hashbytes = HASHBYTES;
+#else
 	volatile long bytes = 0, hashbytes = HASHBYTES;
+#endif
 	char *volatile lmode;
 	char buf[FTP_BUFSIZ], *bufp;
 
@@ -884,7 +892,7 @@ void sendrequest(char *cmd, char *local,
 
 	if (restart_point &&
 	    (strcmp(cmd, "STOR") == 0 || strcmp(cmd, "APPE") == 0)) {
-		if (fseek(fin, (long) restart_point, 0) < 0) {
+		if (FSEEK(fin, restart_point, 0) < 0) {
 			fprintf(stderr, "local: %s: %s\n", local,
 				strerror(errno));
 			restart_point = 0;
@@ -1279,7 +1287,7 @@ void recvrequest(char *cmd, char *volati
 		if (restart_point) {
 			register int i, n, ch;
 
-			if (fseek(fout, 0L, L_SET) < 0)
+			if (FSEEK(fout, 0L, L_SET) < 0)
 				goto done;
 			n = restart_point;
 			for (i = 0; i++ < n;) {
@@ -1288,7 +1296,7 @@ void recvrequest(char *cmd, char *volati
 				if (ch == '\n')
 					i++;
 			}
-			if (fseek(fout, 0L, L_INCR) < 0) {
+			if (FSEEK(fout, 0L, L_INCR) < 0) {
 done:
 				fprintf(stderr, "local: %s: %s\n", local,
 					strerror(errno));
@@ -1553,8 +1561,13 @@ dataconn(char *lmode)
 	return (FDOPEN_SOCKET(data, lmode));
 }
 
+#ifdef HAVE_LONG_LONG_INT
+static void ptransfer(char *direction, long long bytes,
+		      struct timeval *t0, struct timeval *t1)
+#else
 static void ptransfer(char *direction, long bytes,
 		      struct timeval *t0, struct timeval *t1)
+#endif
 {
 	struct timeval td;
 	float s, kbs;
@@ -1564,8 +1577,13 @@ static void ptransfer(char *direction, l
 		s = td.tv_sec + (td.tv_usec / 1000000.);
 #define	nz(x)	((x) == 0 ? 1 : (x))
 		kbs = (bytes / nz(s))/1024.0;
+#ifdef HAVE_LONG_LONG_INT
+		printf("%lld bytes %s in %.2g seconds (%.2g Kbytes/s)\n",
+		    bytes, direction, s, kbs);
+#else
 		printf("%ld bytes %s in %.2g seconds (%.2g Kbytes/s)\n",
 		    bytes, direction, s, kbs);
+#endif
 	}
 }
 
diff -up krb5-appl-1.0/gssftp/ftp/ftp_var.h.largefile krb5-appl-1.0/gssftp/ftp/ftp_var.h
--- krb5-appl-1.0/gssftp/ftp/ftp_var.h.largefile	2010-03-05 11:06:24.000000000 -0500
+++ krb5-appl-1.0/gssftp/ftp/ftp_var.h	2010-03-05 11:06:24.000000000 -0500
@@ -46,12 +46,18 @@ FILE* fdopen_socket(SOCKET s, char* mode
 #define FDOPEN_SOCKET(s, mode) fdopen_socket(s, mode)
 #define SOCKETNO(fd) _get_osfhandle(fd)
 #define PERROR_SOCKET(str) do { errno = SOCKET_ERRNO; perror(str); } while(0)
+#define FSEEK(fd, offset, whence) fseek(fd, (long) offset, whence)
 #else
 #define FCLOSE_SOCKET(f) fclose(f)
 FILE* fdopen_socket(int *s, char* mode);
 #define FDOPEN_SOCKET(s, mode) fdopen_socket(&s, mode)
 #define SOCKETNO(fd) (fd)
 #define PERROR_SOCKET(str) perror(str)
+#ifdef HAVE_FSEEKO
+#define FSEEK(fd, offset, whence) fseeko(fd, (off_t) offset, whence)
+#else
+#define FSEEK(fd, offset, whence) fseek(fd, (long) offset, whence)
+#endif
 #endif
 
 #ifdef _WIN32

krb5-appl-1.0-login_chdir.patch:
 login.c |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

--- NEW FILE krb5-appl-1.0-login_chdir.patch ---
Change to the user's directory after dropping privileges, in case it is only
accessible to the user (for example, if it's in NFS with root squashing).
Incomplete - we probably need to do the same for rshd and ftpd.

diff -up krb5-appl-1.0/bsd/login.c.login_chdir krb5-appl-1.0/bsd/login.c
--- krb5-appl-1.0/bsd/login.c.login_chdir	2010-03-05 11:01:23.000000000 -0500
+++ krb5-appl-1.0/bsd/login.c	2010-03-05 11:01:23.000000000 -0500
@@ -1115,13 +1115,8 @@ int main(argc, argv)
     }
 #endif /* USE_PAM */
 
-    if (chdir(pwd->pw_dir) < 0) {
-	printf("No directory %s!\n", pwd->pw_dir);
-	if (chdir("/"))
-	    exit(0);
-	pwd->pw_dir = "/";
-	printf("Logging in with home = \"/\".\n");
-    }
+    if (chdir("/"))
+	exit(0);
 
     /* nothing else left to fail -- really log in */
     login_time = time(NULL);
@@ -1293,6 +1288,14 @@ int main(argc, argv)
 	sleepexit(1);
     }
 
+    if (chdir(pwd->pw_dir) < 0) {
+	printf("No directory %s!\n", pwd->pw_dir);
+	if (chdir("/"))
+	    exit(0);
+	pwd->pw_dir = "/";
+	printf("Logging in with home = \"/\".\n");
+    }
+
     /*
      * We are the user now.  Re-create the destroyed ccache and
      * ticket file.

krb5-appl-1.0-manpaths.patch:
 aclocal.m4               |   21 +++++++++++++++++++++
 bsd/klogind.M            |    2 +-
 bsd/kshd.M               |    4 ++--
 configure.ac             |    7 +++++++
 gssftp/ftpd/ftpd.M       |    2 +-
 telnet/telnetd/telnetd.8 |    2 +-
 6 files changed, 33 insertions(+), 5 deletions(-)

--- NEW FILE krb5-appl-1.0-manpaths.patch ---
Change the absolute paths included in the man pages so that the correct
values can be dropped in by config.status.  After applying this patch,
these files should be renamed to their ".in" counterparts, and then the
configure scripts should be rebuilt.  Originally RT#6525

diff -up krb5-appl-1.0/aclocal.m4.manpaths krb5-appl-1.0/aclocal.m4
--- krb5-appl-1.0/aclocal.m4.manpaths	2010-03-05 10:55:58.000000000 -0500
+++ krb5-appl-1.0/aclocal.m4	2010-03-05 10:55:58.000000000 -0500
@@ -565,3 +565,24 @@ AC_SUBST(PAM_LIBS)
 AC_SUBST(PAM_MAN)
 AC_SUBST(NON_PAM_MAN)
 ])dnl
+AC_DEFUN(V5_AC_OUTPUT_MANPAGE,[
+mansysconfdir=$sysconfdir
+mansysconfdir=`eval echo $mansysconfdir | sed -e "s,NONE,$prefix,g"`
+mansysconfdir=`eval echo $mansysconfdir | sed -e "s,NONE,$ac_default_prefix,g"`
+mansbindir=$sbindir
+mansbindir=`eval echo $mansbindir | sed -e "s,NONE,$exec_prefix,g"`
+mansbindir=`eval echo $mansbindir | sed -e "s,NONE,$prefix,g"`
+mansbindir=`eval echo $mansbindir | sed -e "s,NONE,$ac_default_prefix,g"`
+manlocalstatedir=$localstatedir
+manlocalstatedir=`eval echo $manlocalstatedir | sed -e "s,NONE,$prefix,g"`
+manlocalstatedir=`eval echo $manlocalstatedir | sed -e "s,NONE,$ac_default_prefix,g"`
+manlibexecdir=$libexecdir
+manlibexecdir=`eval echo $manlibexecdir | sed -e "s,NONE,$exec_prefix,g"`
+manlibexecdir=`eval echo $manlibexecdir | sed -e "s,NONE,$prefix,g"`
+manlibexecdir=`eval echo $manlibexecdir | sed -e "s,NONE,$ac_default_prefix,g"`
+AC_SUBST(mansysconfdir)
+AC_SUBST(mansbindir)
+AC_SUBST(manlocalstatedir)
+AC_SUBST(manlibexecdir)
+AC_CONFIG_FILES($1)
+])
diff -up krb5-appl-1.0/bsd/klogind.M.manpaths krb5-appl-1.0/bsd/klogind.M
--- krb5-appl-1.0/bsd/klogind.M.manpaths	2008-12-15 15:29:01.000000000 -0500
+++ krb5-appl-1.0/bsd/klogind.M	2010-03-05 10:55:58.000000000 -0500
@@ -27,7 +27,7 @@ server is invoked by \fIinetd(8)\fP when
 the port indicated in /etc/inetd.conf.  A typical /etc/inetd.conf
 configuration line for \fIklogind\fP might be:
 
-klogin stream tcp nowait root /usr/cygnus/sbin/klogind klogind -e5c
+klogin stream tcp nowait root @mansbindir@/klogind klogind -e5c
 
 When a service request is received, the following protocol is initiated:
 
diff -up krb5-appl-1.0/bsd/kshd.M.manpaths krb5-appl-1.0/bsd/kshd.M
--- krb5-appl-1.0/bsd/kshd.M.manpaths	2006-06-12 14:19:26.000000000 -0400
+++ krb5-appl-1.0/bsd/kshd.M	2010-03-05 10:55:58.000000000 -0500
@@ -8,7 +8,7 @@
 .SH NAME
 kshd \- kerberized remote shell server
 .SH SYNOPSIS
-.B /usr/local/sbin/kshd 
+.B @mansbindir@/kshd 
 [
 .B \-kr45ec
 ]
@@ -30,7 +30,7 @@ server is invoked by \fIinetd(8c)\fP whe
 on the port indicated in /etc/inetd.conf.  A typical /etc/inetd.conf
 configuration line for \fIkrshd\fP might be:
 
-kshell	stream	tcp	nowait	root	/usr/local/sbin/kshd	kshd -5c
+kshell	stream	tcp	nowait	root	@mansbindir@/kshd	kshd -5c
 
 When a service request is received, the following protocol is initiated:
 
diff -up krb5-appl-1.0/configure.ac.manpaths krb5-appl-1.0/configure.ac
--- krb5-appl-1.0/configure.ac.manpaths	2010-03-05 10:55:58.000000000 -0500
+++ krb5-appl-1.0/configure.ac	2010-03-05 10:55:58.000000000 -0500
@@ -412,6 +412,13 @@ else
 fi
 AC_SUBST(HAVE_RUNTEST)
 
+V5_AC_OUTPUT_MANPAGE([
+	gssftp/ftpd/ftpd.M
+	bsd/klogind.M
+	bsd/kshd.M
+	telnet/telnetd/telnetd.8
+])
+
 V5_AC_OUTPUT_MAKEFILE(. bsd libmissing libpty
                       gssftp gssftp/ftp gssftp/ftpd
                       telnet telnet/libtelnet telnet/telnet telnet/telnetd
diff -up krb5-appl-1.0/gssftp/ftpd/ftpd.M.manpaths krb5-appl-1.0/gssftp/ftpd/ftpd.M
--- krb5-appl-1.0/gssftp/ftpd/ftpd.M.manpaths	2009-01-28 00:42:11.000000000 -0500
+++ krb5-appl-1.0/gssftp/ftpd/ftpd.M	2010-03-05 10:55:58.000000000 -0500
@@ -35,7 +35,7 @@
 .SH NAME
 ftpd \- DARPA Internet File Transfer Protocol server
 .SH SYNOPSIS
-.B ftpd
+.B @mansbindir@/ftpd
 [\fB\-A \fP|\fB -a\fP] [\fB\-C\fP] [\fB\-c\fP] [\fB\-d\fP] [\fB-E\fP]
 [\fB\-l\fP] [\fB\-v\fP] [\fB\-T\fP \fImaxtimeout\fP] [\fB\-t\fP \fItimeout\fP]
 [\fB\-p\fP \fIport\fP] [\fB\-U\fP \fIftpusers-file\fP] [\fB\-u\fP \fIumask\fP]
diff -up krb5-appl-1.0/telnet/telnetd/telnetd.8.manpaths krb5-appl-1.0/telnet/telnetd/telnetd.8
--- krb5-appl-1.0/telnet/telnetd/telnetd.8.manpaths	2004-11-15 16:25:41.000000000 -0500
+++ krb5-appl-1.0/telnet/telnetd/telnetd.8	2010-03-05 10:55:58.000000000 -0500
@@ -37,7 +37,7 @@ telnetd \-
 .SM DARPA TELNET
 protocol server
 .SH SYNOPSIS
-.B /usr/libexec/telnetd
+.B @mansbindir@/telnetd
 [\fB\-a\fP \fIauthmode\fP] [\fB\-B\fP] [\fB\-D\fP] [\fIdebugmode\fP]
 [\fB\-e\fP] [\fB\-h\fP] [\fB\-I\fP\fIinitid\fP] [\fB\-l\fP]
 [\fB\-k\fP] [\fB\-n\fP] [\fB\-r\fP\fIlowpty-highpty\fP] [\fB\-s\fP]


--- NEW FILE krb5-appl-1.0-manpaths.txt ---
bsd/klogind.M
bsd/kshd.M
telnet/telnetd/telnetd.8
gssftp/ftpd/ftpd.M

krb5-appl-1.0-pam.patch:
 aclocal.m4              |   79 ++++++++
 bsd/Makefile.in         |   13 -
 bsd/krshd.c             |   64 ++++++-
 bsd/login.c             |   61 ++++++
 bsd/pam.c               |  438 ++++++++++++++++++++++++++++++++++++++++++++++++
 bsd/pam.h               |   65 +++++++
 configure.ac            |    2 
 gssftp/ftpd/Makefile.in |   11 -
 gssftp/ftpd/ftpd.c      |   72 +++++++
 9 files changed, 785 insertions(+), 20 deletions(-)

--- NEW FILE krb5-appl-1.0-pam.patch ---
Modify krshd so that it performs PAM account and session management.  It
must now always fork so that it can always clean up the session.  The
PAM session is opened and credentials initialized after any forwarded
credentials are stored to disk and before access to the user's home
directory is attempted.  The default service name is "kshell" or
"ekshell", depending on whether or not encryption is in use, to avoid a
dependency or conflict on the plain rsh server's configuration file.  At
run-time, krshd's behavior can be reset to the earlier, non-PAM behavior
by setting "use_pam" to false in the [rshd] section of /etc/krb5.conf.

Modify ftpd so that authentication with a plaintext password goes
through PAM, and it performs PAM account and session management.  The
PAM session is opened and credentials initialized after any forwarded
credentials are stored to disk.  The default service name is "gssftp",
mainly to avoid conflicts with other FTP servers' configuration files.
At run-time, krshd's behavior can be reset to the earlier, non-PAM
behavior by setting "use_pam" to false in the [ftpd] section of
/etc/krb5.conf.

Modify login so that instead of directly obtaining v5 credentials
or running aklog, it calls PAM for authentication if strong
authentication hasn't already been performed, so that it performs
account management using PAM (prompting for a password change if need
be), and that it performs session management.  The PAM session is opened
and credentials initialized after any forwarded credentials are stored
to disk.  The default service name is "login", because its configuration
is pretty much always going to be there.  At run-time, login's behavior
can be reset to the earlier, non-PAM behavior by setting "use_pam" to
false in the [login] section of /etc/krb5.conf.

When enabled, ftpd, krshd, and login.krb5 gain dependence on libpam.
Originally filed as RT#5939.

diff -up krb5-appl-1.0/aclocal.m4.pam krb5-appl-1.0/aclocal.m4
--- krb5-appl-1.0/aclocal.m4.pam	2009-11-21 15:29:19.000000000 -0500
+++ krb5-appl-1.0/aclocal.m4	2010-03-05 10:48:50.000000000 -0500
@@ -486,3 +486,82 @@ AC_DEFUN([KRB5_AC_LIBUTIL],
   UTIL_LIB=-lutil])dnl
 AC_SUBST(UTIL_LIB)
 ])dnl
+dnl
+dnl Use PAM instead of local crypt() compare for checking local passwords,
+dnl and perform PAM account, session management, and password-changing where
+dnl appropriate.
+dnl 
+AC_DEFUN(KRB5_WITH_PAM,[
+AC_ARG_WITH(pam,[AC_HELP_STRING(--with-pam,[compile with PAM support])],
+	    withpam="$withval",withpam=auto)
+AC_ARG_WITH(pam-login-service,[AC_HELP_STRING(--with-login-service,[PAM service name for login ["login"]])],
+	    withloginpamservice="$withval",withloginpamservice=login)
+AC_ARG_WITH(pam-kshell-service,[AC_HELP_STRING(--with-kshell-service,[PAM service name for unencrypted rsh ["kshell"]])],
+	    withkshellpamservice="$withval",withkshellpamservice=kshell)
+AC_ARG_WITH(pam-ekshell-service,[AC_HELP_STRING(--with-ekshell-service,[PAM service name for encrypted rsh ["ekshell"]])],
+	    withekshellpamservice="$withval",withekshellpamservice=ekshell)
+AC_ARG_WITH(pam-ftp-service,[AC_HELP_STRING(--with-ftp-service,[PAM service name for ftpd ["gssftp"]])],
+	    withftppamservice="$withval",withftppamservice=gssftp)
+old_LIBS="$LIBS"
+if test "$withpam" != no ; then
+	AC_MSG_RESULT([checking for PAM...])
+	PAM_LIBS=
+
+	AC_CHECK_HEADERS(security/pam_appl.h)
+	if test "x$ac_cv_header_security_pam_appl_h" != xyes ; then
+		if test "$withpam" = auto ; then
+			AC_MSG_RESULT([Unable to locate security/pam_appl.h.])
+			withpam=no
+		else
+			AC_MSG_ERROR([Unable to locate security/pam_appl.h.])
+		fi
+	fi
+
+	LIBS=
+	unset ac_cv_func_pam_start
+	AC_CHECK_FUNCS(putenv pam_start)
+	if test "x$ac_cv_func_pam_start" = xno ; then
+		unset ac_cv_func_pam_start
+		AC_CHECK_LIB(dl,dlopen)
+		AC_CHECK_FUNCS(pam_start)
+		if test "x$ac_cv_func_pam_start" = xno ; then
+			AC_CHECK_LIB(pam,pam_start)
+			unset ac_cv_func_pam_start
+			unset ac_cv_func_pam_getenvlist
+			AC_CHECK_FUNCS(pam_start pam_getenvlist)
+			if test "x$ac_cv_func_pam_start" = xyes ; then
+				PAM_LIBS="$LIBS"
+			else
+				if test "$withpam" = auto ; then
+					AC_MSG_RESULT([Unable to locate libpam.])
+					withpam=no
+				else
+					AC_MSG_ERROR([Unable to locate libpam.])
+				fi
+			fi
+		fi
+	fi
+	if test "$withpam" != no ; then
+		AC_MSG_NOTICE([building with PAM support])
+		AC_DEFINE(USE_PAM,1,[Define if Kerberos-aware tools should support PAM])
+		AC_DEFINE_UNQUOTED(LOGIN_PAM_SERVICE,"$withloginpamservice",
+				   [Define to the name of the PAM service name to be used by login.])
+		AC_DEFINE_UNQUOTED(KSHELL_PAM_SERVICE,"$withkshellpamservice",
+				   [Define to the name of the PAM service name to be used by rshd for unencrypted sessions.])
+		AC_DEFINE_UNQUOTED(EKSHELL_PAM_SERVICE,"$withekshellpamservice",
+				   [Define to the name of the PAM service name to be used by rshd for encrypted sessions.])
+		AC_DEFINE_UNQUOTED(FTP_PAM_SERVICE,"$withftppamservice",
+				   [Define to the name of the PAM service name to be used by ftpd.])
+		PAM_LIBS="$LIBS"
+		NON_PAM_MAN=".\\\" "
+		PAM_MAN=
+	else
+		PAM_MAN=".\\\" "
+		NON_PAM_MAN=
+	fi
+fi
+LIBS="$old_LIBS"
+AC_SUBST(PAM_LIBS)
+AC_SUBST(PAM_MAN)
+AC_SUBST(NON_PAM_MAN)
+])dnl
diff -up krb5-appl-1.0/bsd/krshd.c.pam krb5-appl-1.0/bsd/krshd.c
--- krb5-appl-1.0/bsd/krshd.c.pam	2009-11-16 05:27:04.000000000 -0500
+++ krb5-appl-1.0/bsd/krshd.c	2010-03-05 10:48:50.000000000 -0500
@@ -163,6 +163,10 @@ char copyright[] =
 #include <arpa/nameser.h>
 #endif
 
+#ifdef USE_PAM
+#include "pam.h"
+#endif
+
 #ifndef MAXDNAME
 #define MAXDNAME 256 /*per the rfc*/
 #endif
@@ -183,6 +187,7 @@ void fatal(int, const char *);
 
 int require_encrypt = 0;
 int do_encrypt = 0;
+int force_fork = 0;
 int anyport = 0;
 char *kprogdir = KPROGDIR;
 int netf;
@@ -1032,14 +1037,6 @@ void doit(f, fromp)
     }
 #endif /*CRAY*/
     
-    if (chdir(pwd->pw_dir) < 0) {
-      if(chdir("/") < 0) {
-      	error("No remote directory.\n");
-	goto signout_please;
-      }
-	   pwd->pw_dir = "/";
-    }
-
 #ifdef KERBEROS
     /* krb5_kuserok returns 1 if OK */
     if (!krb5_kuserok(bsd_context, client, locuser)){
@@ -1069,11 +1066,51 @@ void doit(f, fromp)
 	goto signout_please;
     }
     
+#ifdef USE_PAM
+    if (appl_pam_enabled(bsd_context, "rshd")) {
+        if (appl_pam_acct_mgmt(do_encrypt ?
+			       EKSHELL_PAM_SERVICE :
+			       KSHELL_PAM_SERVICE,
+			       0,
+			       locuser,
+			       "",
+			       hostname,
+			       NULL,
+			       do_encrypt ?
+			       EKSHELL_PAM_SERVICE :
+			       KSHELL_PAM_SERVICE) != 0) {
+	    error("Login denied.\n");
+	    goto signout_please;
+        }
+        if (appl_pam_requires_chauthtok()) {
+	    error("Password change required, but not possible over rsh.\n");
+	    goto signout_please;
+        }
+        force_fork = 1;
+        appl_pam_set_forwarded_ccname(getenv("KRB5CCNAME"));
+        if (appl_pam_session_open() != 0) {
+	    error("Login failure.\n");
+	    goto signout_please;
+        }
+        if (appl_pam_cred_init()) {
+	    error("Login failure.\n");
+	    goto signout_please;
+        }
+    } else
+#endif
     if (pwd->pw_uid && !access(NOLOGIN, F_OK)) {
 	error("Logins currently disabled.\n");
 	goto signout_please;
     }
     
+    if (chdir(pwd->pw_dir) < 0) {
+	if (chdir("/") < 0) {
+	    error("No remote directory.\n");
+	    goto signout_please;
+	}
+	pwd->pw_dir = "/";
+    }
+
     /* Log access to account */
     pwd = (struct passwd *) getpwnam(locuser);
     if (pwd && (pwd->pw_uid == 0)) {
@@ -1113,7 +1150,7 @@ void doit(f, fromp)
     
     (void) write(2, "", 1);
     
-    if (port||do_encrypt) {
+    if (port||do_encrypt||force_fork) {
 	if (port&&(pipe(pv) < 0)) {
 	    error("Can't make pipe.\n");
 	    goto signout_please;
@@ -1418,6 +1455,15 @@ void doit(f, fromp)
 
     environ = envinit;
     
+#ifdef USE_PAM
+    if (appl_pam_enabled(bsd_context, "rshd")) {
+        if (appl_pam_setenv() != 0) {
+	    error("Login failure.\n");
+	    goto signout_please;
+        }
+    }
+#endif
+
 #ifdef KERBEROS
     /* To make Kerberos rcp work correctly, we must ensure that we
        invoke Kerberos rcp on this end, not normal rcp, even if the
diff -up krb5-appl-1.0/bsd/login.c.pam krb5-appl-1.0/bsd/login.c
--- krb5-appl-1.0/bsd/login.c.pam	2009-11-21 15:29:19.000000000 -0500
+++ krb5-appl-1.0/bsd/login.c	2010-03-05 10:48:50.000000000 -0500
@@ -148,6 +148,11 @@ typedef sigtype (*handler)();
 #define KRB5_ENV_CCNAME "KRB5CCNAME"
 #endif /* KRB5_GET_TICKETS */
 
+#ifdef USE_PAM
+#include "pam.h"
+int login_use_pam = 1;
+#endif
+
 #ifndef __STDC__
 #ifndef volatile
 #define volatile
@@ -293,6 +298,9 @@ static struct login_confs {
     char *flagname;
     int *flag;
 } login_conf_set[] = {
+#ifdef USE_PAM
+    {USE_PAM_CONFIGURATION_KEYWORD, &login_use_pam},
+#endif
 #ifdef KRB5_GET_TICKETS
     {"krb5_get_tickets", &login_krb5_get_tickets},
     {"krb_run_aklog", &login_krb_run_aklog},
@@ -934,6 +942,21 @@ int main(argc, argv)
 	if (!unix_needs_passwd())
 	    break;
 
+#ifdef USE_PAM
+	if (login_use_pam) {
+	    if (appl_pam_authenticate(LOGIN_PAM_SERVICE, 1, username, "",
+				      hostname,
+				      NULL,
+				      ttyname(STDIN_FILENO)) == PAM_SUCCESS) {
+		break;
+	    } else {
+		/* the goto target label is in a different nesting scope, but
+		 * it's roughly where we want to land */
+		goto bad_login;
+	    }
+	}
+#endif
+
 #ifdef KRB5_GET_TICKETS
 	if (login_krb5_get_tickets) {
 	    /* rename these to something more verbose */
@@ -1021,6 +1044,24 @@ int main(argc, argv)
     /* committed to login -- turn off timeout */
     (void) alarm((u_int) 0);
 
+#ifdef USE_PAM
+    if (login_use_pam) {
+	if (appl_pam_acct_mgmt(LOGIN_PAM_SERVICE, 1, username, "",
+			       hostname, NULL, ttyname(STDIN_FILENO)) != 0) {
+	    printf("Login incorrect\n");
+	    sleepexit(1);
+	}
+	if (appl_pam_requires_chauthtok()) {
+	    if (appl_pam_chauthtok() != 0) {
+		printf("Failed to change password.\n");
+		sleepexit(1);
+	    }
+	}
+    } else {
+	/* the "else" here is the non-PAM behavior which continues until the
+	 * next ifdef USE_PAM block, as of this writing more or less
+	 * duplicating the work of pam_securetty and an OQUOTA check */
+#endif
     /*
      * If valid so far and root is logging in, see if root logins on
      * this terminal are permitted.
@@ -1061,6 +1102,21 @@ int main(argc, argv)
 	sleepexit(0);
     }
 #endif
+#ifdef USE_PAM
+    }
+#endif /* USE_PAM */
+
+#ifdef USE_PAM
+    if (login_use_pam) {
+	appl_pam_set_forwarded_ccname(getenv("KRB5CCNAME"));
+	if (appl_pam_session_open() != 0) {
+	    sleepexit(1);
+	}
+	if (appl_pam_cred_init() != 0) {
+	    sleepexit(1);
+	}
+    }
+#endif /* USE_PAM */
 
     if (chdir(pwd->pw_dir) < 0) {
 	printf("No directory %s!\n", pwd->pw_dir);
@@ -1343,6 +1399,11 @@ int main(argc, argv)
     }
 #endif /* KRB5_GET_TICKETS */
 
+#ifdef USE_PAM
+    if (login_use_pam)
+	appl_pam_setenv();
+#endif
+
     if (tty[sizeof("tty")-1] == 'd')
 	syslog(LOG_INFO, "DIALUP %s, %s", tty, pwd->pw_name);
     if (pwd->pw_uid == 0)
diff -up krb5-appl-1.0/bsd/Makefile.in.pam krb5-appl-1.0/bsd/Makefile.in
--- krb5-appl-1.0/bsd/Makefile.in.pam	2009-11-05 15:10:37.000000000 -0500
+++ krb5-appl-1.0/bsd/Makefile.in	2010-03-05 10:48:50.000000000 -0500
@@ -3,11 +3,14 @@ BUILDTOP=$(REL)..
 
 LOGINLIBS=@LOGINLIBS@
 KRSHDLIBS=@KRSHDLIBS@
+PAMOBJS=pam.o
+PAM_LIBS=@PAM_LIBS@
 
 SRCS= $(srcdir)/krcp.c $(srcdir)/krlogin.c $(srcdir)/krsh.c $(srcdir)/kcmd.c \
 	$(srcdir)/forward.c $(srcdir)/login.c $(srcdir)/krshd.c \
 	$(srcdir)/krlogind.c
-OBJS= krcp.o krlogin.o krsh.o kcmd.o forward.o login.o krshd.o krlogind.o
+OBJS= krcp.o krlogin.o krsh.o kcmd.o forward.o login.o krshd.o krlogind.o \
+	$(PAMOBJS)
 
 UCB_RLOGIN = @UCB_RLOGIN@
 UCB_RSH = @UCB_RSH@
@@ -50,8 +53,8 @@ install::
 	  ) || exit 1; \
 	done
 
-kshd: krshd.o kcmd.o forward.o $(PTY_DEPLIB) $(MISSING_DEPLIB)
-	$(CC_LINK) -o kshd krshd.o kcmd.o forward.o $(KRSHDLIBS) $(PTY_LIB) $(UTIL_LIB) $(MISSING_LIB) $(KRB5_BASE_LIBS) $(LIBS)
+kshd: krshd.o kcmd.o forward.o $(PAMOBJS) $(PTY_DEPLIB) $(MISSING_DEPLIB)
+	$(CC_LINK) -o kshd krshd.o kcmd.o forward.o $(PAMOBJS) $(KRSHDLIBS) $(PTY_LIB) $(UTIL_LIB) $(MISSING_LIB) $(KRB5_BASE_LIBS) $(PAM_LIBS) $(LIBS)
 
 klogind: krlogind.o kcmd.o forward.o $(PTY_DEPLIB) $(MISSING_DEPLIB)
 	$(CC_LINK) -o klogind krlogind.o kcmd.o forward.o $(PTY_LIB) $(UTIL_LIB) $(MISSING_LIB) $(KRB5_BASE_LIBS) $(LIBS)
@@ -68,8 +71,8 @@ install::
 # No program name transformation is done with login.krb5 since it is directly
 # referenced by klogind.
 #
-login.krb5: login.o $(PTY_DEPLIB) $(MISSING_DEPLIB)
-	$(CC_LINK) -o login.krb5 login.o $(LOGINLIBS) $(PTY_LIB) $(KRB5_BASE_LIBS) $(MISSING_LIB) $(LIBS)
+login.krb5: login.o $(PAMOBJS) $(PTY_DEPLIB) $(MISSING_DEPLIB)
+	$(CC_LINK) -o login.krb5 login.o $(PAMOBJS) $(LOGINLIBS) $(PTY_LIB) $(KRB5_BASE_LIBS) $(MISSING_LIB) $(PAM_LIBS) $(LIBS)
 
 install::
 	$(INSTALL_PROGRAM) login.krb5 $(DESTDIR)$(SERVER_BINDIR)/login.krb5
diff -up krb5-appl-1.0/bsd/pam.c.pam krb5-appl-1.0/bsd/pam.c
--- krb5-appl-1.0/bsd/pam.c.pam	2010-03-05 10:48:50.000000000 -0500
+++ krb5-appl-1.0/bsd/pam.c	2010-03-05 10:48:50.000000000 -0500
@@ -0,0 +1,438 @@
+/*
+ * src/appl/bsd/pam.c
+ *
+ * Copyright 2007,2009,2010 Red Hat, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice, this
+ *  list of conditions and the following disclaimer.
+ *
+ *  Redistributions in binary form must reproduce the above copyright notice,
+ *  this list of conditions and the following disclaimer in the documentation
+ *  and/or other materials provided with the distribution.
+ *
+ *  Neither the name of Red Hat, Inc. nor the names of its contributors may be
+ *  used to endorse or promote products derived from this software without
+ *  specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ * 
+ * Convenience wrappers for using PAM.
+ */
+
+#include "autoconf.h"
+#ifdef USE_PAM
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <profile.h>
+#include "pam.h"
+
+#ifndef MAXPWSIZE
+#define MAXPWSIZE 128
+#endif
+
+#ifndef KRB5_ENV_CCNAME
+#define KRB5_ENV_CCNAME "KRB5CCNAME"
+#endif
+
+static int appl_pam_started;
+static pid_t appl_pam_starter = -1;
+static int appl_pam_session_opened;
+static int appl_pam_creds_initialized;
+static int appl_pam_pwchange_required;
+static pam_handle_t *appl_pamh;
+static struct pam_conv appl_pam_conv;
+static char *appl_pam_user;
+struct appl_pam_non_interactive_args {
+	const char *user;
+	const char *password;
+};
+
+int
+appl_pam_enabled(krb5_context context, const char *section)
+{
+	int enabled = 1;
+	profile_t profile = NULL;
+	if ((context != NULL) && (krb5_get_profile(context, &profile) == 0)) {
+		if (profile_get_boolean(profile,
+					section,
+					USE_PAM_CONFIGURATION_KEYWORD,
+					NULL,
+					enabled, &enabled) != 0) {
+			enabled = 1;
+		}
+	}
+	return enabled;
+}
+
+void
+appl_pam_cleanup(void)
+{
+	if (getpid() != appl_pam_starter) {
+		return;
+	}
+#ifdef DEBUG
+	printf("Called to clean up PAM.\n");
+#endif
+	if (appl_pam_creds_initialized) {
+#ifdef DEBUG
+		printf("Deleting PAM credentials.\n");
+#endif
+		pam_setcred(appl_pamh, PAM_DELETE_CRED);
+		appl_pam_creds_initialized = 0;
+	}
+	if (appl_pam_session_opened) {
+#ifdef DEBUG
+		printf("Closing PAM session.\n");
+#endif
+		pam_close_session(appl_pamh, 0);
+		appl_pam_session_opened = 0;
+	}
+	appl_pam_pwchange_required = 0;
+	if (appl_pam_started) {
+#ifdef DEBUG
+		printf("Shutting down PAM.\n");
+#endif
+		pam_end(appl_pamh, 0);
+		appl_pam_started = 0;
+		appl_pam_starter = -1;
+		free(appl_pam_user);
+		appl_pam_user = NULL;
+	}
+}
+static int
+appl_pam_interactive_converse(int num_msg, const struct pam_message **msg,
+			      struct pam_response **presp, void *appdata_ptr)
+{
+	const struct pam_message *message;
+	struct pam_response *resp;
+	int i, code;
+	char *pwstring, pwbuf[MAXPWSIZE];
+	unsigned int pwsize;
+	resp = malloc(sizeof(struct pam_response) * num_msg);
+	if (resp == NULL) {
+		return PAM_BUF_ERR;
+	}
+	memset(resp, 0, sizeof(struct pam_response) * num_msg);
+	code = PAM_SUCCESS;
+	for (i = 0; i < num_msg; i++) {
+		message = &(msg[0][i]); /* XXX */
+		message = msg[i]; /* XXX */
+		pwstring = NULL;
+		switch (message->msg_style) {
+		case PAM_TEXT_INFO:
+		case PAM_ERROR_MSG:
+			printf("[%s]\n", message->msg ? message->msg : "");
+			fflush(stdout);
+			resp[i].resp = NULL;
+			resp[i].resp_retcode = PAM_SUCCESS;
+			break;
+		case PAM_PROMPT_ECHO_ON:
+		case PAM_PROMPT_ECHO_OFF:
+			if (message->msg_style == PAM_PROMPT_ECHO_ON) {
+				if (fgets(pwbuf, sizeof(pwbuf),
+					  stdin) != NULL) {
+					pwbuf[strcspn(pwbuf, "\r\n")] = '\0';
+					pwstring = pwbuf;
+				}
+			} else {
+				pwstring = getpass(message->msg ?
+						   message->msg :
+						   "");
+			}
+			if ((pwstring != NULL) && (pwstring[0] != '\0')) {
+				pwsize = strlen(pwstring);
+				resp[i].resp = malloc(pwsize + 1);
+				if (resp[i].resp == NULL) {
+					resp[i].resp_retcode = PAM_BUF_ERR;
+				} else {
+					memcpy(resp[i].resp, pwstring, pwsize);
+					resp[i].resp[pwsize] = '\0';
+					resp[i].resp_retcode = PAM_SUCCESS;
+				}
+			} else {
+				resp[i].resp_retcode = PAM_CONV_ERR;
+				code = PAM_CONV_ERR;
+			}
+			break;
+		default:
+			break;
+		}
+	}
+	*presp = resp;
+	return code;
+}
+static int
+appl_pam_non_interactive_converse(int num_msg,
+				  const struct pam_message **msg,
+				  struct pam_response **presp,
+				  void *appdata_ptr)
+{
+	const struct pam_message *message;
+	struct pam_response *resp;
+	int i, code;
+	unsigned int pwsize;
+	struct appl_pam_non_interactive_args *args;
+	const char *pwstring;
+	resp = malloc(sizeof(struct pam_response) * num_msg);
+	if (resp == NULL) {
+		return PAM_BUF_ERR;
+	}
+	args = appdata_ptr;
+	memset(resp, 0, sizeof(struct pam_response) * num_msg);
+	code = PAM_SUCCESS;
+	for (i = 0; i < num_msg; i++) {
+		message = &((*msg)[i]);
+		message = msg[i];
+		pwstring = NULL;
+		switch (message->msg_style) {
+		case PAM_TEXT_INFO:
+		case PAM_ERROR_MSG:
+			break;
+		case PAM_PROMPT_ECHO_ON:
+		case PAM_PROMPT_ECHO_OFF:
+			if (message->msg_style == PAM_PROMPT_ECHO_ON) {
+				/* assume "user" */
+				pwstring = args->user;
+			} else {
+				/* assume "password" */
+				pwstring = args->password;
+			}
+			if ((pwstring != NULL) && (pwstring[0] != '\0')) {
+				pwsize = strlen(pwstring);
+				resp[i].resp = malloc(pwsize + 1);
+				if (resp[i].resp == NULL) {
+					resp[i].resp_retcode = PAM_BUF_ERR;
+				} else {
+					memcpy(resp[i].resp, pwstring, pwsize);
+					resp[i].resp[pwsize] = '\0';
+					resp[i].resp_retcode = PAM_SUCCESS;
+				}
+			} else {
+				resp[i].resp_retcode = PAM_CONV_ERR;
+				code = PAM_CONV_ERR;
+			}
+			break;
+		default:
+			break;
+		}
+	}
+	*presp = resp;
+	return code;
+}
+void
+appl_pam_set_forwarded_ccname(const char *ccname)
+{
+	char *ccname2;
+	if (appl_pam_started && (ccname != NULL) && (strlen(ccname) > 0)) {
+		ccname2 = malloc(strlen(KRB5_ENV_CCNAME) + strlen(ccname) + 2);
+		if (ccname2 != NULL) {
+#ifdef DEBUG
+			printf("Setting %s to \"%s\" in PAM environment.\n",
+			       KRB5_ENV_CCNAME, ccname);
+#endif
+			sprintf(ccname2, "%s=%s", KRB5_ENV_CCNAME, ccname);
+			pam_putenv(appl_pamh, ccname2);
+		}
+	}
+}
+static int
+appl_pam_start(const char *service, int interactive,
+	       const char *login_username,
+	       const char *non_interactive_password,
+	       const char *hostname,
+	       const char *ruser,
+	       const char *tty)
+{
+	static int exit_handler_registered;
+	static struct appl_pam_non_interactive_args args;
+	int ret = 0;
+	if (appl_pam_started &&
+	    (strcmp(login_username, appl_pam_user) != 0)) {
+		appl_pam_cleanup();
+		appl_pam_user = NULL;
+	}
+	if (!appl_pam_started) {
+#ifdef DEBUG
+		printf("Starting PAM up (service=\"%s\",user=\"%s\").\n",
+		       service, login_username);
+#endif
+		memset(&appl_pam_conv, 0, sizeof(appl_pam_conv));
+		appl_pam_conv.conv = interactive ?
+				     &appl_pam_interactive_converse :
+				     &appl_pam_non_interactive_converse;
+		memset(&args, 0, sizeof(args));
+		args.user = strdup(login_username);
+		args.password = non_interactive_password ?
+				strdup(non_interactive_password) :
+				NULL;
+		appl_pam_conv.appdata_ptr = &args;
+		ret = pam_start(service, login_username,
+				&appl_pam_conv, &appl_pamh);
+		if (ret == 0) {
+			if (hostname != NULL) {
+#ifdef DEBUG
+				printf("Setting PAM_RHOST to \"%s\".\n", hostname);
+#endif
+				pam_set_item(appl_pamh, PAM_RHOST, hostname);
+			}
+			if (ruser != NULL) {
+#ifdef DEBUG
+				printf("Setting PAM_RUSER to \"%s\".\n", ruser);
+#endif
+				pam_set_item(appl_pamh, PAM_RUSER, ruser);
+			}
+			if (tty != NULL) {
+#ifdef DEBUG
+				printf("Setting PAM_TTY to \"%s\".\n", tty);
+#endif
+				pam_set_item(appl_pamh, PAM_TTY, tty);
+			}
+			if (!exit_handler_registered &&
+			    (atexit(appl_pam_cleanup) != 0)) {
+				pam_end(appl_pamh, 0);
+				appl_pamh = NULL;
+				ret = -1;
+			} else {
+				appl_pam_started = 1;
+				appl_pam_starter = getpid();
+				appl_pam_user = strdup(login_username);
+				exit_handler_registered = 1;
+			}
+		}
+	}
+	return ret;
+}
+int
+appl_pam_authenticate(const char *service, int interactive,
+		      const char *login_username,
+		      const char *non_interactive_password,
+		      const char *hostname,
+		      const char *ruser,
+		      const char *tty)
+{
+	int ret;
+	ret = appl_pam_start(service, interactive, login_username,
+			     non_interactive_password, hostname, ruser, tty);
+	if (ret == 0) {
+		ret = pam_authenticate(appl_pamh, 0);
+	}
+	return ret;
+}
+int
+appl_pam_acct_mgmt(const char *service, int interactive,
+		   const char *login_username,
+		   const char *non_interactive_password,
+		   const char *hostname,
+		   const char *ruser,
+		   const char *tty)
+{
+	int ret;
+	appl_pam_pwchange_required = 0;
+	ret = appl_pam_start(service, interactive, login_username,
+			     non_interactive_password, hostname, ruser, tty);
+	if (ret == 0) {
+#ifdef DEBUG
+		printf("Calling pam_acct_mgmt().\n");
+#endif
+		ret = pam_acct_mgmt(appl_pamh, 0);
+		switch (ret) {
+		case PAM_IGNORE:
+			ret = 0;
+			break;
+		case PAM_NEW_AUTHTOK_REQD:
+			appl_pam_pwchange_required = 1;
+			ret = 0;
+			break;
+		default:
+			break;
+		}
+	}
+	return ret;
+}
+int
+appl_pam_requires_chauthtok(void)
+{
+	return appl_pam_pwchange_required;
+}
+int
+appl_pam_chauthtok(void)
+{
+	int ret = 0;
+	if (appl_pam_started) {
+#ifdef DEBUG
+		printf("Changing PAM expired authentication token.\n");
+#endif
+		ret = pam_chauthtok(appl_pamh, PAM_CHANGE_EXPIRED_AUTHTOK);
+	}
+	return ret;
+}
+int
+appl_pam_session_open(void)
+{
+	int ret = 0;
+	if (appl_pam_started) {
+#ifdef DEBUG
+		printf("Opening PAM session.\n");
+#endif
+		ret = pam_open_session(appl_pamh, 0);
+		if (ret == 0) {
+			appl_pam_session_opened = 1;
+		}
+	}
+	return ret;
+}
+int
+appl_pam_setenv(void)
+{
+	int ret = 0;
+#ifdef HAVE_PAM_GETENVLIST
+#ifdef HAVE_PUTENV
+	int i;
+	char **list;
+	if (appl_pam_started) {
+		list = pam_getenvlist(appl_pamh);
+		for (i = 0; ((list != NULL) && (list[i] != NULL)); i++) {
+#ifdef DEBUG
+			printf("Setting \"%s\" in environment.\n", list[i]);
+#endif
+			putenv(list[i]);
+		}
+	}
+#endif
+#endif
+	return ret;
+}
+int
+appl_pam_cred_init(void)
+{
+	int ret = 0;
+	if (appl_pam_started) {
+#ifdef DEBUG
+		printf("Initializing PAM credentials.\n");
+#endif
+		ret = pam_setcred(appl_pamh, PAM_ESTABLISH_CRED);
+		if (ret == 0) {
+			appl_pam_creds_initialized = 1;
+		}
+	}
+	return ret;
+}
+#endif
diff -up krb5-appl-1.0/bsd/pam.h.pam krb5-appl-1.0/bsd/pam.h
--- krb5-appl-1.0/bsd/pam.h.pam	2010-03-05 10:48:50.000000000 -0500
+++ krb5-appl-1.0/bsd/pam.h	2010-03-05 10:48:50.000000000 -0500
@@ -0,0 +1,65 @@
+/*
+ * src/appl/bsd/pam.h
+ *
+ * Copyright 2007,2009 Red Hat, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice, this
+ *  list of conditions and the following disclaimer.
+ *
+ *  Redistributions in binary form must reproduce the above copyright notice,
+ *  this list of conditions and the following disclaimer in the documentation
+ *  and/or other materials provided with the distribution.
+ *
+ *  Neither the name of Red Hat, Inc. nor the names of its contributors may be
+ *  used to endorse or promote products derived from this software without
+ *  specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ * 
+ * Convenience wrappers for using PAM.
+ */
+
+#include <krb5.h>
+#ifdef HAVE_SECURITY_PAM_APPL_H
+#include <security/pam_appl.h>
+#endif
+
+#define USE_PAM_CONFIGURATION_KEYWORD "use_pam"
+
+#ifdef USE_PAM
+int appl_pam_enabled(krb5_context context, const char *section);
+int appl_pam_authenticate(const char *service, int interactive,
+			  const char *local_username,
+			  const char *non_interactive_password,
+			  const char *hostname,
+			  const char *ruser,
+			  const char *tty);
+int appl_pam_acct_mgmt(const char *service, int interactive,
+		       const char *local_username,
+		       const char *non_interactive_password,
+		       const char *hostname,
+		       const char *ruser,
+		       const char *tty);
+int appl_pam_requires_chauthtok(void);
+int appl_pam_chauthtok(void);
+void appl_pam_set_forwarded_ccname(const char *ccname);
+int appl_pam_session_open(void);
+int appl_pam_setenv(void);
+int appl_pam_cred_init(void);
+void appl_pam_cleanup(void);
+#endif
diff -up krb5-appl-1.0/configure.ac.pam krb5-appl-1.0/configure.ac
--- krb5-appl-1.0/configure.ac.pam	2009-11-21 16:46:39.000000000 -0500
+++ krb5-appl-1.0/configure.ac	2010-03-05 10:48:50.000000000 -0500
@@ -156,6 +156,8 @@ AC_CHECK_FUNC(tgetent, ,
               [AC_MSG_ERROR([Could not find tgetent; are you missing a curses/ncurses library?])])
 LIBS="$old_LIBS"
 
+KRB5_WITH_PAM
+
 # Make our operating system-specific security checks and definitions
 # for libpty, login, and ftpd.  The following code decides what
 # streams modules will be pushed onto a pty.  In particular, if
diff -up krb5-appl-1.0/gssftp/ftpd/ftpd.c.pam krb5-appl-1.0/gssftp/ftpd/ftpd.c
--- krb5-appl-1.0/gssftp/ftpd/ftpd.c.pam	2009-11-18 00:07:46.000000000 -0500
+++ krb5-appl-1.0/gssftp/ftpd/ftpd.c	2010-03-05 10:48:50.000000000 -0500
@@ -69,6 +69,9 @@ static char sccsid[] = "@(#)ftpd.c	5.40 
 #ifdef HAVE_SHADOW
 #include <shadow.h>
 #endif
+#ifdef USE_PAM
+#include "../../bsd/pam.h"
+#endif
 #include <grp.h> 
 #include <setjmp.h>
 #ifndef POSIX_SETJMP
@@ -743,6 +746,22 @@ user(name)
 				name);
 		}
 #endif /* GSSAPI */
+#ifdef USE_PAM
+		if (appl_pam_enabled(kcontext, "ftpd")) {
+			if (appl_pam_acct_mgmt(FTP_PAM_SERVICE, 0,
+					       name, "",
+					       hostname,
+					       NULL,
+					       FTP_PAM_SERVICE) != 0) {
+					       reply(530, "Login incorrect.");
+				return;
+			}
+			if (appl_pam_requires_chauthtok()) {
+				reply(530, "Password change required.");
+				return;
+			}
+		}
+#endif
 
 		if (!authorized && authlevel == AUTHLEVEL_AUTHORIZE) {
 			strncat(buf, "; Access denied.",
@@ -843,6 +862,10 @@ end_login()
 	(void) krb5_seteuid((uid_t)0);
 	if (logged_in)
 		pty_logwtmp(ttyline, "", "");
+#ifdef USE_PAM
+	if (appl_pam_enabled(kcontext, "ftpd"))
+		appl_pam_cleanup();
+#endif
 	if (have_creds) {
 #ifdef GSSAPI
 		krb5_cc_destroy(kcontext, ccache);
@@ -951,9 +974,19 @@ pass(passwd)
 		 *   kpass fails and the user has no local password
 		 *   kpass fails and the provided password doesn't match pw
 		 */
-		if (pw == NULL || (!kpass(pw->pw_name, passwd) &&
-				   (want_creds || !*pw->pw_passwd ||
-				    strcmp(xpasswd, pw->pw_passwd)))) {
+		if ((pw == NULL) || (
+#ifdef USE_PAM
+		    appl_pam_enabled(kcontext, "ftpd") ?
+		    (appl_pam_authenticate(FTP_PAM_SERVICE, 0,
+					   pw->pw_name, passwd,
+					   hostname,
+					   NULL,
+					   FTP_PAM_SERVICE) != 0) :
+#endif
+		    (!kpass(pw->pw_name, passwd) &&
+		     (want_creds ||
+		      !*pw->pw_passwd ||
+		      strcmp(xpasswd, pw->pw_passwd))))) {
 			pw = NULL;
 			sleep(5);
 			if (++login_attempts >= 3) {
@@ -970,6 +1003,23 @@ pass(passwd)
 	}
 	login_attempts = 0;		/* this time successful */
 
+#ifdef USE_PAM
+	if (appl_pam_enabled(kcontext, "ftpd")) {
+		if (appl_pam_acct_mgmt(FTP_PAM_SERVICE, 0,
+				       pw->pw_name, passwd,
+				       hostname,
+				       NULL,
+				       FTP_PAM_SERVICE) != 0) {
+			reply(530, "Login incorrect.");
+			return;
+		}
+		if (appl_pam_requires_chauthtok()) {
+			reply(530, "Password change required.");
+			return;
+		}
+	}
+#endif
+
 	login(passwd, 0);
 	return;
 }
@@ -985,6 +1035,18 @@ login(passwd, logincode)
 		chown(ccname, pw->pw_uid, pw->pw_gid);
 #endif
 	}
+#ifdef USE_PAM
+	if (appl_pam_enabled(kcontext, "ftpd")) {
+		if (appl_pam_session_open() != 0) {
+			reply(550, "Can't open PAM session.");
+			goto bad;
+		}
+		if (appl_pam_cred_init() != 0) {
+			reply(550, "Can't establish PAM credentials.");
+			goto bad;
+		}
+	}
+#endif
 
 	(void) krb5_setegid((gid_t)pw->pw_gid);
 	(void) initgroups(pw->pw_name, pw->pw_gid);
@@ -1966,6 +2028,10 @@ dologout(status)
 		krb5_cc_destroy(kcontext, ccache);
 #endif
 	}
+#ifdef USE_PAM
+	if (appl_pam_enabled(kcontext, "ftpd"))
+		appl_pam_cleanup();
+#endif
 	/* beware of flushing buffers after a SIGPIPE */
 	_exit(status);
 }
diff -up krb5-appl-1.0/gssftp/ftpd/Makefile.in.pam krb5-appl-1.0/gssftp/ftpd/Makefile.in
--- krb5-appl-1.0/gssftp/ftpd/Makefile.in.pam	2009-07-20 13:21:24.000000000 -0400
+++ krb5-appl-1.0/gssftp/ftpd/Makefile.in	2010-03-05 10:48:50.000000000 -0500
@@ -6,22 +6,24 @@ PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
 
 FTPD_LIBS=@FTPD_LIBS@
+PAM_LIBS=@PAM_LIBS@
 
 SRCS	= $(srcdir)/ftpd.c ftpcmd.c $(srcdir)/popen.c \
 	  $(srcdir)/vers.c \
 	  $(srcdir)/../ftp/glob.c \
 	  $(srcdir)/../ftp/radix.c \
-	  $(srcdir)/../ftp/secure.c
+	  $(srcdir)/../ftp/secure.c \
+	  $(srcdir)/../../bsd/pam.c
 
 OBJS	= ftpd.o ftpcmd.o glob.o popen.o vers.o radix.o \
-	  secure.o
+	  secure.o pam.o
 
 LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)
 
 all::	ftpd
 
 ftpd:	$(OBJS) $(PTY_DEPLIB) $(MISSING_DEPLIB)
-	$(CC_LINK) -o $@ $(OBJS) $(FTPD_LIBS) $(PTY_LIB) $(UTIL_LIB) $(MISSING_LIB) $(GSS_LIBS) $(LIBS)
+	$(CC_LINK) -o $@ $(OBJS) $(FTPD_LIBS) $(PTY_LIB) $(UTIL_LIB) $(MISSING_LIB) $(GSS_LIBS) $(PAM_LIBS) $(LIBS)
 
 generate-files-mac: ftpcmd.c
 
@@ -61,4 +63,7 @@ ftpcmd.o: ftpcmd.c
 popen.o: $(srcdir)/popen.c
 vers.o: $(srcdir)/vers.c
 
+pam.o: $(srcdir)/../../bsd/pam.c
+	$(CC) -c $(ALL_CFLAGS) $(srcdir)/../../bsd/pam.c
+
 # NOPOSTFIX

krb5-appl-1.0-rlogind-environ.patch:
 krlogind.c |   21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

--- NEW FILE krb5-appl-1.0-rlogind-environ.patch ---
Start with only TERM defined in the environment, like NetKit rlogind does, and
KRB5CCNAME, which we set ourselves.

diff -up krb5-appl-1.0/bsd/krlogind.c.rlogind-environ krb5-appl-1.0/bsd/krlogind.c
--- krb5-appl-1.0/bsd/krlogind.c.rlogind-environ	2009-11-21 15:29:19.000000000 -0500
+++ krb5-appl-1.0/bsd/krlogind.c	2010-03-05 11:07:34.000000000 -0500
@@ -667,6 +667,9 @@ void doit(f, fromp)
 #else
 	struct sgttyb b;
 #endif /* POSIX_TERMIOS */
+	char environ_term[sizeof(term) + 6], environ_ccname[sizeof(environ_term)];
+	char *bare_environ[] = {environ_term, environ_ccname, NULL};
+
 	if ((retval = pty_open_slave(line, &t))) {
 	    fatal(f, pty_error_message(retval));
 	    exit(1);
@@ -773,11 +776,15 @@ void doit(f, fromp)
 /* use the vendors login, which has -p and -f. Tested on 
  * AIX 4.1.4 and HPUX 10 
  */
+    memset(environ_term, '\0', sizeof(environ_term));
+    memset(environ_ccname, '\0', sizeof(environ_ccname));
+    if (getenv("KRB5CCNAME") != NULL)
+      snprintf(environ_ccname, sizeof(environ_ccname) - 1, "KRB5CCNAME=%s", getenv("KRB5CCNAME"));
     {
         char *cp;
-        if ((cp = strchr(term,'/')))
+        snprintf(environ_term, sizeof(environ_term) - 1, "TERM=%s", term);
+        if ((cp = strchr(environ_term,'/')))
             *cp = '\0';
-        setenv("TERM",term, 1);
     }
 
     retval = pty_make_sane_hostname((struct sockaddr *) fromp, maxhostlen,
@@ -786,13 +793,13 @@ void doit(f, fromp)
     if (retval)
         fatalperror(f, "failed make_sane_hostname");
     if (passwd_req)
-        execl(login_program, "login", "-p", "-h", rhost_sane,
-          lusername, (char *)NULL);
+        execle(login_program, "login", "-p", "-h", rhost_sane,
+          lusername, NULL, bare_environ);
     else
-        execl(login_program, "login", "-p", "-h", rhost_sane,
-             "-f", lusername, (char *)NULL);
+        execle(login_program, "login", "-p", "-h", rhost_sane,
+             "-f", lusername, NULL, bare_environ);
 #else /* USE_LOGIN_F */
-	execl(login_program, "login", "-r", rhost_sane, (char *)NULL);
+	execle(login_program, "login", "-r", rhost_sane, NULL, bare_environ);
 #endif /* USE_LOGIN_F */
 	syslog(LOG_ERR, "failed exec of %s: %s",
 	       login_program, error_message(errno));


--- NEW FILE krb5-appl-1.0.tar.gz.asc ---
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBLjacFz+KPxyU6q4cRAm2hAKDNBH2x/uyIj1+PkoXNPHnMqC++fwCffFBn
cwkQOeK2fzqp3t2Np7tQDfI=
=s+Qg
-----END PGP SIGNATURE-----


--- NEW FILE krb5-appl.spec ---
# We need the regular rsh to use as a fallback, so we can't put our rsh there.
%global krb5prefix %{_prefix}/kerberos

# For consistency with regular login.
%global login_pam_service remote

# To handle upgrades from versions where we were bundled with krb5.
%global krb5_last_bundled 1.8-3
%global krb5_first_unbundled 1.8-4

Summary: Kerberos-aware versions of telnet, ftp, rsh, and rlogin
Name: krb5-appl
Version: 1.0
Release: 1%{?dist}
# Maybe we should explode from the now-available-to-everybody tarball instead?
# http://web.mit.edu/kerberos/dist/krb5-appl/1.0/krb5-appl-1.0-signed.tar
Source0: krb5-appl-%{version}.tar.gz
Source1: krb5-appl-%{version}.tar.gz.asc
Source7: krb5.sh
Source8: krb5.csh
Source12: krsh
Source13: krlogin
Source14: eklogin.xinetd
Source15: klogin.xinetd
Source16: kshell.xinetd
Source17: krb5-telnet.xinetd
Source18: gssftp.xinetd
Source22: ekrb5-telnet.xinetd
Source125: krb5-appl-1.0-manpaths.txt
Source26: gssftp.pamd
Source27: kshell.pamd
Source28: ekshell.pamd

Patch3: krb5-1.3-netkit-rsh.patch
Patch4: krb5-appl-1.0-rlogind-environ.patch
Patch11: krb5-1.2.1-passive.patch
Patch14: krb5-1.3-ftp-glob.patch
Patch33: krb5-appl-1.0-io.patch
Patch36: krb5-1.7-rcp-markus.patch
Patch40: krb5-1.4.1-telnet-environ.patch
Patch57: krb5-appl-1.0-login_chdir.patch
Patch160: krb5-appl-1.0-pam.patch
Patch161: krb5-appl-1.0-manpaths.patch
Patch72: krb5-1.6.3-ftp_fdleak.patch
Patch73: krb5-1.6.3-ftp_glob_runique.patch
Patch79: krb5-trunk-ftp_mget_case.patch
Patch88: krb5-1.7-sizeof.patch
Patch89: krb5-appl-1.0-largefile.patch

License: MIT
URL: http://web.mit.edu/kerberos/www/
Group: Applications/Internet
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf, bison, flex, gawk
BuildRequires: gzip, ncurses-devel, rsh, texinfo, texinfo-tex, tar
BuildRequires: krb5-devel, pam-devel

%description
This package contains Kerberos-aware versions of the telnet, ftp, rcp, rsh,
and rlogin clients and servers.  While these have been replaced by tools
such as OpenSSH in most environments, they remain in use in others.

%package servers
Group: System Environment/Daemons
Summary: Kerberos-aware telnet, ftp, rcp, rsh and rlogin servers
Requires: xinetd
Requires(post): /sbin/service, xinetd
Obsoletes: krb5-workstation-servers < %{krb5_last_bundled}
Provides: krb5-workstation-servers = %{krb5_first_unbundled}

%description servers
This package contains Kerberos-aware versions of the telnet, ftp, rcp, rsh,
and rlogin servers.  While these have been replaced by tools such as OpenSSH
in most environments, they remain in use in others.

%package clients
Summary: Kerberos-aware telnet, ftp, rcp, rsh and rlogin clients
Group: System Environment/Base
Obsoletes: krb5-workstation-clients < %{krb5_last_bundled}
Provides: krb5-workstation-clients = %{krb5_first_unbundled}

%description clients
This package contains Kerberos-aware versions of the telnet, ftp, rcp, rsh,
and rlogin clients.  While these have been replaced by tools such as OpenSSH
in most environments, they remain in use in others.

%prep
%setup -q
ln -s NOTICE LICENSE

%patch160 -p1 -b .pam
%patch161 -p1 -b .manpaths
%patch3  -p3 -b .netkit-rsh
%patch4  -p1 -b .rlogind-environ
%patch11 -p3 -b .passive
%patch14 -p3 -b .ftp-glob
%patch33 -p1 -b .io
%patch36 -p3 -b .rcp-markus
%patch40 -p3 -b .telnet-environ
%patch57 -p1 -b .login_chdir
%patch72 -p3 -b .ftp_fdleak
%patch73 -p3 -b .ftp_glob_runique
%patch79 -p2 -b .ftp_mget_case
%patch88 -p3 -b .sizeof
%patch89 -p1 -b .largefile

# Rename the man pages so that they'll get generated correctly.  Uses the
# "krb5-appl-1.0-manpaths.txt" source file.
cat %{SOURCE125} | while read manpage ; do
	mv "$manpage" "$manpage".in
done

# Rebuild the configure scripts.
autoheader
autoconf

%build
# Build everything position-independent.
INCLUDES=-I%{_includedir}/et
CFLAGS="`echo $RPM_OPT_FLAGS $DEFINES $INCLUDES -fPIE -fno-strict-aliasing`"
LDFLAGS="-pie"
%configure \
	CFLAGS="$CFLAGS" \
	LDFLAGS="$LDFLAGS" \
	--bindir=%{krb5prefix}/bin \
	--mandir=%{krb5prefix}/man \
	--sbindir=%{krb5prefix}/sbin \
	--datadir=%{krb5prefix}/share \
	--with-pam \
	--with-pam-login-service=%{login_pam_service}
make %{?_smp_mflags}

%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

# Shell scripts wrappers for Kerberized rsh and rlogin (source files).
mkdir -p $RPM_BUILD_ROOT%{krb5prefix}/{bin,man/man{1,5,8},sbin,share}
install -m 755 %{SOURCE12} $RPM_BUILD_ROOT/%{krb5prefix}/bin/
install -m 755 %{SOURCE13} $RPM_BUILD_ROOT/%{krb5prefix}/bin/

# Login-time scriptlets (krb5.sh, krb5.csh) to fix the PATH variable.
mkdir -p $RPM_BUILD_ROOT/etc/profile.d
for subpackage in clients servers ; do
	install -pm 644 %{SOURCE7} \
	$RPM_BUILD_ROOT/etc/profile.d/krb5-appl-$subpackage.sh
	install -pm 644 %{SOURCE8} \
	$RPM_BUILD_ROOT/etc/profile.d/krb5-appl-$subpackage.csh
done

# Xinetd configuration files.
mkdir -p $RPM_BUILD_ROOT/etc/xinetd.d/
for xinetd in \
	%{SOURCE14} \
	%{SOURCE15} \
	%{SOURCE16} \
	%{SOURCE17} \
	%{SOURCE18} \
	%{SOURCE22} ; do
	install -pm 644 ${xinetd} \
	$RPM_BUILD_ROOT/etc/xinetd.d/`basename ${xinetd} .xinetd`
done

# PAM configuration files.
mkdir -p $RPM_BUILD_ROOT/etc/pam.d/
for pam in \
	%{SOURCE26} \
	%{SOURCE27} \
	%{SOURCE28} ; do
	install -pm 644 ${pam} \
	$RPM_BUILD_ROOT/etc/pam.d/`basename ${pam} .pamd`
done

make DESTDIR=$RPM_BUILD_ROOT install

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

%post servers
/sbin/service xinetd reload > /dev/null 2>&1 || :
exit 0

%postun servers
/sbin/service xinetd reload > /dev/null 2>&1 || :
exit 0

%files clients
%defattr(-,root,root,-)
%doc README NOTICE LICENSE
%docdir %{krb5prefix}/man

%config(noreplace) /etc/profile.d/krb5-appl-clients.sh
%config(noreplace) /etc/profile.d/krb5-appl-clients.csh

%dir %{krb5prefix}
%dir %{krb5prefix}/bin
%dir %{krb5prefix}/man
%dir %{krb5prefix}/man/man1

# Used by both clients and servers.
%{krb5prefix}/bin/rcp
%{krb5prefix}/man/man1/rcp.1*

# Client network bits.
%{krb5prefix}/bin/ftp
%{krb5prefix}/man/man1/ftp.1*
%{krb5prefix}/bin/krlogin
%{krb5prefix}/bin/rlogin
%{krb5prefix}/man/man1/rlogin.1*
%{krb5prefix}/bin/krsh
%{krb5prefix}/bin/rsh
%{krb5prefix}/man/man1/rsh.1*
%{krb5prefix}/bin/telnet
%{krb5prefix}/man/man1/telnet.1*
%{krb5prefix}/man/man1/tmac.doc*

%files servers
%defattr(-,root,root,-)
%doc README NOTICE LICENSE
%docdir %{krb5prefix}/man

%config(noreplace) /etc/profile.d/krb5-appl-servers.sh
%config(noreplace) /etc/profile.d/krb5-appl-servers.csh

%dir %{krb5prefix}
%dir %{krb5prefix}/bin
%dir %{krb5prefix}/man
%dir %{krb5prefix}/man/man1
%dir %{krb5prefix}/man/man8
%dir %{krb5prefix}/sbin

# Used by both clients and servers.
%{krb5prefix}/bin/rcp
%{krb5prefix}/man/man1/rcp.1*

%config(noreplace) /etc/xinetd.d/*
%config(noreplace) /etc/pam.d/kshell
%config(noreplace) /etc/pam.d/ekshell
%config(noreplace) /etc/pam.d/gssftp

# Login is used by telnetd and klogind.
%{krb5prefix}/sbin/login.krb5
%{krb5prefix}/man/man8/login.krb5.8*

# Application servers.
%{krb5prefix}/sbin/ftpd
%{krb5prefix}/man/man8/ftpd.8*
%{krb5prefix}/sbin/klogind
%{krb5prefix}/man/man8/klogind.8*
%{krb5prefix}/sbin/kshd
%{krb5prefix}/man/man8/kshd.8*
%{krb5prefix}/sbin/telnetd
%{krb5prefix}/man/man8/telnetd.8*

%changelog
* Fri Mar  5 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.0-1
- build a split-out krb5-appl package by pruning out all of the non-appl
  parts and resetting the versioning to match the upstream version for the
  newly-split package

* Fri Mar  5 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.8-1
- update to 1.8
  - temporarily bundling the krb5-appl package (split upstream as of 1.8)
    until its package review is complete
  - profile.d scriptlets are now only needed by -workstation-clients
  - adjust paths in init scripts
  - drop upstreamed fix for KDC denial of service (CVE-2010-0283)
  - drop patch to check the user's password correctly using crypt(), which
    isn't a code path we hit when we're using PAM

* Wed Mar  3 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.7.1-6
- fix a null pointer dereference and crash introduced in our PAM patch that
  would happen if ftpd was given the name of a user who wasn't known to the
  local system, limited to being triggerable by gssapi-authenticated clients by
  the default xinetd config (Olivier Fourdan, #569472)

* Tue Mar  2 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.7.1-5
- fix a regression (not labeling a kdb database lock file correctly, #569902)

* Thu Feb 25 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.7.1-4
- move the package changelog to the end to match the usual style (jdennis)
- scrub out references to $RPM_SOURCE_DIR (jdennis)
- include a symlink to the readme with the name LICENSE so that people can
  find it more easily (jdennis)

* Wed Feb 17 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.7.1-3
- pull up the change to make kpasswd's behavior better match the docs
  when there's no ccache (#563431)

* Tue Feb 16 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.7.1-2
- apply patch from upstream to fix KDC denial of service (CVE-2010-0283,
  #566002)

* Wed Feb  3 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.7.1-1
- update to 1.7.1
  - don't trip AD lockout on wrong password (#542687, #554351)
  - incorporates fixes for CVE-2009-4212 and CVE-2009-3295
  - fixes gss_krb5_copy_ccache() when SPNEGO is used
- move sim_client/sim_server, gss-client/gss-server, uuclient/uuserver to
  the devel subpackage, better lining up with the expected krb5/krb5-appl
  split in 1.8
- drop kvno,kadmin,k5srvutil,ktutil from -workstation-servers, as it already
  depends on -workstation which also includes them

* Mon Jan 25 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.7-23
- tighten up default permissions on kdc.conf and kadm5.acl (#558343)

* Fri Jan 22 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.7-22
- use portreserve correctly -- portrelease takes the basename of the file
  whose entries should be released, so we need three files, not one

* Mon Jan 18 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.7-21
- suppress warnings of impending password expiration if expiration is more than
  seven days away when the KDC reports it via the last-req field, just as we
  already do when it reports expiration via the key-expiration field (#556495)
- link with libtinfo rather than libncurses, when we can, in future RHEL

* Fri Jan 15 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.7-20
- krb5_get_init_creds_password: check opte->flags instead of options->flags
  when checking whether or not we get to use the prompter callback (#555875)

* Thu Jan 14 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.7-19
- use portreserve to make sure the KDC can always bind to the kerberos-iv
  port, kpropd can always bind to the krb5_prop port, and that kadmind can
  always bind to the kerberos-adm port (#555279)
- correct inadvertent use of macros in the changelog (rpmlint)

* Tue Jan 12 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.7-18
- add upstream patch for integer underflow during AES and RC4 decryption
  (CVE-2009-4212), via Tom Yu (#545015)

* Wed Jan  6 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.7-17
- put the conditional back for the -devel subpackage
- back down to the earlier version of the patch for #551764; the backported
  alternate version was incomplete

* Tue Jan  5 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.7-16
- use %%global instead of %%define
- pull up proposed patch for creating previously-not-there lock files for
  kdb databases when 'kdb5_util' is called to 'load' (#551764)

* Mon Jan  4 2010 Dennis Gregorovic <dgregor at redhat.com>
- fix conditional for future RHEL

* Mon Jan  4 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.7-15
- add upstream patch for KDC crash during referral processing (CVE-2009-3295),
  via Tom Yu (#545002)

* Mon Dec 21 2009 Nalin Dahyabhai <nalin at redhat.com> - 1.7-14
- refresh patch for #542868 from trunk

* Thu Dec 10 2009 Nalin Dahyabhai <nalin at redhat.com>
- move man pages that live in the -libs subpackage into the regular
  %%{_mandir} tree where they'll still be found if that package is the
  only one installed (#529319)

* Wed Dec  9 2009 Nalin Dahyabhai <nalin at redhat.com> - 1.7-13
- and put it back in

* Tue Dec  8 2009 Nalin Dahyabhai <nalin at redhat.com>
- back that last change out

* Tue Dec  8 2009 Nalin Dahyabhai <nalin at redhat.com> - 1.7-12
- try to make gss_krb5_copy_ccache() work correctly for spnego (#542868)

* Fri Dec  4 2009 Nalin Dahyabhai <nalin at redhat.com>
- make krb5-config suppress CFLAGS output when called with --libs (#544391)

* Thu Dec  3 2009 Nalin Dahyabhai <nalin at redhat.com> - 1.7-11
- ksu: move account management checks to before we drop privileges, like
  su does (#540769)
- selinux: set the user part of file creation contexts to match the current
  context instead of what we looked up
- configure with --enable-dns-for-realm instead of --enable-dns, which isn't
  recognized any more

* Fri Nov 20 2009 Nalin Dahyabhai <nalin at redhat.com> - 1.7-10
- move /etc/pam.d/ksu from krb5-workstation-servers to krb5-workstation,
  where it's actually needed (#538703)

* Fri Oct 23 2009 Nalin Dahyabhai <nalin at redhat.com> - 1.7-9
- add some conditional logic to simplify building on older Fedora releases

* Tue Oct 13 2009 Nalin Dahyabhai <nalin at redhat.com>
- don't forget the README

* Mon Sep 14 2009 Nalin Dahyabhai <nalin at redhat.com> - 1.7-8
- specify the location of the subsystem lock when using the status() function
  in the kadmind and kpropd init scripts, so that we get the right error when
  we're dead but have a lock file - requires initscripts 8.99 (#521772)

* Tue Sep  8 2009 Nalin Dahyabhai <nalin at redhat.com>
- if the init script fails to start krb5kdc/kadmind/kpropd because it's already
  running (according to status()), return 0 (part of #521772)

* Mon Aug 24 2009 Nalin Dahyabhai <nalin at redhat.com> - 1.7-7
- work around a compile problem with new openssl

* Fri Aug 21 2009 Tomas Mraz <tmraz at redhat.com> - 1.7-6
- rebuilt with new openssl

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Jul  7 2009 Nalin Dahyabhai <nalin at redhat.com> 1.7-5
- rebuild to pick up the current forms of various patches

* Mon Jul  6 2009 Nalin Dahyabhai <nalin at redhat.com>
- simplify the man pages patch by only preprocessing the files we care about
  and moving shared configure.in logic into a shared function
- catch the case of ftpd printing file sizes using %%i, when they might be
  bigger than an int now

* Tue Jun 30 2009 Nalin Dahyabhai <nalin at redhat.com> 1.7-4
- try to merge and clean up all the large file support for ftp and rcp
  - ftpd no longer prints a negative length when sending a large file
    from a 32-bit host

* Tue Jun 30 2009 Nalin Dahyabhai <nalin at redhat.com>
- pam_rhosts_auth.so's been gone, use pam_rhosts.so instead

* Mon Jun 29 2009 Nalin Dahyabhai <nalin at redhat.com> 1.7-3
- switch buildrequires: and requires: on e2fsprogs-devel into
  buildrequires: and requires: on libss-devel, libcom_err-devel, per
  sandeen on fedora-devel-list

* Fri Jun 26 2009 Nalin Dahyabhai <nalin at redhat.com>
- fix a type mismatch in krb5_copy_error_message()
- ftp: fix some odd use of strlen()
- selinux labeling: use selabel_open() family of functions rather than
  matchpathcon(), bail on it if attempting to get the mutex lock fails

* Tue Jun 16 2009 Nalin Dahyabhai <nalin at redhat.com>
- compile with %%{?_smp_mflags} (Steve Grubb)
- drop the bit where we munge part of the error table header, as it's not
  needed any more

* Fri Jun  5 2009 Nalin Dahyabhai <nalin at redhat.com> 1.7-2
- add and own %%{_libdir}/krb5/plugins/authdata

* Thu Jun  4 2009 Nalin Dahyabhai <nalin at redhat.com> 1.7-1
- update to 1.7
  - no need to work around build issues with ASN1BUF_OMIT_INLINE_FUNCS
  - configure recognizes --enable/--disable-pkinit now
  - configure can take --disable-rpath now
  - no more libdes425, krb524d, krb425.info
  - kadmin/k5srvutil/ktutil are user commands now
  - new kproplog
  - FAST encrypted-challenge plugin is new
- drop static build logic
- drop pam_krb5-specific configuration from the default krb5.conf
- drop only-use-v5 flags being passed to various things started by xinetd
- put %%{krb5prefix}/sbin in everyone's path, too (#504525)

* Tue May 19 2009 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-106
- add an auth stack to ksu's PAM configuration so that pam_setcred() calls
  won't just fail

* Mon May 11 2009 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-105
- make PAM support for ksu also set PAM_RUSER

* Thu Apr 23 2009 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-104
- extend PAM support to ksu: perform account and session management for the
  target user
- pull up and merge James Leddy's changes to also set PAM_RHOST in PAM-aware
  network-facing services

* Tue Apr 21 2009 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-103
- fix a typo in a ksu error message (Marek Mahut)
- "rev" works the way the test suite expects now, so don't disable tests
  that use it

* Mon Apr 20 2009 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-102
- add LSB-style init script info

* Fri Apr 17 2009 Nalin Dahyabhai <nalin at redhat.com>
- explicitly run the pdf generation script using sh (part of #225974)

* Tue Apr  7 2009 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-101
- add patches for read overflow and null pointer dereference in the
  implementation of the SPNEGO mechanism (CVE-2009-0844, CVE-2009-0845)
- add patch for attempt to free uninitialized pointer in libkrb5
  (CVE-2009-0846)
- add patch to fix length validation bug in libkrb5 (CVE-2009-0847)
- put the krb5-user .info file into just -workstation and not also
  -workstation-clients

* Mon Apr  6 2009 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-100
- turn off krb4 support (it won't be part of the 1.7 release, but do it now)
- use triggeruns to properly shut down and disable krb524d when -server and
  -workstation-servers gets upgraded, because it's gone now
- move the libraries to /%%{_lib}, but leave --libdir alone so that plugins
  get installed and are searched for in the same locations (#473333)
- clean up buildprereq/prereqs, explicit mktemp requires, and add the
  ldconfig for the -server-ldap subpackage (part of #225974)
- escape possible macros in the changelog (part of #225974)
- fixup summary texts (part of #225974)
- take the execute bit off of the protocol docs (part of #225974)
- unflag init scripts as configuration files (part of #225974)
- make the kpropd init script treat 'reload' as 'restart' (part of #225974)

* Tue Mar 17 2009 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-19
- libgssapi_krb5: backport fix for some errors which can occur when
  we fail to set up the server half of a context (CVE-2009-0845)

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.6.3-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Jan 16 2009 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-17
- rebuild

* Thu Sep  4 2008 Nalin Dahyabhai <nalin at redhat.com>
- if we successfully change the user's password during an attempt to get
  initial credentials, but then fail to get initial creds from a non-master
  using the new password, retry against the master (#432334)

* Tue Aug  5 2008 Tom "spot" Callaway <tcallawa at redhat.com> 1.6.3-16
- fix license tag

* Wed Jul 16 2008 Nalin Dahyabhai <nalin at redhat.com>
- clear fuzz out of patches, dropping a man page patch which is no longer
  necessary
- quote %%{__cc} where needed because it includes whitespace now
- define ASN1BUF_OMIT_INLINE_FUNCS at compile-time (for now) to keep building

* Fri Jul 11 2008 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-15
- build with -fno-strict-aliasing, which is needed because the library
  triggers these warnings
- don't forget to label principal database lock files
- fix the labeling patch so that it doesn't break bootstrapping

* Sat Jun 14 2008 Tom "spot" Callaway <tcallawa at redhat.com> 1.6.3-14
- generate src/include/krb5/krb5.h before building
- fix conditional for sparcv9

* Wed Apr 16 2008 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-13
- ftp: use the correct local filename during mget when the 'case' option is
  enabled (#442713)

* Fri Apr  4 2008 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-12
- stop exporting kadmin keys to a keytab file when kadmind starts -- the
  daemon's been able to use the database directly for a long long time now
- belatedly add aes128,aes256 to the default set of supported key types

* Tue Apr  1 2008 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-11
- libgssapi_krb5: properly export the acceptor subkey when creating a lucid
  context (Kevin Coffman, via the nfs4 mailing list)

* Tue Mar 18 2008 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-10
- add fixes from MITKRB5-SA-2008-001 for use of null or dangling pointer
  when v4 compatibility is enabled on the KDC (CVE-2008-0062, CVE-2008-0063,
  #432620, #432621)
- add fixes from MITKRB5-SA-2008-002 for array out-of-bounds accesses when
  high-numbered descriptors are used (CVE-2008-0947, #433596)
- add backport bug fix for an attempt to free non-heap memory in
  libgssapi_krb5 (CVE-2007-5901, #415321)
- add backport bug fix for a double-free in out-of-memory situations in
  libgssapi_krb5 (CVE-2007-5971, #415351)

* Tue Mar 18 2008 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-9
- rework file labeling patch to not depend on fragile preprocessor trickery,
  in another attempt at fixing #428355 and friends

* Tue Feb 26 2008 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-8
- ftp: add patch to fix "runique on" case when globbing fixes applied
- stop adding a redundant but harmless call to initialize the gssapi internals

* Mon Feb 25 2008 Nalin Dahyabhai <nalin at redhat.com>
- add patch to suppress double-processing of /etc/krb5.conf when we build
  with --sysconfdir=/etc, thereby suppressing double-logging (#231147)

* Mon Feb 25 2008 Nalin Dahyabhai <nalin at redhat.com>
- remove a patch, to fix problems with interfaces which are "up" but which
  have no address assigned, which conflicted with a different fix for the same
  problem in 1.5 (#200979)

* Mon Feb 25 2008 Nalin Dahyabhai <nalin at redhat.com>
- ftp: don't lose track of a descriptor on passive get when the server fails to
  open a file

* Mon Feb 25 2008 Nalin Dahyabhai <nalin at redhat.com>
- in login, allow PAM to interact with the user when they've been strongly
  authenticated
- in login, signal PAM when we're changing an expired password that it's an
  expired password, so that when cracklib flags a password as being weak it's
  treated as an error even if we're running as root

* Mon Feb 18 2008 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-7
- drop netdb patch
- kdb_ldap: add patch to treat 'nsAccountLock: true' as an indication that
  the DISALLOW_ALL_TIX flag is set on an entry, for better interop with Fedora,
  Netscape, Red Hat Directory Server (Simo Sorce)

* Wed Feb 13 2008 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-6
- patch to avoid depending on <netdb.h> to define NI_MAXHOST and NI_MAXSERV

* Tue Feb 12 2008 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-5
- enable patch for key-expiration reporting
- enable patch to make kpasswd fall back to TCP if UDP fails (#251206)
- enable patch to make kpasswd use the right sequence number on retransmit
- enable patch to allow mech-specific creds delegated under spnego to be found
  when searching for creds

* Wed Jan  2 2008 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-4
- some init script cleanups
  - drop unquoted check and silent exit for "$NETWORKING" (#426852, #242502)
  - krb524: don't barf on missing database if it looks like we're using kldap,
    same as for kadmin
  - return non-zero status for missing files which cause startup to
    fail (#242502)

* Tue Dec 18 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-3
- allocate space for the nul-terminator in the local pathname when looking up
  a file context, and properly free a previous context (Jose Plans, #426085)

* Wed Dec  5 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-2
- rebuild

* Tue Oct 23 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.3-1
- update to 1.6.3, dropping now-integrated patches for CVE-2007-3999
  and CVE-2007-4000 (the new pkinit module is built conditionally and goes
  into the -pkinit-openssl package, at least for now, to make a buildreq
  loop with openssl avoidable)

* Wed Oct 17 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.2-10
- make proper use of pam_loginuid and pam_selinux in rshd and ftpd

* Fri Oct 12 2007 Nalin Dahyabhai <nalin at redhat.com>
- make krb5.conf %%verify(not md5 size mtime) in addition to
  %%config(noreplace), like /etc/nsswitch.conf (#329811)

* Mon Oct  1 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.2-9
- apply the fix for CVE-2007-4000 instead of the experimental patch for
  setting ok-as-delegate flags

* Tue Sep 11 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.2-8
- move the db2 kdb plugin from -server to -libs, because a multilib libkdb
  might need it

* Tue Sep 11 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.2-7
- also perform PAM session and credential management when ftpd accepts a
  client using strong authentication, missed earlier
- also label kadmind log files and files created by the db2 plugin

* Thu Sep  6 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.2-6
- incorporate updated fix for CVE-2007-3999 (CVE-2007-4743)
- fix incorrect call to "test" in the kadmin init script (#252322,#287291)

* Tue Sep  4 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.2-5
- incorporate fixes for MITKRB5-SA-2007-006 (CVE-2007-3999, CVE-2007-4000)

* Sat Aug 25 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.2-4
- cover more cases in labeling files on creation
- add missing gawk build dependency

* Thu Aug 23 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.2-3
- rebuild

* Thu Jul 26 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.2-2
- kdc.conf: default to listening for TCP clients, too (#248415)

* Thu Jul 19 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.2-1
- update to 1.6.2
- add "buildrequires: texinfo-tex" to get texi2pdf

* Wed Jun 27 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.1-8
- incorporate fixes for MITKRB5-SA-2007-004 (CVE-2007-2442,CVE-2007-2443)
  and MITKRB5-SA-2007-005 (CVE-2007-2798)

* Mon Jun 25 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.1-7
- reintroduce missing %%postun for the non-split_workstation case

* Mon Jun 25 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.1-6
- rebuild

* Mon Jun 25 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.1-5.1
- rebuild

* Sun Jun 24 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.1-5
- add missing pam-devel build requirement, force selinux-or-fail build

* Sun Jun 24 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.1-4
- rebuild

* Sun Jun 24 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.1-3
- label all files at creation-time according to the SELinux policy (#228157)

* Fri Jun 22 2007 Nalin Dahyabhai <nalin at redhat.com>
- perform PAM account / session management in krshd (#182195,#195922)
- perform PAM authentication and account / session management in ftpd
- perform PAM authentication, account / session management, and password-
  changing in login.krb5 (#182195,#195922)

* Fri Jun 22 2007 Nalin Dahyabhai <nalin at redhat.com>
- preprocess kerberos.ldif into a format FDS will like better, and include
  that as a doc file as well

* Fri Jun 22 2007 Nalin Dahyabhai <nalin at redhat.com>
- switch man pages to being generated with the right paths in them
- drop old, incomplete SELinux patch
- add patch from Greg Hudson to make srvtab routines report missing-file errors
  at same point that keytab routines do (#241805)

* Thu May 24 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.1-2
- pull patch from svn to undo unintentional chattiness in ftp
- pull patch from svn to handle NULL krb5_get_init_creds_opt structures
  better in a couple of places where they're expected

* Wed May 23 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6.1-1
- update to 1.6.1
  - drop no-longer-needed patches for CVE-2007-0956,CVE-2007-0957,CVE-2007-1216
  - drop patch for sendto bug in 1.6, fixed in 1.6.1

* Fri May 18 2007 Nalin Dahyabhai <nalin at redhat.com>
- kadmind.init: don't fail outright if the default principal database
  isn't there if it looks like we might be using the kldap plugin
- kadmind.init: attempt to extract the key for the host-specific kadmin
  service when we try to create the keytab

* Wed May 16 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6-6
- omit dependent libraries from the krb5-config --libs output, as using
  shared libraries (no more static libraries) makes them unnecessary and
  they're not part of the libkrb5 interface (patch by Rex Dieter, #240220)
  (strips out libkeyutils, libresolv, libdl)

* Fri May  4 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6-5
- pull in keyutils as a build requirement to get the "KEYRING:" ccache type,
  because we've merged

* Fri May  4 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6-4
- fix an uninitialized length value which could cause a crash when parsing
  key data coming from a directory server
- correct a typo in the krb5.conf man page ("ldap_server"->"ldap_servers")

* Fri Apr 13 2007 Nalin Dahyabhai <nalin at redhat.com>
- move the default acl_file, dict_file, and admin_keytab settings to
  the part of the default/example kdc.conf where they'll actually have
  an effect (#236417)

* Thu Apr  5 2007 Nalin Dahyabhai <nalin at redhat.com> 1.5-24
- merge security fixes from RHSA-2007:0095

* Tue Apr  3 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6-3
- add patch to correct unauthorized access via krb5-aware telnet
  daemon (#229782, CVE-2007-0956)
- add patch to fix buffer overflow in krb5kdc and kadmind
  (#231528, CVE-2007-0957)
- add patch to fix double-free in kadmind (#231537, CVE-2007-1216)

* Thu Mar 22 2007 Nalin Dahyabhai <nalin at redhat.com>
- back out buildrequires: keyutils-libs-devel for now

* Thu Mar 22 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6-2
- add buildrequires: on keyutils-libs-devel to enable use of keyring ccaches,
  dragging keyutils-libs in as a dependency

* Mon Mar 19 2007 Nalin Dahyabhai <nalin at redhat.com> 1.5-23
- fix bug ID in changelog

* Thu Mar 15 2007 Nalin Dahyabhai <nalin at redhat.com> 1.5-22

* Thu Mar 15 2007 Nalin Dahyabhai <nalin at redhat.com> 1.5-21
- add preliminary patch to fix buffer overflow in krb5kdc and kadmind
  (#231528, CVE-2007-0957)
- add preliminary patch to fix double-free in kadmind (#231537, CVE-2007-1216)

* Wed Feb 28 2007 Nalin Dahyabhai <nalin at redhat.com>
- add patch to build semi-useful static libraries, but don't apply it unless
  we need them

* Tue Feb 27 2007 Nalin Dahyabhai <nalin at redhat.com> - 1.5-20
- temporarily back out %%post changes, fix for #143289 for security update
- add preliminary patch to correct unauthorized access via krb5-aware telnet

* Mon Feb 19 2007 Nalin Dahyabhai <nalin at redhat.com>
- make profile.d scriptlets mode 644 instead of 755 (part of #225974)

* Tue Jan 30 2007 Nalin Dahyabhai <nalin at redhat.com> 1.6-1
- clean up quoting of command-line arguments passed to the krsh/krlogin
  wrapper scripts

* Mon Jan 22 2007 Nalin Dahyabhai <nalin at redhat.com>
- initial update to 1.6, pre-package-reorg
- move workstation daemons to a new subpackage (#81836, #216356, #217301), and
  make the new subpackage require xinetd (#211885)

* Mon Jan 22 2007 Nalin Dahyabhai <nalin at redhat.com> - 1.5-18
- make use of install-info more failsafe (Ville Skyttä, #223704)
- preserve timestamps on shell scriptlets at %%install-time

* Tue Jan 16 2007 Nalin Dahyabhai <nalin at redhat.com> - 1.5-17
- move to using pregenerated PDF docs to cure multilib conflicts (#222721)

* Fri Jan 12 2007 Nalin Dahyabhai <nalin at redhat.com> - 1.5-16
- update backport of the preauth module interface (part of #194654)

* Tue Jan  9 2007 Nalin Dahyabhai <nalin at redhat.com> - 1.5-14
- apply fixes from Tom Yu for MITKRB5-SA-2006-002 (CVE-2006-6143) (#218456)
- apply fixes from Tom Yu for MITKRB5-SA-2006-003 (CVE-2006-6144) (#218456)

* Wed Dec 20 2006 Nalin Dahyabhai <nalin at redhat.com> - 1.5-12
- update backport of the preauth module interface

* Mon Oct 30 2006 Nalin Dahyabhai <nalin at redhat.com>
- update backport of the preauth module interface
- add proposed patches 4566, 4567
- add proposed edata reporting interface for KDC
- add temporary placeholder for module global context fixes

* Mon Oct 23 2006 Nalin Dahyabhai <nalin at redhat.com> - 1.5-11
- don't bail from the KDC init script if there's no database, it may be in
  a different location than the default (fenlason)
- remove the [kdc] section from the default krb5.conf -- doesn't seem to have
  been applicable for a while

* Wed Oct 18 2006 Nalin Dahyabhai <nalin at redhat.com> - 1.5-10
- rename krb5.sh and krb5.csh so that they don't overlap (#210623)
- way-late application of added error info in kadmind.init (#65853)
 
* Wed Oct 18 2006 Nalin Dahyabhai <nalin at redhat.com> - 1.5-9.pal_18695
- add backport of in-development preauth module interface (#208643)

* Mon Oct  9 2006 Nalin Dahyabhai <nalin at redhat.com> - 1.5-9
- provide docs in PDF format instead of as tex source (Enrico Scholz, #209943)

* Wed Oct  4 2006 Nalin Dahyabhai <nalin at redhat.com> - 1.5-8
- add missing shebang headers to krsh and krlogin wrapper scripts (#209238)

* Wed Sep  6 2006 Nalin Dahyabhai <nalin at redhat.com> - 1.5-7
- set SS_LIB at configure-time so that libss-using apps get working readline
  support (#197044)

* Fri Aug 18 2006 Nalin Dahyabhai <nalin at redhat.com> - 1.5-6
- switch to the updated patch for MITKRB-SA-2006-001

* Tue Aug  8 2006 Nalin Dahyabhai <nalin at redhat.com> - 1.5-5
- apply patch to address MITKRB-SA-2006-001 (CVE-2006-3084)

* Mon Aug  7 2006 Nalin Dahyabhai <nalin at redhat.com> - 1.5-4
- ensure that the gssapi library's been initialized before walking the
  internal mechanism list in gss_release_oid(), needed if called from
  gss_release_name() right after a gss_import_name() (#198092)

* Tue Jul 25 2006 Nalin Dahyabhai <nalin at redhat.com> - 1.5-3
- rebuild

* Tue Jul 25 2006 Nalin Dahyabhai <nalin at redhat.com> - 1.5-2
- pull up latest revision of patch to reduce lockups in rsh/rshd

* Mon Jul 17 2006 Nalin Dahyabhai <nalin at redhat.com> - 1.5-1.2
- rebuild

* Wed Jul 12 2006 Jesse Keating <jkeating at redhat.com> - 1.5-1.1
- rebuild

* Thu Jul  6 2006 Nalin Dahyabhai <nalin at redhat.com> 1.5-1
- build

* Wed Jul  5 2006 Nalin Dahyabhai <nalin at redhat.com> 1.5-0
- update to 1.5

* Fri Jun 23 2006 Nalin Dahyabhai <nalin at redhat.com> 1.4.3-9
- mark profile.d config files noreplace (Laurent Rineau, #196447)

* Thu Jun  8 2006 Nalin Dahyabhai <nalin at redhat.com> 1.4.3-8
- add buildprereq for autoconf

* Mon May 22 2006 Nalin Dahyabhai <nalin at redhat.com> 1.4.3-7
- further munge krb5-config so that 'libdir=/usr/lib' is given even on 64-bit
  architectures, to avoid multilib conflicts; other changes will conspire to
  strip out the -L flag which uses this, so it should be harmless (#192692)

* Fri Apr 28 2006 Nalin Dahyabhai <nalin at redhat.com> 1.4.3-6
- adjust the patch which removes the use of rpath to also produce a
  krb5-config which is okay in multilib environments (#190118)
- make the name-of-the-tempfile comment which compile_et adds to error code
  headers always list the same file to avoid conflicts on multilib installations
- strip SIZEOF_LONG out of krb5.h so that it doesn't conflict on multilib boxes
- strip GSS_SIZEOF_LONG out of gssapi.h so that it doesn't conflict on mulitlib
  boxes

* Fri Apr 14 2006 Stepan Kasal <skasal at redhat.com> 1.4.3-5
- Fix formatting typo in kinit.1 (krb5-kinit-man-typo.patch)

* Fri Feb 10 2006 Jesse Keating <jkeating at redhat.com> 1.4.3-4.1
- bump again for double-long bug on ppc(64)

* Mon Feb  6 2006 Nalin Dahyabhai <nalin at redhat.com> 1.4.3-4
- give a little bit more information to the user when kinit gets the catch-all
  I/O error (#180175)

* Thu Jan 19 2006 Nalin Dahyabhai <nalin at redhat.com> 1.4.3-3
- rebuild properly when pthread_mutexattr_setrobust_np() is defined but not
  declared, such as with recent glibc when _GNU_SOURCE isn't being used

* Thu Jan 19 2006 Matthias Clasen <mclasen at redhat.com> 1.4.3-2
- Use full paths in krb5.sh to avoid path lookups

* Fri Dec 09 2005 Jesse Keating <jkeating at redhat.com>
- rebuilt

* Thu Dec  1 2005 Nalin Dahyabhai <nalin at redhat.com>
- login: don't truncate passwords before passing them into crypt(), in
  case they're significant (#149476)

* Thu Nov 17 2005 Nalin Dahyabhai <nalin at redhat.com> 1.4.3-1
- update to 1.4.3
- make ksu setuid again (#137934, others)

* Tue Sep 13 2005 Nalin Dahyabhai <nalin at redhat.com> 1.4.2-4
- mark %%{krb5prefix}/man so that files which are packaged within it are
  flagged as %%doc (#168163)

* Tue Sep  6 2005 Nalin Dahyabhai <nalin at redhat.com> 1.4.2-3
- add an xinetd configuration file for encryption-only telnetd, parallelling
  the kshell/ekshell pair (#167535)

* Wed Aug 31 2005 Nalin Dahyabhai <nalin at redhat.com> 1.4.2-2
- change the default configured encryption type for KDC databases to the
  compiled-in default of des3-hmac-sha1 (#57847)

* Thu Aug 11 2005 Nalin Dahyabhai <nalin at redhat.com> 1.4.2-1
- update to 1.4.2, incorporating the fixes for MIT-KRB5-SA-2005-002 and
  MIT-KRB5-SA-2005-003

* Wed Jun 29 2005 Nalin Dahyabhai <nalin at redhat.com> 1.4.1-6
- rebuild

* Wed Jun 29 2005 Nalin Dahyabhai <nalin at redhat.com> 1.4.1-5
- fix telnet client environment variable disclosure the same way NetKit's
  telnet client did (CAN-2005-0488) (#159305)
- keep apps which call krb5_principal_compare() or krb5_realm_compare() with
  malformed or NULL principal structures from crashing outright (Thomas Biege)
  (#161475)

* Tue Jun 28 2005 Nalin Dahyabhai <nalin at redhat.com>
- apply fixes from draft of MIT-KRB5-SA-2005-002 (CAN-2005-1174,CAN-2005-1175)
  (#157104)
- apply fixes from draft of MIT-KRB5-SA-2005-003 (CAN-2005-1689) (#159755)

* Fri Jun 24 2005 Nalin Dahyabhai <nalin at redhat.com> 1.4.1-4
- fix double-close in keytab handling
- add port of fixes for CAN-2004-0175 to krb5-aware rcp (#151612)

* Fri May 13 2005 Nalin Dahyabhai <nalin at redhat.com> 1.4.1-3
- prevent spurious EBADF in krshd when stdin is closed by the client while
  the command is running (#151111)

* Fri May 13 2005 Martin Stransky <stransky at redhat.com> 1.4.1-2
- add deadlock patch, removed old patch

* Fri May  6 2005 Nalin Dahyabhai <nalin at redhat.com> 1.4.1-1
- update to 1.4.1, incorporating fixes for CAN-2005-0468 and CAN-2005-0469
- when starting the KDC or kadmind, if KRB5REALM is set via the /etc/sysconfig
  file for the service, pass it as an argument for the -r flag

* Wed Mar 23 2005 Nalin Dahyabhai <nalin at redhat.com> 1.4-3
- drop krshd patch for now

* Thu Mar 17 2005 Nalin Dahyabhai <nalin at redhat.com>
- add draft fix from Tom Yu for slc_add_reply() buffer overflow (CAN-2005-0469)
- add draft fix from Tom Yu for env_opt_add() buffer overflow (CAN-2005-0468)

* Wed Mar 16 2005 Nalin Dahyabhai <nalin at redhat.com> 1.4-2
- don't include <term.h> into the telnet client when we're not using curses

* Thu Feb 24 2005 Nalin Dahyabhai <nalin at redhat.com> 1.4-1
- update to 1.4
  - v1.4 kadmin client requires a v1.4 kadmind on the server, or use the "-O"
    flag to specify that it should communicate with the server using the older
    protocol
  - new libkrb5support library
  - v5passwdd and kadmind4 are gone
  - versioned symbols
- pick up $KRB5KDC_ARGS from /etc/sysconfig/krb5kdc, if it exists, and pass
  it on to krb5kdc
- pick up $KADMIND_ARGS from /etc/sysconfig/kadmin, if it exists, and pass
  it on to kadmind
- pick up $KRB524D_ARGS from /etc/sysconfig/krb524, if it exists, and pass
  it on to krb524d *instead of* "-m"
- set "forwardable" in [libdefaults] in the default krb5.conf to match the
  default setting which we supply for pam_krb5
- set a default of 24h for "ticket_lifetime" in [libdefaults], reflecting the
  compiled-in default

* Mon Dec 20 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.6-3
- rebuild

* Mon Dec 20 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.6-2
- rebuild

* Mon Dec 20 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.6-1
- update to 1.3.6, which includes the previous fix

* Mon Dec 20 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.5-8
- apply fix from Tom Yu for MITKRB5-SA-2004-004 (CAN-2004-1189)

* Fri Dec 17 2004 Martin Stransky <stransky at redhat.com> 1.3.5-7
- fix deadlock during file transfer via rsync/krsh
- thanks goes to James Antill for hint

* Fri Nov 26 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.5-6
- rebuild

* Mon Nov 22 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.5-3
- fix predictable-tempfile-name bug in krb5-send-pr (CAN-2004-0971, #140036)

* Tue Nov 16 2004 Nalin Dahyabhai <nalin at redhat.com>
- silence compiler warning in kprop by using an in-memory ccache with a fixed
  name instead of an on-disk ccache with a name generated by tmpnam()

* Tue Nov 16 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.5-2
- fix globbing patch port mode (#139075)

* Mon Nov  1 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.5-1
- fix segfault in telnet due to incorrect checking of gethostbyname_r result
  codes (#129059)

* Fri Oct 15 2004 Nalin Dahyabhai <nalin at redhat.com>
- remove rc4-hmac:norealm and rc4-hmac:onlyrealm from the default list of
  supported keytypes in kdc.conf -- they produce exactly the same keys as
  rc4-hmac:normal because rc4 string-to-key ignores salts
- nuke kdcrotate -- there are better ways to balance the load on KDCs, and
  the SELinux policy for it would have been scary-looking
- update to 1.3.5, mainly to include MITKRB5SA 2004-002 and 2004-003

* Tue Aug 31 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.4-7
- rebuild

* Tue Aug 24 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.4-6
- rebuild

* Tue Aug 24 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.4-5
- incorporate revised fixes from Tom Yu for CAN-2004-0642, CAN-2004-0644,
  CAN-2004-0772

* Mon Aug 23 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.4-4
- rebuild

* Mon Aug 23 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.4-3
- incorporate fixes from Tom Yu for CAN-2004-0642, CAN-2004-0772
  (MITKRB5-SA-2004-002, #130732)
- incorporate fixes from Tom Yu for CAN-2004-0644 (MITKRB5-SA-2004-003, #130732)

* Tue Jul 27 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.4-2
- fix indexing error in server sorting patch (#127336)

* Tue Jun 15 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Mon Jun 14 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.4-0.1
- update to 1.3.4 final

* Mon Jun  7 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.4-0
- update to 1.3.4 beta1
- remove MITKRB5-SA-2004-001, included in 1.3.4

* Mon Jun  7 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.3-8
- rebuild

* Fri Jun  4 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.3-7
- rebuild

* Fri Jun  4 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.3-6
- apply updated patch from MITKRB5-SA-2004-001 (revision 2004-06-02)

* Tue Jun  1 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.3-5
- rebuild

* Tue Jun  1 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.3-4
- apply patch from MITKRB5-SA-2004-001 (#125001)

* Wed May 12 2004 Thomas Woerner <twoerner at redhat.com> 1.3.3-3
- removed rpath

* Thu Apr 15 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.3-2
- re-enable large file support, fell out in 1.3-1
- patch rcp to use long long and %%lld format specifiers when reporting file
  sizes on large files

* Tue Apr 13 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.3-1
- update to 1.3.3

* Wed Mar 10 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.2-1
- update to 1.3.2

* Mon Mar  8 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.1-12
- rebuild

* Tue Mar 02 2004 Elliot Lee <sopwith at redhat.com> 1.3.1-11.1
- rebuilt

* Fri Feb 13 2004 Elliot Lee <sopwith at redhat.com> 1.3.1-11
- rebuilt

* Mon Feb  9 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.1-10
- catch krb4 send_to_kdc cases in kdc preference patch

* Mon Feb  2 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.1-9
- remove patch to set TERM in klogind which, combined with the upstream fix in
  1.3.1, actually produces the bug now (#114762)

* Mon Jan 19 2004 Nalin Dahyabhai <nalin at redhat.com> 1.3.1-8
- when iterating over lists of interfaces which are "up" from getifaddrs(),
  skip over those which have no address (#113347)

* Mon Jan 12 2004 Nalin Dahyabhai <nalin at redhat.com>
- prefer the kdc which last replied to a request when sending requests to kdcs

* Mon Nov 24 2003 Nalin Dahyabhai <nalin at redhat.com> 1.3.1-7
- fix combination of --with-netlib and --enable-dns (#82176)

* Tue Nov 18 2003 Nalin Dahyabhai <nalin at redhat.com>
- remove libdefault ticket_lifetime option from the default krb5.conf, it is
  ignored by libkrb5

* Thu Sep 25 2003 Nalin Dahyabhai <nalin at redhat.com> 1.3.1-6
- fix bug in patch to make rlogind start login with a clean environment a la
  netkit rlogin, spotted and fixed by Scott McClung

* Tue Sep 23 2003 Nalin Dahyabhai <nalin at redhat.com> 1.3.1-5
- include profile.d scriptlets in krb5-devel so that krb5-config will be in
  the path if krb5-workstation isn't installed, reported by Kir Kolyshkin

* Mon Sep  8 2003 Nalin Dahyabhai <nalin at redhat.com>
- add more etypes (arcfour) to the default enctype list in kdc.conf
- don't apply previous patch, refused upstream

* Fri Sep  5 2003 Nalin Dahyabhai <nalin at redhat.com> 1.3.1-4
- fix 32/64-bit bug storing and retrieving the issue_date in v4 credentials

* Wed Sep 3 2003 Dan Walsh <dwalsh at redhat.com> 1.3.1-3
- Don't check for write access on /etc/krb5.conf if SELinux

* Tue Aug 26 2003 Nalin Dahyabhai <nalin at redhat.com> 1.3.1-2
- fixup some int/pointer varargs wackiness

* Tue Aug  5 2003 Nalin Dahyabhai <nalin at redhat.com> 1.3.1-1
- rebuild

* Mon Aug  4 2003 Nalin Dahyabhai <nalin at redhat.com> 1.3.1-0
- update to 1.3.1

* Thu Jul 24 2003 Nalin Dahyabhai <nalin at redhat.com> 1.3-2
- pull fix for non-compliant encoding of salt field in etype-info2 preauth
  data from 1.3.1 beta 1, until 1.3.1 is released.

* Mon Jul 21 2003 Nalin Dahyabhai <nalin at redhat.com> 1.3-1
- update to 1.3

* Mon Jul  7 2003 Nalin Dahyabhai <nalin at redhat.com> 1.2.8-4
- correctly use stdargs

* Wed Jun 18 2003 Nalin Dahyabhai <nalin at redhat.com> 1.3-0.beta.4
- test update to 1.3 beta 4
- ditch statglue build option
- krb5-devel requires e2fsprogs-devel, which now provides libss and libcom_err

* Wed Jun 04 2003 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Wed May 21 2003 Jeremy Katz <katzj at redhat.com> 1.2.8-2
- gcc 3.3 doesn't implement varargs.h, include stdarg.h instead

* Wed Apr  9 2003 Nalin Dahyabhai <nalin at redhat.com> 1.2.8-1
- update to 1.2.8

* Mon Mar 31 2003 Nalin Dahyabhai <nalin at redhat.com> 1.2.7-14
- fix double-free of enc_part2 in krb524d

* Fri Mar 21 2003 Nalin Dahyabhai <nalin at redhat.com> 1.2.7-13
- update to latest patch kit for MITKRB5-SA-2003-004

* Wed Mar 19 2003 Nalin Dahyabhai <nalin at redhat.com> 1.2.7-12
- add patch included in MITKRB5-SA-2003-003 (CAN-2003-0028)

* Mon Mar 17 2003 Nalin Dahyabhai <nalin at redhat.com> 1.2.7-11
- add patches from patchkit from MITKRB5-SA-2003-004 (CAN-2003-0138 and
  CAN-2003-0139)

* Thu Mar  6 2003 Nalin Dahyabhai <nalin at redhat.com> 1.2.7-10
- rebuild

* Thu Mar  6 2003 Nalin Dahyabhai <nalin at redhat.com> 1.2.7-9
- fix buffer underrun in unparsing certain principals (CAN-2003-0082)

* Tue Feb  4 2003 Nalin Dahyabhai <nalin at redhat.com> 1.2.7-8
- add patch to document the reject-bad-transited option in kdc.conf

* Mon Feb  3 2003 Nalin Dahyabhai <nalin at redhat.com>
- add patch to fix server-side crashes when principals have no
  components (CAN-2003-0072)

* Thu Jan 23 2003 Nalin Dahyabhai <nalin at redhat.com> 1.2.7-7
- add patch from Mark Cox for exploitable bugs in ftp client

* Wed Jan 22 2003 Tim Powers <timp at redhat.com>
- rebuilt

* Wed Jan 15 2003 Nalin Dahyabhai <nalin at redhat.com> 1.2.7-5
- use PICFLAGS when building code from the ktany patch

* Thu Jan  9 2003 Bill Nottingham <notting at redhat.com> 1.2.7-4
- debloat

* Tue Jan  7 2003 Jeremy Katz <katzj at redhat.com> 1.2.7-3
- include .so.* symlinks as well as .so.*.*

* Mon Dec  9 2002 Jakub Jelinek <jakub at redhat.com> 1.2.7-2
- always #include <errno.h> to access errno, never do it directly
- enable LFS on a bunch of other 32-bit arches

* Wed Dec  4 2002 Nalin Dahyabhai <nalin at redhat.com>
- increase the maximum name length allowed by kuserok() to the higher value
  used in development versions

* Mon Dec  2 2002 Nalin Dahyabhai <nalin at redhat.com>
- install src/krb524/README as README.krb524 in the -servers package,
  includes information about converting for AFS principals

* Fri Nov 15 2002 Nalin Dahyabhai <nalin at redhat.com> 1.2.7-1
- update to 1.2.7
- disable use of tcl

* Mon Nov 11 2002 Nalin Dahyabhai <nalin at redhat.com>
- update to 1.2.7-beta2 (internal only, not for release), dropping dnsparse
  and kadmind4 fixes

* Wed Oct 23 2002 Nalin Dahyabhai <nalin at redhat.com> 1.2.6-5
- add patch for buffer overflow in kadmind4 (not used by default)

* Fri Oct 11 2002 Nalin Dahyabhai <nalin at redhat.com> 1.2.6-4
- drop a hunk from the dnsparse patch which is actually redundant (thanks to
  Tom Yu)

* Wed Oct  9 2002 Nalin Dahyabhai <nalin at redhat.com> 1.2.6-3
- patch to handle truncated dns responses

* Mon Oct  7 2002 Nalin Dahyabhai <nalin at redhat.com> 1.2.6-2
- remove hashless key types from the default kdc.conf, they're not supposed to
  be there, noted by Sam Hartman on krbdev

* Fri Sep 27 2002 Nalin Dahyabhai <nalin at redhat.com> 1.2.6-1
- update to 1.2.6

* Fri Sep 13 2002 Nalin Dahyabhai <nalin at redhat.com> 1.2.5-7
- use %%{_lib} for the sake of multilib systems

* Fri Aug  2 2002 Nalin Dahyabhai <nalin at redhat.com> 1.2.5-6
- add patch from Tom Yu for exploitable bugs in rpc code used in kadmind

* Tue Jul 23 2002 Nalin Dahyabhai <nalin at redhat.com> 1.2.5-5
- fix bug in krb5.csh which would cause the path check to always succeed

* Fri Jul 19 2002 Jakub Jelinek <jakub at redhat.com> 1.2.5-4
- build even libdb.a with -fPIC and $RPM_OPT_FLAGS.

* Fri Jun 21 2002 Tim Powers <timp at redhat.com>
- automated rebuild

* Sun May 26 2002 Tim Powers <timp at redhat.com>
- automated rebuild

* Wed May  1 2002 Nalin Dahyabhai <nalin at redhat.com> 1.2.5-1
- update to 1.2.5
- disable statglue

* Fri Mar  1 2002 Nalin Dahyabhai <nalin at redhat.com> 1.2.4-1
- update to 1.2.4

* Wed Feb 20 2002 Nalin Dahyabhai <nalin at redhat.com> 1.2.3-5
- rebuild in new environment
- reenable statglue

* Sat Jan 26 2002 Florian La Roche <Florian.LaRoche at redhat.de>
- prereq chkconfig for the server subpackage

* Wed Jan 16 2002 Nalin Dahyabhai <nalin at redhat.com> 1.2.3-3
- build without -g3, which gives us large static libraries in -devel

* Tue Jan 15 2002 Nalin Dahyabhai <nalin at redhat.com> 1.2.3-2
- reintroduce ld.so.conf munging in the -libs %%post

* Thu Jan 10 2002 Nalin Dahyabhai <nalin at redhat.com> 1.2.3-1
- rename the krb5 package back to krb5-libs; the previous rename caused
  something of an uproar
- update to 1.2.3, which includes the FTP and telnetd fixes
- configure without --enable-dns-for-kdc --enable-dns-for-realm, which now set
  the default behavior instead of enabling the feature (the feature is enabled
  by --enable-dns, which we still use)
- reenable optimizations on Alpha
- support more encryption types in the default kdc.conf (heads-up from post
  to comp.protocols.kerberos by Jason Heiss)

* Fri Aug  3 2001 Nalin Dahyabhai <nalin at redhat.com> 1.2.2-14
- rename the krb5-libs package to krb5 (naming a subpackage -libs when there
  is no main package is silly)
- move defaults for PAM to the appdefaults section of krb5.conf -- this is
  the area where the krb5_appdefault_* functions look for settings)
- disable statglue (warning: breaks binary compatibility with previous
  packages, but has to be broken at some point to work correctly with
  unpatched versions built with newer versions of glibc)

* Fri Aug  3 2001 Nalin Dahyabhai <nalin at redhat.com> 1.2.2-13
- bump release number and rebuild

* Wed Aug  1 2001 Nalin Dahyabhai <nalin at redhat.com>
- add patch to fix telnetd vulnerability

* Fri Jul 20 2001 Nalin Dahyabhai <nalin at redhat.com>
- tweak statglue.c to fix stat/stat64 aliasing problems
- be cleaner in use of gcc to build shlibs

* Wed Jul 11 2001 Nalin Dahyabhai <nalin at redhat.com>
- use gcc to build shared libraries

* Wed Jun 27 2001 Nalin Dahyabhai <nalin at redhat.com>
- add patch to support "ANY" keytab type (i.e.,
  "default_keytab_name = ANY:FILE:/etc/krb5.keytab,SRVTAB:/etc/srvtab"
  patch from Gerald Britton, #42551)
- build with -D_FILE_OFFSET_BITS=64 to get large file I/O in ftpd (#30697)
- patch ftpd to use long long and %%lld format specifiers to support the SIZE
  command on large files (also #30697)
- don't use LOG_AUTH as an option value when calling openlog() in ksu (#45965)
- implement reload in krb5kdc and kadmind init scripts (#41911)
- lose the krb5server init script (not using it any more)

* Sun Jun 24 2001 Elliot Lee <sopwith at redhat.com>
- Bump release + rebuild.

* Tue May 29 2001 Nalin Dahyabhai <nalin at redhat.com>
- pass some structures by address instead of on the stack in krb5kdc

* Tue May 22 2001 Nalin Dahyabhai <nalin at redhat.com>
- rebuild in new environment

* Thu Apr 26 2001 Nalin Dahyabhai <nalin at redhat.com>
- add patch from Tom Yu to fix ftpd overflows (#37731)

* Wed Apr 18 2001 Than Ngo <than at redhat.com>
- disable optimizations on the alpha again

* Fri Mar 30 2001 Nalin Dahyabhai <nalin at redhat.com>
- add in glue code to make sure that libkrb5 continues to provide a
  weak copy of stat()

* Thu Mar 15 2001 Nalin Dahyabhai <nalin at redhat.com>
- build alpha with -O0 for now

* Thu Mar  8 2001 Nalin Dahyabhai <nalin at redhat.com>
- fix the kpropd init script

* Mon Mar  5 2001 Nalin Dahyabhai <nalin at redhat.com>
- update to 1.2.2, which fixes some bugs relating to empty ETYPE-INFO
- re-enable optimization on Alpha

* Thu Feb  8 2001 Nalin Dahyabhai <nalin at redhat.com>
- build alpha with -O0 for now
- own %%{_var}/kerberos

* Tue Feb  6 2001 Nalin Dahyabhai <nalin at redhat.com>
- own the directories which are created for each package (#26342)

* Tue Jan 23 2001 Nalin Dahyabhai <nalin at redhat.com>
- gettextize init scripts

* Fri Jan 19 2001 Nalin Dahyabhai <nalin at redhat.com>
- add some comments to the ksu patches for the curious
- re-enable optimization on alphas

* Mon Jan 15 2001 Nalin Dahyabhai <nalin at redhat.com>
- fix krb5-send-pr (#18932) and move it from -server to -workstation
- buildprereq libtermcap-devel
- temporariliy disable optimization on alphas
- gettextize init scripts

* Tue Dec  5 2000 Nalin Dahyabhai <nalin at redhat.com>
- force -fPIC

* Fri Dec  1 2000 Nalin Dahyabhai <nalin at redhat.com>
- rebuild in new environment

* Tue Oct 31 2000 Nalin Dahyabhai <nalin at redhat.com>
- add bison as a BuildPrereq (#20091)

* Mon Oct 30 2000 Nalin Dahyabhai <nalin at redhat.com>
- change /usr/dict/words to /usr/share/dict/words in default kdc.conf (#20000)

* Thu Oct  5 2000 Nalin Dahyabhai <nalin at redhat.com>
- apply kpasswd bug fixes from David Wragg

* Wed Oct  4 2000 Nalin Dahyabhai <nalin at redhat.com>
- make krb5-libs obsolete the old krb5-configs package (#18351)
- don't quit from the kpropd init script if there's no principal database so
  that you can propagate the first time without running kpropd manually
- don't complain if /etc/ld.so.conf doesn't exist in the -libs %%post

* Tue Sep 12 2000 Nalin Dahyabhai <nalin at redhat.com>
- fix credential forwarding problem in klogind (goof in KRB5CCNAME handling)
  (#11588)
- fix heap corruption bug in FTP client (#14301)

* Wed Aug 16 2000 Nalin Dahyabhai <nalin at redhat.com>
- fix summaries and descriptions
- switched the default transfer protocol from PORT to PASV as proposed on
  bugzilla (#16134), and to match the regular ftp package's behavior

* Wed Jul 19 2000 Jeff Johnson <jbj at redhat.com>
- rebuild to compress man pages.

* Sat Jul 15 2000 Bill Nottingham <notting at redhat.com>
- move initscript back

* Fri Jul 14 2000 Nalin Dahyabhai <nalin at redhat.com>
- disable servers by default to keep linuxconf from thinking they need to be
  started when they don't

* Thu Jul 13 2000 Prospector <bugzilla at redhat.com>
- automatic rebuild

* Mon Jul 10 2000 Nalin Dahyabhai <nalin at redhat.com>
- change cleanup code in post to not tickle chkconfig
- add grep as a Prereq: for -libs

* Thu Jul  6 2000 Nalin Dahyabhai <nalin at redhat.com>
- move condrestarts to postun
- make xinetd configs noreplace
- add descriptions to xinetd configs
- add /etc/init.d as a prereq for the -server package
- patch to properly truncate $TERM in krlogind

* Fri Jun 30 2000 Nalin Dahyabhai <nalin at redhat.com>
- update to 1.2.1
- back out Tom Yu's patch, which is a big chunk of the 1.2 -> 1.2.1 update
- start using the official source tarball instead of its contents

* Thu Jun 29 2000 Nalin Dahyabhai <nalin at redhat.com>
- Tom Yu's patch to fix compatibility between 1.2 kadmin and 1.1.1 kadmind
- pull out 6.2 options in the spec file (sonames changing in 1.2 means it's not
  compatible with other stuff in 6.2, so no need)

* Wed Jun 28 2000 Nalin Dahyabhai <nalin at redhat.com>
- tweak graceful start/stop logic in post and preun

* Mon Jun 26 2000 Nalin Dahyabhai <nalin at redhat.com>
- update to the 1.2 release
- ditch a lot of our patches which went upstream
- enable use of DNS to look up things at build-time
- disable use of DNS to look up things at run-time in default krb5.conf
- change ownership of the convert-config-files script to root.root
- compress PS docs
- fix some typos in the kinit man page
- run condrestart in server post, and shut down in preun

* Mon Jun 19 2000 Nalin Dahyabhai <nalin at redhat.com>
- only remove old krb5server init script links if the init script is there

* Sat Jun 17 2000 Nalin Dahyabhai <nalin at redhat.com>
- disable kshell and eklogin by default

* Thu Jun 15 2000 Nalin Dahyabhai <nalin at redhat.com>
- patch mkdir/rmdir problem in ftpcmd.y
- add condrestart option to init script
- split the server init script into three pieces and add one for kpropd

* Wed Jun 14 2000 Nalin Dahyabhai <nalin at redhat.com>
- make sure workstation servers are all disabled by default
- clean up krb5server init script

* Fri Jun  9 2000 Nalin Dahyabhai <nalin at redhat.com>
- apply second set of buffer overflow fixes from Tom Yu
- fix from Dirk Husung for a bug in buffer cleanups in the test suite
- work around possibly broken rev binary in running test suite
- move default realm configs from /var/kerberos to %%{_var}/kerberos

* Tue Jun  6 2000 Nalin Dahyabhai <nalin at redhat.com>
- make ksu and v4rcp owned by root

* Sat Jun  3 2000 Nalin Dahyabhai <nalin at redhat.com>
- use %%{_infodir} to better comply with FHS
- move .so files to -devel subpackage
- tweak xinetd config files (bugs #11833, #11835, #11836, #11840)
- fix package descriptions again

* Wed May 24 2000 Nalin Dahyabhai <nalin at redhat.com>
- change a LINE_MAX to 1024, fix from Ken Raeburn
- add fix for login vulnerability in case anyone rebuilds without krb4 compat
- add tweaks for byte-swapping macros in krb.h, also from Ken
- add xinetd config files
- make rsh and rlogin quieter
- build with debug to fix credential forwarding
- add rsh as a build-time req because the configure scripts look for it to
  determine paths

* Wed May 17 2000 Nalin Dahyabhai <nalin at redhat.com>
- fix config_subpackage logic

* Tue May 16 2000 Nalin Dahyabhai <nalin at redhat.com>
- remove setuid bit on v4rcp and ksu in case the checks previously added
  don't close all of the problems in ksu
- apply patches from Jeffrey Schiller to fix overruns Chris Evans found
- reintroduce configs subpackage for use in the errata
- add PreReq: sh-utils

* Mon May 15 2000 Nalin Dahyabhai <nalin at redhat.com>
- fix double-free in the kdc (patch merged into MIT tree)
- include convert-config-files script as a documentation file

* Wed May 03 2000 Nalin Dahyabhai <nalin at redhat.com>
- patch ksu man page because the -C option never works
- add access() checks and disable debug mode in ksu
- modify default ksu build arguments to specify more directories in CMD_PATH
  and to use getusershell()

* Wed May 03 2000 Bill Nottingham <notting at redhat.com>
- fix configure stuff for ia64

* Mon Apr 10 2000 Nalin Dahyabhai <nalin at redhat.com>
- add LDCOMBINE=-lc to configure invocation to use libc versioning (bug #10653)
- change Requires: for/in subpackages to include %%{version}

* Wed Apr 05 2000 Nalin Dahyabhai <nalin at redhat.com>
- add man pages for kerberos(1), kvno(1), .k5login(5)
- add kvno to -workstation

* Mon Apr 03 2000 Nalin Dahyabhai <nalin at redhat.com>
- Merge krb5-configs back into krb5-libs.  The krb5.conf file is marked as
  a %%config file anyway.
- Make krb5.conf a noreplace config file.

* Thu Mar 30 2000 Nalin Dahyabhai <nalin at redhat.com>
- Make klogind pass a clean environment to children, like NetKit's rlogind does.

* Wed Mar 08 2000 Nalin Dahyabhai <nalin at redhat.com>
- Don't enable the server by default.
- Compress info pages.
- Add defaults for the PAM module to krb5.conf

* Mon Mar 06 2000 Nalin Dahyabhai <nalin at redhat.com>
- Correct copyright: it's exportable now, provided the proper paperwork is
  filed with the government.

* Fri Mar 03 2000 Nalin Dahyabhai <nalin at redhat.com>
- apply Mike Friedman's patch to fix format string problems
- don't strip off argv[0] when invoking regular rsh/rlogin

* Thu Mar 02 2000 Nalin Dahyabhai <nalin at redhat.com>
- run kadmin.local correctly at startup

* Mon Feb 28 2000 Nalin Dahyabhai <nalin at redhat.com>
- pass absolute path to kadm5.keytab if/when extracting keys at startup

* Sat Feb 19 2000 Nalin Dahyabhai <nalin at redhat.com>
- fix info page insertions

* Wed Feb  9 2000 Nalin Dahyabhai <nalin at redhat.com>
- tweak server init script to automatically extract kadm5 keys if
  /var/kerberos/krb5kdc/kadm5.keytab doesn't exist yet
- adjust package descriptions

* Thu Feb  3 2000 Nalin Dahyabhai <nalin at redhat.com>
- fix for potentially gzipped man pages

* Fri Jan 21 2000 Nalin Dahyabhai <nalin at redhat.com>
- fix comments in krb5-configs

* Fri Jan  7 2000 Nalin Dahyabhai <nalin at redhat.com>
- move /usr/kerberos/bin to end of PATH

* Tue Dec 28 1999 Nalin Dahyabhai <nalin at redhat.com>
- install kadmin header files

* Tue Dec 21 1999 Nalin Dahyabhai <nalin at redhat.com>
- patch around TIOCGTLC defined on alpha and remove warnings from libpty.h
- add installation of info docs
- remove krb4 compat patch because it doesn't fix workstation-side servers

* Mon Dec 20 1999 Nalin Dahyabhai <nalin at redhat.com>
- remove hesiod dependency at build-time

* Sun Dec 19 1999 Nalin Dahyabhai <nsdahya1 at eos.ncsu.edu>
- rebuild on 1.1.1

* Thu Oct  7 1999 Nalin Dahyabhai <nsdahya1 at eos.ncsu.edu>
- clean up init script for server, verify that it works [jlkatz]
- clean up rotation script so that rc likes it better
- add clean stanza

* Mon Oct  4 1999 Nalin Dahyabhai <nsdahya1 at eos.ncsu.edu>
- backed out ncurses and makeshlib patches
- update for krb5-1.1
- add KDC rotation to rc.boot, based on ideas from Michael's C version

* Mon Sep 26 1999 Nalin Dahyabhai <nsdahya1 at eos.ncsu.edu>
- added -lncurses to telnet and telnetd makefiles

* Mon Jul  5 1999 Nalin Dahyabhai <nsdahya1 at eos.ncsu.edu>
- added krb5.csh and krb5.sh to /etc/profile.d

* Mon Jun 22 1999 Nalin Dahyabhai <nsdahya1 at eos.ncsu.edu>
- broke out configuration files

* Mon Jun 14 1999 Nalin Dahyabhai <nsdahya1 at eos.ncsu.edu>
- fixed server package so that it works now

* Sat May 15 1999 Nalin Dahyabhai <nsdahya1 at eos.ncsu.edu>
- started changelog (previous package from zedz.net)
- updated existing 1.0.5 RPM from Eos Linux to krb5 1.0.6
- added --force to makeinfo commands to skip errors during build


--- NEW FILE krb5-telnet.xinetd ---
# default: off
# description: The kerberized telnet server accepts normal telnet sessions, \
#              but can also use Kerberos 5 authentication.
service telnet
{
	flags		= REUSE
	socket_type	= stream        
	wait		= no
	user		= root
	server		= /usr/kerberos/sbin/telnetd
	log_on_failure	+= USERID
	disable		= yes
}

krb5-trunk-ftp_mget_case.patch:
 cmds.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- NEW FILE krb5-trunk-ftp_mget_case.patch ---
When "case" is enabled, we've been setting the target filename to the buffer
in which we'd store the lower-cased version of the name, even if we ended up
not generating a lower-cased version of the name, causing the client to store
the incoming data in whichever file whose name we'd last generated. ITS#5940.
diff -up src/appl/gssftp/ftp/cmds.c src/appl/gssftp/ftp/cmds.c
--- src/appl/gssftp/ftp/cmds.c	2008-04-16 10:36:13.000000000 -0400
+++ src/appl/gssftp/ftp/cmds.c	2008-04-16 10:36:16.000000000 -0400
@@ -1013,8 +1013,10 @@ void mget(argc, argv)
 						tp++;
 						tp2++;
 					}
+					tp = tmpbuf;
+				} else {
+					tp = cp;
 				}
-				tp = tmpbuf;
 			}
 			if (ntflag) {
 				tp = dotrans(tp);


--- NEW FILE krb5.csh ---
if ( "${path}" !~ */usr/kerberos/bin* ) then
	set path = ( /usr/kerberos/bin $path )
endif
if ( "${path}" !~ */usr/kerberos/sbin* ) then
	set path = ( /usr/kerberos/sbin $path )
endif


--- NEW FILE krb5.sh ---
if ! echo ${PATH} | /bin/grep -q /usr/kerberos/bin ; then
	PATH=/usr/kerberos/bin:${PATH}
fi
if ! echo ${PATH} | /bin/grep -q /usr/kerberos/sbin ; then
	PATH=/usr/kerberos/sbin:${PATH}
fi


--- NEW FILE krlogin ---
#!/bin/sh
/usr/kerberos/bin/rlogin -x "$@"


--- NEW FILE krsh ---
#!/bin/sh
/usr/kerberos/bin/rsh -x "$@"


--- NEW FILE kshell.pamd ---
#%PAM-1.0
# For root login to succeed here with pam_securetty, "kshell" must be
# listed in /etc/securetty.
auth       required     pam_nologin.so
auth       required     pam_securetty.so
auth       required     pam_env.so
auth       required     pam_rhosts.so
account    include      system-auth
# pam_selinux.so close should be the first session rule
session    required     pam_selinux.so close
session    optional     pam_keyinit.so force revoke
session    include      system-auth
# pam_selinux.so open should only be called for sessions to be executed in the user context
session    required     pam_loginuid.so
session    required     pam_selinux.so open


--- NEW FILE kshell.xinetd ---
# default: off
# description: The kerberized rshell server accepts rshell commands \
#              authenticated and encrypted with Kerberos 5.
service kshell
{
	flags		= REUSE
	socket_type	= stream        
	wait		= no
	user		= root
	server		= /usr/kerberos/sbin/kshd
	server_args	= -e
	disable		= yes
}


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/krb5-appl/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	19 Mar 2010 20:07:02 -0000	1.1
+++ .cvsignore	19 Mar 2010 20:20:37 -0000	1.2
@@ -0,0 +1 @@
+krb5-appl-1.0.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/krb5-appl/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	19 Mar 2010 20:07:02 -0000	1.1
+++ sources	19 Mar 2010 20:20:41 -0000	1.2
@@ -0,0 +1 @@
+4ecf03dad0df7f2ded49f0cfd9786157  krb5-appl-1.0.tar.gz



More information about the scm-commits mailing list