summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-11-16 18:32:32 +0000
committerJeremy Allison <jra@samba.org>2001-11-16 18:32:32 +0000
commite74c51dfeb8c19f01451d2085f2e510bb431fbf0 (patch)
treee59713c70d579e0eb8f44f3d7b0f25894498f34d /source3/lib
parentf6f04b5a44ad37e3ca82c932bb1df64c7254dda5 (diff)
downloadsamba-e74c51dfeb8c19f01451d2085f2e510bb431fbf0.tar.gz
samba-e74c51dfeb8c19f01451d2085f2e510bb431fbf0.tar.bz2
samba-e74c51dfeb8c19f01451d2085f2e510bb431fbf0.zip
I *love* removing code :-). Removed 4 files that weren't being used.
All this stuff was being pulled in due to *one* unneeded call to fetch a domain SID which smbpasswd already puts in the database... Jeremy. (This used to be commit 6bf2505cce7db770fd4db5b19999a78588e96b58)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_list.c111
-rw-r--r--source3/lib/util_seaccess.c2
2 files changed, 1 insertions, 112 deletions
diff --git a/source3/lib/util_list.c b/source3/lib/util_list.c
index 9795932eca..b6c82b7371 100644
--- a/source3/lib/util_list.c
+++ b/source3/lib/util_list.c
@@ -210,114 +210,3 @@ BOOL copy_policy_hnd (POLICY_HND *dest, const POLICY_HND *src)
*dest = *src;
return True;
}
-
-/* -------------------------------------------------------------
- Functions to implement the RpcHandle list
- -------------------------------------------------------------- */
-
-
-
-/***************************************************************
- Return True if the to RPC_HND_NODEs are equivalent in value.
- Return False if they are not. Since a POLICY_HND is really
- a UUID, two RPC_HND_NODES are considered to be the same if the
- POLICY_HND value matches.
-
- No ordering between the two is attempted.
- **************************************************************/
-BOOL compare_rpc_hnd_node(const RPC_HND_NODE *x,
- const RPC_HND_NODE *y)
-{
- /* only compare valid nodes */
- if (x==NULL || y==NULL)
- return False;
-
- /* if the POLICY_HND field(s) are ever changed, this
- will need to be updated. Probably should be a set of
- support function for dealing with POLICY_HND */
- return (memcmp(&x->hnd, &y->hnd, sizeof(POLICY_HND)) == 0);
-}
-
-/***************************************************************
- associate a POLICY_HND with a cli_connection
- **************************************************************/
-BOOL RpcHndList_set_connection(const POLICY_HND *hnd,
- struct cli_connection *con)
-{
-
- RPC_HND_NODE *node = NULL;
-
- /* initialize the list if necessary */
- if (!hnds.initialized)
- generic_list_init(&hnds);
-
- /* allocate a node to insert */
- if ((node=(RPC_HND_NODE*)malloc(sizeof(RPC_HND_NODE))) == NULL)
- {
- DEBUG(0, ("ERROR: Unable to allocate memory for an RPC_HND_NODE!\n"));
- return False;
- }
-
- /* fill in the RPC_HND_NODE */
- copy_policy_hnd (&node->hnd, hnd);
- node->cli = con;
-
- /* insert the node into the list:
- The 3rd parameter is set to 0 since we don't care
- anything about the type field */
- return (generic_list_insert(&hnds, (void*)node, 0));
-}
-
-/************************************************************************
- delete a POLICY_HND (and associated cli_connection) from the list
- ***********************************************************************/
-BOOL RpcHndList_del_connection(const POLICY_HND *hnd)
-{
- RPC_HND_NODE node, *located;
-
- /* return NULL if the list has not been initialized */
- if (!hnds.initialized)
- return False;
-
- /* fill in the RPC_HND_NODE */
- copy_policy_hnd (&node.hnd, hnd);
- node.cli = NULL;
-
- /* search for the POLICY_HND */
- located = (RPC_HND_NODE*)generic_list_remove(&hnds, &node,
- (BOOL(*)(const void*, const void*))compare_rpc_hnd_node);
- if (located == NULL)
- return False;
-
- /* delete the information */
- cli_connection_free(located->cli);
- SAFE_FREE(located);
- return True;
-}
-
-/************************************************************************
- search for a POLICY_HND and return a pointer to the associated
- cli_connection struct in the list
- **********************************************************************/
-struct cli_connection* RpcHndList_get_connection(const POLICY_HND *hnd)
-{
- RPC_HND_NODE node, *located;
-
- /* return NULL if the list has not been initialized */
- if (!hnds.initialized)
- return NULL;
-
- /* fill in the RPC_HND_NODE */
- copy_policy_hnd (&node.hnd, hnd);
- node.cli = NULL;
-
- /* search for the POLICY_HND */
- located = (RPC_HND_NODE*)generic_list_locate(&hnds, &node,
- (BOOL(*)(const void*, const void*))compare_rpc_hnd_node);
- if (located == NULL)
- return NULL;
- else
- return located->cli;
-}
-
-
diff --git a/source3/lib/util_seaccess.c b/source3/lib/util_seaccess.c
index 82fb1e8527..852ded5627 100644
--- a/source3/lib/util_seaccess.c
+++ b/source3/lib/util_seaccess.c
@@ -241,7 +241,7 @@ BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token,
/* The user sid is the first in the token */
- DEBUG(3, ("se_access_check: user sid is %s\n", sid_to_string(sid_str, &token->user_sids[0]) ));
+ DEBUG(3, ("se_access_check: user sid is %s\n", sid_to_string(sid_str, &token->user_sids[PRIMARY_USER_SID_INDEX]) ));
for (i = 1; i < token->num_sids; i++) {
DEBUG(3, ("se_access_check: also %s\n",