[uim-commit] r2636 - trunk/uim

ekato at freedesktop.org ekato at freedesktop.org
Sat Dec 17 07:39:43 PST 2005


Author: ekato
Date: 2005-12-17 07:39:39 -0800 (Sat, 17 Dec 2005)
New Revision: 2636

Modified:
   trunk/uim/skk.c
Log:
* uim/skk.c (is_setugid) : New.
(skk_dic_open) : Check setugid here.
(look_popen) : Don't call uim_helper_is_setugid() each time.


Modified: trunk/uim/skk.c
===================================================================
--- trunk/uim/skk.c	2005-12-17 14:25:30 UTC (rev 2635)
+++ trunk/uim/skk.c	2005-12-17 15:39:39 UTC (rev 2636)
@@ -182,6 +182,8 @@
 static void close_skkserv(void);
 static void skkserv_disconnected(struct dic_info *di);
 
+static uim_bool is_setugid;
+
 static int
 calc_line_len(const char *s)
 {
@@ -410,6 +412,7 @@
   return p;
 }
 
+/* init */
 static uim_lisp
 skk_dic_open(uim_lisp fn_, uim_lisp use_skkserv_, uim_lisp skkserv_portnum_)
 {
@@ -417,6 +420,7 @@
   uim_bool use_skkserv = uim_scm_c_bool(use_skkserv_);
   int skkserv_portnum = uim_scm_c_int(skkserv_portnum_);
   
+  is_setugid = uim_helper_is_setugid();
   signal(SIGPIPE, SIG_IGN);
 
   if (!skk_dic) {
@@ -3347,7 +3351,7 @@
   FILE *fp;
   int len;
   
-  if (uim_helper_is_setugid()) 
+  if (is_setugid) 
     look = "/usr/bin/" LOOK_COMMAND;
   else
     look = LOOK_COMMAND;



More information about the uim-commit mailing list