summaryrefslogtreecommitdiffstats
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-02-12 14:47:26 +0000
committerMichael Adam <obnox@samba.org>2014-02-12 21:47:51 +0100
commit69594dfb8cfa35612ff9ce96f9669d7ed94ad578 (patch)
tree473fe577289fe7cef1a0360c167f2d8e07feec00 /source3/lib
parentf0a385f35f9528b8f1f0c829065562b2d90b9850 (diff)
downloadsamba-69594dfb8cfa35612ff9ce96f9669d7ed94ad578.tar.gz
samba-69594dfb8cfa35612ff9ce96f9669d7ed94ad578.tar.xz
samba-69594dfb8cfa35612ff9ce96f9669d7ed94ad578.zip
auth: Make new_server_id_task() static to auth_samba4
This is not used in other parts of source3, so this patch improves modularity and isolation of features. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index cddb53c3cb9..374bc5d5c92 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1948,48 +1948,6 @@ struct server_id procid_self(void)
return pid_to_procid(getpid());
}
-static struct idr_context *task_id_tree;
-
-static int free_task_id(struct server_id *server_id)
-{
- idr_remove(task_id_tree, server_id->task_id);
- return 0;
-}
-
-/* Return a server_id with a unique task_id element. Free the
- * returned pointer to de-allocate the task_id via a talloc destructor
- * (ie, use talloc_free()) */
-struct server_id *new_server_id_task(TALLOC_CTX *mem_ctx)
-{
- struct server_id *server_id;
- int task_id;
- if (!task_id_tree) {
- task_id_tree = idr_init(NULL);
- if (!task_id_tree) {
- return NULL;
- }
- }
-
- server_id = talloc(mem_ctx, struct server_id);
-
- if (!server_id) {
- return NULL;
- }
- *server_id = procid_self();
-
- /* 0 is the default server_id, so we need to start with 1 */
- task_id = idr_get_new_above(task_id_tree, server_id, 1, INT32_MAX);
-
- if (task_id == -1) {
- talloc_free(server_id);
- return NULL;
- }
-
- talloc_set_destructor(server_id, free_task_id);
- server_id->task_id = task_id;
- return server_id;
-}
-
bool procid_is_me(const struct server_id *pid)
{
if (pid->pid != getpid())