summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/token_util.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c
index d68f44cbf1..57db0d193f 100644
--- a/source3/auth/token_util.c
+++ b/source3/auth/token_util.c
@@ -28,47 +28,6 @@
#include "includes.h"
/****************************************************************************
- Duplicate a SID token.
-****************************************************************************/
-
-NT_USER_TOKEN *dup_nt_token(TALLOC_CTX *mem_ctx, const NT_USER_TOKEN *ptoken)
-{
- NT_USER_TOKEN *token;
-
- if (!ptoken)
- return NULL;
-
- token = TALLOC_P(mem_ctx, NT_USER_TOKEN);
- if (token == NULL) {
- DEBUG(0, ("talloc failed\n"));
- return NULL;
- }
-
- ZERO_STRUCTP(token);
-
- if (ptoken->user_sids && ptoken->num_sids) {
- token->user_sids = (DOM_SID *)talloc_memdup(
- token, ptoken->user_sids, sizeof(DOM_SID) * ptoken->num_sids );
-
- if (token->user_sids == NULL) {
- DEBUG(0, ("talloc_memdup failed\n"));
- TALLOC_FREE(token);
- return NULL;
- }
- token->num_sids = ptoken->num_sids;
- }
-
- /* copy the privileges; don't consider failure to be critical here */
-
- if ( !se_priv_copy( &token->privileges, &ptoken->privileges ) ) {
- DEBUG(0,("dup_nt_token: Failure to copy SE_PRIV!. "
- "Continuing with 0 privileges assigned.\n"));
- }
-
- return token;
-}
-
-/****************************************************************************
Check for a SID in an NT_USER_TOKEN
****************************************************************************/