dovecot-1.2: Added restrict_get_groups_list() for easily getting...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jun 22 06:32:05 EEST 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/c002187195bd
changeset: 9147:c002187195bd
user: Timo Sirainen <tss at iki.fi>
date: Sun Jun 21 23:30:42 2009 -0400
description:
Added restrict_get_groups_list() for easily getting list of process's groups.
diffstat:
2 files changed, 4 insertions(+), 2 deletions(-)
src/lib/restrict-access.c | 4 ++--
src/lib/restrict-access.h | 2 ++
diffs (31 lines):
diff -r de64bd431b80 -r c002187195bd src/lib/restrict-access.c
--- a/src/lib/restrict-access.c Sun Jun 21 23:09:19 2009 -0400
+++ b/src/lib/restrict-access.c Sun Jun 21 23:30:42 2009 -0400
@@ -131,7 +131,7 @@ static void restrict_init_groups(gid_t p
#endif
}
-static gid_t *get_groups_list(unsigned int *gid_count_r)
+gid_t *restrict_get_groups_list(unsigned int *gid_count_r)
{
gid_t *gid_list;
int ret, gid_count;
@@ -202,7 +202,7 @@ static void fix_groups_list(const char *
t_strsplit_spaces(extra_groups, ", ");
if (preserve_existing) {
- gid_list = get_groups_list(&gid_count);
+ gid_list = restrict_get_groups_list(&gid_count);
drop_restricted_groups(gid_list, &gid_count,
have_root_group);
/* see if the list already contains the primary GID */
diff -r de64bd431b80 -r c002187195bd src/lib/restrict-access.h
--- a/src/lib/restrict-access.h Sun Jun 21 23:09:19 2009 -0400
+++ b/src/lib/restrict-access.h Sun Jun 21 23:30:42 2009 -0400
@@ -26,4 +26,6 @@ void restrict_access_drop_priv_gid(void)
/* Returns TRUE if privileged GID exists for this process. */
bool restrict_access_have_priv_gid(void);
+gid_t *restrict_get_groups_list(unsigned int *gid_count_r);
+
#endif
More information about the dovecot-cvs
mailing list