[uim-commit] r1654 - branches/0.4/uim
tkng at freedesktop.org
tkng at freedesktop.org
Wed Sep 28 05:52:57 PDT 2005
Author: tkng
Date: 2005-09-28 05:52:55 -0700 (Wed, 28 Sep 2005)
New Revision: 1654
Modified:
branches/0.4/uim/uim-custom.c
branches/0.4/uim/uim-helper.c
branches/0.4/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: branches/0.4/uim/uim-custom.c
===================================================================
--- branches/0.4/uim/uim-custom.c 2005-09-28 12:52:16 UTC (rev 1653)
+++ branches/0.4/uim/uim-custom.c 2005-09-28 12:52:55 UTC (rev 1654)
@@ -826,7 +826,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;
+ }
}
static uim_bool
@@ -892,7 +896,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: branches/0.4/uim/uim-helper.c
===================================================================
--- branches/0.4/uim/uim-helper.c 2005-09-28 12:52:16 UTC (rev 1653)
+++ branches/0.4/uim/uim-helper.c 2005-09-28 12:52:55 UTC (rev 1654)
@@ -209,6 +209,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: branches/0.4/uim/uim-helper.h
===================================================================
--- branches/0.4/uim/uim-helper.h 2005-09-28 12:52:16 UTC (rev 1653)
+++ branches/0.4/uim/uim-helper.h 2005-09-28 12:52:55 UTC (rev 1654)
@@ -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