dovecot-2.0: Added restrict_get_groups_list() for easily getting...

dovecot at dovecot.org dovecot at dovecot.org
Mon Jun 22 06:32:04 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/5074914f2dba
changeset: 9500:5074914f2dba
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Jun 21 23:31:10 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 3aeab83e661a -r 5074914f2dba src/lib/restrict-access.c
--- a/src/lib/restrict-access.c	Sun Jun 21 23:09:33 2009 -0400
+++ b/src/lib/restrict-access.c	Sun Jun 21 23:31:10 2009 -0400
@@ -109,7 +109,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;
@@ -175,7 +175,7 @@ static void fix_groups_list(const struct
 		t_strsplit_spaces(set->extra_groups, ", ");
 
 	if (preserve_existing) {
-		gid_list = get_groups_list(&gid_count);
+		gid_list = restrict_get_groups_list(&gid_count);
 		drop_restricted_groups(set, gid_list, &gid_count,
 				       have_root_group);
 		/* see if the list already contains the primary GID */
diff -r 3aeab83e661a -r 5074914f2dba src/lib/restrict-access.h
--- a/src/lib/restrict-access.h	Sun Jun 21 23:09:33 2009 -0400
+++ b/src/lib/restrict-access.h	Sun Jun 21 23:31:10 2009 -0400
@@ -52,4 +52,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