[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freewnn:00676] uum patch for 1.1.1-a018



 こんにちは、いいじま@(今は)つくばです。

 server,libraryの分割、shared library化などで、以前の
patchの一部が rejectされたり、作成に失敗するようになって
いました。その部分を修正して、juum-a018.patch として
添付いたします。

 また、IPv6 patchと競合しないように、
  Xsi/Wnn/jlib/js.c
の Security修正は、この patchには含まれていません。
 単独で uum patchを適用する場合は、[freewnn:00415],[freewnn:00639],
[freewnn:00667]などを参考に修正を行なって下さい。

 そして、Xsi/Wnn/etc/msg.c 内の getlang()の glibc 2.1.x,2.2.x用
の修正も、今後ほかのものと競合しないように別にしました。この
修正がないと、setlocale()の返り値が常に "C"になるようです。
 getlang_linux.patch として、添付いたします。

-- 
 飯島賢吾 // E-mail kiij@mx1.freemail.ne.jp
diff -Nurd FreeWnn-1.1.1-a018.orig/Xsi/Wnn/Makefile.in FreeWnn-1.1.1-a018/Xsi/Wnn/Makefile.in
--- FreeWnn-1.1.1-a018.orig/Xsi/Wnn/Makefile.in	Thu Jul 26 01:53:17 2001
+++ FreeWnn-1.1.1-a018/Xsi/Wnn/Makefile.in	Mon Jul 30 13:19:33 2001
@@ -53,7 +53,9 @@
 
 JLIBV3DIR = jlib.V3
 
-LIB_SUBDIRS =  $(JDDIR) $(JLIBDIR) $(WNNCLIENTSDIR) $(WNNMANDIR) $(WNNENVDIR) $(JLIBV3DIR)
+UUMDIR = uum
+
+LIB_SUBDIRS =  $(JDDIR) $(JLIBDIR) $(WNNCLIENTSDIR) $(WNNMANDIR) $(WNNENVDIR) $(JLIBV3DIR) $(UUMDIR)
 
 SERVER_SUBDIRS = $(JSERVERDIR) $(WNNJUTILDIR) $(PUBDICPLUSDIR) $(WNNCONSDIR) $(WNNMANDIR)
 
diff -Nurd FreeWnn-1.1.1-a018.orig/Xsi/Wnn/uum/Makefile.in FreeWnn-1.1.1-a018/Xsi/Wnn/uum/Makefile.in
--- FreeWnn-1.1.1-a018.orig/Xsi/Wnn/uum/Makefile.in	Thu Jul 26 01:53:18 2001
+++ FreeWnn-1.1.1-a018/Xsi/Wnn/uum/Makefile.in	Mon Jul 30 13:19:33 2001
@@ -37,7 +37,7 @@
        INCLUDES = -I$(WNNINCLUDESRC) -I$(WNNROMKANSRC) -I$(TOP)
         DEFINES = $(SIGNAL_DEFINES) $(WNNDEFINES) $(WNNLANGDEF)
 LOCAL_INSTFLAGS = $(INSTUIDFLAGS) -o $(UUMOWNER)
-LOCAL_LIBRARIES = $(WNNJLIB) $(WNNCONVLIB)
+LOCAL_LIBRARIES = $(WNNJLIB) $(WNNCONVLIB) @LIBS@
 
 SRC1= epilogue.c header.c kensaku.c kuten.c jis_in.c       prologue.c touroku.c jikouho.c jutil.c w_string.c       printf.c termio.c hinsi.c termcap.c       ttyfdslot.c setutmp.c redraw.c history.c key_bind.c       screen.c basic_op.c uif.c cursor.c jhlp.c       select_ele.c inspect.c wnnrc_op.c functions.c
 
@@ -60,7 +60,7 @@
 
 uum: $(OBJS) $(LOCAL_LIBRARIES)
 	$(RM) $@
-	$(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBRARIES) $(WNNTERM_LIB)
+	$(LIBTOOL) $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBRARIES) $(WNNTERM_LIB)
 
 clean::
 	$(RM) uum
@@ -70,7 +70,7 @@
 install:: uum
 	@if [ -d $(DESTDIR)$(JWNNBINDIR) ]; then set +x; \
 	else (set -x; $(MKDIRHIER) $(DESTDIR)$(JWNNBINDIR)); fi
-	$(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS) $(LOCAL_INSTFLAGS) uum $(DESTDIR)$(JWNNBINDIR)/uum
+	$(LIBTOOL) $(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS) $(LOCAL_INSTFLAGS) uum $(DESTDIR)$(JWNNBINDIR)/uum
 
 $(OBJ2) : $(SRC2)
 	$(CC) -c $(CFLAGS)  $(WNNETCSRC)/`basename $@ .o`.c
diff -Nurd FreeWnn-1.1.1-a018.orig/Xsi/Wnn/uum/jhlp.c FreeWnn-1.1.1-a018/Xsi/Wnn/uum/jhlp.c
--- FreeWnn-1.1.1-a018.orig/Xsi/Wnn/uum/jhlp.c	Thu Jul 26 01:53:18 2001
+++ FreeWnn-1.1.1-a018/Xsi/Wnn/uum/jhlp.c	Mon Jul 30 13:19:33 2001
@@ -156,7 +156,8 @@
   strcpy (username, getpwuid (getuid ())->pw_name);
   if ((name = getenv (WNN_USERNAME_ENV)) != NULL)
     {
-      strcpy (username, name);
+      strncpy(username, name, PATHNAMELEN-1);
+      username[PATHNAMELEN-1] = '\0';
     }
   for (i = 1; i < argc;)
     {
@@ -164,7 +165,8 @@
         {
           if (i >= argc || argv[i][0] == '-')
             default_usage ();
-          strcpy (lang_dir, argv[i++]);
+          strncpy(lang_dir, argv[i++], 31);
+          lang_dir[31] = '\0';
           for (; i < argc; i++)
             {
               argv[i - 2] = argv[i];
@@ -181,8 +183,8 @@
         {
           if (strlen (p) >= 4)
             {
-              strncpy (lang_dir, p, 5);
-              lang_dir[5] = '\0';
+              strncpy (lang_dir, p, 31);
+              lang_dir[31] = '\0';
             }
           else
             {
@@ -238,8 +240,9 @@
         }
       if (name = getenv (server_env))
         {
-          strcpy (def_servername, name);
-          strcpy (def_reverse_servername, name);
+          strncpy(def_servername, name, PATHNAMELEN-1);
+          def_servername[PATHNAMELEN-1] = '\0';
+          strcpy(def_reverse_servername, def_servername);
         }
     }
 
@@ -540,7 +543,8 @@
 static int
 do_k_opt ()
 {
-  strcpy (uumkey_name_in_uumrc, optarg);
+  strncpy(uumkey_name_in_uumrc, optarg, PATHNAMELEN-1);
+  uumkey_name_in_uumrc[PATHNAMELEN-1] = '\0';
   if (*uumkey_name_in_uumrc == '\0')
     {
       return -1;
@@ -552,7 +556,8 @@
 static int
 do_c_opt ()
 {
-  strcpy (convkey_name_in_uumrc, optarg);
+  strncpy(convkey_name_in_uumrc, optarg, PATHNAMELEN-1);
+  convkey_name_in_uumrc[PATHNAMELEN-1] = '\0';
   if (*convkey_name_in_uumrc == '\0')
     {
       return -1;
@@ -564,7 +569,8 @@
 static int
 do_r_opt ()
 {
-  strcpy (rkfile_name_in_uumrc, optarg);
+  strncpy(rkfile_name_in_uumrc, optarg, PATHNAMELEN-1);
+  rkfile_name_in_uumrc[PATHNAMELEN-1] = '\0';
   if (*rkfile_name_in_uumrc == '\0')
     {
       return -1;
@@ -583,8 +589,9 @@
 static int
 do_D_opt ()
 {
-  strcpy (def_servername, optarg);
-  strcpy (def_reverse_servername, optarg);
+  strncpy(def_servername, optarg, PATHNAMELEN-1);
+  def_servername[PATHNAMELEN-1] = '\0';
+  strcpy(def_reverse_servername, def_servername);
   if (*def_servername == '\0')
     {
       return -1;
@@ -595,7 +602,8 @@
 static int
 do_n_opt ()
 {
-  strcpy (username, optarg);
+  strncpy(username, optarg, PATHNAMELEN-1);
+  username[PATHNAMELEN-1] = '\0';
   if (*username == '\0')
     {
       return -1;
@@ -639,7 +647,10 @@
 #ifdef  SYSVR2
 #define index   strchr
 #endif /* SYSVR2 */
+
+#if !defined(linux)
   extern char *index ();
+#endif
 
   strcpy (ostr, default_getoptstr);
   strcat (ostr, lang_db->getoptstr);
diff -Nurd FreeWnn-1.1.1-a018.orig/Xsi/Wnn/uum/wnnrc_op.c FreeWnn-1.1.1-a018/Xsi/Wnn/uum/wnnrc_op.c
--- FreeWnn-1.1.1-a018.orig/Xsi/Wnn/uum/wnnrc_op.c	Thu Feb 24 00:31:45 2000
+++ FreeWnn-1.1.1-a018/Xsi/Wnn/uum/wnnrc_op.c	Mon Jul 30 13:19:33 2001
@@ -132,7 +132,7 @@
   int noerr, expandsuc;
   struct passwd *u;
   extern struct passwd *getpwnam ();
-#if defined(SYSVR2) && !defined(AIXV3)
+#if defined(SYSVR2) && !defined(AIXV3) && !defined(linux)
   extern char *strchr ();
 #endif /* defined(SYSVR2) && !defined(AIXV3) */
 
diff -Nurd FreeWnn-1.1.1-a018.orig/Xsi/Wnn/etc/msg.c FreeWnn-1.1.1-a018/Xsi/Wnn/etc/msg.c
--- FreeWnn-1.1.1-a018.orig/Xsi/Wnn/etc/msg.c	Thu Jul 26 01:53:17 2001
+++ FreeWnn-1.1.1-a018/Xsi/Wnn/etc/msg.c	Mon Jul 30 13:21:19 2001
@@ -124,7 +124,11 @@
   if (lang == NULL || *lang == '\0')
     {
 #ifdef  HAS_SETLOCALE
+#ifdef define(linux)
+      lang = setlocale (LC_ALL, "");
+#else
       lang = setlocale (LC_ALL, NULL);
+#endif
       if (lang == NULL || *lang == '\0')
 #endif
         {


http://www.freewnn.org/ FreeWnn Project