[uim-commit] r1658 - trunk/uim
tkng at freedesktop.org
tkng at freedesktop.org
Wed Sep 28 06:26:53 PDT 2005
Author: tkng
Date: 2005-09-28 06:26:47 -0700 (Wed, 28 Sep 2005)
New Revision: 1658
Modified:
trunk/uim/uim-custom.c
trunk/uim/uim-helper.c
trunk/uim/uim-helper.h
Log:
* uim/uim-helper.c, uim/uim-helper.h:
-(uim_helper_is_setugid): New function.
* uim/uim-custom.c:
-(uim_custom_load): Check added for setuid/setgid applications.
-(uim_custom_save): Ditto.
Modified: trunk/uim/uim-custom.c
===================================================================
--- trunk/uim/uim-custom.c 2005-09-28 13:20:28 UTC (rev 1657)
+++ trunk/uim/uim-custom.c 2005-09-28 13:26:47 UTC (rev 1658)
@@ -874,7 +874,11 @@
uim_bool
uim_custom_load(void)
{
- return for_each_primary_groups(uim_custom_load_group);
+ if(uim_helper_is_setugid() ==UIM_FALSE) {
+ return for_each_primary_groups(uim_custom_load_group);
+ } else {
+ return UIM_FALSE;
+ }
}
#ifdef UIM_CUSTOM_EXPERIMENTAL_MTIME_SENSING
@@ -1002,7 +1006,11 @@
uim_bool
uim_custom_save(void)
{
- return for_each_primary_groups(uim_custom_save_group);
+ if(uim_helper_is_setugid() ==UIM_FALSE) {
+ return for_each_primary_groups(uim_custom_save_group);
+ } else {
+ return UIM_FALSE;
+ }
}
/**
Modified: trunk/uim/uim-helper.c
===================================================================
--- trunk/uim/uim-helper.c 2005-09-28 13:20:28 UTC (rev 1657)
+++ trunk/uim/uim-helper.c 2005-09-28 13:26:47 UTC (rev 1658)
@@ -210,6 +210,17 @@
return NULL;
}
+/* Interface function for is_setugid. */
+uim_bool
+uim_helper_is_setugid(void)
+{
+ if(is_setugid() != 0) {
+ return UIM_TRUE;
+ } else {
+ return UIM_FALSE;
+ }
+}
+
int
is_setugid(void)
{
Modified: trunk/uim/uim-helper.h
===================================================================
--- trunk/uim/uim-helper.h 2005-09-28 13:20:28 UTC (rev 1657)
+++ trunk/uim/uim-helper.h 2005-09-28 13:26:47 UTC (rev 1658)
@@ -59,6 +59,9 @@
void uim_helper_buffer_shift(char *buf, int count);
char *uim_helper_buffer_get_message(char *buf);
+uim_bool
+uim_helper_is_setugid(void);
+
#ifdef __cplusplus
}
#endif
More information about the uim-commit
mailing list