summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-05-28 16:08:04 +0200
committerGünther Deschner <gd@samba.org>2009-05-29 13:49:58 +0200
commitbff54b90c353920ba058cc53a6cc0464f0939424 (patch)
treec23115864d639816bb09b0a32c890c9ada77cfe9 /source3/lib
parent12496ea5aba3a53691ca74f12192f489d7831592 (diff)
downloadsamba-bff54b90c353920ba058cc53a6cc0464f0939424.tar.gz
samba-bff54b90c353920ba058cc53a6cc0464f0939424.tar.bz2
samba-bff54b90c353920ba058cc53a6cc0464f0939424.zip
util: move add_gid_to_array_unique to toplevel and add add_uid_to_array_unique.
Guenther
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 8e67edeae6..b85f29e136 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -495,39 +495,6 @@ void set_cmdline_auth_info_getpass(struct user_auth_info *auth_info)
TALLOC_FREE(frame);
}
-/****************************************************************************
- Add a gid to an array of gids if it's not already there.
-****************************************************************************/
-
-bool add_gid_to_array_unique(TALLOC_CTX *mem_ctx, gid_t gid,
- gid_t **gids, size_t *num_gids)
-{
- int i;
-
- if ((*num_gids != 0) && (*gids == NULL)) {
- /*
- * A former call to this routine has failed to allocate memory
- */
- return False;
- }
-
- for (i=0; i<*num_gids; i++) {
- if ((*gids)[i] == gid) {
- return True;
- }
- }
-
- *gids = TALLOC_REALLOC_ARRAY(mem_ctx, *gids, gid_t, *num_gids+1);
- if (*gids == NULL) {
- *num_gids = 0;
- return False;
- }
-
- (*gids)[*num_gids] = gid;
- *num_gids += 1;
- return True;
-}
-
/*******************************************************************
Check if a file exists - call vfs_file_exist for samba files.
********************************************************************/