Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 0eec05715da3ca8ae3817a0833b18fa6 > files > 65

nfs-utils-1.0.9-50.el5.src.rpm

diff -up nfs-utils-1.0.9/utils/gssd/context_mit.c.orig nfs-utils-1.0.9/utils/gssd/context_mit.c
--- nfs-utils-1.0.9/utils/gssd/context_mit.c.orig	2006-07-07 20:04:32.000000000 -0400
+++ nfs-utils-1.0.9/utils/gssd/context_mit.c	2008-07-11 11:52:48.000000000 -0400
@@ -183,7 +183,7 @@ prepare_krb5_rfc1964_buffer(gss_krb5_luc
 	if (WRITE_BYTES(&p, end, lctx->endtime)) goto out_err;
 	word_send_seq = lctx->send_seq;	/* XXX send_seq is 64-bit */
 	if (WRITE_BYTES(&p, end, word_send_seq)) goto out_err;
-	if (write_buffer(&p, end, (gss_buffer_desc*)&krb5oid)) goto out_err;
+	if (write_oid(&p, end, &krb5oid)) goto out_err;
 
 	printerr(2, "prepare_krb5_rfc1964_buffer: serializing keys with "
 		 "enctype %d and length %d\n",
diff -up nfs-utils-1.0.9/utils/gssd/gssd_proc.c.orig nfs-utils-1.0.9/utils/gssd/gssd_proc.c
--- nfs-utils-1.0.9/utils/gssd/gssd_proc.c.orig	2008-07-11 10:53:48.000000000 -0400
+++ nfs-utils-1.0.9/utils/gssd/gssd_proc.c	2008-07-11 11:52:48.000000000 -0400
@@ -47,6 +47,7 @@
 #include <sys/stat.h>
 #include <sys/socket.h>
 #include <arpa/inet.h>
+#include <sys/fsuid.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff -up nfs-utils-1.0.9/utils/gssd/krb5_util.c.orig nfs-utils-1.0.9/utils/gssd/krb5_util.c
--- nfs-utils-1.0.9/utils/gssd/krb5_util.c.orig	2008-07-11 10:53:48.000000000 -0400
+++ nfs-utils-1.0.9/utils/gssd/krb5_util.c	2008-07-11 11:52:48.000000000 -0400
@@ -178,6 +178,7 @@ gssd_find_existing_krb5_ccache(uid_t uid
 	struct dirent *best_match_dir = NULL;
 	struct stat best_match_stat, tmp_stat;
 
+	memset(&best_match_stat, 0, sizeof(best_match_stat));
 	*d = NULL;
 	n = scandir(ccachedir, &namelist, select_krb5_ccache, 0);
 	if (n < 0) {
diff -up nfs-utils-1.0.9/utils/gssd/write_bytes.h.orig nfs-utils-1.0.9/utils/gssd/write_bytes.h
--- nfs-utils-1.0.9/utils/gssd/write_bytes.h.orig	2006-07-07 20:04:32.000000000 -0400
+++ nfs-utils-1.0.9/utils/gssd/write_bytes.h	2008-07-11 11:52:32.000000000 -0400
@@ -63,6 +63,19 @@ write_buffer(char **p, char *end, gss_bu
 	return 0;
 }
 
+inline static int
+write_oid(char **p, char *end, gss_OID_desc *arg)
+{
+	int len = (int)arg->length;		/* make an int out of size_t */
+	if (WRITE_BYTES(p, end, len))
+		return -1;
+	if (*p + arg->length > end)
+		return -1;
+	memcpy(*p, arg->elements, len);
+	*p += len;
+	return 0;
+}
+
 static inline int
 get_bytes(char **ptr, const char *end, void *res, int len)
 {