Mercurial > dovecot > original-hg > dovecot-1.2
changeset 9147:c002187195bd HEAD
Added restrict_get_groups_list() for easily getting list of process's groups.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 21 Jun 2009 23:30:42 -0400 |
parents | de64bd431b80 |
children | a32a8ea97b25 |
files | src/lib/restrict-access.c src/lib/restrict-access.h |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ #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 @@ 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 */
--- 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 @@ /* 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