[58013] trunk/dports/x11/kinput2

takanori at macports.org takanori at macports.org
Sun Sep 20 11:36:48 PDT 2009


Revision: 58013
          http://trac.macports.org/changeset/58013
Author:   takanori at macports.org
Date:     2009-09-20 11:36:44 -0700 (Sun, 20 Sep 2009)
Log Message:
-----------
kinput2:
* Security enhancement: Make kinput2 create its UNIX domain socket directory with sticky bit.

Modified Paths:
--------------
    trunk/dports/x11/kinput2/Portfile

Added Paths:
-----------
    trunk/dports/x11/kinput2/files/patch-lib_IMProto.c.diff

Modified: trunk/dports/x11/kinput2/Portfile
===================================================================
--- trunk/dports/x11/kinput2/Portfile	2009-09-20 18:22:59 UTC (rev 58012)
+++ trunk/dports/x11/kinput2/Portfile	2009-09-20 18:36:44 UTC (rev 58013)
@@ -4,7 +4,7 @@
 
 name            kinput2
 version         3.1
-revision        4
+revision        5
 categories      x11 japanese
 maintainers     takanori openmaintainer
 description     Input server of Japanese text
@@ -16,7 +16,8 @@
                 ftp://ftp.sra.co.jp/pub/x11/kinput2/
 distname        ${name}-v${version}
 patchfiles      patch-cmd_Kinput2.ad.diff \
-                patch-lib_Canna.c.diff
+                patch-lib_Canna.c.diff \
+                patch-lib_IMProto.c.diff
 checksums       md5 2de20576f150248d1fdfe66d7cc4e510 \
                 sha1 48050f70e7c0cc67193ea260f8d7f6e822a02ca3 \
                 rmd160 c56684769859bbee5f8238cd1af061796ff931e8

Added: trunk/dports/x11/kinput2/files/patch-lib_IMProto.c.diff
===================================================================
--- trunk/dports/x11/kinput2/files/patch-lib_IMProto.c.diff	                        (rev 0)
+++ trunk/dports/x11/kinput2/files/patch-lib_IMProto.c.diff	2009-09-20 18:36:44 UTC (rev 58013)
@@ -0,0 +1,25 @@
+--- lib/IMProto.c.orig	2002-10-03 18:35:28.000000000 +0900
++++ lib/IMProto.c	2009-09-21 03:20:53.000000000 +0900
+@@ -281,7 +281,7 @@
+ 	 * The unix domain socket pathname has the following form:
+ 	 *   <UNIX_SOCKET_DIR>/<Display Name>-<Language>
+ 	 */
+-	(void)mkdir(UNIX_SOCKET_DIR, 0777);
++	(void)mkdir(UNIX_SOCKET_DIR, 01777);
+ #ifdef S_IFLNK
+ 	{
+ 	    /*
+@@ -292,11 +292,11 @@
+ 	    struct stat st;
+ 	    if (lstat(UNIX_SOCKET_DIR, &st) == 0 &&
+ 		(st.st_mode & S_IFMT) == S_IFDIR) {
+-		(void)chmod(UNIX_SOCKET_DIR, 0777);
++		(void)chmod(UNIX_SOCKET_DIR, 01777);
+ 	    }
+ 	}
+ #else
+-	(void)chmod(UNIX_SOCKET_DIR, 0777);
++	(void)chmod(UNIX_SOCKET_DIR, 01777);
+ #endif
+ 	(void)sprintf(path, "%s/%s", UNIX_SOCKET_DIR,
+ 		      DisplayString(XtDisplay(new)));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090920/42c27c8d/attachment.html>


More information about the macports-changes mailing list