rpms/xorg-x11-server/devel xserver-1.4.99-ssh-isnt-local.patch, 1.1, 1.2

Adam Jackson (ajax) fedora-extras-commits at redhat.com
Mon Dec 10 20:34:35 UTC 2007


Author: ajax

Update of /cvs/pkgs/rpms/xorg-x11-server/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29769

Modified Files:
	xserver-1.4.99-ssh-isnt-local.patch 
Log Message:
avoid unterminated haystack

xserver-1.4.99-ssh-isnt-local.patch:

Index: xserver-1.4.99-ssh-isnt-local.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-server/devel/xserver-1.4.99-ssh-isnt-local.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- xserver-1.4.99-ssh-isnt-local.patch	10 Dec 2007 20:23:39 -0000	1.1
+++ xserver-1.4.99-ssh-isnt-local.patch	10 Dec 2007 20:34:09 -0000	1.2
@@ -11,7 +11,7 @@
 index 5937a03..5376c19 100644
 --- a/Xext/shm.c
 +++ b/Xext/shm.c
-@@ -381,8 +381,20 @@ shm_access(ClientPtr client, SHMPERM_TYPE *perm, int readonly)
+@@ -381,8 +381,21 @@
      mode_t mask;
      int uidset = 0, gidset = 0;
      LocalClientCredRec *lcc;
@@ -23,8 +23,9 @@
 +	    /* ssh isn't actually a local client */
 +	    char exe[64], buf[64];
 +
++	    memset(buf, 0, 64);
 +	    snprintf(exe, 64, "/proc/%d/exe", lcc->pid);
-+	    readlink(exe, buf, 64);
++	    readlink(exe, buf, 63);
 +	    if (strstr(buf, "/ssh"))
 +		is_ssh = TRUE;
 +	}
@@ -32,7 +33,7 @@
  
  	if (lcc->fieldsSet & LCC_UID_SET) {
  	    uid = lcc->euid;
-@@ -401,6 +413,9 @@ shm_access(ClientPtr client, SHMPERM_TYPE *perm, int readonly)
+@@ -401,6 +414,9 @@
  	}
  #endif
  	FreeLocalClientCreds(lcc);




More information about the fedora-extras-commits mailing list